WordPress NextGEN Gallery – SEO Permalink Patch

WordPress LogoAfter converting my gallery from Coppermine to NextGEN, one of the only downsides was the non-SEO friendly nature of NextGEN’s default permalink structure.

After searching through Google, its seemed others had also raised the issue, but the feature was as-yet unimplemented by Alex Rabe, NextGEN’s developer. Undaunted by this, I set about dismantling NextGEN’s code to implement it myself.

So, after several hours of coding, hacking and bug-fixing, I have released the changed files for anyone who wants to implement the feature in the future. Just download the patched version of NextGEN (tar.gz | zip | changed files only) and replace your current NextGEN plugin files. You will need to update your permalink structure once after activating the SEO settings in the NextGEN Options page.

Disclaimer

Obviously there is a risk in using this as it I haven’t tested on anything other than my own website. Remember to backup your current nextgen-gallery plugin folder, as well as any customised CSS files you have.

I have submitted the changes to Alex, so hopefully they should be integrated into the next release of NextGEN.

If you have any questions/comments, please by all means ask :)

Update 21:00 BST, 8th July 2010

I have been testing the changes and have found a couple of minor bugs, mainly relating to the use of European characters and quotes in gallery/album names. These bugs have now been fixed, and a proof-of-concept for European characters is here.

The archives above have been updated to include these changes. If anyone can provide feedback (even a “it works!”) it would be much appreciated – I’m trying to save Alex as much testing as possible :)