vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Im Trying to XHTML Validate my board... (https://vborg.vbsupport.ru/showthread.php?t=76174)

Guy G 02-12-2005 08:42 AM

Im Trying to XHTML Validate my board...
 
Im trying to validate my forum, so far i had 139 errors..
I got them down to 59 errors.
But there are some things that i dont know even how to approach in order to fix them...

I cant fix all of these errors:
http://validator.w3.org/check?uri=ht...tomatically%29

If anyone would be kind enough to have a look an tell me how to fix some ill be happy...(most errors are of the same kind)


Thanks,
www.ex-zone.com

Dean C 02-12-2005 11:06 AM

Half of those errors are due to incorrect nesting. As you're validating your XHTML i'm assuming you know the three golden rules. Nesting should be consistent being one of them. Go through your code and find out where you are not closing tags etc. Then that'll narrow it down so we can help some more :)

Princeton 02-12-2005 12:45 PM

yep, I agree ... and
1. you are using deprecated tags/attributes.
2. image tags are not being closed properly

Guy G 02-12-2005 01:47 PM

Quote:

Originally Posted by Dean C
Half of those errors are due to incorrect nesting. As you're validating your XHTML i'm assuming you know the three golden rules. Nesting should be consistent being one of them. Go through your code and find out where you are not closing tags etc. Then that'll narrow it down so we can help some more

So nesting is the issue.... ill try and see if i can do it. loads of code there.

Quote:

Originally Posted by princeton
yep, I agree ... and
1. you are using deprecated tags/attributes.
2. image tags are not being closed properly

What do u mean deprecated tags \ attr ?

and where is there an error about improper closure of an img tag?

Princeton 02-12-2005 01:53 PM

valign is a deprecated attribute
onClick should be onclick
etc.

<img src="" alt="" title="" /> <-- the proper way to close image when using XHTML
FYI: All tags that do not have a closing end should be closed properly.

Guy G 02-12-2005 02:08 PM

Quote:

Originally Posted by princeton
valign is a deprecated attribute
onClick should be onclick
etc.

<img src="" alt="" title="" /> <-- the proper way to close image when using XHTML
FYI: All tags that do not have a closing end should be closed properly.

The onclick will be fixed.
Whats the replacement for valign?
and all the single tag tags are closed.

sabret00the 02-12-2005 02:22 PM

Quote:

Originally Posted by Guy G
The onclick will be fixed.
Whats the replacement for valign?
and all the single tag tags are closed.

style="vertical-align: top"


:)

Guy G 02-12-2005 02:41 PM

Quote:

Originally Posted by sabret00the
style="vertical-align: top"

Thanks m8 :D

Hmmm valign doesnt seem to affect it to be XHTML valid...

Dean C 02-12-2005 05:07 PM

Sort out those nesting issues Guy! :p lol

Guy G 02-14-2005 08:54 AM

Quote:

Originally Posted by Dean C
Sort out those nesting issues Guy! :p lol

Can't... The skin company did a loousy job on nesting it.
And going through all that code would be crazy...

neocorteqz 02-14-2005 09:10 AM

Quote:

Originally Posted by Guy G
Can't... The skin company did a loousy job on nesting it.
And going through all that code would be crazy...

not that hard. :) Yes it will take a long time, but it's not that hard. :)

Guy G 02-14-2005 09:29 AM

To be honest, i have no idea how to fix them...
For example:
Quote:

Originally Posted by XHTML validator
Line 352, column 942: end tag for "td" omitted, but OMITTAG NO was specified

...f')">&nbsp;</td> </tr> </table> </div> <!-- nav buttons bar --> <div align="l

You may have neglected to close a tag, or perhaps you meant to "self-close" a tag; that is, ending it with "/>" instead of ">".

I found where it is. But i dont understand this line "end tag for "td" omitted, but OMITTAG NO was specified"


...

Dean C 02-14-2005 09:35 AM

It means incorrect nesting. Either you've started a <td> tag and not closed it, or you've wrote a </td> when there is no <td> to start it.

Guy G 02-14-2005 10:40 AM

Quote:

Originally Posted by Dean C
It means incorrect nesting. Either you've started a <td> tag and not closed it, or you've wrote a </td> when there is no <td> to start it.

Ok i see... i think i know where the problem is than... thanks.

Ok so i got it to 27 errors alone.. check it here: http://validator.w3.org/check?uri=ht...&sp=1#line-352

