This is the web portfolio and personal blog of Leon Chevalier. If you're interested in having custom Wordpress plugins built for you, a professional site speed consultation or in a full-blown website then please continue here: show me your web services!
If you're looking for my blog with web design tutorials and open-source projects (including PHP Speedy) then please continue here: show me your blog!
I've been working as a full time web developer and designer now for 5 years, and have been making websites for 9. I've created large scale custom-build websites for a select group of clients and maintained those sites over a period of years. I now offer three specific services:
Custom Wordpress Plugins
If you can think of something cool you'd like to do with Wordpress, I can build it for you. Do you want to turn Wordpress into a news agregator? That's what I did with my plugin for http://purrl.net. Or what about a plugin to allow flexible publishing of your ads across your blog network? That what I did for internet marketer Jon Waraas:
Leon created me a plugin to use with wordpress so I can display advertising using OIOPublisher on my content websites. With Leons help I am now making $1,500-$2,000 a month off his plugin and OIOPublisher. Leon is a great php programmer and I will definably using him more in the future!![]()
Jon Waraas http://jonwaraas.com
So if you want to push Wordpress to the next level, just get in contact and I'll give you a quote.
Site Speed Check-up
As your site grows the amount of work you throw at it increases. Until one day you look at your once sprightly baby, and realise the poor thing now takes 10 seconds to load. What can you do? How can you restore its youthful energy? Well, the first step is to diagnose the problem, and this is where my site speed check comes in. The service includes:
- A thorough 2 hour examination of your site and your server, looking for weaknesses and diagnosing where improvements can be made.
- I will install my asset compressor 'PHP Speedy' on your site. This can drastically improve things immediately.
- We will then speak on the phone or via email and I will detail exactly where improvements to your site and server can be made.
- We will then schedule the improvements in such a way as to cause no downtime to your site.
If you're interested in vastly improving the load time of your site, just send me an email and I'll let you know how much it costs and when I'm available.
Full custom-built websites
I tend not to do these so often any more; they require a lot of dedicated time and I'm often to be too busy these days. But if you have an interesting project and like the look of my site and my attitude, then please get in touch and we'll work something out. You can check out previous websites I have built in the client section of my blog: http://aciddrop.com/category/clients/
- Apr
- 09

There’s no doubt that digg can provide an emourmous boost to your traffic. It’s great for ‘new’ articles and blog posts to give them a big rush of initial popularity. But it’s also useful for older articles - if you can keep the digg count ticking over, then you might have a shot at some of the long-term popular lists.
So, with this in mind, I wrote an article on how to display digg counts (like in the image above). It goes into some detail about how to retrieve the counts in PHP and via AJAX. And there’s full source-code as ever.
The article is a guest post over at Stylized Web - so head over there now to read it! Here’s the link:
http://stylizedweb.com/2008/04/09/stylize-your-digg-count/
Please ask any questions you may have here so I don’t keep having to head over there to check

- Mar
- 26
Just a quick informational post for those of you using the PHP Speedy Wordpress plugin. Version 0.4.4 is now available from here: http://aciddrop.com/2008/03/22/php-speedy-wordpress-plugin-version-04/
This is a recommended upgrade (versions 0.4-0.4.2 had a couple of bugs which could end up displaying an error message rather than your page output under certain conditions).
- Mar
- 22
Isn't Easter great? Some quality time off work to spend with family and friends. Or, alternatively, to sit at your PC and work on a Wordpress plugin. I think you'll be able to guess from this release which option I chose.
The big feature of this release (0.4) is that PHP Speedy will now handle standard JavaScript libraries. Previous releases suffered from problems when a plugin used a JavaScript library such as Prototype/Scriptaculous. Also, I have noticed that some plugins include their libraries directly, which means that if more than one plugin calls the same library it is included (and downloaded by the user) more than once. For fun, I tested this out.

This is what can happen. A 8.4 second download of 576KB!
With PHP Speedy turned on and handling the libraries this what happens:

