JoomEXT:Gallery2 Bridge

From Kb_JMY(晉明夷)

Jump to: navigation, search

Joomla Extension: Gallery and Streaming Media

Contents

Gallery2 and Joomla Bridge

Installation

  • Ref:
  1. Gallery2 notes & installation
  2. "my_joomlalib.1.0.0.zip" & "mod_joomlalib_cron.1.0.0.zip": how to install and what's its uses?
  • Assume:
-- Gallery2: gallery-2.1.2-full.tar.gz
-- Gallery2 Bridge: com_gallery2_v2.0.14_beta.zip
-- Gallery2 Bridge library: com_joomlalib_1_3_1.zip
-- Gallery2 Sidebar Module: mod_g2bridge_SideBar_v2.6.zip
-- Gallery2 Album Module: mod_g2bridge_album_v2.0.zip


  • Install, configure and make sure Gallery2 is running properly as a standalone application;
  • Make sure: you have disabled the "Url Rewrite" Module if you are going to embed G2 into Joomla CMS
--> login Site Admin
--> click "Module" on the left menu
--> Disable the "Url Rewrite" Module
--> That's it!
--> Otherwise, you'll get "404 not found error" in Joomla when you access the images/albums of G2 (due to wrong URL)
  • Install Gallery2 bridge as a normal Joomla Component
  • Install JoomlaLib as a normal Joomla Component
  • Gallery2 URL and Server Path: Setup them by running the wizard of Gallery2 Bridge -- with procedure as shown below:
  • Inside Joomla Admin. backend, click "components" -> "Gallery2 bridge" -> "Settings"
-> click the "Wizard" icon
-> Enter the Gallery2 URL (when requested), e.g. http://www.mysite.com/gallery/main.php
-> then you will get the following results:
     Gallery 2 Path:  /home/mysite/public_html/gallery/embed.php
     Gallery 2 URL:  http://www.mysite.com/gallery/
-> Click "save" to save the settings
  • Add Gallery2 menu item:
  • select the menu, e.g. "topmenu", that you want to add access to Gallery2
  • -> click the "New" icon -> then "component"
  • -> In "Add Menu Item: Component" screen, add the "name", e.g. "Gallery", of the menu item
  • -> in the "component" listing window, select "Gallery2" -> click "Save"
  • -> That's it!


Installation Errors

404 Not Found Error


  • Problems:
  • After installation of the Gallery2 bridge component:
-> I add the component link, with menu item name "gallery", to the topmenu,
-> click on "gallery" of the topmenu, the gallery2 do displays
-> but when I click on one of the album image, the following error happens:
============================================== 	
Not Found
The requested URL /dsite/v/hiking/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. 
===============================================
  • Installing the Gallery2 Sidebar module, nothing but the following message is displayed inside the sidebar module:
=========================
your not on the gallery embedded page!
=========================
  • Installing the Gallery2 Album Module, an album thumbnail do display, but click on the album displays the "404 Not found error" similar to Gallery2 component error
  • Solutions: Disable the "Url Rewrite" Module in Gallery2
--> login Site Admin
--> click "Module" on the left menu
--> Disable the "Url Rewrite" Module
--> That's it!

How to change slideshow default settings?

  • Ref:
  1. menalto.com -- How to change slideshow default settings?
  2. menalto.com -- How to set slide show default settings? Specifically, lowering the delay to 3secs?
  • Assume: Gallery2 version ??
  • Question: The current slideshow default setting is:
-> delay: 15seconds; Max.Size: 320x320
-> How to change it to: delay: 5seconds; max.size: 640x640


  • Solution: download the file "<gallery2 directory>\modules\slideshow\templates\slideshow.tpl" and
  • change
  • line 41: var image = new Image(), timer, iDelay = 15000, iDir = 1, iSize = 0;
  • line 185: <option selected="selected" value="15">{g->text text="15 seconds"}</option>
  • line 183: <option value="5">{g->text text="5 seconds"}</option>
  • line 201: <option value="1">{g->text text="640x640"}</option>
  • To:
  • line 41: var image = new Image(), timer, iDelay = 5000, iDir = 1, iSize = 1;
  • line 185: <option value="15">{g->text text="15 seconds"}</option>
  • line 183: <option selected="selected" value="5">{g->text text="5 seconds"}</option>
  • line 201: <option selected="selected" value="1">{g->text text="640x640"}</option>
