Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Users commenting with default name. How to disable?  (Read 5288 times)

0 Members and 1 Guest are viewing this topic.

Burana

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Users commenting with default name. How to disable?
« on: April 18, 2004, 10:44:52 am »

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?
« Last Edit: December 16, 2004, 08:07:17 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
[Solved]:Users commenting with default name. How to disable?
« Reply #1 on: April 18, 2004, 12:56:39 pm »

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
Code: [Select]
// For the word censorAdd the default username to the word censor list that comes after it.

GauGau
Logged

Burana

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
[Solved]:Users commenting with default name. How to disable?
« Reply #2 on: April 18, 2004, 01:20:36 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
[Solved]:Users commenting with default name. How to disable?
« Reply #3 on: April 18, 2004, 01:25:28 pm »

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
Logged

Burana

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
[Solved]:Users commenting with default name. How to disable?
« Reply #4 on: April 18, 2004, 01:37:47 pm »

Simple problems often have simple solutions. From the language file I just changed
Code: [Select]
'your_name' => 'Nimesi'
to
Code: [Select]
'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.
Logged

jaydj

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: [Solved]:Users commenting with default name. How to disable?
« Reply #5 on: December 03, 2004, 01:53:31 am »

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!
Logged

Nibbler

  • Guest
Re: [Solved]:Users commenting with default name. How to disable?
« Reply #6 on: December 03, 2004, 11:36:42 am »

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

Code: [Select]
check_comment($HTTP_POST_VARS['msg_author']);
under

Code: [Select]
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)]
Logged

jaydj

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: [Solved]:Users commenting with default name. How to disable?
« Reply #7 on: December 15, 2004, 12:47:40 pm »

thanks ! worked like a charm :)
added that coded and tested it.  yey ! thanks for the help !
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 18 queries.