Joomla

From G2Image

Revision as of 13:35, 1 October 2007 by Kirk (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Contents

[edit] Joomla-Specific Information

  • This page is the Joomla-Specific Installation/Configuration Information for G2Image.
  • Please see the Installation Page first for general G2Image installation information.

[edit] Joomla 1.5 Support?

  • Yes, G2Image works with Joomla 1.5.
    • That said, only the included TinyMCE method described below is supported for 1.5 (as of August 2007).
    • Once JCE and FCKEditor are updated to support 1.5, G2Image should work with them, too.
    • I have not tested the beta of the G2 Bridge for 1.5, but once it works with 1.5, G2Image should work with 1.5, too.
  • The bottom line is that G2Image does not talk to Joomla directly. It does so through the editors and the G2 Bridge. Once these plugins support 1.5, G2Image will by extension.

[edit] Joomla G2 Bridge (or here)

  • Getting the G2 Bridge configured is a little tricky. These instructions are for version 2.0.14 of the G2 Bridge with Joomla 1.0.13
    • First download the component here. (You can also load the modules from the same page, but they're not required to get the embedded page working.)
    • Install the component on the Administator page under Installers -> Components.
    • After you get it installed, go to Components -> Gallery 2 -> Settings.
      • Press the "Wizard" button in the upper right-hand corner.
      • Enter your Gallery URL in the resulting box and click the "Next" button, and then the "Save" button on the resulting page.
    • Now you need to make an embedded page
      • Go to Menu -> Menu Manager
      • Click on the Menu Items icon for mainmenu.
      • Click the New button.
      • Click Component on the resulting page.
      • Enter a name, e.g., Photo Gallery.
      • Select Gallery 2 from the Component list.
      • Press Save.
    • On the resulting page, note the Itemid for the newly created component. You'll need it for configuring G2Image, as described below.

[edit] Embedded Configuration

  • For all of the editor configurations below, make sure you set the following variables in g2image/config.php, per the directions on the Embedded Configuration page.
  • For G2Image version 3.0.x (for Gallery2 2.1.x or higher) with the G2 Bridge, use:
$g2ic_embedded_mode = TRUE;
$g2ic_gallery2_uri = 'http://www.domain.com/gallery2/main.php';
$g2ic_embed_uri = 'http://www.domain.com/index.php?option=com_gallery2&Itemid=85';
  • The $g2ic_embed_uri should be set to the Itemid from the menu item you created for your gallery. I.e, for Itemid=85 you should replace the 85 with the Itemid you got when you created your embedded page as described above.

[edit] Editor-specific configuration

[edit] Built-in TinyMCE

  • G2Image works with Joomla's built-in TinyMCE editor.
  • Unzip the file and put the g2image folder in a new g2image subdirectory in /mambots/editors/tinymce/jscripts/tiny_mce/plugins/
  • Make the following changes to /joomla/mambots/editors/tinymce.php. In the TinyMCE.init function towards the end of the file, change
plugins : "advlink, advimage, $plugins",
theme_advanced_buttons2_add : "$buttons2",

to

plugins : "advlink, advimage, g2image, $plugins",
theme_advanced_buttons2_add : "$buttons2, separator, g2image",
  • Make sure to do a browser refresh/reload while on the "Add New Content" page. This will force a reload of TinyMCE.

[edit] JCE

  • Leave the download file zipped and install it with the JCE plugin manager.
  • Afterwards you will need to edit the config file with the correct settings. It's located at /mambots/editors/jce/jscripts/tiny_mce/plugins/g2image/
  • A huge thanks to Ron Field for doing most of the Joomla! integration work!

[edit] FCKEditor

  • NOTE: In order to get FCKEditor for Joomla working, I had to edit line 97 of mambots/editors/fckeditor.php to change it from
oFCKeditor.BasePath = "/mambots/editors/fckeditor/" ;

to

oFCKeditor.BasePath = "/joomla/mambots/editors/fckeditor/" ;

I had to do this because I have joomla in the /joomla/ directory instead of at the web root. If you have it in another directory like /oursite/, you'll need to make the same modification, but using your directory name instead of "joomla"

  • Unzip the file and put the g2image folder in a new g2image subdirectory in mambots/editors/fckeditor/editor/plugins/
  • Edit g2image/config.php as described above.
  • Edit mambots/editors/fckconfigjoomla.js
    • Add the following line somewhere in the file (case sensitive):
FCKConfig.Plugins.Add( 'g2image' ) ;
    • Look for the sections labeled "FCKConfig.ToolbarSets"
      • Add G2Image (case sensitive) to the list. For example:
['Image','G2Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
Personal tools
Developers