Spice Up Your Theme—Break Out Of Your Layout’s Lines

Design Tips | How To | February 15th, 2010

Have you ever been frustrated with your site’s inability to break free of the line? By the very nature of HTML, most themes are prone to being reduced to a series of horizontal and vertical lines with no overlap. It’s nice and orderly but boring—nothing ever stands out. Many rely on large images to break the monotony but it’s simple to do it with small PNG images and a bit of CSS using positioning!

Learn how to do this in two minutes following my near-light speed tutorial. (more…)

7 Tips For Form Validation: Striking a Balance

Design Tips | February 10th, 2010

How much is too much?

Digg's registration form screenshot

Digg uses client-side on-the-fly validation to walk visitors through their registration page.

Input validation has long been a highly debated field. No one disputes some sort of validation is appropriate, but the question how much is subject of great debate. And more: server-side only enough, or are modern websites expected to have client-side too? Google “email validation,” or more specifically, “php email validation” and you’ll find hundreds of scripts all of which go about it different ways.

Programmers have spent years of man-hours working on the same sets of problems when it comes to validation. Username, password, email address, name, phone number, and so on. These fields are common in thousands of registration pages. Most have different ways of handling it. I will admit I’ve reinvented the wheel a few times. Perhaps this is because there is no definitive set of functions cross-language cross-platform that we’ve all agreed upon as the way to validate. (more…)

Create local users with random passwords in Window Server

Server Administration | February 8th, 2010

I recently worked on a project where I had to write a script to create local users and add them to groups in Windows Server 2003. It was for VMWare’s vSphere software. It uses local groups and users as users of the center, and allows you to assign privileges with these. Creating these users and assigning them to groups is easy with a simple script:

The follow script does a few things:

  • Creates multiple users with similar names (user1, user2, user3)
  • Generates a password of random numbers, upper and lowercase letters
  • Assigns the users to a group (the group must exist before using the script)
  • Stores the generated usernames and passwords to a text file

(more…)

Hide PHP extension in URL using .htaccess

Server Administration | February 7th, 2010

What?

Hide the .php extension of your PHP files in the URL of your site address.

Instead of:
http://www.example.com/page.php
Visitors to your site will see:
http://www.example.com/page/

Why?

There are actually quite a few reasons to do this.

  • Make your URLs cleaner and easier to remember for visitors
  • Make dynamic pages appear static for SEO
  • Security by obscurity (albeit very weakly so)—visitors cannot tell as easily that you are using PHP
  • For fun (yay!)

(more…)

Definitive HTML Entities Reference List

Reference List | February 6th, 2010

W3Schools has a great reference for HTML entities… my only complaint is their organization. It is spread over multiple pages making it difficult to find what you already know you want. Without further ado, here is the full HTML Entities Reference List, including both the ASCII character-set as well as the rest of ISO-8859-1.
(more…)