ibao’s Gallery2 Theme Release
October 24th, 2006If you like the theme of our gallery, you can now get it here! But before you begin, here are a few words of warning regarding this release. This is a highly customized theme based on Siriux which wasn’t intended to be published so it is unlikely to “just work” for you. If you don’t mind getting your hands dirty then carry on. My support will be best effort but limited so I hope the users can help each other out.
Here are the instructions (beta). Feedback is appreciated.
Step 1 - Install
Download the ibao theme. Unzip it to the gallery themes directory (e.g. /usr/shared/gallery2/themes/ibao). Go to [Site Admin -> Themes] Install and activate the ibao theme then set ibao as the default theme for the gallery.
Step 2 - Configure
Here are my configurations for [Site Admin -> Themes -> Ibao]:
Number of items to show per page = 15 Blocks to show on album pages - Album quick links (Dropdown) - Item actions - Show comments Blocks to show on photo pages Blocks to show on photo pages - Item actions - EXIF/IPTC photo info - Show comments Width of page content in pixels = This is ignored, the width is set to 80% of the window width in the css.
Step 3 - Patch ImageMagick for panomaras
In order allow panorama thumbnails to stretch out and breath we need to patch the imagemagick module. Modify the following file modules/imagemagick/classes/ImageMagickToolkit.class
Change this:
if ($width > $parameters[0] || $height > $parameters[0]) {
$this->_addResizeParam($transform, $parameters[0]);
list ($width, $height) = GalleryUtilities::scaleDimensionsToFit($width, $height, $parameters[0]);
}
To this:
if ($width > $parameters[0] || $height > $parameters[0]) {
if ( $width > $height ) { /* fixed height for pan photos*/
$this->_addResizeParam($transform, $parameters[0]*6, $parameters[0]*0.75);
list ($width, $height) = GalleryUtilities::scaleDimensionsToFit($width, $height, $parameters[0]*6, $parameters[0]*0.75);
}else{
$this->_addResizeParam($transform, $parameters[0]);
list ($width, $height) = GalleryUtilities::scaleDimensionsToFit($width, $height, $parameters[0]);
}
}
We then tell gallery2 to use the ImageMagick module over other toolkits by moving ImageMagick all the way up in [Site Admin -> Toolkit Priority].
Step 4 - Setting the look for the front page
The ibao theme uses a special look of alternating panoramas for the top page of the gallery. You can select anything from a sub-album as the highlight. I wanted however something that’s not part of the gallery so I manually edited some panoramas to 4×1 ratio and put it in a private album under each top level album. I then select a panorama from each album as the highlight on the top page. I made this album private so that only the administrator can see it.
I set the thumbnail size to 180 for the top album and 200 for the sub albums under [Edit Album -> Album].
You may have noticed that there is a sidebar on the top page. In it is a manual link to the Google Map module which you need to download and install separately. I also added more blocks in [Edit Album -> Theme -> Blocks to show on album pages] the following: Search Box, Image Block, and Shopping Cart Info.
Hidden gems/hacks
- There is a hidden hack for the album titled “Panoramas”. The theme will use a different style such that the highlights can be shown at full length rather than been shown as cropped if it were in a normal album.
- If you have entered a summary for an image it will be displayed in the album view though it won’t look particularly pretty.
- In the last block of
ibao/template/theme.tplthere is code for Google Analytics. If you use Analytics uncomment those two lines and insert your account number.
When all else fails, here’s the System Information of my gallery installation:
Gallery version = 2.1.1 core 1.1.0.1 PHP version = 4.3.10-16 apache2handler Webserver = Apache/2.0.54 (Debian GNU/Linux) mod_auth_pgsql/2.0.2b1 DAV/2 mod_jk2/2.0.4 mod_python/3.1.3 Python/2.3.5 PHP/4.3.10-16 mod_ssl/2.0.54 OpenSSL/0.9.7e Database = mysqlt 4.0.24_Debian-10sarge2-log, lock.system=flock Toolkits = Exif, ArchiveUpload, Dcraw, Ffmpeg, NetPBM, Gd, ImageMagick Acceleration = none, none Operating system = Linux plum 2.6.12-1-k7 #1 Tue Sep 27 13:22:07 JST 2005 i686 Default theme = ibao Locale = en_US Browser = Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.2) Gecko/20060330 Firefox/1.5.0.2
Have fun, good luck and please leave your feedback!