There's obviously a bug in CPG 1.4.10 include\themes.inc.php:
You have to change line 864 from
<input type="text" class="textinput" name="msg_author" size="10" maxlength="20" value="{USER_NAME}" />
to
<input type="text" class="textinput" name="msg_author" size="10" maxlength="20" value={USER_NAME} />
to display the (cookie stored?) guests name in the guest name field (remove the [Anführungszeichen] from value="{USER_NAME}" ...).
with kind regards
I don't understand, how does your change help?
The original code produces the following html:
<input type="text" class="textinput" name="msg_author" size="10" maxlength="20" value=""MarcyMarc"" />
The modified code produces:
<input type="text" class="textinput" name="msg_author" size="10" maxlength="20" value="MarcyMarc" />
In html source code around line 349, the text value is the point...
A better fix is to remove the duplicate quotes being added here:
$user_name = isset($USER['name']) ? '"' . strtr($USER['name'], $HTML_SUBST) . '"' : $lang_display_comments['your_name'] . '" onclick="javascript:this.value=\'\';';
Moving to bugs board, thanks for the report.
Hey Nibbler -
that's exactly what I detected during the last minutes and wanted to post right now :D
great community!
with kind regards
Changed$user_name = isset($USER['name']) ? '"' . strtr($USER['name'], $HTML_SUBST) . '"' : $lang_display_comments['your_name'] . '" onclick="javascript:this.value=\'\';';
to if (isset($USER['name'])) {
$user_name = strtr($USER['name'], $HTML_SUBST);
} else {
$lang_display_comments['your_name'];
}
in include/themes.inc.php and themes/sample/theme.php of svn repositories "cpg1.4.x" and "cpg1.5.x". Will go into cpg1.4.12 and cpg1.5.0. Marking as "fixed".
Why? Your code makes no sense.
Could you elaborate please?
$lang_display_comments['your_name'];
Should be
$user_name = $lang_display_comments['your_name'];
Otherwise the line does nothing.
oops, you're of course right :-[. Committed to both branches of the SVN. Will go into cpg1.4.13 and cpg1.5.0.