Blog: Programming

High-Performance WordPress with W3 Total Cache and Nginx

March 14, 2011 at 3:26am.

64 comments.

Running WordPress on an Nginx server with the W3 Total Cache plugin can increase your blog’s speed by as much as 2x. This configuration file makes that combo work together seamlessly and follows Nginx best-practices—unlike many of the other sample configurations out there.

Read all of High-Performance WordPress with W3 Total Cache and Nginx

jQuery plugin for two-column lists without changing your markup

January 31, 2011 at 4:48am.

1 comments.

The vzListSplit jQuery plugin divides the children of an HTML element (like a list) into two columns. Although the results aren’t quite a neat as they would be with CSS3 columns, they do work across all major browsers. So there’s that.

Read all of jQuery plugin for two-column lists without changing your markup

VZ Members Fieldtype

November 2, 2009 at 2:47am.

30 comments.

VZ Members is my second fieldtype for Brandon Kelly’s FieldFrame extension. I needed a way to select any number of site members to associate with an entry. In my case I am doing this to allow entry creators to set permissions on an entry-by-entry basis. You could also use it to link to the profiles of people mentioned in an article, or inside a Matrix field to create a list of events, each with a date, title, and the personnel who will be in attendance.

All New VZ Url fieldtype

October 25, 2009 at 3:55pm.

4 comments.

This morning I pushed version 1.1 of my VZ Url fieldtype for Brandon Kelly’s FieldFrame extension up to GitHub. The code for this version completely rewritten to (hopefully!) eliminate some issues with ajax calls returning in the wrong order, leading to false negatives. While I was at it, I made the errors display in a pop-up box, allowing for more verbose errors without breaking the layout.

Securing your downloads with mod_xsendfile

October 20, 2009 at 2:23am.

14 comments.

In many case you have files available through your webapp that should only be accessible to certain people. You don’t want to rely on security through obscurity (throwing them all in a public folder, but only showing the links to certain visitors). Although that will deter casual users from getting ahold of the forbidden files, once someone has the link they could post it anywhere and your security is blown. What you want to do is to squirrel the files away outside of your publicly-accessible folder and then give them out as needed once a user is validated by whatever authentication method you are using. Apache’s mod_xsendfile module (inspired by lighthttpd’s X-Sendfile )is the tool for this job.

Read all of Securing your downloads with mod_xsendfile

VZ Url extension

March 11, 2009 at 10:09pm.

38 comments.

A URL fieldtype for Expression Engine with ajax url validation. When the user leaves the url field, it will ping the url they entered and display an error message if it doesn’t find a valid webpage there.

Read all of VZ Url extension

listFilter jQuery plugin

February 13, 2009 at 9:59pm.

14 comments.

A project I am working on needed a way to filter a long list of staff members. We needed to be able to filter by several different criteria, and several different interfaces (text search, dropdown lists). And it needed to happen in-place—no page reloads. Thus my listFilter jQuery plugin was born.

Elevated initial caps with jQuery

July 2, 2008 at 7:46pm.

4 comments.

For a project I am currently working on I wanted to use elevated initial capitals to set off each block of text. The obvious way to do this would have been with the :first-letter pseudo-element, which is what I initially did. This worked great in Safari, but in Internet Explorer, I got a series of bugs and idiosyncrasies that eventually became more trouble than they were worth. Line spacing was alternately too loose or too tight, depending on what I did, and in IE6 it interacted with the IE7-js script to make all but the first paragraph tiny.