1
wanikoo
Let's make XOOPS valid xhtml1.0 transitional!
  • 2005/4/4 14:47

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Let's make XOOPS valid xhtml1.0 transitional!

First,
replacing
,
with
,


Empty elements must either have an end tag or the start tag must end with />
------------------------------------------

->

----------------------------------------
/html/class/errorhandler.php
line 169
$output .= sprintf( "%s in file %s line %s
\n", $error['errstr'], $error['errfile'], $error['errline'] );

/html/modules/xoopspoll/admin/index.php
line 441
echo "
View Log
Sorry, not yet. ";

/html/modules/mydownloads/blocks/mydownloads_top.php
line 74
$form .= " 
"._MB_MYDOWNLOADS_CHARS."  "._MB_MYDOWNLOADS_LENGTH."";

/html/modules/mylinks/blocks/mylinks_top.php
line 71
$form .= " 
"._MB_MYLINKS_CHARS."  "._MB_MYLINKS_LENGTH."";

/html/modules/news/blocks/news_top.php
line68
$form .= " 
"._MB_NEWS_CHARS."  "._MB_NEWS_LENGTH."";


/html/modules/system/admin/banners/xoops_version.php
$modversion['author'] = "Francisco Burzi
( http://phpnuke.org/ )";

/html/modules/system/admin/findusers/xoops_version.php
$modversion['author'] = "Kazumi Ono
( http://www.myweb.ne.jp/ )";

/html/modules/system/admin/mailusers/xoops_version.php
$modversion['author'] = "Kazumi Ono
( http://www.myweb.ne.jp/ )";

/html/modules/system/admin/modulesadmin/xoops_version.php
$modversion['author'] = "Kazumi Ono
( http://www.mywebaddons.com/ )";

/html/modules/system/admin/users/xoops_version.php
$modversion['author'] = "Francisco Burzi
( http://phpnuke.org/ )";

/html/modules/xoopsheadline/xoops_version.php
$modversion['author'] = "Kazumi Ono
( https://xoops.org/ http://www.xoopscube.jp/ http://www.myweb.ne.jp/ )";

and in lang file
/html/modules/newbb/language/english/admin.php
define("_MD_A_YDNFOATPOTFDYAA","You did not fill out all the parts of the form.
Did you assign at least one moderator? Please go back and correct the form.");
/html/modules/newbb/language/english/main.php
define("_MD_ANONNOTALLOWED","Anonymous user not allowed to post.
Please register.");
/html/modules/sections/language/english/main.php
define("_MD_MUSTREGFIRST","You need to be a registered user or logged in to send a modify request.
Please register or login first!");

-------------------------------------------

->

--------------------------------------
/html/modules/mydownloads/admin/index.php
line 335
echo "
";

/html/modules/mylinks/admin/index.php
line 311
echo "
";

/html/modules/sections/admin/index.php
line 49
echo "

line 61


line 82


line 103


line 146



--------------------------------------------
& -> &
--------------------------------------------
/html/search.php
line 191
$search_url .= "&mid=$mid&action=showall&andor=$andor";
line 253
$search_url .= "&mid=$mid&action=$action&andor=$andor";
line 255
$search_url .= "&uid=$uid";
line 261
$search_url_prev = $search_url."&start=$prev";
line 269
$search_url_next = $search_url."&start=$next";

/html/modules/system/admin/blocksadmin/blockform.php
line 61
$form->addElement(new XoopsFormLabel(_AM_CONTENT, ''._AM_EDITTPL.''));
line 65
$form->addElement(new XoopsFormLabel(_AM_CONTENT, ''._AM_EDITTPL.''));

---------------------------------------------
->
-----------------------------------------
/html/modules/system/admin/banners/banners.php
line 165
"._AM_USEHTML."
line 300
echo " ";
line 302
echo " ";

----------------------------------------
embed -> object
-----------------------------------------
/include/functions.php

function xoops_getbanner()

From:
if (stristr($imageurl'.swf')) {
                
$bannerobject $bannerobject
                    
.''
                    
.'.$imageurl.'">'
                    
.''
                    
.'.$imageurl.'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"; type="application/x-shockwave-flash" width="468" height="60">'
                    
.''
                    
.'';
            } else {
                
$bannerobject $bannerobject.'.$imageurl.'" alt="" />';
            }

( btw, in ShockwaveFlash"; Umm.. no need ; !! )

to:
if (stristr($imageurl'.swf')) {
                
$bannerobject $bannerobject
                    
.'.$imageurl.'" width="468" height="60">'
                    
.'.$imageurl.'" />'
                    
.''
                    
.'';
            } else {
                
$bannerobject $bannerobject.'.$imageurl.'" alt="" />';
            }

same fix needed in /html/banners.php

Read this article if you want more info.
http://www.alistapart.com/articles/flashsatay/
---------------------------------

and bug fix!

/html/modules/system/admin/smiles/smiles.php
line 70
From:
if ($smiles['display'] == 1) {
echo ' checked="checked"';
}
To:
if ($smiles['display'] == 1) {
echo ' checked="checked"';
}
echo " />";

Umm...
I think it's still not perfect.

-------To be continued---------^^;;

2
risto
Re: Let's make XOOPS valid xhtml1.0 transitional!
  • 2005/4/4 14:51

  • risto

  • Not too shy to talk

  • Posts: 159

  • Since: 2003/4/16


solid.

I totaly agree.

3
Herko
Re: Let's make XOOPS valid xhtml1.0 transitional!
  • 2005/4/4 14:59

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Submit them to the Core Trackers, so we can add these to the 2.1 code There are a number of other issues (labels, accesskeys, etc.) that an XHTML 1.0 strict valid output needs, and I think we should work towards that as well, as well as Section 508 and AAA accessibility standards. Who's up for this challenge? To test the XOOPS core (not any modules, to start with) for these standards?
- XHTML 1.0 strict
- CSS 2.0
- Section 508/AAA web accessibility

If you find any code or templates that need to be adjusted because of this, submit them to the trackers, so we can deal with them

Herko

4
wanikoo
Re: Let's make XOOPS valid xhtml1.0 transitional!
  • 2005/4/4 17:14

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

Herko Coomans wrote:
If you find any code or templates that need to be adjusted because of this, submit them to the trackers, so we can deal with them

Herko

Ok^^
--------------------------------
/html/viewpmsg.php

----------------------
line 68
echo "\n";

During validation check( http://validator.w3.org/ ),
the code above gives us this error message.....

Errors: character "[" is not allowed in the value of attribute "id"

so...we need to change it like this...
from
id='msg_id[]'
to
id='msg_id".$i."'

And...


the structure above also gives us some error message in case of viewpmsg.php.
so we need to change it like this..
From:

To:


------------------------------
After this modification,
we can get this message, "This Page(viewpmsg.php) Is Valid XHTML 1.0 Transitional!" from W3 validator.

------------To be continued--------

PS:
btw,
I will make my PM-hack valid XHTML 1.0 transitional in the next version^^;;

5
Mithrandir
Re: Let's make XOOPS valid xhtml1.0 transitional!

Quote:
submit them to the trackers, so we can deal with them

Trackers are here

6
wanikoo
Re: Let's make XOOPS valid xhtml1.0 transitional!
  • 2005/4/4 19:50

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


-------------------------------------------
system_userinfo.html(userinfo.php)
------------------------------------------

document type does not allow element "h4" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

Downloads



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

From:

<{foreach 
item=module from=$modules}>

<
p>
<
h4><{$module.name}>h4>

  
  <{foreach 
item=result from=$module.results}>

  <
img src="<{$result.image}>" alt="<{$module.name}>" /><b><a href="<{$result.link}>"><{$result.title}>a>b><br /><small>(<{$result.time}>)small><br />

  <{/foreach}>
  

<{
$module.showall_link}>
p>

<{/foreach}>

To:

<{foreach 
item=module from=$modules}>

<
p>p>
<
h4><{$module.name}>h4>

  
  <{foreach 
item=result from=$module.results}>

  <
img src="<{$result.image}>" alt="<{$module.name}>" /><b><a href="<{$result.link}>"><{$result.title}>a>b><br /><small>(<{$result.time}>)small><br />

  <{/foreach}>
  

<{
$module.showall_link}>
<
p>p>

<{/foreach}>

or
instead of

, we can use other tags such as
...etc.

----------

After this modification,
we can get this message, "This Page(userinfo.php) Is Valid XHTML 1.0 Transitional!" from W3 validator.

7
wanikoo
Re: Let's make XOOPS valid xhtml1.0 transitional!
  • 2005/4/4 19:51

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


-----------------------------------
pages with form class (ex: edituser.php)
--------------------------------


or

or

or


This kind of coding above always give us some error message like this....

document type does not allow element "input" here

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading

Refer to this page
http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd

So..
If we use form classes such as XoopsTableForm(tableform.php), XoopsThemeForm(themeform.php) with XoopsFormHidden(formhidden.php),
we can never get the message," "This Page Is Valid XHTML 1.0 Transitional!" from W3 validator.

ex)
tableform.php
function render()
    {
        
$ret $this->getTitle()."n.$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">nn";
        foreach ( 
$this->getElements() as $ele ) {
            if ( !
$ele->isHidden() ) {
                
$ret .= "".$ele->getCaption();
                if (
$ele->getDescription() != '') {
                    
$ret .= ''.$ele->getDescription().''
;
                }
                
$ret .= "".$ele->render()."";
            } else {
                
$ret .= $ele->render()."n";
            }
        }
        
$ret .= "nn";
        return 
$ret;
    }

if element is hidden,
it will be rendered like this!
$ret .= $ele->render()."\n";

formhidden.php
function render(){
        return 
".$this->getName()."' id='".$this->getName()."' value='".$this->getValue()."' />";
    }


Umm...
I think there are some solutions for this problem..
At my first thought,
maybe...
the most simplest solution is to just remove if ( !$ele->isHidden() ) process like this below.
tableform.php
//if ( !$ele->isHidden() ) {
                
$ret .= "".$ele->getCaption();
                if (
$ele->getDescription() != '') {
                    
$ret .= ''.$ele->getDescription().''
;
                }
                
$ret .= "".$ele->render()."";
            
//} else {
            //    $ret .= $ele->render()."n";
            //}

themeform.php
if (!is_object($ele)) {
                
$ret .= $ele;
            
//} elseif (!$ele->isHidden()) {
            
} else {
                
//if ($count % 2 == 0) {
                    
$class 'even';
                
//} else {
                //    $class = 'odd';
                //}
                
$ret .= "".$ele->getCaption();
                if (
$ele->getDescription() != '') {
                    
$ret .= ''.$ele->getDescription().''
;
                }
                
$ret .= "$class'>".$ele->render()."";
                
//$count++;
            //} else {
            //    $ret .= $ele->render();
            
}


------------------------------
After this modification,
(......although we use form classes.....)
we can get this message, "This Page(ex: edituser.php) Is Valid XHTML 1.0 Transitional!" from W3 validator.

--------To be continued--------------

8
Herko
Re: Let's make XOOPS valid xhtml1.0 transitional!
  • 2005/4/4 20:03

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Wanikoo: PLEASE PLEASE PLEASE ADD THESE TO THE CORE DEVELOPMENT PATCH TRACKERS ON SF.NET! We will not be able to fix all these if this isn't submitted to the trackers...

Herko

9
WarDick
Re: Let
  • 2005/4/4 20:11

  • WarDick

  • Just can't stay away

  • Posts: 890

  • Since: 2003/9/13


Wanikoo

Thank you for posting this valuable information here. It is very educational. As we all know the posting of information on the tracker is much like posting in a black hole. What goes in doesn't always come out.

You contributions are awesome. Thank You!

10
wanikoo
Re: Let
  • 2005/4/4 20:45

  • wanikoo

  • Not too shy to talk

  • Posts: 129

  • Since: 2003/12/27


Quote:

submit them to the trackers, so we can deal with them

I did right now.
Umm..
btw..
this has just started..
and..
still going on ..
so..
just for reference

Login

Who's Online

410 user(s) are online (292 user(s) are browsing Support Forums)


Members: 0


Guests: 410


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits