Archive for the 'Web Development' Category

A more useful 404 for wordpress

I stumbled upon a great article by Dean Frickey, entitled A More Useful 404, which discusses the need for blogs (and other pages) to have a more elaborated 404 page. I couldn’t agree more with the fact that most website out there offer very slim possibilities to their users to find what they were looking for on your site. I immediately thought that it would be a great little plugin to add to the ever increasing collection of wordpress plugins out there (about 3758 as I write this). To my surprise, and delight, someone had already written a plugin for it, creatively called Useful 404 (Also found on wordpress’s download site). I was happy to find that this plugin works great on wordpress 2.7, which is fabulous by the way.

Unfortunately, I may have to tweak the plugin a little bit since it is missing what is, in my opinion, the most important feature of a customized 404 page, which is to offer the user a list of possible candidates that actually exist on your site. This feature is apparently already available in another 404 plugin called Smart 404 (Also on wordpress’s download site), but this one doesn’t seem to function on Wordpress 2.7 yet. Anyways, I highly recommend the plugin Useful 404 for now. Simple to install and does the job very nicely for now. Any other 404 plugins out there?

Auto margin shifts my page content to the left

I found myself wasting about 2 hours of my time trying to understand why only one of my pages moved about 16px to the left when switching back and forth between the different page. My problem is that I was using a template and that everything on the two pages were exactly the same. Here is an example of what I mean.

Using the famous divide-and-conquer problem solving method (ha ha!), I started to remove some text to find out the culprit paragraph, and realized that the problem was only present when I had a lot of content on the page. After a few google searches, I found a thread on sitepoint’s site that explains exactly my problem (titled: Web Page Wiggle Issue and Margin Auto Wiggles & The Vertical Scrollbar). The problem lies in the use of “auto” for centering pages, much like in the very popular “body {margin: 0 auto; width: 960px;}”. This causes the page to wiggle (move to the left) between pages where the vertical scrollbar is needed (longer content) and where it doesn’t appear (firefox adds the scrollbar as needed, whereas IE always keeps it!). From the website, I found two fixes for the problem:

You can easily fix this, using CSS, by adding this one line in your stylesheet:

html {overflow-y: scroll;}

Another fix, if you are using JQuery, is the following:

$(function(){
    $('<div/>').css({
        position: 'absolute',
        top: 0,
        width: '1px',
        height: ($(window).height() + 1).toString() + 'px'
    }).appendTo('body');
});

Upgrading Wordpress from 2.3.3 to 2.6

I reluctantly upgraded my Wordpress installation yesterday night. I say reluctantly because, for some reason, even after having upgraded from 2.2 to 2.3.3 a while back, i thought that this was going to be a long and painful process. I once again was able to upgrade my whole installation, including backup of all my files, in less than 30 minutes. I followed the great Three Step Upgrade from the wordpress folks! I will not wait as long as I just did before upgrading next time. The design of the 2.6 version is awesome and was definitively worth the 30 minutes spent on the upgrade. I can’t wait for great new things that the next version promises. Good work wordpress!

What are you waiting for? Go get the latest version and get blogging!





coolphotoblogs Photo Blog Blogsbonuel at flickrvfxy W