Tags: gallery2 plugin
Gallery2 plugin with TinyMCE
2008/06/04 @ 18:18I made some changes to the TinyMCE plugin for b2evolution to support some callbacks which will allow other b2evolution plugins to register TinyMCE plugins automatically. This is especially useful for the Gallery2 plugin because it will allow me to add a button that allows users to add photos from Gallery2 to their blog posts to TinyMCE automatically when the Gallery2 plugin is installed. Currently it's a pain to get it to work because the standard gallery2 image chooser button doesn't work with TinyMCE and installing it requires you to copy the g2image directory to another location.
Fortunately these sorts of callbacks are implemented in the b2evolution Plugin API already. I just needed to specify that the TinyMCE plugin has some extra callbacks and then fire the associated events at the right time. The code is a bit awkward but it serves it's purpose.
The first part is specifying the extra events.
| function GetExtraEvents() | |
| { | |
| return array( | |
| "tinymce_before_init" => "Event that is called before tinymce is initialized", | |
| "tinymce_extend_plugins" => "Event called to allow other plugins to extend the plugin list", | |
| "tinymce_extend_buttons" => "Event called to allow other plugins to extend the button list" | |
| ); | |
| } |
Then I fire the events like so. The 'tinymce_extend_plugins' and 'tinymce_extend_buttons' events allow other plugins to modify the plugins list and buttons list via a special "get_trigger_event" call.
| $tmce_plugins_array = | |
| $Plugins->get_trigger_event("tinymce_extend_plugins", | |
| array("tinymce_plugins" => $tmce_plugins_array), | |
| "tinymce_plugins"); |
The plugins list is modified on the Gallery2 plugin side by adding an implementation of the event hook. In this case the 'tinymce_plugins' key in the $params array is a reference that can be modified and passed back to the TinyMCE plugin.
| function tinymce_extend_plugins( &$params ) { | |
| array_push($params["tinymce_plugins"], "-g2image"); | |
| } |
You can view the changes made in the checked in code here.
Fat Jack recommends my plugins.
2008/03/29 @ 01:57Gallery2 Plugin 1.4 Released!!
2008/03/23 @ 21:38Version 1.4 of the Gallery2 Plugin has been released!!
The Gallery2 Plugin is a full featured plugin that provides integration between your b2evolution blog and gallery2. It supports single sign on, and adding images to posts using the Gallery2 Image Chooser.
This version adds support for gallery2 image block widget that enable you to show a random image, recently viewed image, recently added image etc. to the sidebar or page title, anywhere a widget can be added in b2evolution. See the sidebar of this blog for an example of how this looks. The image block widget works in conjuction with the Image block plugin for Gallery2 so you will need to make sure it is installed and activated in gallery2 before you can use the widget.
The Gallery2 Plugin also offers full compatibility with the Lightbox Plugin for b2evolution as well so you can include your gallery2 photos in your posts and display them using Lightbox1 or Lightbox2.
Check out a couple examples of what you can do with the plugin. Enjoy!!!
You can also make text links to images in your gallery.
Download: gallery2_plugin-1.4.zip
Gallery2 Plugin 1.3 Released!!
2007/12/11 @ 00:51The next version of the Gallery2 Plugin has been released!!
This version fixes a number of problems with different versions of
b2evolution . It should work in b2evolution 1.9.2 and newer. It was
tested in 1.9.2, 1.13.0, and 2.1.0. This version also fixes a number of path issues with previous
versions of the plugin. Paths to your gallery2 installation should be
managed correctly now.
The Gallery2 Plugin offers full compatibility with the Lightbox Plugin for b2evolution as well so you can include your Gallery2 photos in your posts and display them using Lightbox1 or Lightbox2.
Check out a couple examples of what you can do with the plugin. Enjoy!!!
| | ||
| A link to the gallery page for an item. | A lightbox link to the resized image. | A link to the parent album. |
You can also make text links to images in your gallery.
Download: gallery2_plugin-1.3.zip
Gallery2 Plugin 1.2 Released!!
2007/11/07 @ 10:42Version 1.2 of the Gallery2 Plugin for b2evolution has been released!! This release is a simple bugfix from the previous release a couple weeks ago. It fixes a number of bugs in adding images to posts and fixes various messages and improves how the plugin checks for a valid gallery installation.
It offers full compatibility with the Lightbox Plugin for b2evolution as well so you can include your Gallery2 photos in your posts and display them using Lightbox1 or Lightbox2.
Check out a couple examples of what you can do with the plugin. Enjoy!!!
| | ||
| A link to the gallery page for an item. | A lightbox link to the resized image. | A link to the parent album. |
You can also make text links to images in your gallery.
Download: gallery2_plugin-1.2.zip
Gallery2 Plugin 1.1 for b2evolution has been released!!
2007/10/25 @ 02:27Version 1.1 of the Gallery2 Plugin for b2evolution has been released!! This release adds the ability to post gallery2 photos into your b2evo posts using the Gallery2 Image Chooser.
It offers full compatibility with the Lightbox Plugin for b2evolution as well so you can include your Gallery2 photos in your posts and display them using Lightbox1 or Lightbox2.
Check out an example of what you can do with the plugin. Enjoy!!!
Download: gallery2_plugin-1.1.zip
Gallery Single Sign On Released
2007/04/28 @ 16:10Gallery Single Sign On is a b2evolution plugin that enables this site, and any other b2evolution/gallery2 site to have single sign on between the gallery and b2evolution.
More information about the plugin can be found here.
Using this plugin users can register with b2evolution and automatically have a gallery user created for them. And once logging into b2evoulution the session is carried over to gallery2. So the user will not have to log in twice and maintain two users.
When using this plugin, gallery2 admins will need to put their gallery into embedded mode. This is explained some on the gallery website. With the plugin I have included a script that will allow gallery admins to replace their existing standalone gallery installation with an embedded gallery that performs single sign on with b2evolution. If combined with gallery's url rewrite plugin the embedded gallery will work exactly the same as your existing stand alone version.
Here is a initial release: gallery_plugin-1.0.1.zip









