G2Bridge Plugin [v2.3]

by Wayne Patterson
Support Forum
8th Oct. 2008

Gallery2 Bridge (G2Bridge) gives you the power of Geeklog and Gallery in one solution. It bridges the user database between the two applications and gives you the opportunity to add Forums, Mailing, Profiles, Blogging, HTML editor, Blocks, Permissions, Calendars, Private messaging, and many other terrific functions of Geeklog, all working in parallel with Gallery. Combined with our Minislide Show, Autotags, and our new G2Image technology, G2bridge allows you to use Gallery as a dynamic publishing solution for your front-end web site.

Table of Contents
Supporting Geeklog 1.6.x and glFusion 1.1.6+

G2Bridge is a Geeklog plugin which allows integration of the Gallery2 Open Source Project into your Geeklog site.

By default, it installs a random photo block, which is enabled, and a Gallery2 control block [the G2 sidebar], which is disabled. The control block is explained on the G2Bridge admin page. In order for the random photo block to work, you must have the 'Image Block' module installed. [You can find it on the G2 downloads page.]

Please Note: G2Bridge does not map group permissions from one to the other.

Installing The Plugin
  1. First, make sure you have a working Gallery2 installation and a working Geeklog installation.
  2. If you have G2's URL Rewrite module installed, deactivate and remove it. Re-install it through the embedded version after you've completed the installation of the plugin and verified that the installation works properly. This will ensure that the correct paths are used for rewriting.
  3. Backup your Geeklog database because the G2Bridge plugin adds and modifies tables. You can do this with the built in database backup facility in the Admin menu.
  4. Uncompress the G2Bridge plugin archive and upload the files for your version of geeklog. 1.6.x only, filestructure is the same.
  5.   gl_1.6.x_tree

  6. Configure your plugin by setting paths and options in the config.php file.
  7. *Note: For geeklog 1.5.x you can now edit settings in the new configuration panel, but for installation if you are not using the default paths and urls for gallery and the public directory  then setting them beforehand in config.php will save you a step later.
  8. Login as the user who will be the admin for the G2 installation. Go to the plugin administration page. The G2Bridge plugin should show up with a link to install it. Click it. The install page will tell you if the install was successful or not. If not, examine the Geeklog system errorlog in <geeklog_dir>/logs to see what the problem was. Fix it and re-install.
  9. *Note: This plugin creates blocks which you should not remove manually. It is fine to disable them, but the plugin expects them to exist. They will be removed if you choose to remove the plugin.
Configuring The Plugin
All configuration options can be set up in in Admin -> Configuration -> G2Bridge.

G2Bridge block management is done through your G2Bridge admin page.
And all other Gallery2 configuration is done throught the gallery2 admin interface.
The Admin Section
  • Within the admin page <site_admin_url>/plugins/G2Bridge/index.php there are a few option for your control.
  • Control the Gallery2 SideBar Block's visibility.
  • Sync your Geeklog& Gallery2 users should they ever fall out of sync.
  • [new] Create Blocks containing our Flash XML MiniSlideShow to display your albums like the random photo block or simply generate the embed code for external use of the minislideshow.
Within the G2Bridge admin you can create minislideshows of your favorite albums to display in left or right blocks, or simply generate the embed code for use anywhere on the web.
G2Bridge also comes with the new mediaBlock script to display your gallery content on the web. Its preconfigured and located in your G2Bridge public directory. ie. <?php @readfile('http://www.yoursite.com/G2Bridge2/mediaBlock.php?g2_itemId=1400&limit=2&useThumb=1&shuffle=1'); ?>
For a list of available parameters visit the mediaBlock reference page.
Upgrading The Plugin
Upgrading G2Bridge is very similar to installation:
  1. Backup your Geeklog database because upgrading may add or modify database tables. You can do this with the built in database backup facility in the Admin menu.
  2. Disable G2Bridge using the admin interface's plugin editor [Admin->Plugins->G2Bridge]
  3. Uncompress the G2Bridge plugin and copy the new files over the old ones as if it were a new installation.
  4. Enable G2Bridge using the admin interface [Admin->Plugins->G2Bridge]
  5. Go back to the plugin editor for G2Bridge [Admin->Plugins->G2Bridge] and click the 'Update' button.
Removing The Plugin
  1. Because the plugin modifies several database tables, it should always be removed through the interface provided. Log in to your Geeklog as a root user and go to the plugin administration page. Click the 'G2Bridge' link and then click the 'Delete' button. It will ask you to confirm it. Confirm it.
  2. Delete the three plugin directories created in the install process:
    • <geeklog-dir>/plugins/G2Bridge/
    • <public_html>/G2Bridge/ [OR whatever you changed the name to in your config.php]
    • <public_html>/admin/plugins/G2Bridge/
  3. There is no step three.
The G2Bridge plugin is licensed under the GPL even though I don't really understand it and all its implications.

| View Printable Version