Note that iSize determines the starting image size, where
  • 0=320x320
  • 1=640x640
  • 2=800x800
  • 3=1024x1024
  • 4=1280x1280
  • 5=no limit


  • create the new directory "<gallery2 directory>\modules\slideshow\templates\local\"
  • put the new "slideshow.tpl" here, Gallery2 will look for new version in "local" -- this will prevent new version upgrade from overwriting your hacks!

Bugs

Gallery2 User Synchronization Problem

(2) Trac Bug Tracking Ticket#57



Moving Gallery2 from one Hosting Provider to Another

  • Assume:
  • in original hosting provider:
  1. G2 main directory: /home/mysite01/public_html/gallery/ (remember to note down the username and password)
  2. G2 data directory: /home/mysite01/public_html/_Files/g2data/
  3. G2 upload directory: /home/mysite01/public_html/_Files/g2Upload/
  4. G2 MySQL database: mysite01_g2 (remember to note down the username and password)
  • in new hosting provider:
  1. G2 main directory: /home/mysite02/public_html/gallery/
  2. G2 data directory: /home/mysite02/public_html/_Files/g2data/
  3. G2 upload directory: /home/mysite02/public_html/_Files/g2Upload/
  4. G2 MySQL database: mysite02_g2


  • Procedure:
  1. backup the directories and the MySQL database in original hosting site
  2. restore them in the new hosting site and keep the original directory structure
  3. Change "config.php" (immediately under gallery main directory) to reflect all the directory changes and database changes
  4. Note: "symbolic links" still not being updated, so if you add photos to albums using symbolic links, you have to re-create all the album photos again, otherwise you will failed to play "slideshow" and the following error happens:
Platform Error
An error has occurred while interacting with the platform.
The exact nature of the platform error is unknown. A common cause are insufficient file system permissions. This can happen if you or your webhost changed something in the file system,
e.g. by restoring data from a backup.
Back to the Gallery

Error Detail  -
Error (ERROR_PLATFORM_FAILURE) : Missing /home/martclub/public_html/_Files/g2data/albums/Putonghua2007-01-07/CIMG5442.JPG
in modules/exif/classes/ExifHelper.class at line 225 (GalleryCoreApi::error) 
in modules/exif/classes/ExifExtractor.class at line 76 (ExifHelper::getIptcObject) 
in modules/slideshow/Slideshow.inc at line 152 (ExifExtractor::getMetaData) 
in modules/slideshow/Slideshow.inc at line 64 (SlideshowView::buildSlideshow) 
in modules/core/classes/GalleryView.class at line 317 (SlideshowView::loadTemplate) 
in main.php at line 386 (GalleryView::doLoadTemplate) 
in main.php at line 87
in main.php at line 80


Moving G2.2.1 from one hosting server to another (backup & then re-install)

  • Ref:
  1. gallery.menalto.com -- Moving G2.2.1 from one hosting server to another, pls.help!
  2. gallery2.org -- How_can_I_move_my_gallery_installation_from_one_server_to_another?


  • Suppose original server configuration are:
-- g2 root: /home/mysite01/public_html/gallery
-- g2 photo directory: /home/mysite01/public_html/_Files/g2data
-- g2 mySQL database name: mysite01_g2
  • here I backup the database, g2 and g2data directory
-- Important! uninstall the "URL Rewrite module" before any backups, otherwise it will generate incorrect urls after your move.


  • in the new server
-- g2 root: /home/mysite02/public_html/macg2
-- g2 photo directory: /home/mysite02/public_html/macf/g2data
-- g2 mySQL database name: mysite02_g2
  • here in the new server, I restore the database, g2 and g2data directory accordingly;
-> then delete "public_html/macg2/login.txt", as the authentication codes in it shall no longer be correct after G2 is moved to a new server!
-> start G2's installation program to generate a new "login.txt" and update the new server paths and settings by http://mysite02.com/macg2/install
-> Important! -- "step5: database setup" -> MUST choose "Reuse Existing Tables", otherwise your restore database shall be erased!
  • after successful installation:
-> you may find all thumbnails are gone!
-> this is because, most likely, the server paths of the graphic toolkits are not the same in the new server
-> so login -> access "site admin"
-> click "Gd" -> then "ImageMagic" -> then "netPBM" and enter the correct server path, e.g. /usr/bin/, for all of them (request them from the technical support of your webhosting company if you don't know)
-> make sure that you do "Test Settings" to check if the new server paths are correct!
  • finally, re-generate all thumbnails:
-> go "maintenance" (the 4th left menu item)
-> then run "Build all thumbnails/resizes"
-> That's it!

FAQ(G2)


FAQ(G2 Bridge)




Personal tools