Aug
30
2005
Embedding Gallery2
Written by Graham Spice, Kai Tomalik   
Embedding Gallery2 into Joomla

TipA German translation of this article is available at www.joomla-galerien.de
Eine Deutsche Übersetzung dieser Anleitung  ist auf www.joomla-galerien.de verfügbar.

First download the latest version of Gallery G2 from the Gallery Project site.
Upload the Gallery files to your Webserver and point your browser to the setup directory.

G2 Installscreen
G2 Installscreen


If you need help with the install or requirements for Gallery2 please visit the official documentation web site for Gallery and review the FAQ.

Before going further with the Joomla component be sure that Gallery2 works standalone and you are able to create albums, upload images etc. You also have to disable the URL Rewrite Module in G2 before you install the component as this Module doesn't work with Joomla's SEF.

Download and install the G2 Bridge for Joomla

Download and install the latest version of the Gallery2 component from the Joomla! Developer Project site and install it with the component installer. If you have problems with the component or need help with the installation, please visit trac.4theweb.nl/g2bridge (website of Michiel Bijland) , the home for Gallery2 component development and check out the forum and FAQ.
The G2 Bridge requires the installation of the JoomlaLib component. Download and install JoomlaLib form the JoomlaLib project site .

Related Files:
icon Gallery2 Bridge for Joomla 1.0.x (181.64 kB)
icon Joomlalib (198.89 kB)

G2 Component Backend overview:

Components - Gallery2 - Settings
After a sucessfully installation you have to provide two path's to make the Gallery2 component work.
Prefered way of adjusting this value is using the wizard by selecting the correct wizzard icon in the top right of your browser window. (Only if your Server does not support fsockopen() you should use direct editing.)

Embedding Gallery2
G2 Core Settings

Embedding Gallery2
G2 User Settings

Embedding Gallery2
G2 Display Settings


Create a new Menu Item in Menu > Main Menu > New > Component > choose Gallery2 from the list.

Components - Gallery2 - User Management

Here you will see an overview of the entire Joomla user base and their status with in G2. You can see if Joomla users are blocked and too which group they belong. It will also detect G2 sync problems, here is table with all the error messages and what they mean.

  1. “User is Blocked!”, This means the password for this user is changed to a random string. The user won’t be able to lock in if he bypasses Joomla. This is set when a user has been blocked and the users are synced. If the user isn’t blocked in Joomla but is in G2 then resync the users.
  2. “Username”, the username isn’t the same in Joomla as it is in G2.
  3. “Password”, the Password isn’t the same in Joomla as it is in G2.
  4. “Email”, the Email isn’t the same in Joomla as it is in G2.
  5. “Fullname”, the full name isn’t the same in Joomla as it is in G2.
To see a more complete user details page click on their full name. If you are looking for a special person, just use the filter. It searches for e-mail, username and full name.

You can sync users and groups by selecting the correct action icon in the top right of your browser window.

User Details
The User Details page is a summary or which groups the uses is a member off.

Groups
A selection on the User Details page that allows you you to modify which group the user is member of. Click the associated radio buttons and Save after all changes have been made.

Embedding Gallery2
G2 User Manager
Embedding Gallery2
G2 User Details


Components - Gallery2 - Album Management
Removed in Bridge version 2.0.14, please use the Galllery2 User Album module

Components - Gallery2 - Tools

Removed in Bridge version 2.0.14



Template adjustment

Here is one way to make the embedded Gallery2 look like the rest of your Joomla site.
Disclaimer: this may not work with all templates and themes.


1) Download the Embed Color Pack by Steve Lineberry from the Gallery2 User Contributions and copy it into your /gallery2/modules/colorpack/packs directory. Maybe you have to download and install the Gallery 2 Color Packs Module before you get a "Color Pack" option in your theme setting


2) Set the embed color pack in your theme settings. Here is a screenshot of the Matrix theme.

Matrix settings
Matrix settings


3) Edit your Joomla stylesheet (/templates/your_templatename/css/template_css.css) and add the text "!important" after the color for the css link items. For example:

Code:
  1. a:link, a:visited {
  2. font-size: 12px;
  3. color: #CC9966 !important;
  4. text-decoration:none;
  5. font-weight: bold;
  6. }
  7. a:hover {
  8. text-decoration:underline;
  9. color:#FF0000 !important;
  10. }
 


Adding  "!important" to your stylesheet will help override the Gallery2 default colors for links, etc.

4) Edit the file "template_css.css" (/templates/your_templatename/css/template_css.css) of your current Joomla template and add the following code by Steve Lineberry. You would then need to change the color's and sizes as needed.

Code by Steve Lineberry:
  1. #gallery{
  2. color: black;
  3. font-size: 90% !important;
  4. }
  5. #gallery h1,
  6. h2,
  7. h3,
  8. h4,
  9. h5,
  10. h6,
  11. .giDescription,
  12. .autoCompleteBackground,
  13. .autoCompleteHighlight,
  14. .autoCompleteNotSelected,
  15. .autoCompleteNotSelected{
  16. color : black !important;
  17. }
  18. #gallery table.gbDataTable th {
  19. background : #D4EAF8 !important;
  20. color : #666666 !important;
  21. }
  22. #gallery .gcBackground1, .gbEven { background-color: transparent !important; }
  23. #gallery .gcBackground2, .gbOdd { background-color: transparent !important; }
  24. #gallery .summary{ color: #666666; }
  25. #gsHeader { display : none; }
 