I thought that was quite funny.
Install
The plugin is a standard Wordpress plugin install - just copy the entire php_speedy_wp folder into your Wordpress plugins folder. Activate the plugin via the "Plugins" menu, then go to Options -> PHP Speedy.
You should then:-
- Configure PHP Speedy as you see fit, and click the "Set Options" button at the bottom on the configure screen
- Test the configuration
- Finally, activate PHP Speedy on its own activation screen. This is separate from the WP Plugin activation.
Download
You can download PHP Speedy WP Wordpress Plugin here: PHP Speedy WP 0.4.5
Changelog
0.1 - Initial Release
0.2 - Fixed bug in ignore (thanks Jeromy)
0.2.1 - Changed control of when plugin loads
- Fixed problem with space on ignore list
0.2.2 - Really fixed bug in ignore (thanks Steve)
0.3 - Added write of debugging info
- Now works on more pages
0.4 - Added Speedy handling of plugin libraries
- Wordpress exclusively handles gzipping
- Compressed files now appear first in document
- Fixed bug in debugging info write
- Made compressed files include at start of head
0.4.1 - Doesn't die if WP_Scripts class not present
0.4.2 - Fixed bug if no css or js in head
0.4.3 - Fixed is_* functions for all versions
0.4.4 - Fixed display for trackbacks (thanks Steve)
0.4.5 - Added check for empty POST array (thanks Jeromy)
Having problems?
- If it seems PHP Speedy has had no effect at all
If you view your source code, and it looks exactly the same as it did before you activated Speedy please try the following:- First, make sure you really did activate Speedy. Make sure you click the 'Activation' button in Options | PHP Speedy | Activate.
- Look in the cache directory in the PHP Speedy plugin folder. If there is a text file called 'debugging_info.txt' please email it to me (leon at aciddrop.com). Please include the version of Wordpress you are using and the URL of the site (is it's public).
- If PHP Speedy breaks a plugin
If another plugin stops working please try the following:- Set the PHP Speedy configuration to use any standard JavaScript libraries that are in use by your plugin.
- Try adding to the ignore list in PHP speedy all the .js files that your plugin uses. If you don't know what these files are, search the plugin's directory for .js files.
- Let me know in the comments whether this worked or not (in either case).
- If PHP Speedy breaks something else
- Turn off PHP Speedy. View the source of your page and save it to a text file.
- Turn on PHP Speedy. View the source of your page and save it to a text file.
- Email me (leon at aciddrop.com) a description of the problem, both text files and the contents of the cache folder in the PHP Speedy plugin directory.
Known issue with wp-cache/WP Super Cache
I managed to do some proper testing with PHP Speedy WP and wp-cache and WP Super Cache. With all the buffer functions going on, the plugins get confused. I found that this could be fixed by amending the wp-cache-phase2.php file in the wp-cache/wp-super-cache directory. Just find the line that says: if ($new_cache) { and add this before it:
$mtime = @filemtime($cache_path . $cache_filename);
if( !((!$file_expired && $mtime) || ($mtime && $file_expired && (time() - $mtime) <5)) ) {
$new_cache = true;
}
PHP Speedy WP should then work with the caching plugins.
What's to come?
The eventual plan is to automatically improve all elements that could be slowing down your page (and causing that terrible Y-Slow rating). Next on the list are document images and CSS background images - so make sure you subscribe to my blog to be the first to find out about new updates.
- Mar
- 07
Please see here for the latest version of this plugin: http://aciddrop.com/2008/03/22/php-speedy-wordpress-plugin-version-04/
All comments should be added on this new page. Thanks!
- Feb
- 19
Here's another quick tips for the 'Custom slug, custom page' plugin. Do you have any affiliate offers on your blog? Want a quick way to mask the ugly affiliate URLs?
Stage 1
Install the Custom Page plugin. You can download it from this page: http://aciddrop.com/2008/02/16/wordpress-plugin-custom-page-slugs-with-custom-content/
Stage 2
Once you've installed the plugin, go to Options | Custom Page | New Page.
- For the slug, enter the URL you would like your visitors to see
- For the content enter this code:
CODE:<?
header( "HTTP/1.1 301 Moved Permanently" );
header( "Location:http://www.affiliateurl.com?trackingid=78236374637");
?>Enter your own Affiliate URL in place of my example above.
Click submit!
That's it.
Demo
Here, try this lovely link: http://aciddrop.com/free-remote-pc-access
Advanced tip
You can easily include some tracking to store a record of how many times the link was clicked, the page it was clicked on, the browser, the user's I.P etc. Just create a database table in your Wordpress DB to include the relevant info, then insert it into the database before the redirect.
More cunning plans
I've got a few more cunning uses of the plugin to come, so make sure you subscribe to my feed to stay up-to-date!
- Feb
- 18
Do you have more than one website? Or a friend with a website? Wouldn't it be great to easily be able to promote your Wordpress blog on those other sites? Maybe you'd like to:
- Display an up-to-the-minute listing of your latest posts?
- Or show a listing of your most popular or most commented posts?
- Maybe show some live stats from your Wordpress blog on another of your sites?
- Or, what about displaying some of your Wordpress site's ads on your non-Wordpress website?
How can we easily achieve this:

Stage 1 - install the Custom Page plugin
First you should download and install my 'Custom Slug, Custom Page' plugin from this page:
http://aciddrop.com/2008/02/16/wordpress-plugin-custom-page-slugs-with-custom-content/
The plugin allows you to create a page with a custom slug, with whatever content you like and - importantly - with full access to the Wordpress functions and plugin architecture.
Stage 2 - create a Custom page with the content to promote
Let's make a custom page that displays a list of the 3 most recent posts on my blog. So, once you've installed the plugin, click on Options, then Custom Page, then New Page:

For the slug, let's enter "recent-posts":
![]()
Now, for the content. First let's enter some code to create the recent posts lists. If you're not a coder, don't worry, just paste this in (you can't damage anything). Include the starting <? and final ?>.
/*
Plugin Name: Recent Posts
Plugin URI: http://mtdewvirus.com/code/wordpress-plugins/
*/
function mdv_recent_posts($no_posts = 3, $before = '<li>', $after = '</li>', $hide_pass_post = true, $skip_posts = 0, $show_excerpts = false) {
global $wpdb;
$time_difference = get_settings('gmt_offset');
$now = gmdate("Y-m-d H:i:s",time());
$request = "SELECT ID, post_title, post_excerpt FROM $wpdb->posts WHERE post_status = 'publish' ";
if($hide_pass_post) $request .= "AND post_password ='' ";
$request .= "AND post_date_gmt <'$now' ORDER BY post_date DESC LIMIT $skip_posts, $no_posts";
$posts = $wpdb->get_results($request);
$output = '';
if($posts) {
foreach ($posts as $post) {
$post_title = stripslashes($post->post_title);
$permalink = get_permalink($post->ID);
$output .= $before . '<a href="' . $permalink . '" rel="nofollow" target="_blank" title="Permanent Link: ' . htmlspecialchars($post_title, ENT_COMPAT) . '">' . htmlspecialchars($post_title) . '</a>';
if($show_excerpts) {
$post_excerpt = stripslashes($post->post_excerpt);
$output.= '<br />' . $post_excerpt;
}
$output .= $after;
}
} else {
$output .= $before . "None found" . $after;
}
return $output;
}
?>
Thanks to http://mtdewvirus.com/code/wordpress-plugins/ for the code. OK, so now all we need is the HTML for the document, and some CSS to style our bulleted list. (Just paste this into the content box, below the code you've just pasted in)
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
body {
margin:0;
padding:0;
font-family:verdana,arial;
}
div#container_drp h4 {
margin:3px 0 3px 0;
font-size:12px;
}
div#container_drp ul {
margin:0;
padding:2px;
list-style:none;
margin: 10px 0 10px 0px;
font-size:12px;
border:1px solid #ccc;
background-color:#ffffff;
}
div#container_drp li {
background-image:url(http://aciddrop.com/wp-content/themes/leon/images/icn_bullet.gif);
background-repeat:no-repeat;
padding-left: 15px;
background-position:0px 1px;
margin-bottom:4px;
}
div#container_drp {
width:140px;
padding:5px;
background-color:#e4e4e4;
border:1px solid #ccc;
}
-->
</style>
</head>
You can change these styles as you see fit, or just leave it as it is. You should change the image for the bullet to one of your own. Finally we, just need to add the body of the document, and to close the HTML tags:
<div id='container_drp'>
<h4>What's new on <a href='<? echo get_bloginfo('url'); ?>' target=_blank><? echo get_bloginfo('name'); ?>?</a></h4>
<ul>
<? echo mdv_recent_posts() ?>
</ul>
</div>
</body>
</html>
Submit the page, and then click on Manage. Your new page should be available to manage, and you will see a link to it. It will be like this: http://aciddrop.com/recent-posts (but with your domain instead of aciddrop.com). Click the link to view the page. You should get something like this:
Your new custom page

