Easy Scroll v1.0

April 3, 2008

Lightweight accessible content scroller. Very easy to apply.

Slidng Top Panel

April 1, 2008

Drop Down Panel adds a pull down panel to the top of your page that contains external content fetched via Ajax. Visitors click on the protruding button to reveal/ close it.

WordPress 2.5

March 29, 2008

WordPress 2.5, the culmination of six months of work by the WordPress community, people just like you. The improvements in 2.5 are numerous, and almost entirely a result of your feedback: multi-file uploading, one-click plugin upgrades, built-in galleries, customizable dashboard, salted passwords and cookie encryption, media library, a WYSIWYG that doesn’t mess with your code, concurrent post editing protection, full-screen writing, and search that covers posts and pages. For a short overview of the features with screenshots, it’d be best to visit our sneak peek announcement for RC1. Or check out a 4-minute screencast of the new interface in action. If you just want to jump straight to the good stuff here’s where you can find 2.5 upgrade and download information. If you want to see everything I would grab a cup of coffee or a mojito, because this post is epic.

User Features

Read more

Vector rainbow

March 28, 2008

vector rainbow

Blue background vector rainbow in high quality EPS file.

You can also use it as a desktop background or you can select the awesome shapes from the illustration thanks to the vector format.

(more…)

Read more

The 3 Master Principles of Web Design

February 28, 2008

php-video-tutorial Floating around the universe, are certain universal principles that transcend disciplines. I would like to explore a few of them here, and talk about how they can be applied to web design. The Three Master Principles #1 Simplicity Read more

PHP Video Tutorials for iPods

February 20, 2008

PHP Logo Because of recent demand, I decided to release my PHP video tutorials in iPod format - that means they play on your iPod. :) … OK, you guys guessed that one. Read more

Using setTimeout to Solve DOMContentLoaded

February 15, 2008

Stuart Colville pondered the potential for using setTimeout to solve the DOMContentLoaded problem in browsers that don't support it, namely anything but Opera and Mozilla. His code is deceivingly simple:
function DOMReady(f){
  if (/(?!.*?compatible|.*?webkit)^mozilla|opera/i.test(navigator.userAgent)){ // Feeling dirty yet?
    document.addEventListener("DOMContentLoaded", f, false);
  }else{
    window.setTimeout(f,0);
  }
} 
Then, to make use of this, simply call DOMReady, passing in the function you want to execute when the page has loaded. Read more

How I built an effective blog comment spam blocker

February 6, 2008

Mention comment spam and most people, in particular those crazy WordPress users, mention Akismet. Great tool and I have nothing against it but I wanted to build my own, avoiding the external call to the Akismet service. What has been interesting to see, is just how effective it is. Turns out, my spammers are quite obvious. As you might see, I don't use CAPTCHAs and I don't use JavaScript detection. I just use a number of rules that validate each comment on the server. Oh, and I don't use nofollow.

Points System

I use a points system, which I got the idea from Movable Type, whose spam protection is also based on a points system. For everything in a comment that I like, you get a point. For everything I don't like, you lose a point (or two, or three). If you get a 1 or higher, you've made it on the site as a valid comment. If you get a 0, it's set for moderation and I'll take a look at it. If it's below 0, it's marked as spam and I'll never see it (although I check every couple weeks just in case a legitimate comment needs to be unflagged). If it falls below -10, I don't even bother saving it to the database since it is so obviously spam. Read more

Easier Static Pages for CakePHP 1.2

February 5, 2008

Traditionally in a CakePHP application, to do static pages you have two options:
  1. Use the built-in Pages controller and either have all static pages reside in /pages/pagename or set up custom routes.
  2. Set up an empty action in a controller.
I didn't like either of those options. With Nate Abele's help, I wrote up a custom error class that will check to see if a view exists for a missing action or missing controller/action combo. If it does, it'll render that view. This is pretty handy as it means that I can maintain a structure within the view folder that more closely matches the URL structure for the site. The one current limitation of this right now is that it only accesses the beforeRender call on the AppController and not on a particular controller, if it exists. Read more