mod_smfRecentPostsv1.1 W3C Validator!

Started by muslim, December 06, 2006, 06:18:39 PM

Previous topic - Next topic

muslim

I'm using this module in my web site but i it to be allways with vaid xhtml code.
The W3C validator warning me that there is some code mistakes:
QuoteLine 161, column 264: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag .

...m_smf&amp;Itemid=94&amp;?action=profile;u=1">admin</a>  <li><a href="http://w

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").


And here is the code with the non valid xhtml:
<?php
echo
'<ul class="', $moduleclass_sfx ,'">';
foreach ($array as $post) {
if ($showboard==1) echo '<li>[', $post['board']['link'], ']';
echo '<li><a href="', $post['href'], '">', $post['subject'], '</a> ';
if ($postline==1) echo '<li> ';
echo $txt[525], ' ', $post['poster']['link'], ' ', $post['new'] ? ' ' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>';
if ($showdate==1) echo '<li>', $post['time'];
}
echo '</ul>';
break;
}
?>


Can you help me pls to validate my web site?
Thanks in advance!

muslim


Advertisement: