Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Change Gallery Home Page Title in Theme.php  (Read 3774 times)

0 Members and 1 Guest are viewing this topic.

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Solid Snake/Joshua Harris Fan
    • Legacy Designs
Change Gallery Home Page Title in Theme.php
« on: February 18, 2014, 01:07:21 pm »

Is it possible to change the title of the Photo Gallery home page?

I saw the title in the english.php file in the Language file.  Is it possible to change it within the theme.php so I don't have to change it every upgrade?

http://www.solidsnakelegacy.net/gallery
Logged

roaftech

  • Coppermine novice
  • *
  • Country: ro
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • Romanian Aid Foundation
Re: Change Gallery Home Page Title in Theme.php
« Reply #1 on: February 26, 2014, 07:03:57 pm »

In the absence of any other reply let me put in my two-pence worth and if it's wrong somebody will correct it!

Reading your question, I conclude that you want to change the 'Home' title that appears at the beginning of the default menu. On http://www.roaf.org/gallery/ I have changed the title from "Home" to "Gallery Introduction" by adding the appropriate line of code into english_gb.php (my preferred language).
Here is the actual code:
Code: [Select]
$lang_main_menu['home_lnk'] = 'Gallery Home Page';
As I understand it, 'english.php' is the default file containing all variable labels, but any labels placed in a supplementary language file will over-ride those in the default file (provided that language is activated in the gallery config).  If you dont want to use 'english_gb' as your language then create a copy of it (eg 'my_lang.php') and retain only those labels that you want to change, then activate that as your preferred language.  Since 'my_lang.php' is not a standard file it won't get overwritten in any upgrade.

This is probably easier than trying to change it in the theme file.

HTH
Logged
.
Steve Humphreys,
Help, Hope and Co-operation,
Asociatia Neemia, Dorohoi, Romania.
www.roaf.org/gallery

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Change Gallery Home Page Title in Theme.php
« Reply #2 on: February 28, 2014, 12:42:37 pm »

Good solution roaftech, unfortunately it just works if your preferred language is English, i.e. it won't work if your gallery should be displayed in e.g. Spanish.

SolidSnake2003, if you want to change it in your theme.php file, copy the function theme_main_menu from themes/sample/theme.php if it doesn't exist. Then, find
Code: [Select]
'{HOME_LNK}' => $lang_main_menu['home_lnk'],and replace it with something like
Code: [Select]
'{HOME_LNK}' => 'Gallery Home Page',
Logged

roaftech

  • Coppermine novice
  • *
  • Country: ro
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • Romanian Aid Foundation
Re: Change Gallery Home Page Title in Theme.php
« Reply #3 on: March 03, 2014, 09:17:20 am »

Valid point, Andre, although I could add in mitigation that I had looked at the enquirer's site before replying.  :)
Logged
.
Steve Humphreys,
Help, Hope and Co-operation,
Asociatia Neemia, Dorohoi, Romania.
www.roaf.org/gallery

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Solid Snake/Joshua Harris Fan
    • Legacy Designs
Re: Change Gallery Home Page Title in Theme.php
« Reply #4 on: March 04, 2014, 01:03:12 pm »

Thanks for answering my question, marking as solved.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.