Hello

September 07, 2010, 05:44:41 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
What sNews Is: - sNews is a simple, basic, customizable CMS tool suitable for developers with beginner-to-advanced PHP skills. It is also useful to have a good working knowledge of how to work with, set up and manage MySQL databases. sNews is not - geared towards the end-user who knows little or nothing about building and developing PHP-MySQL based websites.
News: Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: sitemap() W3C code  (Read 3013 times)
ha100
Newbie
*

Karma: 6
Posts: 18


« on: October 24, 2008, 01:07:49 AM »

if there are no articles and no categories, code at sitemap() is not W3C valid. it is not a big issue (i guess there will always be some articles or categories), but let's make this piece of code completely perfect Wink

in sitemap()

just find first line from snippet, and add red text
Quote
if (mysql_num_rows($cat_result) == 0) {
   echo '<li><p>'.l('no_articles').'</p></li></ul>';
} else {
Logged
Sven
ULTIMATE member
******

Karma: 76
Posts: 1857


Chasing MY bugs!


WWW
« Reply #1 on: October 24, 2008, 08:45:34 AM »

if there are no articles and no categories, code at sitemap() is not W3C valid. it is not a big issue (i guess there will always be some articles or categories), but let's make this piece of code completely perfect Wink

in sitemap()

just find first line from snippet, and add red text
Quote
if (mysql_num_rows($cat_result) == 0) {
   echo '<li><p>'.l('no_articles').'</p></li></ul>';
} else {
Hi
I don't see what you mean since my HTML sitemap page does validate with the original code.
More, you should not put a <p> inside an <ul>: it's not semantically correct for the document structure. The <li> tag is a list for items.
Logged

funlw65
Hero Member
*****

Karma: 95
Posts: 799



WWW
« Reply #2 on: October 24, 2008, 11:26:47 AM »

if there are no articles ...

Mr. Sven, except for <p> inside list, he is right ...
Logged
philmoz
High flyer
Administrator
ULTIMATE member
******

Karma: 152
Posts: 1848



WWW
« Reply #3 on: October 24, 2008, 11:46:37 AM »

so
Code:
echo '<li>'.l('no_articles').'</li></ul>';
would be the prefered semantic... yes?
Logged

Take offs are optional, landings are mandatory, unless you get into space, then you have other issues.
funlw65
Hero Member
*****

Karma: 95
Posts: 799



WWW
« Reply #4 on: October 24, 2008, 12:11:01 PM »

...  course. Smiley
Logged
philmoz
High flyer
Administrator
ULTIMATE member
******

Karma: 152
Posts: 1848



WWW
« Reply #5 on: October 31, 2008, 07:57:19 PM »

fixed in final release
Logged

Take offs are optional, landings are mandatory, unless you get into space, then you have other issues.
Pages: [1]
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!