By abhishek |
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
- Drupal 6 of course
- Gallery2
- Galley2 Module Integrated in Drupal
- WYSIWYG API with TinyMCE
- G2 Image Application
The Steps
- Extract G2 Image Application in $DRUPAL_HOME/sites/all/modules/wysiwyg/tinymce/jscripts/tiny_mce/plugins/
- Open Gallery Setting in Web Browser from $SITENAME/admin/settings/gallery/g2image and enable G2Image for TimyMCE as shown in the image below
- 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,
), - Now enable G2Image button for TinyMCE from the editor profile at "admin/settings/wysiwyg/profile/edit/2"
- 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 :)
Added to DrupalSightings.com
Added to DrupalSightings.com
mediawiki?
interesting thoughts. Does this also come for MediaWiki? Or is it just a drupal thing? regards weekendje brugge
RE: Mediawiki?
Indeed, is there a mediawiki version?
Thanks, zakelijk advies.
G2image plugins
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
same problem: tinymce doesn't show up
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
Wysiwyg 6.x-2.0
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?
Thanks a lot............!!
I would really would like to thank u for this information. I will write u again if I face some problem.
Tools
"The article you have posted is superb!
There are so many informative information. This is very knowledgeable article.
Thank you!"
machine shop
Wow really makes you think. I like it very much. Very inspirational and motivational. Thanks for that.
Thanks!
The text that you have posted is a phenomenal and very wisely explained. Very good.
yeah i know this post is
yeah i know this post is quite old yet useful and valuable.
Great For Galleries
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