Now that Gallery 3.0 Final has been released, I have changed my main Gallery to use it. This wasn’t an overnight thing as I have been using the Gallery 3 code in a test environment since it was in beta. Notice I did not say upgrade, but change. This is a completely new code base from Gallery 2. None of the modules or themes from Gallery 2 are compatible. Why the change? Well, the main reason is that working with the code in this version is so much easier. The database schema is also much easier to comprehend and deal with.
Because of this change, I did have to change how I get a random image from the Gallery to display on my blog and main website. It was fairly easy to make the switch. Because the database schema was easier, I was able to just do a direct database connection and MySQL query to get the information I needed. No inclusion of gallery code or use of Curl connections was necessary. A much more efficient process that took an average of 0.2 seconds off the page load time for my blog!
The other fun part has been locating all the links and image references that needed to be changed. Think I have updated all of them in my blog and main website. For the external links I’ve been modifying the .htaccess file as situations arise. Here are few examples:
# put redirects for old to new gallery links here RewriteBase / RewriteRule ^v/MyPics/HomeTheater/([A-Za-z_0-9\)\(\-]*)\.[A-Za-z]*\.html$ http://gallery.markheadrick.com/Home-Theater/$1 [R=301,L] RewriteRule ^v/MyPics/([A-Za-z_0-9\)\(\-]*)\.[A-Za-z]*\.html$ http://gallery.markheadrick.com/MiscPics/$1 [R=301,L] RewriteRule ^v/Nature/([A-Za-z_0-9\)\(\-]*)\.[A-Za-z]*\.html$ http://gallery.markheadrick.com/Nature/$1 [R=301,L]
Since this version works with Akismet, I have opened this gallery up for comments for now. I had to turn them off in the other one due to overwhelming amounts of spam at times even with captcha modules installed. So feel free to comment.
I guess that’s about it for now. Hope you had a happy 10/10/10!