Username:    Password:    Remember me  
Hagan-Net.Net :: Forums :: Gallery2 plugin for e107 :: Support
 
<< Previous thread | Next thread >>
Purple Scroll
Moderators: Andrew, erika
Author Post
cory_booth
Tue Sep 30 2008, 02:05pm
Registered Member #138
Joined: Wed Sep 24 2008, 04:59pm
Posts: 12
Found out, must use g2Image v 3.0 if you are using the PurpleScroll version of TinyMCE - just thought I would point that out.
It is a bit more troublesome to update that partucular plugin to use g2Image...
Back to top
cory_booth
Tue Sep 30 2008, 04:27pm
Registered Member #138
Joined: Wed Sep 24 2008, 04:59pm
Posts: 12
Steps to add g2Image to Purple Scroll TinyMCE...
Download version 3 of the g2Image from here:
CLICK HERE

Upload the g2Image directory to e107/handlers/tiny_mce/plugins/

download the handlers/tiny_mce/themes files you wish to add g2Image (i.e. advanced, basic, etc...)

Modify each file by adding $text .= "g2Image,"; to the UNCOMPRESSED plugins section (do not add to first plugin section labeled as COMPRESSED). I placed mine so it looks like:
  1. $text .= "directionality,";                                   // Adds directionality to handle languages that is written from right to left
  2. $text .= "g2image,";
  3. $text .= ($pref['smiley_activate']) ? ((!USER || check_class($pref['post_html']) == FALSE) ? "" : "emoticons,") : "";


Place the imgae button where you would like it on the toolbar using the same methods - i.e.:

  1. $text .= "table,";                                            // Table controls
  2. $text .= "separator,";                // a "|" to seperate buttons
  3. $text .= "g2image,";


Remove the g2Image section from the e_meta.php file.

Place the script into the theme function section (near the bottom):

I placed mine like this:

  1. //----------------------------------------------------------------------------//
  2. //  Functions for the G2IMAGE Plugin                                          //
  3. //----------------------------------------------------------------------------//
  4. function g2ic_open(form) {
  5.   var field = null;
  6.  
  7.   var docForm = document.forms[form];
  8.   if (docForm == null) {return;}
  9.   for (var i = 0; i < docForm.elements.length; ++i) {
  10.     var docEl = docForm.elements[i];
  11.     if (docEl.type == 'textarea') {
  12.       field = docEl.name;
  13.       break;
  14.     }
  15.   }
  16.  
  17.         var url = '$plugin_url/g2image/g2image.php?g2ic_form='+form+'&g2ic_field='+field+'&g2ic_tinymce=0';
  18.         var name = 'g2image';
  19.         var w = 800;
  20.         var h = 600;
  21.         var valLeft = (screen.width) ? (screen.width-w)/2 : 0;
  22.         var valTop = (screen.height) ? (screen.height-h)/2 : 0;
  23.         var features = 'width='+w+',height='+h+',left='+valLeft+',top='+valTop+',resizable=1,scrollbars=1';
  24.         window.open(url, name, features);
  25. }


I modified the config.php file within the g2Image plugin folder so it reads as follows:

  1. $g2ic_gallery2_path = "/home/XXXXXX/public_html/gallery2/";
  2. $g2ic_embedded_mode = TRUE;
  3. $g2ic_use_full_path = TRUE;
  4. $g2ic_gallery2_uri = 'http://www.XXXXXXX.com/gallery2/main.php';
  5. $g2ic_embed_uri = 'http://www.XXXXXXXXX.com/plugins/gallery2/gallery2.php';   
  6.  
Back to top
Andrew
Tue Sep 30 2008, 11:37pm

Registered Member #1
Joined: Sat Mar 18 2006, 11:53pm
Posts: 384
Thanks for information!
Back to top
cory_booth
Wed Oct 01 2008, 02:03am
Registered Member #138
Joined: Wed Sep 24 2008, 04:59pm
Posts: 12
No problem and THANKS for you to developing this awesome plugin!

Any way I can help - I will do my best....

I found another way to do this, but its a bit complicated... Anyone interested can contact me directly... Or, I am willing to upload my files...
Back to top
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System