Users commenting with default name. How to disable? Users commenting with default name. How to disable?
 

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]

Main Menu

Users commenting with default name. How to disable?

Started by Burana, April 18, 2004, 10:44:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Burana

I have problems with users commenting pictures with default name entry. For example here user just dropped short comment without adding username. Default is "Nimesi". I dont want to disable anonymous commenting, just to prevent adding comments without proper name.

Is there a simple way to fix this?

Joachim Müller

I suggest adding the default name to the word censor in your language file; edit lang/your_language_file.php (e.g. english.php) and find// For the word censorAdd the default username to the word censor list that comes after it.

GauGau

Burana

That doesn't seem to work. It accepts the forbidden word as a name and simply censors it from the comment part. Example on the same page.

Joachim Müller

I guess you'll then have to add an if/then switch to db_input.php, or you can have a blank the name input field pre-filled with a blank instead of "your name".

Letting anon users post comments is not a good idea imo, as it will always result in user misbehaving (either by not filling in their name or by posting "funny" comments, hiding behind anonymity).

GauGau

Burana

Simple problems often have simple solutions. From the language file I just changed
'your_name' => 'Nimesi'
to
'your_name' => ''
Now it simply prompts ignorant user to enter something into the name-field, instead of simpy accepting the formerly-default 'Nimesi'.

But thanks for the pointers, they really helped.

jaydj

i tested my own installation and typed in censored words to check and see how coppermine deals with them.

Works fine for censors, replaces those words with ....

It doesn't censor usernames assuming you've configured it to "allow anyone to post comment"
So users can place anything under the "Your Name", even if it's a censored word.  How do I fix this ? Or where exactly in the code/files need to be edited ? Any existing hack/mod for this ?

Thanks!

Nibbler

Looks like you'd need to edit db_input.php to insert

check_comment($HTTP_POST_VARS['msg_author']);

under

check_comment($HTTP_POST_VARS['msg_body']);

It already happens for updating the comment it seems it is missing here.

[added to stable cvs (- apologies for the typo in the commit comment)]

jaydj

thanks ! worked like a charm :)
added that coded and tested it.  yey ! thanks for the help !