Tags: wordpress
Gallery2 for wordpress
2008/04/18 @ 11:51I took a look at the Gallery2 plugin for wordpress by ozgreg to get some ideas on how they had integrated Gallery2 with the Wordpress blog engine and how I might be able to bring those features to b2evolution. I felt somewhat bad looking at it as I've worked on by own gallery2 integration plugin for b2evolution for about a year and haven't really taken more than a cursory look at the wordpress counterpart. I felt even worse when I realized how slick it is compared to my, comparitavely, rather simple integration.
The scale and amount of code was the first thing I noticed. My gallery2 plugin is on the bigger end, in terms of lines of code, for a b2evolution plugin but the wordpress gallery2 plugin has a few times as much code. This might be seen as bloat if it wasn't for the number of features that it offers.
Both of our plugins use the Gallery image chooser (g2image) to allow users to add gallery images to posts and offer single sign on between the blog and gallery. But there are a number of things that the wordpress plugin either is done better than my plugin or isn't present at all in my plugin.
- Both of the plugins allow mapping of blog users to gallery but the wordpress plugin goes a step further and allows you to manage each user mapping and create and delete users in gallery manually. This is a cool feature and I think I'm going to create something similar in b2evolution's gallery2 plugin.
- The wordpress plugin also offers a wider range of widgets to place in the sidebar and allows more customization including a customizable template. This is cool but the implementation is questionable as it makes use of gallery's php classes themselves rather than relying on the Embedded API. It also generates the sidebar image block itself instead of letting gallery do it. I need to test it but I'm not sure if this works with say, the gallery2 multi-language plugin. I think this kind of manuvering is what precipitated the need for a release compatibility matrix which I think might be a pain for users, so I plan to add some more options while sticking as much to the embedded api as possible.
- The wordpress plugin adds a button to tinymce automatically. Currently with my plugin you have to jump through some hoops. I would like to work with the author of the tinymce plugin for b2evolution to allow me to integrate seamlessly.
- The wordpress plugin creates a page automatically that puts your gallery inside wordpress. This is pretty cool and allows users to more easily integrate their blog with gallery. I'd like to do something similar in b2evolution.
- The wordpress plugin has some url rewrite options which seem to allow you to create nice permalinks inside your embedded gallery page. This might be used somehow to preserve previous gallery permalinks, or just to make nice new permalinks inside your wordpress blog.
- The wordpress plugin searches some common paths for your gallery2 installation. Simple but a useful feature that I didn't implement into my gallery2 plugin.
That seems like a lot doesn't it? I really need to get to work to close these gaps. The wordpress plugin has predated my plugin by almost 2 years and still makes mine look like child's play in terms of features. The integration into wordpress is pretty slick too. The menus are placed in intuitive locations within the admin. That's something I might not be able to do in b2evolution given it's rather antiquated, plugin interface (essentially a Plugin class you extend overridding any needed "hook" methods).
Anyway, look for some of these improvements in the coming weeks/months. ![]()
It may come as a disappointment to some of the b2evolution developers since they seemed to like the plugins I wrote for b2evo, but I've pretty much decided that I am going to defect and convert my blog to wordpress. With b2evolution I have had to write and have to maintain plugins to get features that already exist in wordpress plugins that integrate with gallery2 and show images using lightbox. I have also had to hack b2evo quite a bit to achieve the multi-language features that I wanted because a plugin isn't possible given the limited plugin API in b2evo. Basically maintaining my b2evo blog has been a pain especially when it comes to upgrading since my site contains a non-trivially modified version of b2evo. All of those changes need to be merged with new versions when they come out.
So I decided I will convert to wordpress since I can get gallery2 integration in a plugin, multiple langage posts/translations in a plugin, and I also will get the wordpress features like widgets that the b2evo folks have been coding for the next version to play catch up with wordpress.
Though it sounds nice it's still not as easy as it sounds as gengo, which supports the multi-language features in wordpress, has a developer who seems to have been absent since around May and it isn't compatible with the newest version of wordpress which came out on Tuesday. So either I have to install the previous version of wordpress and wait until gengo can get it's act together or hack gengo to work on wordpress 2.3. ![]()










