G2Image in Drupal using TinyMCE with WYSIWYG API

UPDATE: This post is quite old now and wont work with the latest version of WYSIWYG API, will try to update this soon.

Gallery2 is one of the best galleries available which could be integrated with Drupal easily you would have read my post on integrating it earlier, after you have integrated it the bigger question is how get those images into your content or nodes so this posts answers it, after reading this post you would be able to integrate Gallery2 with your WYSIWYG (TinyMCE) Editor.

Prerequisites

The Steps

  1. Extract G2 Image Application in $DRUPAL_HOME/sites/all/modules/wysiwyg/tinymce/jscripts/tiny_mce/plugins/
  2. Open Gallery Setting in Web Browser from $SITENAME/admin/settings/gallery/g2image and enable G2Image for TimyMCE as shown in the image below
    gallery settings
  3. Once you have selected the Mode as TinyMCE add the following code in %drupal%sites/all/modules/wysiwyg/editors/tinymce.inc (function wysiwyg_tinymce_plugins($editor))

    'G2Image' => array(
            'path' => $editor['library path'] .'/plugins/G2Image',
            'buttons' => array('G2Image' => t('G2Image')),
            'internal' => TRUE,
            'load' => TRUE,
             ),

  4. Now enable G2Image button for TinyMCE from the editor profile at "admin/settings/wysiwyg/profile/edit/2"
  5. Thats it select G2Image button in TinyMCE

    it will popup a Galley as shown below for you to select images and insert them directly in your posts :)

    gallery Pop Up

first thanks for your article: it help a lot to setup all the thing !

In my case I had to change:
'path' => $editor['library path'] .'/plugins/G2Image',
by
'path' => $editor['library path'] .'/plugins/g2image',

I still have an issue:
when I selected G2Image in the Button and plugins list, TinyMCE doesn't appear anymore ...

any idea?

thanks in advance

Vincent

my config:

Gallery 2.3
Drupal 6.10
modules
Gallery 6.x-1.0
Wysiwyg 6.x-2.x-dev
TinyMCE 3.2.3
g2image-v3.0.3
IMCE 6.x-1.2
IMCE Wysiwyg API bridge 6.x-1.0

Hey Vince,

I'm also tried teh wysiwyg 6.x-2.x-dev and then there are no tinymce buttons on the screen:( with the wysiwyg 6.x-1 module this is okee, but then you dont have pagebreak working.

I lett you know when i solved this.

Willem

In reply to by Vincent (सत्यापित नहीं)

Same Problem for me with Wysiwyg 6.x-2.0. If I activate the G2Image-Button, TinyMCE doesn't appear any more at all! Anyone who has solved this problem yet?

I'm a photographer who recently switched to Drupal. I've been using Joomla and Wordpress for most of my site, but now I've discovered Drupal. I appreciate you post on galleries, I can use this to display some of my customers photos and redesign some of my sites. Thanks again!
Iowa Wedding Photographers