forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Ecards & Email => Topic started by: Jules on February 19, 2005, 01:24:08 am

Title: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
Post by: Jules on February 19, 2005, 01:24:08 am
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
Title: Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
Post by: Tranz 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.
Title: Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
Post by: kegobeer 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.
Title: Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
Post by: Jules 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
Title: Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
Post by: Tranz 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?
Title: Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
Post by: kegobeer 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.
Title: Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
Post by: kegobeer 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.
Title: Re: Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
Post by: kegobeer 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.