WordPress and Gallery2 setup.

For an other site I had to implement a gallery into WordPress. I use Lightroom to catalog my photos and there’s a plug-in for Lightroom that can export directly into a remote Gallery2 set up, so the choice for Gallery2 was a no-brainer for me. I downloaded the WordPress 2.3.2 , the Subversion version of Gallery2 and the WPG2 3.0.2, which is a plug-in to integrate Gallery2 into WordPress and started implementing the whole setup.

During the installation I ran into a few “problems” which I will detail further and give some tips on the implementation.

  • Gallery2 doesn’t come with a theme for WordPress embedded. The creators of WPG2 made one but it isn’t very obvious where to download it. After some searching on the forum I found it’s available here. It might need some tweaking to make it look and feel like for your WordPress theme, at least I had to.
  • Gallery has the nice feature of adding frames around pictures and I wanted to use that but it didn’t work. I kept giving me a the following error:

    Error (ERROR_BAD_PARAMETER) : Smarty error: The template ‘modules/imageframe/templates/containers/ImageFrame.tpl’ does not exist.
    * in modules/core/classes/GallerySmarty.class at line 76 (GalleryCoreApi::error)
    * in modules/core/classes/GalleryTemplate.class at line 401 (GallerySmarty::trigger_error)

    It took some time to figure this one out, but I solved it by copying that entire patch to the WPG2 directory. That solved the problem but it’s not the way it should be. Just as I’m writing this I saw on the WPG2 forum another user reporting this error and one of the developers responded to the question so they are aware of the problem.

  • I suggest copying the wordpressembedded Gallery2 theme to a Gallery2 theme named after your WordPress theme. I use the Mandigo theme for WordPress, so I copied the wordpressembedded directory to mandigo. When you do this you have to also change the theme.inc file. Open the file in your favorite editor and replace all WordPressembedded and wordpressembedded into respectively Yourdirectoryname and yourdirectoryname, in my case I did in vi: %s/Wordpressembedded/Mandigo/g and %s/wordpressembedded/mandigo/g. And also change the description $this->setDescription($gallery->i18n('Mandigo WordPress Gallery2 Embedded look and feel'));
  • I was lucky enough that Mandigo 1.30 was updated so it works with WPG2, they created the wpg2header.php and wpg2footer.php files. I didn’t have to create them myself 🙂

At the moment I have a nice running site with a gallery as I want it to be. I hope these small tips and tricks will help you in implementing the Gallery2 into your WordPress site.

Links:
Gallery2
WPG2 Development site
WPG2 Support Forum
Galley2 WordPress Embedded theme
Mandigo

This article is filed under the category WordPress and has the following tags associated with it: , , , .
  • A step by step guide to implementing gallery into wordpress is just not around, what a pity.

  • Peter

    It’s been a couple of months now, I’ll see what I can do.

download