5) If you want to change the CSS of Gallery instead of your Joomla template edit the file "theme.css" in your choosen Gallery2 theme. For example, the Matrix theme's "theme.css is located in the /gallery2/themes/matrix directory. Replace the Gallery2 theme's background color with the background color from your Joomla  site template or remove the color to make the background transparent. Here are the most important classes to modify to change the Gallery2 theme's background color or font size:

Code:
  1. #gallery {
  2. font-family: Verdana, Arial, Helvetica, sans-serif;
  3. font-size: 62.5%;
  4. color: #333;
  5. background-color: transparent;
  6. }
  7. body.gallery {
  8. background-color: transparent;
  9. }
  10. .gcBackground1 {
  11. background-color: transparent;
  12. }
  13. .gcBackground2 {
  14. background-color: transparent;
  15. }
 


Of course you can change everything in the theme.css until you like it.

TipTo change the Gallery image or the descriptions like Date, Owner, Size, etc. take a look at the .tpl files in the "templates" directory of your chosen Gallery2 theme. For example, the Matrix theme's directory is located here: gallery2/themes/matrix/templates/ directory




Gallery2 Sidbar Module

This Module shows the Gallery2 sidebar as configured in the Gallery2 settings in the module.
Download the module from the Joomla! Developer Project site and install it with the module installer.
 
Gallery2 Random Image Block

With this module your are able to show one of the following images:

  • Random Image
  • Last Added Image
  • Most Viewed Image
  • Random Album
  • Last Added Album
  • Most Viewed Album
  • Daily Image
  • Weekly Image
  • Monthly Image
  • Daily Album
  • Weekly Album
  • Monthly Album
  • Specific Picture

TipIf you want to run a second instance with another image, make a copy of the Gallery2 Image Block in the modulemanager

Image Block Parameters

Gallery2 Comments Module

Shows the latest comments from Gallery2 in a module.
Comments Module
Comments Module


Gallery2 Statistic Module


This Module shows how many albums, photos and comments there are in your Gallery.
Stats Module
Stats Module


Grap your copy from the Joomla! Developer Project site .



Gallery2 Search Mambot

With the Gallery2 Search Mambot you can use the Joomla search engine to search for the Gallery2 bridge.

Search Result
Search Result


Grap your copy from the Joomla! Developer Project site .


Gallery2 Image Chooser (editor plugin)

Gallery2 Image Chooser by Kirk Steffensen allows you to choose images from your Gallery2 photo albums and add them to your Joomla content by browsing thumbnails.
It works with Joomla's built in TinyMCE editor, mosCE editor and JCE editor.
Download and instructions are available at Kirk Steffensen's website .

 
G2 Image Chooser JCE Editor Plugin
G2 Image Chooser JCE Editor Plugin
 
Gallery2 Image Chooser
Gallery2 Image Chooser
Gallery2 Image Chooser advanced
Gallery2 Image Chooser advanced


Comunity Builder Plugin

This plugin for the Community Builder add a tab for the Gallery2 Bridge to the User Profile Page of CB.
You can see the users Last Added, Most Viewed Images and the Last Added Albums.

User Profile Page
User Profile Page


Grap your copy from the Joomla! Developer Project site .

Joomap Plugin
A plugin to show Gallery2 Albums with the Joomap Component .

Download from Joomla Developer Project site .


Pix 2 Gallery 2

Utility to upload pictures to a Gallery 2.2 site.
Pix2Gallery2 is simply a .NET 2.0 version of GalleryRemote written by Ted Dinklocker. It's running on Windows Vista and Windows XP and is an alternative to GalleryRemote .
Please visit the website the Tedware site for download and instructions.

Pix2Gallery2
Pix2Gallery2


XML Mini Slideshow for Gallery2

Mini slideshow for Gallery2.
Small and portable(place it in any webpage) with links to the larger images in gallery2 written by Wayne Patterson.
Mini Slideshow
Slideshow example


Installation:
- download the XML Mini slideshow for Gallery2 from here: http://www.flashyourweb.com/filemgmt/index.php?id=1
- read the usage.txt and edit line 5 of xml.php and change the "embedUri" parameter, see example:
Code:
  1. $ret = GalleryEmbed::init(array('fullInit' => true, 'embedUri' => '/index.php?option=com_gallery2&Itemid=135?', 'g2Uri' => '/gallery2/'));
 

To show the Mini Slideshow in a Joomla module position (see example on the Frontpage)
- download and install the mod_html module from here: http://fijiwebdesign.com/component/o...,90/Itemid,76/
- edit the module in Joomlas Module Manager and add the code for the slideshow to the Parameters area, for example:
Code:
  1. <embed xsrc="http://www.your-site.com/gallery2/slideshow.swf"
  2. flashvars="xmlUrl=http://www.your-site.com/gallery2/xml.php?mode=slideShow%26g2_itemId=330&showDropShadow=true&
  3. transInType=Fade&transOutType=Random" quality="high" wmode="transparent" width="150" height="150"
  4. name="slideshow" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com
  5. /go/getflashplayer" />
 

- "Edit the g2_itemId in the xmlUrl to reflect the album you want to be displayed and also the site url. (if you have url rewrite enabled, you may have to disable it to see the g2_itemId in your album's url)"