Recent Topics

1 Nov 01, 2007 15:03    

The Gallery2 plugin's G2Image button doesn't work with the TinyMCE Plugin so today I figured out how to integrate the Gallery2 Plugin and TinyMCE Plugin. I hope that those using Gallery2 could and TinyMCE could find it useful.

The Gallery2 plugin can be used with the TinyMCE Plugin but it requires some extra work. Thankfully though, Gallery2 Image Chooser is itself a TinyMCE plugin so integrating it with TinyMCE is somewhat simple. You should have the Gallery2 Plugin and TinyMCE plugins installed already. Also, have a copy of the Gallery2 Plugin on your local harddrive.

1. On your local harddrive, open the g2image directory in the gallery2_plugin directory. From there open the config.php and edit the first line of code to have five '..'s.

require_once dirname(__FILE__).'/../../../../../conf/_config.php';

2. Upload the entire g2image directory to the plugins/tinymce_plugin/tiny_mce/plugins directory.
3. Open the admin interface and edit the settings for the tinymce plugin. In the 'Plugins' field, add 'g2image' to the end of the list. In the 'Custom TinyMCE init' add the following line:

theme_advanced_buttons3_add : "iespell,advhr,separator,print,separator,g2image"

And there you have it, you should now be able to see a new button on the right side of the TinyMCE toolbar for inserting gallery2 images. This will popup a window for inserting gallery2 images into your posts that uses the gallery2 plugin settings.


Form is loading...