coppermine-gallery.com/forum

Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: m@rk on January 21, 2007, 12:22:23 AM

Title: cpg1.4 Testing/Bugs: themes.inc.php
Post by: m@rk on January 21, 2007, 12:22:23 AM
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
Title: Re: cpg1.4 Testing/Bugs: themes.inc.php
Post by: Nibbler on January 21, 2007, 12:21:01 PM
I don't understand, how does your change help?
Title: Re: cpg1.4 Testing/Bugs: themes.inc.php
Post by: m@rk on January 21, 2007, 02:53:06 PM
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...
Title: Re: cpg1.4 Testing/Bugs: themes.inc.php
Post by: Nibbler on January 21, 2007, 03:09:06 PM
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.
Title: Re: cpg1.4 Testing/Bugs: themes.inc.php
Post by: m@rk on January 21, 2007, 03:23:57 PM
Hey Nibbler -

that's exactly what I detected during the last minutes and wanted to post right now  :D

great community!

with kind regards
Title: Re: cpg1.4 Testing/Bugs: themes.inc.php
Post by: Joachim Müller on July 02, 2007, 03:49:32 PM
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".
Title: Re: cpg1.4 Testing/Bugs: themes.inc.php
Post by: Nibbler on July 02, 2007, 04:30:44 PM
Why? Your code makes no sense.
Title: Re: cpg1.4 Testing/Bugs: themes.inc.php
Post by: Joachim Müller on July 04, 2007, 07:47:14 AM
Could you elaborate please?
Title: Re: cpg1.4 Testing/Bugs: themes.inc.php
Post by: Nibbler on July 04, 2007, 05:37:37 PM
$lang_display_comments['your_name'];

Should be

$user_name = $lang_display_comments['your_name'];

Otherwise the line does nothing.
Title: Re: cpg1.4 Testing/Bugs: themes.inc.php
Post by: Joachim Müller on July 05, 2007, 10:50:32 AM
oops, you're of course right :-[. Committed to both branches of the SVN. Will go into cpg1.4.13 and cpg1.5.0.