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: Validation problem  (Read 3652 times)

0 Members and 1 Guest are viewing this topic.

WickedElf

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Validation problem
« on: January 04, 2006, 04:43:29 am »

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. 

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

Code: [Select]
  '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
Code: [Select]
<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!
« Last Edit: January 04, 2006, 06:30:10 am by GauGau »
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Validation problem
« Reply #1 on: January 04, 2006, 05:10:48 am »

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.)
« Last Edit: January 04, 2006, 05:18:18 am by Paver »
Logged

WickedElf

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Validation problem
« Reply #2 on: January 04, 2006, 05:22:17 am »

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*

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

Apparently.   ::)

Thanks! 
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Validation problem
« Reply #3 on: January 04, 2006, 05:32:37 am »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.