coppermine-gallery.com/forum

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

define('USER_NAME', 'Anonymous');

to

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

$lang_anonymous_user = array(
  'anon' => 'Anonymous',
);


In functions.inc.php, change

return 'Anonymous';

to

return $lang_anonymous_user['anon'];

Can someone test this?  I'm currently without the ability to test the devel version.