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: Possible to Validate HTML 4.01 Transitional?  (Read 12000 times)

0 Members and 1 Guest are viewing this topic.

oldschoolandrew

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • Mizzou Cycling Gallery
Possible to Validate HTML 4.01 Transitional?
« on: June 18, 2007, 09:57:20 pm »

I've got a perfectly working cpmFetch code but I was wondering if it's possible to make it validate? 

Here's my code: 
"Random Images
      <?php
  include_once "./gallery/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
     $objCpm->cpm_viewRandomMedia(1,4, $options);   
   $objCpm->cpm_viewRandomMedia("cat=1,2,3",1, 4, $options);
   
  $objCpm->cpm_close();
?>"

Here's what shows up when I try to validate (Source listing as given by http://validator.w3.org/check?uri=http%3A%2F%2Fwww.mizzoucycling.com%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&No200=1):
 "Random Images
 <table >

 <tr>

 <td><a href="http://mizzoucycling.com/gallery//displayimage.php?pos=-48" ><img src="http://mizzoucycling.com/gallery//albums/userpics/thumb_crit_%287%29.jpg" alt="crit_(7).jpg" title="crit_(7).jpg" /></a><br /></td>
<td><a href="http://mizzoucycling.com/gallery//displayimage.php?pos=-45" ><img src="http://mizzoucycling.com/gallery//albums/userpics/thumb_ttt_%282%29.jpg" alt="ttt_(2).jpg" title="ttt_(2).jpg" /></a><br /></td>
 <td><a href="http://mizzoucycling.com/gallery//displayimage.php?pos=-13" ><img src="http://mizzoucycling.com/gallery//albums/userpics/thumb_Murray.JPG" alt="Murray.JPG" title="Murray.JPG" /></a><br /></td>
 <td><a href="http://mizzoucycling.com/gallery//displayimage.php?pos=-36" ><img src="http://mizzoucycling.com/gallery//albums/userpics/thumb_markiuds12te.jpg" alt="markiuds12te.jpg" title="markiuds12te.jpg" /></a><br /></td>

</tr>


</table>

 <table >


 </table>"

I'm still working on learning PHP...but I've come a good way in a short time.

What I don't understand is where the last two table tags are coming from when the code goes through validation?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Possible to Validate HTML 4.01 Transitional?
« Reply #1 on: June 18, 2007, 10:44:36 pm »

I've got a perfectly working cpmFetch code but I was wondering if it's possible to make it validate? 

Here's my code: 
"Random Images
      <?php
  include_once "./gallery/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
     $objCpm->cpm_viewRandomMedia(1,4, $options);   
   $objCpm->cpm_viewRandomMedia("cat=1,2,3",1, 4, $options);
   
  $objCpm->cpm_close();
?>"

Here's what shows up when I try to validate (Source listing as given by http://validator.w3.org/check?uri=http%3A%2F%2Fwww.mizzoucycling.com%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&No200=1):
 "Random Images
 <table >

 <tr>

 <td><a href="http://mizzoucycling.com/gallery//displayimage.php?pos=-48" ><img src="http://mizzoucycling.com/gallery//albums/userpics/thumb_crit_%287%29.jpg" alt="crit_(7).jpg" title="crit_(7).jpg" /></a><br /></td>
<td><a href="http://mizzoucycling.com/gallery//displayimage.php?pos=-45" ><img src="http://mizzoucycling.com/gallery//albums/userpics/thumb_ttt_%282%29.jpg" alt="ttt_(2).jpg" title="ttt_(2).jpg" /></a><br /></td>
 <td><a href="http://mizzoucycling.com/gallery//displayimage.php?pos=-13" ><img src="http://mizzoucycling.com/gallery//albums/userpics/thumb_Murray.JPG" alt="Murray.JPG" title="Murray.JPG" /></a><br /></td>
 <td><a href="http://mizzoucycling.com/gallery//displayimage.php?pos=-36" ><img src="http://mizzoucycling.com/gallery//albums/userpics/thumb_markiuds12te.jpg" alt="markiuds12te.jpg" title="markiuds12te.jpg" /></a><br /></td>

</tr>


</table>

 <table >


 </table>"

I'm still working on learning PHP...but I've come a good way in a short time.

What I don't understand is where the last two table tags are coming from when the code goes through validation?



Okay, the first error in the validation  I believe is from the code in your page, not the cpmfetch output and is pretty self explanatory.

The second is due to probably my code... the second call you make is not finding any matches, but putting an empty table in there.  Yes, I agree that is bad and should be done away with.

I will make a note to fix that.


Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

oldschoolandrew

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • Mizzou Cycling Gallery
Re: Possible to Validate HTML 4.01 Transitional?
« Reply #2 on: June 19, 2007, 06:18:41 am »


Okay, the first error in the validation  I believe is from the code in your page, not the cpmfetch output and is pretty self explanatory.

The second is due to probably my code... the second call you make is not finding any matches, but putting an empty table in there.  Yes, I agree that is bad and should be done away with.

