Validation problem Validation problem
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Validation problem

Started by WickedElf, January 04, 2006, 04:43:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WickedElf

I'm trying to validate the xhtml and coming across a problem.

On the index page, there is an extra opening bold tag.  I thought it was because I had fiddled with the theme, but I went to the demo page (http://coppermine-gallery.net/demo/cpg14x/index.php?4x=&theme=classic) and spot checked a few skins (giallo, classic, hardwired) and found the same problem with all of them. 

<td colspan="3" class="tableh1" align="center"><span class="statlink"><b><b>253</b> files in <b>20</b> albums and <b>6</b> categories with <b>21</b> comments viewed <b>94124</b> times</b></span></td>

I've looked through index.php, english.php and theme.inc.php and couldn't find the extra bold tag.  And

  'stat1' => '<b>[pictures]</b> files in <b>[albums]</b> albums and <b>[cat]</b> categories with <b>[comments]</b> comments viewed <b>[views]</b> times',
and
<td colspan="3" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>

Where can I go to find the necessary code to fix that?

Thanks!

Paver

#1
It's true that having <b>,</b> around {STATISTICS} makes the nested <b>,</b> tags moot (inside the $statistics variable), but is that a validation problem?  I admit I don't know enough about XHTML compliance to answer that myself.

One way to remove this issue for merely validation-sake is to make a copy of english.php, remove the nested <b>,</b> tags and set your language to this new english.php.  You could also hack themes.inc.php, but that's not recommended since it's a core script.  Instead, override $template_cat_list in your theme.php by copying that variable from the sample theme and removing the <b>,</b> around {STATISTICS}.  On second thought, I would lean toward the latter solution unless you really want the entire {STATISTICS} text to be bold.

To clarify: don't modify themes.inc.php since nearly everything can be overridden in your theme's theme.php.  (If you are using a core theme, copy the theme to a new folder and set your theme to this new one, then customize it.)

WickedElf

I removed the nested tags, and that does allow validation now.   I didn't remove it before because I was actually misreading the line too and thought it was missing a closing bold tag and that there was the problem... not the redundancy.    :-\   Man, usually I catch myself before I ask really stupid questions on forums, and now I've asked at least 2 or 3 dumb ones on this forum alone.  I'll have to blame it on the post-holiday chaos.  *sigh*

QuoteIt's true that having <b>,</b> around {STATISTICS} makes the nested <b>,</b> tags moot, but is that a validation problem?

Apparently.   ::)

Thanks! 

Paver

Since that is a validation issue, your post has usefully reported a redundancy in the core themes.inc.php script, which offsets your blindness to that poor closing bold tag.