Ok, great. Now what?
The final stage is to get this page to display on your other blog or site. The easiest way to do this is through an iframe. This is an HTML tag that you can use to display a page within another page. So, let say we want to display the info an other Wordpress blog, in the sidebar.
Open up sidebar.php of the theme you use (or whichever file displays the sidebar), and paste in this code where you would like the info to be displayed:
Of course, you should change aciddrop.com to your own domain. You may need to adjust the width and height depending on the info that you are displaying. That's it!
Demo
Just have a look in the right hand bar of this site, and you will see I'm using this technique to display recent posts from both this blog, and another one.
Other uses
The technique isn't restricted to just displaying recent posts. Any time you would like to easily display info from your blog on another site you can use it. Please let me know if you come up with some other ingenious uses.
As usual, please let me know of any bugs/feedback/comments.
Want to hear of other ingenious uses for the plugin? Or be the first to try out my upcoming PHP Speedy Wordpress plugin? Then subscribe to my feed!
- Feb
- 16

I'm still working hard on the Wordpress Plugin for PHP Speedy, but have taken a moment out to write a plugin for Jon Warass of http://www.jonwaraas.com. He needed to be able to display ads from the OIOPublisher system across his non-Wordpress sites. But OIOPublisher is Wordpress only, leaving him with a problem: how to port the publisher system to his other sites?
The solution we came up with was to create a plugin for Wordpress to allow the user to:
- Create a custom page slug
- Fill that page with whatever content they wish, including PHP, with full access to the Wordpress and Plugin architecture.
All we then had to do was create a custom page, and fill it with the OIOPublisher ads, directly using the OIO code. These custom pages could then be included via iframe on his other sites.
Jon has generously agreed to make this plugin available to everyone on a GPL licence.
Download
You can download it here: Custom Pub Page Plugin; custom slugs with custom content
Install instructions
- Install the plugin in your Wordpress install
- You should have a new option in "Options" called "Custom Page", click it
- Click "New Page" in the sub menu enter the slug you want for the page (the url), and the content.
- Click submit, and then the new page should be available in the Manage sub-menu, together with the link to the page
- You can create as many custom pages as you like
Demo
Here is a demo, running the code below: http://aciddrop.com/custom-slug-this-is-one-great-slug
<?
echo "Want to see my archives?<br>";
wp_get_archives();
?>
As usual, hit me with bugs/feedback/suggestions etc!
- Feb
- 04
I have made some more improvements to PHP Speedy - many thanks to everyone who gave me feedback. The improvements are:
- Added in compress method for direct content compression
- Made the gzipping functions more robust
- Added in check for query string in file paths
- Changed name of view class to avoid conflicts
Due to popular demand I have also tested it with Drupal and Joomla, and have instructions on how to get it working with both.
Drupal
- Edit index.php in the root Drupal folder
- Include the PHP Speedy code at the top of the page as normal
- At the bottom of the page change print theme('page', $return); to
print $compressor->compress(theme('page', $return));
I'm not a Drupal user so have only tested on a basic installation - please let me know if this doesn't work for you (preferably with a solution!)
Joomla
- Again, edit index.php in the root Joomla folder
- Include the PHP Speedy code AFTER the first two includes made by Joomla. So it would look something like this:
CODE:require( 'globals.php' );
require_once( 'configuration.php' );
require('/home/your_site/public_html/php_speedy/php_speedy.php'); - At the very bottom of the page add $compressor->finish();
Again, I must add the disclaimer that I've only tested this with a basic installation so any problems please let me know.
You can download the lastest version of PHP Speedy at the dedicated page: PHP Speedy
Don't forget to subscribe to my feed to stay up-to-date.
