I will make a note to fix that.

There's only one error that I saw.

Thanks for the info, I thought it was something like that but I couldn't figure out any way to change the code and still get images to show up.  Like I said, I don't know much PHP yet.

Thanks for the great tool!
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Possible to Validate HTML 4.01 Transitional?
« Reply #3 on: June 20, 2007, 04:17:54 am »

There's only one error that I saw.

Thanks for the info, I thought it was something like that but I couldn't figure out any way to change the code and still get images to show up.  Like I said, I don't know much PHP yet.

Thanks for the great tool!


Maybe you were playing with the page when I hit it before.  Anyway, I made a code change - and it will be put up with version 2.1.1 in the next day or two.  I have one other bit of code to redo before I post it.
Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

oldschoolandrew

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • Mizzou Cycling Gallery
Re: Possible to Validate HTML 4.01 Transitional?
« Reply #4 on: June 26, 2007, 09:48:19 pm »

Sorry to bother you again.  Just have another question.

Well, first, I was extremely impressed with how quickly you made changes to the code to get rid of the table validation error. 


Now my problem is this (after updating to the latest cpmFetch code):

For every "random image" on my site I get this validation error:

"Line 74, Column 150: required attribute "ALT" not specified." 
Can be found at: http://validator-test.w3.org/check?uri=http%3A%2F%2Fwww.mizzoucycling.com%2F

I understand this error within the realm of xhtml coding, but I don't understand why I'm getting this error know and I wasn't with the previous version of cpmFetch code?

Thanks!
Andrew
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Possible to Validate HTML 4.01 Transitional?
« Reply #5 on: June 26, 2007, 11:14:24 pm »

Sorry to bother you again.  Just have another question.

Well, first, I was extremely impressed with how quickly you made changes to the code to get rid of the table validation error. 

It was actually a good thing... I looked at it and found that PHP was evaluating a number of lines of code even though it did not have too.  So fixing this made cpmfetch more efficent.  Of course we are talking 0.0000000005 seconds of an improvement, but I look at it as lines of code.

Quote
Now my problem is this (after updating to the latest cpmFetch code):

For every "random image" on my site I get this validation error:

"Line 74, Column 150: required attribute "ALT" not specified." 
Can be found at: http://validator-test.w3.org/check?uri=http%3A%2F%2Fwww.mizzoucycling.com%2F

I understand this error within the realm of xhtml coding, but I don't understand why I'm getting this error know and I wasn't with the previous version of cpmFetch code?

Thanks!
Andrew

I will have to check this... AFAIK I use the filename if an alt tag is not specified - the code there has not changed.  I checked my site, which apparently is not running 2.1.1 and it works.  I will upgrade.

Can you post the PHP code you are using to generate that block?

Thanks

Vuud
Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

oldschoolandrew

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • Mizzou Cycling Gallery
Re: Possible to Validate HTML 4.01 Transitional?
« Reply #6 on: June 27, 2007, 05:37:47 am »

My code is:
  <?php

  include_once "./gallery/cpmfetch/cpmfetch.php";

  $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");

     $options = array( 'imagesize' => 'thumb');

    $objCpm->cpm_viewRandomMedia(1,4, $options);   

   $objCpm->cpm_viewRandomMedia("cat=1,2,3",1, 4, $options);

  $objCpm->cpm_close();

?>   
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Possible to Validate HTML 4.01 Transitional?
« Reply #7 on: June 27, 2007, 06:28:50 am »

My code is:
  <?php

  include_once "./gallery/cpmfetch/cpmfetch.php";

  $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");

     $options = array( 'imagesize' => 'thumb');

    $objCpm->cpm_viewRandomMedia(1,4, $options);   

   $objCpm->cpm_viewRandomMedia("cat=1,2,3",1, 4, $options);

  $objCpm->cpm_close();

?>   

The good news is that its nothing you've done, and I have confirmed it is broken in the code somewhere - which is why there are stable and development releases :)

The bad news is that there is a bug and I did not have time to fix it tonight.  You can try to force an alt tag by specifiying one in the options array - that may dump one out for you - thus passing the validation
Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

oldschoolandrew

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
    • Mizzou Cycling Gallery
Re: Possible to Validate HTML 4.01 Transitional?
« Reply #8 on: June 27, 2007, 06:09:16 pm »

which is why there are stable and development releases :)

Exactly  :)


The bad news is that there is a bug and I did not have time to fix it tonight.  You can try to force an alt tag by specifiying one in the options array - that may dump one out for you - thus passing the validation
I might give that a try in the next couple days.

Thanks!

Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Possible to Validate HTML 4.01 Transitional?
« Reply #9 on: June 28, 2007, 03:39:28 am »

Exactly  :)

I might give that a try in the next couple days.

Thanks!

I fixed it in the next release (2.1.2) but I have a few things to get done before I post that.  Adding an ALT tag to the options array would also definately do it.

Vuud
Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco
Pages: [1]   Go Up
 

Page created in 0.039 seconds with 20 queries.