now it seems most of the errors generate out of this block. anyone willing to have a quick look?

HTML Code:

//--> </script> <!-- logo --> <a name="top"></a> <div align="center">
 <table width="85%"  border="0" cellspacing="0" cellpadding="1"> <tr> <td bgcolor="#000000">
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr> <td width="100%" align="left" style="vertical-align: top">
<table width="100%"  border="0" cellspacing="0" cellpadding="0"> <tr>
<td bgcolor="#FFFFFF"> <table cellpadding="1" width="100%">
<tr> <td bgcolor="#304157"> <table width="100%"  border="0" cellspacing="0" cellpadding="0"> <tr>
<td align="left" style="background-image: url('images/satellite/header/header_bg.gif')" bgcolor="#F2F4F6">
<a href="index.php"><img src="images/satellite/header/logo.gif" border="0" alt="" /></a></td> </tr> </table>
<!-- /logo -->
<table width="100%"  border="0" cellspacing="0" cellpadding="0"> <tr> <td height="22" style="background-image: url('images/satellite/gradients/nav_top_blue.gif')">&nbsp;</td>
</tr> </table> </div> <!-- nav buttons bar -->
<div align="left"> <table class="tborder" cellpadding="100%" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center"> <!--<td class="vbmenu_control"><a href="index.php?amp;">Home</a></td>--> <td class="vbmenu_control"><a href="register.php?amp;">Register</a>
</td> <td class="vbmenu_control"><a href="faq.php?amp;" accesskey="5">FAQ</a></td> <td class="vbmenu_control">
<a href="memberlist.php?amp;">Members List</a></td> <td class="vbmenu_control"><a href="calendar.php?amp;">Calendar</a>
</td> <td class="vbmenu_control"><a href="forumdisplay.php?amp;do=markread">Mark Forums Read</a></td> <td class="vbmenu_control"><a href="#bottom">Bottom</a></td>
 </tr>
 </table> </div> <!-- / nav buttons bar --> <div align="center"> <table width="100%"  border="0" cellspacing="0" cellpadding="0"> <tr>
 <td height="19" style="background-image: url('images/satellite/gradients/nav_bottom_bg.gif')">&nbsp;</td>
</tr> </table> </div> <!-- content table --> <!-- BEGIN TEMPLATE: spacer_open --> <!-- open content container --> <div align="center">
 <div class="page" style="width:100%; text-align:left"> <div style="padding:0px 15px 0px 15px"> <!-- END TEMPLATE: spacer_open -->
<p></p> <div align="center" style="font-size: 20px; font-family: tahoma, verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif


neocorteqz 02-14-2005 01:04 PM

Quote:

Originally Posted by Guy G
Ok i see... i think i know where the problem is than... thanks.

Ok so i got it to 27 errors alone.. check it here: http://validator.w3.org/check?uri=ht...&sp=1#line-352

now it seems most of the errors generate out of this block. anyone willing to have a quick look?

HTML Code:

//--> </script> <!-- logo --> <a name="top"></a> <div align="center">
 <table width="85%"  border="0" cellspacing="0" cellpadding="1"> <tr> <td bgcolor="#000000">
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr> <td width="100%" align="left" style="vertical-align: top">
<table width="100%"  border="0" cellspacing="0" cellpadding="0"> <tr>
<td bgcolor="#FFFFFF"> <table cellpadding="1" width="100%">
<tr> <td bgcolor="#304157"> <table width="100%"  border="0" cellspacing="0" cellpadding="0"> <tr>
<td align="left" style="background-image: url('images/satellite/header/header_bg.gif')" bgcolor="#F2F4F6">
<ahref="index.php"><imgsrc="images/satellite/header/logo.gif"border="0"alt=""/></a></td></tr></table>
<!-- /logo -->
<tablewidth="100%"border="0"cellspacing="0"cellpadding="0"><tr><tdheight="22"style="background-image:url('images/satellite/gradients/nav_top_blue.gif')">&nbsp;</td>
</tr> </table> </div> <!-- nav buttons bar -->
<divalign="left"><tableclass="tborder"cellpadding="100%"cellspacing="0"border="0"width="100%"align="center"style="border-top-width:0px">
<tralign="center"><!--<tdclass="vbmenu_control"><ahref="index.php?amp;">Home</a></td>--><tdclass="vbmenu_control"><ahref="register.php?amp;">Register</a>
</td><tdclass="vbmenu_control"><ahref="faq.php?amp;"accesskey="5">FAQ</a></td><tdclass="vbmenu_control">
<ahref="memberlist.php?amp;">MembersList</a></td><tdclass="vbmenu_control"><ahref="calendar.php?amp;">Calendar</a>
</td><tdclass="vbmenu_control"><ahref="forumdisplay.php?amp;do=markread">MarkForumsRead</a></td><tdclass="vbmenu_control"><ahref="#bottom">Bottom</a></td>
 </tr>
