“the j stands for Jointure”
about me | research blog | wordpress plugins | jQuery plugins

25 July, 2010

Enabling compression with GoDaddy Shared Hosting

Compression of HTML, CSS and JavaScript is quite important for improving your site’s speed and should always be used.

Of you will find that all you need to do is add a line similar to the following to your .htaccess file:

AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml application/x-javascript text/javascript application/javascript
Source: StackOverflow

However, if you’re on a GoDaddy shared hosting account you may have realised that this doesn’t work. GoDaddy’s help page recommends that you paste this code in all your PHP pages:

<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>

That’s fine, but from my understanding this will not cache your CSS or JavaScript. However, I found a solution here here, which involves some .htaccess trickery to compress all your CSS and JavaScript files automatically. Enjoy!

10 January, 2010

qTranslate and multilingual META tags

I use WordPress with qTranslate, but I needed to have multilingual META tags which qTranslate doesn’t support – so I wrote a plugin to do the job myself. It’s pretty basic, but I thought I would share in case anyone else needs something similar.

Plugin can be found on WordPress’ Plugin site here: qTranslate Meta at WP Plugin Directory.

For users of qTranslate META 0.9.1 and older, to make the plugin work on a “static” homepage you should change the title hook used from single_post_title to wp_title (in qtranslate-meta.php, line 29). As of version 1.0.0, you can now set this directly from the plugin’s setting page, without having to edit any PHP code.


I’d like to thank the following people for their contributions (in chronological order):

  • Victor Berchet — Help with initial localisation; French translation
  • Benoit Gauthier — autosave bug fix
  • Filippo Pisano — Italian translation
  • Marcis G. — Belorussian translation
  • Almaz — Russian translation
  • Renate Kramer — German translation
  • Rene — Dutch translation

4 January, 2010

WordPress NextGEN Gallery – Thumbnail Generation PHP Memory Limit

The name says it all, if you use NextGen Gallery and have problems with GD thumnbnail generation, you might want to consider upping the PHP memory limit. You probably already suspected it, and it can be done by simply uncommenting one line of code.

Link here: Thumbnail Generation PHP Memory Limit NextGEN Gallery » Visser Labs.

19 November, 2009

Empty / blank page for large posts with WordPress

So I was having this problem where WordPress would display a blank editor for large posts when viewing visual mode. I could get it to work by using the HTML view and refreshing the page, but never in visual mode.

Anyway turns out to be the result of some modest PHP pcre regex defaults. Thankfully all it took was changing a few setting in PHP.ini. A bit thanks to the following blog post, which turned a nightmare of a bug to find into a quick and easy fix.

Sudden empty / blank page for large posts with WordPress | Under My Hat.

12 October, 2009

qTranslate Widget Validation Fixer – No longer necessary?

So after upgrading to qTranslate version 2.5 I am not longer getting the validation error I used to get, ie meaning the small plugin is no longer needed.

Can anyone else confirm this?

25 August, 2009

qTranslate and Theme Hybrid: Multilingual META fields

So I wrote this code for allowing multilingual editing of the META fields when using Theme Hybrid (the “Hybrid Settings” panel on any add/edit post/page.

Here is the functions.php file, this should of course be combined with whatever else you’re using..

This is still an early version, so if anyone tries it out let me know if you have any issues/feature suggestions!

Download: functions-example.zip

25 July, 2009

External Linker – My first public WordPress Plugin!

I’ve done quite a few WordPress plugins but this is the first one I’m making public, because I think others might find it useful. Basically, you know how target=_blank is invalid in XHTML strict? Well, this uses a Javascript hack to get around this.  The code was originally taken from this thread I came across: http://www.webmasterworld.com/forum21/11165.htm

More to come soon, meanwhile if you have any comments whatsoever about the plugin just let me know!

Go to WP Plugins Directory page