Well, since I didn’t say much about upgrading my galleries to version 1.4.7, I figured I’d talk about upgrading them to Zenphoto v1.4.8. I followed their upgrade instructions with some slight deviations. Following are the steps I performed:
- I downloaded and unzipped the archive and then re-zipped it only including the zp-core and themes directory as well as the files in the root folder.
- Backed-up the database to my local MySQL server. Actually, I backed-up both my local development database on my PC and my production database on the web server to my local MySQL server.
- Made a backup copy of index.php (since I had some custom code in it) and copied the zp-core and themes directories to zp-core147 and themes147, respectively.
- Deleted the zp-core directory and the standard themes from the themes directory while leaving my custom ones.
- Unzipped the new files into my gallery’s directory, replacing all files.
- Re-added my custom code into index.php and /zp-core/zp-extensions/html_meta_tags.php.
- Compared the changes between the Garland themes in version 1.4.7 and 1.4.8 using Windiff and saw that no changes had been made. Thus, I knew I did not need to update my customized Garland theme to incorporate any changes.
- Refreshed my browser so that Zenphoto’s setup would run. Saw there were no problems on the initial setup screen and clicked the Go button.
I then tested it in my development copy before changing my production one and did uncover one bug. When editing a single image from the front-end, it would go into batch edit mode after clicking “Apply” to save the changes made. I posted 1.4.8: Single Image edit mode bug that returns to batch edit after apply on their GitHub Bug Tracker. Their latest master support version has corrected this bug. I basically performed the same steps with the support version. Since I had already backed-up the database and files, I just re-deleted the zp-core and themes directories.
After I verified everything worked correctly as far as I could tell with my development gallery, I proceeded to upgrade the galleries on the web server. Both gallery.markheadrick.com and gallery.mysstie.com have been running version 1.4.8 for several days now. 🙂
Oh, for those curious, my custom code in html_meta_tags.php was to change the image being referenced in the og:image meta tag:
198 199 200 201 202 203 204 205 206 207 208 | case 'image.php': $pagetitle = getBareImageTitle() . " (" . getBareAlbumTitle() . ") - "; $date = getImageDate(); $desc = getBareImageDesc(); $canonicalurl = $host . getImageURL(); if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) { // mrh use the normal sized image since Facebook has a 200x200 minimum. //$thumb = $host . getImageThumb(); $thumb = $host . html_encode(pathurlencode(getCustomImageURL(NULL, 520))); } break; |