Entries Tagged 'Web Development' ↓
February 26th, 2008 — Web Development, Wordpress, Wordpress Functions
You can see it work throughout this wordpress blog, to the right you see DCE Article 94. Notice you can select the number as text. The number is pulled from the post on every single page by placing this line of code in your wordpress single.php template page.
<?php the_ID(); ?>
Note: When using this line of code be sure it is between these two lines of code in your single.php page
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php endwhile; else: ?>
I place the code in its own div with a background image to create the illusion of unity. I use margins to move the number to the right spot of the image. My CSS and Code looks like this.
<style>
#page_number_id_spawn { float:left; text-align:right; margin-top:240px; width:135px; color:#900; font-size:30px; font-family:Georgia, 'Times New Roman', Times, serif;}</style>
<div id="page_number_id_spawn"><?php the_ID(); ?></div>
February 23rd, 2008 — Web Development
Please note, the site will look funky between Saturday Feb 23rd 6pm Eastern - Sunday Feb 24th 6pm. During this time we will keep the content legible, but the navigation system maybe be shaky. Please comment to help out!
Changes are going to revolve around overall legibility and typography, smarter advertisements, more contrasting color scheme, usability, 1024 screen design, and a big SEO package.
With the last DCE 0.9 design we averaged 900-1000 hits on a 30 days rotation. In the next 30 Days I will post the numbers back on this Page.
February 8th, 2008 — JavaScript, MySQL, PHP, Web Development
Wrote this function to check email addresses already in a database, so I dont have to change pages, and check with javascript. Problem: it exposes your whole email list to the public in the source code, and the source code can become a monster length. So it isnt practical, but it works. (I'm not using it to check emails)
The script proves useful to do other things with javascript and spawn arrays to manipulate data... etc.
function jarray(){
$sql = "SELECT * FROM table_name LIMIT 0, 100000000";
$jarray = "var your_array = new Array();\n\t\t";
$i = 0;
$q = mysql_query($sql);
while($object = mysql_fetch_object($q)){
$jarray = $jarray."your_array[{$i}] = \"{$object->field_name}\";\n\t\t";
$i++;
}
print $jarray."\n";
}
Put your own info where the Text is bold
February 8th, 2008 — JavaScript, Javascipt, Web Development
I've used many before, this is the cleanest without too much code. It features a nice onfocus clear value bonus. When the email is incorrect after click the alert box when the email is invalid, it will clear the mail input field value and bring the cursor directly to the the email input box. The email validation does not check is the email actually works, just is it appears valid, excellent for javascript!
Javascript Email Input Validation Script
January 29th, 2008 — Web Development
Wii Zapper
and Link Shooter is cool, much fun. I'd be very pissed if the white piece of 10 cent plastic that holds the Wii motes cost 25 bucks without a game. Right now there are a select few games that work with the Wii Zapper
.
Compatible games:
By Accident I purchased Resident Evil 4: Wii Version along with the Zapper. Had meant to get umbrella chronicles but I'm screw up. After playing RE4 for 10 minutes with the Wii Zapper I found myself frustrated and kept getting owned by zombies when I wanted to kick them in the face or close combat knifing. Since I've played through the Gamecube RE4 (which I highly recommend to anyone) the Wii version is going on Amazon since it's not made for the Wii Zapper
.
December 17th, 2007 — Web Development, Wordpress Functions
No plugin needed, you can list however many recent posts by title using the wp_get_archives function. Insert this code into your sidebar.php
<ul> <?php wp_get_archives(’type=postbypost&limit=10'); ?> </ul>
The limit can be adjust to any number of posts.
December 16th, 2007 — CSS, JavaScript, Javascipt, Mac, Web Development
The letter-spacing is treated differently on OSX than Windows XP. This can cause problems if you basing a design off text-based CSS. This fix works perfectly if you using a simple dropdown menu that uses absolute positions and auto margins, so its not a child of the initial menu you made, an example can be seen here: www.cmcri.org
A simple javascript code can detect a MAC platform with an IF statement, IF it is MAC then write to document a style. This code must be inserted after your initial call for your style sheet so it overwrites the original CSS code.
if(navigator.userAgent.indexOf('Mac') != -1)
{document.write ('<style type="text/css">#header ul li a{letter-spacing:.025em;}</style>');}
Easy fix!