hi there,
i've tried to install g2image module in drupal5. when i activate tinymce in the g2image settings of the gallery module, it tells me that it doesn't find the g2image files in this directory:
modules/tinymce/tinymce/jscripts/tiny_mce/plugins/g2image
the prob is that tinymce (at least in the current version) uses this directory for plugins.
modules/tinymce/includes/jscripts/tiny_mce/plugins

any idea where to change that?

Comments

pegmonkey’s picture

I edited gallery_settings.inc and just put the absolute path in at around line 984

case 'tinymce':
$mode = t('TinyMCE');
$path .= '/var/www/html/sites/all/modules/tinymce/includes/jscripts/tiny_mce/plugins/g2image';
break;

Not the most elegant way I'm sure..

hyperlogos’s picture

StatusFileSize
new485 bytes

Enclosed is a patch. BTW your method with the .= means you're appending that string to a hopefully empty string. Don't hope - if you're going to set a string manually, use =, not .=

Tested the patch on my test system, based on code downloaded today (and the system is drupal-5.1.)

hyperlogos’s picture

Status: Active » Needs review

whoops, sorry, forgot to change status.

profix898’s picture

Looks good to me. Anybody else?

kiz_0987’s picture

Seems OK, but the instructions to get the G2Image button in TinyMCE will have to change (the 4.7 method will not work). Presumably we now need to modify the .js files in tinymce/themes.

profix898’s picture

Yes, you must manually edit the tinymce_*.js files in tinymce/themes. The TinyMCE module for Drupal 5 does no longer have the 'button configurator'. So this must be hardcoded into the editor theme files. Maybe we should send a feature request for tinymce module to add G2Image to the default list? Its really sad to see the nice configurations screens from tinymce 4.7 disappeared.
The patch in #2 is all we can do to make G2Image work nicely with TinyMCE from gallery module's point. Should we add some documentation on howto manually add the button to tinymce configuration? Or should we provide a patch for the theme files? Not exactly sure on this.

kiz_0987’s picture

I think instructions to change the .js files are fine. The configurable buttons may reappear in tinymce, judging by its issues list.

I can update the install instructions at http://drupal.galleryembedded.com/index.php/G2Image and include this link in the INSTALL.txt file. Do you think this is the way to go (via wiki) or should instructions be included in the INSTALL.txt file (potentially leading to maintenance in 2 places)?

kiz_0987’s picture

StatusFileSize
new2.32 KB

Updated patch to include another minor error with the display warning in Standalone mode. Also added link to install instructions (should be added to 4.7 also).

profix898’s picture

An additional reference to http://drupal.galleryembedded.com/index.php/G2Image in INSTALL.txt is sufficient IMO. I actually didnt have time to test the patch, but its looks good to go ...

profix898’s picture

Status: Needs review » Reviewed & tested by the community
kiz_0987’s picture

Status: Reviewed & tested by the community » Fixed

Commited to 5.x. Also added the install instructions link to 4.7.

hatsch’s picture

thanks for adding the documentation to
http://drupal.galleryembedded.com/index.php/G2Image#TinyMCE_Installation...

the path for the themes files is wrong. it's not in the includes folder but directly in the tinymce folder.
"Full" - /modules/tinymce/includes/themes/tinymce_full.js
unfortunatly i was not able to log in to the wiki and change the path there.

another question is. you say:
Lastly, you need to setup the TinyMCE module to actually show the g2image button - go to admin/settings/tinymce and select the profile(s) that you want the icon available in. Under the "buttons and plugins" section chech the box next to the "Gallery 2 Image Plugin" item. You may need to force a reload/refresh for your browser.

hm, i just don't have that "buttons and plugins" section on my tinymce settings page using the latest version of tinymce for drupal. i tried to force a reload but it didn't appear. so g2image is still not working for me.

hatsch’s picture

i solved the problem with the missing button by adding
plugins : "g2image",
to the theme js-file

maybe you can add this to the wiki.

anyway, thanks a lot for your help.

pegmonkey’s picture

Thanks for the pointer on the .= drinkypoo. I completely didn't see the .

profix898’s picture

@hatsch: from the wiki
Open up the theme file and make the following modifications:
- Change the "plugins :" line to include g2image and
- Add the following line ... theme_advanced_buttons4_add : "g2image"

kiz_0987’s picture

I made the wiki a bit clearer today. Thanks for checking it out.

Anonymous’s picture

Status: Fixed » Closed (fixed)
STINGER_LP’s picture

I did everything like you said guys, but still there is no button in tinymce panel
the standalone mode doesn't work too, it says:

Fatal Gallery2 Error: Cannot activate the Gallery2 Embedded functions.
 WordPress users, either install the WPG2 plugin (located at http://wpg2.ozgreg.com/) or verify your Gallery2 path in the G2Image Popup Options admin panel.
 other platforms, please verify your Gallery2 path in config.php.

plaese help me, i don't know what to do. someone explaine step by step ???

smitty’s picture

I have got the same problem. Without having installed TinyMCE I want to use g2image in standalone mode.
I managed to get the link "add Gallery2 images" in the edit-mode of a page. But then I get the described error message:

"Fatal Gallery2 Error: Cannot activate the Gallery2 Embedded functions.
...
For other platforms, please verify your Gallery2 path in config.php."

I cecked config.php and all seems to be ok.

Who can help?

smitty’s picture

Status: Closed (fixed) » Active

Reactivated.

Has anybody an idea?

hatsch’s picture

following the instructions at
http://drupal.galleryembedded.com/index.php/G2Image#TinyMCE_Installation...
and changing the path in gallery_settings.inc as stated in comment #1 did the trick for me!
now g2image is working.

thanks to everybody

nautiazn85’s picture

The tinymce module for 5.x-1.x now specifies that the files need to be copied in /modules/tinymce/tinymce NOT /modules/tinymce/includes.

And it doesn't seem to use the theme profiles anymore since there's a plugin chooser. But no matter how hard I try, I can't seem to get the stupid plugin working.

kiz_0987’s picture

nautiazn85: I have changed the path and wiki back. Try going back through the wiki page to see if there is an installation instruction you missed.

STINGER_LP and smitty: Did you copy the two files found in the TinyMCE_version_2.0.3/ folder to the main g2image/ folder? (you are almost certain to have >2.0.3).

kiz_0987’s picture

Status: Active » Fixed

The path is fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)
milplus’s picture

Component: Code » Code / API

dear pegmonkey

do you refer to the gallery_settings.inc into the sites/module/gallery/?

please if oyu can confirm

Mine has onlt 934 rows but I cannot see place where placing your code. please if you can advise.

of course i have same problem mentioned in the above thread opening g2 images chooser from g2 button into the wysiwyg panel in drupal 6.22 pages/nodes.

thanks

milplus’s picture

hi I run drupal 6.22 and galleery2

Ihave same issue with g2image chooser.

can you advise how can I run this patch?

I have same error message to check in config.php but it looks like is fine

thanks

milplus’s picture

there is no row 984 in my correspondent file .

instead installing tinymce I use wysiwyg and I installed tinyMCE as plug in in there.

is that correct?

thanks