</table> </div> <!-- /navbuttonsbar--><divalign="center"><tablewidth="100%"border="0"cellspacing="0"cellpadding="0"><tr>
 <td height="19" style="background-image: url('images/satellite/gradients/nav_bottom_bg.gif')">&nbsp;</td>
</tr> </table> </div><!--contenttable--><!--BEGIN TEMPLATE: spacer_open--><!--opencontentcontainer --><div align="center">
<divclass="page"style="width:100%;text-align:left"><divstyle="padding:0px15px0px15px"><!-- END TEMPLATE:spacer_open-->
<p></p><divalign="center"style="font-size:20px;font-family:tahoma,verdana,geneva, lucida,'lucida grande',arial,helvetica,sans-serif


I could figure it out better if I could see the template. Or Just the section of code in question.

It would take me some time to figure out what's what with thecodepastedfrom the results from your XHTML Vebose validation. I see things easierin the templates than i do with the raw ouput.

But if you want to do it yourself, take in the template that code isin, and where you see an open tag like <td>, and Close it
for example.

HTML Code:

<td class="vbmenu_control"><a href="usercp.php?$session[sessionurl]">$vbphrase[user_cp]</a></td>
The above is proper.

HTML Code:

<td class="vbmenu_control"><a href="usercp.php?$session[sessionurl]">$vbphrase[user_cp]</a>
The above is not proper, it is missing a </td> tag.

If you see an open <tr> tag also close it.

Note the following example.
HTML Code:

<!-- Arcade Search -->

                <tr>
                        <td class="thead">Arcade Game Search</td>
                </tr>
                <tr>
                        <td class="vbmenu_option" title="nohilite">
                        <formaction="arcade.php?do=category"method="post">
                        <inputtype="text"class="bginput"name="search"size="20"/>$gobutton<br/>
                        </form>
                        </td>
                </tr>
                                        <!--ArcadeSearch-->

Unless i made a mistake (which i shouldn't have it's not my code. :)) That is proper.

all it is, is going through your template and where you see a tag open and not closed. close it.

Now when you start to close all the open tags most of the other stuffshould go away with it, because it's directly linked to the error's forthe non closed tags.

now if you see this

Line 356, column 942: end tag for "tr" omitted, but OMITTAG NO was specified


that means a <tr> was never started. so it's trying to close atag that was never opened. Like in the example above,you'll note how itstarted and ended it's tags. It should be safe to removethe</tr>, but just in case, you can always omit the tagwith<!--</tr> -->, If no error's show up, then you can justremove the code. First make sure that there indeed was no <tr>needed, or started above, but closed to early.


Same thing goes for <table> and</table> tags. ift hey'renot closed. close them, if they're not opened, test first, then removeif it's sucessfull.

an example of a properly opened and closed table

HTML Code:

<!-- Addon to John's vB3 ArcadeV3 hack - created by Natch -->
    <if condition="$show['member']">
    <!-- flash arcade auto-menu -->
    <div class="vbmenu_popup" id="flasharcade_menu" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">
<tr><tdclass="thead"><ahref="$vboptions[bburl]/arcade.php?$session[sessionurl]"title="$vbphrase[arcade_addon_title]">$vbphrase[arcade_addon_title]</a></td></tr>
$nav_arcade
        </table>
    </div>
    <!-- / flash arcade auto-menu -->
    </if>
<!-- Addon to John's vB3 ArcadeV3 hack - created by Natch -->


Guy G 02-14-2005 02:32 PM

1 Attachment(s)
Thanks for your time.
But the problem is that there are so many tags and tables within tables within tables thats its nearly impossible to figure it out...

You know any XHTML editor who would show me nesting problems of tags?

This is the header template, the source for most problems...


All times are GMT. The time now is 05:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01528 seconds
  • Memory Usage 1,828KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_html_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete