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 standard-name of guest ecard-writers from "Anonymous" to "Whatever"  (Read 6120 times)

0 Members and 1 Guest are viewing this topic.

Jules

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

Hi, when I am not logged in and want to write an ecard (already allowed in the groups config  ;)) the name of the ecard-writer is automatically set to "Anonymous". I want to change this into the german word for it (Unbekannt), but I don't know how... I did not find any piece of code in the original coppermine-files containing "Anonymous" in this content. So I think it's a php-funktion to automatically set it  ???...
Can anyone of you help me with this???
Thanks Jules
« Last Edit: February 20, 2005, 10:44:45 pm by TranzNDance »
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
« Reply #1 on: February 19, 2005, 02:21:13 am »

hmm... Looking at the code, it seems like it needs to be changed in multiple places. I don't know if it's possible to do this without breaking things. However, it seems to be a good thing to internationalize since it is also hard-coded in the next version. Imagine someone who doesn't know English receiving an ecard from "Anonymous"... they might think it's an actual person's name. Sorry I can't help on this, but hopefully this could be addressed.
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
« Reply #2 on: February 19, 2005, 02:23:13 am »

The constant USER_NAME is set to Anonymous in init.inc.php.  Change

Code: [Select]
define('USER_NAME', 'Anonymous');
to

Code: [Select]
define('USER_NAME', 'Unbekannt');
I agree, this should be put in the language file.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Jules

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
« Reply #3 on: February 20, 2005, 10:38:28 pm »

thank you very much for showing up this line of code!
it worked for me.
thanks for this fast reply and thanks for this great gallery script!!!!
jules
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
« Reply #4 on: February 20, 2005, 10:47:51 pm »

That is great that it worked for you and thank you for bringing it to our attention.

@dev team, is it too late to internationalize this?
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
« Reply #5 on: February 20, 2005, 10:58:40 pm »

I wouldn't think so.  Add one line of code to init.inc.php and one line to the language file.  I'll make the change and commit if it's ok.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
« Reply #6 on: February 20, 2005, 10:59:52 pm »

Oops, not that easy.  I have to look at the devel init.inc.php more closely - I was still thinking 1.3.2.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
« Reply #7 on: February 21, 2005, 01:42:20 am »

I think Anonymous is returned in functions.inc.php, in the set_username function.  This is untested, but should work.

In english.php, add

Code: [Select]
$lang_anonymous_user = array(
  'anon' => 'Anonymous',
);

In functions.inc.php, change

Code: [Select]
return 'Anonymous';
to

Code: [Select]
return $lang_anonymous_user['anon'];
Can someone test this?  I'm currently without the ability to test the devel version.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 15 queries.