Change standard-name of guest ecard-writers from "Anonymous" to "Whatever" Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Change standard-name of guest ecard-writers from "Anonymous" to "Whatever"

Started by Jules, February 19, 2005, 01:24:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jules

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

Tranz

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.

kegobeer

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.
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

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

Tranz

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?

kegobeer

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.
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

Oops, not that easy.  I have to look at the devel init.inc.php more closely - I was still thinking 1.3.2.
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

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.
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