forum.coppermine-gallery.net
Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: Burana on April 18, 2004, 10:44:52 am
-
I have problems with users commenting pictures with default name entry. For example here (http://www.vastus.net/coppermine/displayimage.php?album=32&pos=12) 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?
-
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 censor
Add the default username to the word censor list that comes after it.
GauGau
-
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.
-
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
-
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.
-
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!
-
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)]
-
thanks ! worked like a charm :)
added that coded and tested it. yey ! thanks for the help !