FAQ(Gallery2)

From Kb_JMY(晉明夷)

Jump to: navigation, search

FAQ about Gallery2 Photo Album

Contents

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:
  • "<gallery2 directory>/themes/matrix(or your Theme)/templates/theme.tpl" , search for:
<div id="gsHeader">
        <img src="{g->url href="images/galleryLogo_sm.gif"}" width="107" height="48" alt=""/>
      </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:
#gsHeader { display : none; }
-> example stylesheet: <joomla_root>/templates/rhuk_solarflare_ii/css/template_css.css


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?

  • 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?

  • Ans:
  1. locates "<gallery2 directory>/themes/matrix(or your Theme)/templates/album.tpl"
  2. 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:
  1. locates "<gallery2 directory>/themes/matrix(or your Theme)/templates/album.tpl"
  2. 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:
  1. gallery.menalto.com -- How to remove the "Full size" display on the top of a photo?
  2. 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:
  • login as administrator and go to "site admin" -> "User Albums" -> then the following displayed:
=========================
User Album Settings
* An album will be created for each user. The user will have full permissions on the album.
* Create albums ----> "when user is created" or "when first is accessed" both options do not works!!!???
* Albums viewable by -------------------------- everybody
* Full size images viewable --------------- Yes
* Location for new user albums ------------ Gallery (i.e. root)
* Login page ----------------------------------- checked "Jump to user album after login"
* Link to user album ------------------------- Show link
=========================
  • Solutions: "when first is accessed" is the right answer to allow user albums


Integration

How to use common login to get into gallery2?

(2) Gallery2:Embedding


Multi-Language

How to control the language setting of G2 through programming?

(2) codex.gallery2.org -- Language Settings in Gallery 2


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:
  1. activate or install the Gallery2 Module "Multilanguage"
  2. Edit the MultiLanguage Settings in > Side Admin > Extra Data > Multilanguage
  3. add your languages.
  4. Edit an album or photo and you can see a new Tab "Multilanguage". Here you can translate the Title, Summary and Desciption.
  5. 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".



Personal tools