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: renaming the user galleries "one the fly"  (Read 2694 times)

0 Members and 1 Guest are viewing this topic.

rrwwxx

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 51
renaming the user galleries "one the fly"
« on: September 07, 2007, 10:35:22 pm »

GauGau suggested that I should start a new thread for this.

I need to come back once again to all these phrases and words that show up in English language on various gallery pages. I would like to identify all of them and insert appropriate code in order to get rid of it and receive my own language (which is German) if that language is selected.
I searched this forum a while and found various people posting the question concerning
User galleries
This category contains albums that belong to Toontown Gallery members

and the moderators have always replied that this text can be changed in the admin menu.
That is right, however it does not help if you want to keep it in English too.
I have a bilingual gallery (see http://galerie.toontown-click.de) and I found another rather complicated method to identify that string and replace it if necessary. You need to edit index.php for that.
I included the following code lines after
         case 'catlist':
Code:
Code: [Select]
// replacing English text for German language
    if (strpos($cat_data[0][0],'User galleries')=== false) {}
        else {   if ($CONFIG['lang']=='german') {$cat_data[0][0]=str_replace('User galleries','Benutzer-Galerien',$cat_data[0][0]);
        $cat_data[0][1]=str_replace('This category contains albums that belong to Coppermine users..','Diese Kategorie enthält Alben von Galerie-Mitgliedern.<br /><br />&nbsp;<br />',$cat_data[0][1]);
        }else{$cat_data[0][1].='<br /><br />&nbsp;<br />';} }
 // end of modification

If you look closer you'll see that I also added some extra line spacing for the English display too because I wanted a larger gap under that category.

That is a very specific solution, but it doesn't help for still displaying an English text 'User galleries' when clicking on it!  Huh
It still says Galerie > User galleries in the navigation bar and it's <title> too.

Is there any other solution to replace every occurance of User galleries for instance right after it's being read from the database categories description? I tried on various places but I had no luck yet ...
cu,
Roli
°¿°
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: renaming the user galleries "one the fly"
« Reply #1 on: September 08, 2007, 06:55:40 am »

This is going to be an issue with any category, of which User gallery is one. Since category descriptions are defined by the admin, it makes sense to have it in the database and settable in a form, unlike the static text strings used in the lang/*.php files. Even "User galleries" is arbitrary. An admin could change it to whatever they want. We wouldn't want them to have to edit code to do so.

Perhaps the easier albeit less clean solution would be to have descriptions in both languages, as seen in bilingual instructions elsewhere.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.