Advanced search  

News:

cpg1.5.42 maintenance release - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix several minor issues. All fixes are not security critical, so if your gallery is running fine with cpg1.5.36, cpg1.5.38 or cpg1.5.40 you don't need to upgrade. If you are running an older version than cpg1.5.36, you must update to this latest version as soon as possible because of the security impact!
[more]

Pages: [1]   Go Down

Author Topic: Prepopulating Name in Comments section  (Read 6976 times)

0 Members and 1 Guest are viewing this topic.

wbnp

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 37
Prepopulating Name in Comments section
« on: June 03, 2010, 08:36:10 PM »

When guest comments are allowed it appears that the "Name" field in the comments section is prepopulated with "Anon".  However "Anon" does not seem to be a vaild name as you get a pop-up requiring you to enter a different name.

The pop-up states, "Please provide your name for comment".

Since the other fields available for input are blank it is not intitutive that you must enter a name and can't use "Anon".

This happens with Firefox, IE and Safari although interestingly the field IS blank in Google Chrome however you still can't use Anon.  (Chrome Version 5.0.375.55).

Hopefully this ramble is somewhat clear! 
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15170
Re: Prepopulating Name in Comments section
« Reply #1 on: June 03, 2010, 09:08:33 PM »

Maybe it's better to leave that field empty and pre-populate it with the last used name when you have written your first comment (store in cookie).
Logged

wbnp

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 37
Re: Prepopulating Name in Comments section
« Reply #2 on: June 03, 2010, 09:39:30 PM »

I think that is the best (only?) solution Αndré.  (Personally I don't even care if you store the name in a cookie but it is a nice though!)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15170
Re: Prepopulating Name in Comments section
« Reply #3 on: June 11, 2010, 03:05:51 PM »

The user name has already been stored in a cookie. We only had a bug pre-populating that value. I fixed the issue in r7676.

I also changed the english default language string to 'Your name'. If you don't want to have that string as name, please copy the whole function theme_html_comments from themes/sample/theme.php to themes/your_theme/theme.php, find
Code: [Select]
$user_name = $lang_display_comments['your_name'];and replace it with
Code: [Select]
$user_name = '';
Logged
Pages: [1]   Go Up
 

Page created in 0.061 seconds with 20 queries.