1 (edited by minusf 2006-02-22 13:35)

Topic: web standard comliancy (possible empty span in header.php)

are there plans to make punbb 100% w3c compliant?

the code is certainly very clean, respect.  but still i get 4-5 warnings on some of the pages.

this page is ok, for example, but on my forum i get:

line 18 column 7 - Warning: trimming empty <span>


i know these are silly and absolutely harmless.
but it is so easy to fix it....

Re: web standard comliancy (possible empty span in header.php)

punbb is 100% compliant.
Valid Xhtml For Punbb
the errors are probly from a mod.

Re: web standard comliancy (possible empty span in header.php)

well, yes and no.  i don't run any mods yet.

the warnings are mostly coming from "placeholders".
things which are on the page but the variable is empty.
these should be changed to nbsp's.  you get empty tags otherwise.

Re: web standard comliancy (possible empty span in header.php)

can we have a link to your page?

Re: web standard comliancy (possible empty span in header.php)

sure.  http://www.4zivly.sk/forum/

the very first thing: i don't have a site tagline, so i get a

<div id="brdtitle" class="inbox">
            <h1><span>4zivly.sk</span></h1>
            <p><span></span></p>

and should be:
            <p><span></span> </p>

Re: web standard comliancy (possible empty span in header.php)

one more empty tag on viewtopic.php:

                    <dd class="postavatar"></dd>

Re: web standard comliancy (possible empty span in header.php)

validates fine for me

Re: web standard comliancy (possible empty span in header.php)

i use firefox with the "html validator (based on tidy) 0.5.9, which says

"The errors and warnings are generated by Tidy. This program is originally developed by the Web Consortium W3C."


empty tags are very minor "notices".
consider me a hard core validator ;-)

9

Re: web standard comliancy (possible empty span in header.php)

Version 1.3 shows no errors or warnings, at least not out of the box. As for being easy to fix, avoiding emply tags usually involves additional php i.e use an if statement to avoid generating the tag in the first place. I certainly wouldn't use an nbsp; because I consider having a useless character entity far worse than just having an empty tag.

The empty tagline is certainly fixed but of course the header reduces in height. The empty postavatar list item is also fixed.

10

Re: web standard comliancy (possible empty span in header.php)

i still use 1.2.5 with 1.2.6 (stealth) patches (sad versioning i must say)
i don't use development versions.

but i agree, it's certainly more php.  but then we could leave out a *lot* of php
and get ugly code, couldn't we?

sometimes the "useless" character helps to keep the style or the table structure.
nbsp is certainly very useful in many cases...

if all this is fixed in 1.3, that's great, when's 1.3 coming out? ;-)

11

Re: web standard comliancy (possible empty span in header.php)

You don't need nbsp; to maintain table structure anymore, just use empty-cells: show and the css table model. This however does mean people with IE5Mac are screwed. The only time I think they are justified is to avoid wrapping in IE5 and occassionally to layout form controls.

Re: web standard comliancy (possible empty span in header.php)

minusf wrote:

i still use 1.2.5 with 1.2.6 (stealth) patches (sad versioning i must say)

Guilty as charged. You can expect 1.2.6 any day now though.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

13

Re: web standard comliancy (possible empty span in header.php)

the empty span is still there (1.2.10) if there is no "Board description" set in
administration -> options.  as this is not a mandatory setting, i consider this
a very low low low priority bug which breaks the validation.

here's the patch against 1.2.10, it's really brain dead simple,
it can be done without an if so doesn't disturb the source very much.

http://obiit.org/punbb_patches/header.php_patch

ps. as i read back the discussion now, the nbsp is not a good idea.
the admin can still set the "Board description" to nbsp if very inclined to,
it can contain html after all.

Re: web standard comliancy (possible empty span in header.php)

change the line in header.php to something like

if (desc != '')
echo{<p><span> desc code</span></p>}

That will get rid of the code altogether if there is no desc.