FAQ(Gallery2)
From Kb_JMY(晉明夷)
FAQ about Gallery2 Photo Album
Display & Layout
How to disable new user registration?
- Solutions:
- if g2.1.2: login and go "site admin" -> "modules"
- if g2.2: login and go "site admin" -> "plugins"
- -> search "Registration" for the Registration module
- -> deactivate it
- -> That's it!
How can I remove or change the Gallery2 Header?
- To remove or change the Gallery header edit:
<div id="gsHeader">
<img src="{g->url href="images/galleryLogo_sm.gif"}" width="107" height="48" alt=""/>
</div>
#gsHeader { display : none; }
|
How can I remove or change the Gallery2 Footer?
- To remove or change the Gallery footer edit:
- "<gallery2 directory>/themes/matrix(or your Theme)/templates/theme.tpl" , search for:
<div id="gsFooter">
{g->logoButton type="validation"}
{g->logoButton type="gallery2"}
{g->logoButton type="gallery2-version"}
{g->logoButton type="donate"}
</div>
|
- and remark this code, or remove them, or replace the Gallery image with your own image.
- Or simply add the following code to your Joomla stylesheet:
#gsFooter { display : none; }
|
"Album Quick Links (DHTML)" Hacks
- Solution:
- -> Edit the G2 files: "<g2 directory>/modules/albumselect/dtree.css"
- -> and : "<g2 directory>/modules/albumselect/templates/blocks/AlbumTree.tpl"
How to change the icons of "Album Quick Links (DHTML)"?
- Problems:
The G2 bridge sidebar can be configure to show the "Album Quick Links (DHTML)". My question is how to change the folder icon images of each link item? I am using the "matrix" theme. |
- Ans: The images are located in -- "<gallery2 directory>/modules/albumselect/images/"
Possible to change the text "Album" under each album thumbnail to an icon image?
- Ref: menalto.com -- Possible to change the text "Album" under each album thumbnail to an icon image?
- Solutions:
- Locates: "<gallery2 directory>/themes/matrix(or your Theme)/templates/album.tpl"
- Search for "Album:" (which is in about line#120) in "album.tpl" and you should be able to locate the code:
- {g->text text="Album: %s" arg1=$child.title|markup}
- Change the above code to:
<img src={g->url href="modules/albumselect/images/folder.gif"}> <!-- or any other icon images that you like -->
{g->text text="%s" arg1=$child.title|markup} <!-- Note that the text "Album:" has been deleted! -->
How to remove the "date", "owner" and "size" on the top of photo thumbnails display?
- Ref: menalto.com -- How to remove the "date", "owner" and "size" on the top of photo thumbnails display?
- Ans:
- locates "<gallery2 directory>/themes/matrix(or your Theme)/templates/album.tpl"
- find "showDate" in about line#40, change it to false; do the same for others:
showDate=false
showSize=false
showOwner=false
|
How to remove the "Date, Owner, Size, Counts, and Summaries" under thumbnails?
- Ans:
- locates "<gallery2 directory>/themes/matrix(or your Theme)/templates/album.tpl"
- find "showDate" in about line#155, change it to false; do the same for others:
{g->block type="core.ItemInfo"
item=$child
showDate=true
showOwner=$showOwner
showSize=true
showViewCount=true
showSummaries=true
class="giInfo"}
|
- Note that "showOwner" and "showSummaries" can be disabled in:
- -> "Site Admin" -> theme -> matrix (or your selected theme)...
How to remove the "Full size" display on the top of a photo?
- Ref:
- gallery.menalto.com -- How to remove the "Full size" display on the top of a photo?
- codex.gallery2.org -- add the "local" directory to prevent over-written when Gallery2 is updated to a new version
- Ans:
- Locate the template file: public_html/g2/themes/matrix/templates/photo.tpl
- Locate the code at about line#36:
<td style="width: 30%">
{g->block type="core.ItemInfo"
item=$theme.item
showDate=true
showOwner=$theme.params.showImageOwner
class="giInfo"}
{g->block type="core.PhotoSizes" class="giInfo"}
</td>
|
- Remove the line {g->block type="core.PhotoSizes" class="giInfo"}
- That's it!
Installation & configuration
How to setup an user album ?
- Problems: I have tried every option to configure G2 to allow user to upload their own album photo, but still failed, here is what I have tried:
|
- Solutions: "when first is accessed" is the right answer to allow user albums
Integration
How to use common login to get into gallery2?
Multi-Language
How to control the language setting of G2 through programming?
Which file should I work on to translate Album Names? --NOT Solved!
- Problems:
I am building an multilingual site (English and Chinese) using JoomFish. My question is which php file should I work on to translate the album names into Chinese? |
- Ans:
- activate or install the Gallery2 Module "Multilanguage"
- Edit the MultiLanguage Settings in > Side Admin > Extra Data > Multilanguage
- add your languages.
- Edit an album or photo and you can see a new Tab "Multilanguage". Here you can translate the Title, Summary and Desciption.
- If you switch the language within Joomfish Gallery will also use the correct language.
- Results:
- Things go as you described, but... Translation is not successful!
- for example:
- -> English Album Name: Paintings
- -> Chinese Album Name: 油畫 ---> turns to "??" after save!!
- -> Maybe due to character encoding issue -- mysite is utf-8 while G2 is big5 for Traditional Chinese
- Try editing Gallery2 database directly -> album name is stored in the table "g2_MultiLangItemMap".

