Possible to Validate HTML 4.01 Transitional? Possible to Validate HTML 4.01 Transitional?
 

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

Possible to Validate HTML 4.01 Transitional?

Started by oldschoolandrew, June 18, 2007, 09:57:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

oldschoolandrew

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?

vuud

Quote from: oldschoolandrew 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?



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.


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

Quote from: vuud on June 18, 2007, 10:44:36 PM

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!

vuud

Quote from: oldschoolandrew on June 19, 2007, 06:18:41 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.
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

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

vuud

Quote from: oldschoolandrew 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. 

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
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

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();

?>   

vuud

Quote from: oldschoolandrew 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();

?>   

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
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

Quote from: vuud on June 27, 2007, 06:28:50 AM
which is why there are stable and development releases :)

Exactly  :)


Quote from: vuud on June 27, 2007, 06:28:50 AMThe 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!


vuud

Quote from: oldschoolandrew on June 27, 2007, 06:09:16 PM
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
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