31
jph000
vlweather 0.9 XHTML Validation
  • 2009/2/24 1:13

  • jph000

  • Just popping in

  • Posts: 60

  • Since: 2004/8/2 2


In case anyone's interested in the status of legacy modules under XOOPS 2.3.2 and PHP5 and XHTML validation, my changes to get vlweather 0.9 to validate for CSS level 2 and XHTML 1.0 Transitional are summarized below. Note: Replacement of $HTTP_GET_VARS with $_GET for PHP5 compatibility already had been done.

1. templates/blocks/vlweatherblock.html

OLD

<div style="text-align: center;">
<b><{$block.location}></b>
<b><{$block.time}></b>
<center><a href="<{$block.moreurl}>"><IMG SRC="<{$block.image}>" alt="" height="50" width="50" border="1"></a></center>
<{$block.conditions}>
<{$block.temp}><{$block.feels}>
<{$block.rel_humidity}>
<{$block.dew}>
<{$block.bar}>&nbsp;<{$block.bardir}>
<{$block.windspeed}>
<{$block.rec_precip}>
<{$block.forecast}>
<{$block.usersettings}>
</div>

NEW
<div style="text-align: center;">
<b><{$block.location}></b><br />
<b><{$block.time}></b><br />
<a href="<{$block.moreurl}>"><img src="<{$block.image}>" alt="" height="50" width="50" border="1" /></a><br />
<{$block.conditions}>
<{$block.temp}><{$block.feels}>
<{$block.rel_humidity}>
<{$block.dew}>
<{$block.bar}>&nbsp;<{$block.bardir}>
<{$block.windspeed}>
<{$block.rec_precip}>
<{$block.forecast}>
<{$block.usersettings}>
</div>

2. blocks/vlweatherblock.php

13 occurrences replaced <br> with <br />

4 occurrences removed <center> and </center> tags

3. change.php

2 occurrences removed <center> and </center> tags

4. class/vlweather.php

OLD
$content ="<center><font class=\"sideboxfont\">" . _VL_BL_CONDAO . "<br />" . $hago . $mago . _VL_BL_AGO ."</font></center>\n";

2 occurrences removed <center> and </center> tags

4 occurrences replaced in href link code of simple ampersands with ampersand string equivalent: ampersand city



32
jph000
Re: WF-Links 1.06 XHTML Validation - additional edits
  • 2009/2/11 18:21

  • jph000

  • Just popping in

  • Posts: 60

  • Since: 2004/8/2 2


McDonald, thanks for letting me know that version 1.07 is available. I am not sure what you are asking regarding difference in browser(s). Modern browsers tolerate differences from declared HTML standards. (Using standards compliance mode for my new Web projects, I check for W3C validation with zero errors.)

My standard for HTML / XHTML validation is W3C Markup Validator v0.8.4 (currently). Visual inspection of code confirms whether there is an actual issue, as well as what items later in the error list are cascades from earlier errors.

For example, thanks for noting in your bug history for 1.07 the print fixes. Sometimes I do not validate print features. I just ran W3C Markup Validator on a wflinks 1.06 print.php action and the Validator detected both div and body tag issues you noted in your bug fix list (as well as a <script for=window event=onload language="javascript"> issue which I'll check sometime).

My standard browsers are Firefox, Internet Explorer, Safari, and Opera, by the way.




33
jph000
Re: WF-Links 1.06 XHTML Validation - additional edits
  • 2009/2/10 22:18

  • jph000

  • Just popping in

  • Posts: 60

  • Since: 2004/8/2 2


1. templates/wflinks_singlelink.html

Five absmiddle's were replaced with middle.

Lines 1 - 14 inline style (css) block not allowed in body (versus head section) of page. Hmm ... how to relocate or ... Generated code contains the style lines after a "<!-- Start content module page -->" comment.

The 'socbookmark' style only is used in line 88 which only generates HTML code if $link.showsbookmarx > 0 -- that is, if Show Social Bookmarks is set to 'Yes' in the module's config options. Since I had this option set to 'No' the simple solution for validation was to remove the 14 lines in question.

2. templates/wflinks_linkload.html

Four absmiddle's were replaced with middle.

3, singlelink.php

Line 208 was missing alt attribute.

4. topten.php

For the Popular and Top Rated pages, line 61 was missing alt attribute.

5. include/linkloadinfo.php

Line 145 had simple ampersand for mail body parameter.

2-11-2009 [Some of these fixed in version 1.07.]

templates/wflinks_print.html

OLD

<body>
<script for=window event=onload language="javascript">
window.print();
</script>

<body style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px;" bgcolor="#ffffff" text="#000000">

NEW

<body style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 12px;" bgcolor="#ffffff" text="#000000" onload="window.print()">

Missing </div> tag for line 23.

print.php

Six absmiddle's replaced with middle.



34
jph000
Re: SmartFAQ 1.08 XHTML Validation
  • 2009/2/10 1:20

  • jph000

  • Just popping in

  • Posts: 60

  • Since: 2004/8/2 2


Additional note for smartfaq 1.08

images/smartfaq_logo.png was corrupt in the released package.



35
jph000
Stockquotes 0.1 XHTML Validation
  • 2009/2/10 1:15

  • jph000

  • Just popping in

  • Posts: 60

  • Since: 2004/8/2 2


In case anyone's interested in the status of legacy modules under XOOPS 2.3.2 and PHP5 and XHTML validation, my changes to get Stockquotes 0.1 to validate for CSS level 2 and XHTML 1.0 Transitional are summarized below. Note: Curl fix for fopen already had been done, as well as replacement of $HTTP_GET_VARS with $_GET and $HTTP_POST_VARS with $_POST for PHP5 compatibility.

stockquotes 0.1 module

blocks/stockbox.php

Ampersands in the $block['iframeurl'] declaration were cleaned up.

templates/blocks/stockbox_iframe.html

style="overflow: clip;" was changed to style="overflow: auto;" in the file.



36
jph000
Sections 1 XHTML Validation
  • 2009/2/10 1:14

  • jph000

  • Just popping in

  • Posts: 60

  • Since: 2004/8/2 2


In case anyone's interested in the status of legacy modules under XOOPS 2.3.2 and PHP5 and XHTML validation, my changes to get Sections 1 to validate for CSS level 2 and XHTML 1.0 Transitional are summarized below. Note: Replacement of $HTTP_GET_VARS with $_GET and $HTTP_POST_VARS with $_POST for PHP5 compatibility already had been done.

sections 1 module

index.php

Twelve sections of code required editing in this file, both for logic and XHTML conformance. If you're interested in the details, just send me a message and I'll email you the file.

The while-loop logic and HTML tag formatting were changed in the listsections function, as well as some edits before and after that loop.

'alt' use in an image tag and an ampersand in an href were cleaned up in the listarticles function.

Ampersands in href's were cleaned up in the viewarticles function.

Doctype and html and meta tags were added in the PrintSecPage function. Also ampersands in an href were cleaned up.



37
jph000
SmartFAQ 1.08 XHTML Validation
  • 2009/2/7 21:55

  • jph000

  • Just popping in

  • Posts: 60

  • Since: 2004/8/2 2


My changes to get SmartFAQ 1.08 to validate for CSS level 2 and XHTML 1.0 Transitional are shown below -- under XOOPS 2.3.2 and PHP5.

SmartFAQ 1.08 Module

smartfaq_index.html (template)

NEW - fixing misplaced semicolon removed 9 errors!

<div class="sf_collaps_title"><a href='#' onclick="toggle('toptable'); toggleIcon('toptableicon');"><img id='toptableicon' src='<{$xoops_url}>/modules/smartfaq/images/icon/close12.gif' alt='' /></a>&nbsp;<{$lang_categories_summary}></div>

OLD
<div class="sf_collaps_title"><a href='#' onclick="toggle('toptable'); toggleIcon('toptableicon')";><img id='toptableicon' src='<{$xoops_url}>/modules/smartfaq/images/icon/close12.gif' alt='' /></a>&nbsp;<{$lang_categories_summary}></div>

Note: Also, in order to prevent the page from scrolling to the top when lists are expanded or collapsed (toggled), I replaced href='#' with href='javascript:void(0)' in this template and the smartfaq_lastfaqs.html (template), as well as the 'javascript:;' in the smartfaq_category.html (template).

smartfaq_category.html (template)

NEW

<!-- END DYNAMIC BLOCK -->
<tr>
<td></td>
</tr>
</table>


OLD

<!-- END DYNAMIC BLOCK -->
<tr>
</tr>
</table>

smartfaq_singlefaq.html (template)

NEW

<div class="itemInfo">
<{if $display_categoryname}>
<div class="sf_faq_head_cat">
<span class="itemPoster">
[&nbsp;<a href="<{$xoops_url}>/modules/smartfaq/category.php?categoryid=<{$faq.categoryid}>"><{$faq.categoryname}></a>&nbsp;]
</span>
</div>
<{/if}>
<div class="sf_faq_head_who">
<span class="itemPoster">
<{$faq.who_when}> (<{$faq.counter}> <{$lang_reads}>)
</span>
</div>
</div>

OLD

<div class="itemInfo">
<span class="itemPoster">
<{if $display_categoryname}>
<div class="sf_faq_head_cat">
[&nbsp;<a href="<{$xoops_url}>/modules/smartfaq/category.php?categoryid=<{$faq.categoryid}>"><{$faq.categoryname}></a>&nbsp;]
</div>
<{/if}>
<div class="sf_faq_head_who">
<{$faq.who_when}> (<{$faq.counter}> <{$lang_reads}>)
</div>
</span>
</div>

smartfaq_index.html (template)

NEW

<!-- End categories loop -->
<tr>
<td></td>
</tr>
</table>

OLD

<!-- End categories loop -->
<tr>
</tr>
</table>

Blocks Administration

Needed to replace all occurrences of simple ampersand, for example, in "Recent Q&A List" title, with & a m p ;

That change is not visible on web page after the edit; but can be seen in the page's source code.



38
jph000
Re: WF-Links 1.06 XHTML Validation
  • 2009/2/6 16:58

  • jph000

  • Just popping in

  • Posts: 60

  • Since: 2004/8/2 2


Thanks, ghia. I corrected the template file names in question.

(I am currently working on validation for SmartFAQ 1.0.8, by the way.)



39
jph000
WF-Links 1.06 XHTML Validation
  • 2009/2/6 0:08

  • jph000

  • Just popping in

  • Posts: 60

  • Since: 2004/8/2 2


My changes to get WF-Links 1.06 to validate for CSS level 2 and XHTML 1.0 Transitional are shown below -- under XOOPS 2.3.2 and PHP5.

WF-Links 1.06 Module

wflinks_index.html (template)

OLD

<tr>
<td colspan="2">&nbsp;</td>
<tr>
</table>

NEW - simple change removed 13 errors!

<tr>
<td colspan="2">&nbsp;</td>
</tr>
</table>

As to an error regarding a "link rel=" for a style sheet being outside the head section, the line in question containing that is included via a reference (somewhere) to the wflinks_tag_block_cloud.html file which contains the single line:

<{include file="db:tag_block_cloud.html"}>

and tag_block_cloud.html is a Tag module blocks template, which contains the "link rel=" code in question. Wflinks checks whether the Tag module is activated; so, the block of code in question may or may not be present in the generated html page.

One solution might be to include the "link rel=" separately and earlier -- placed in the head section. But that would couple the code of the two modules -- require modifying the Tag module (to separate the "link rel=" statement from the following div code) and the wf-links module (to use a separate call in the head section). The easy way to eliminate this vaidation error was to deactivate the XOOPS Tag module.

Another problem was in the (English vs. French) admin.php and main.php and modinfo.php files for string values for PageRank and Google PageRank containing invalid byte values for the trademark symbol rather than "& t r a d e ;" string.

wflinks_singlelink.html (template)

NEW
</tr>
</table>
</td></tr>
</table>

OLD
</tr>
</table>
</tr>
</table>

wflinks_linkload.html (template)

NEW
<{/if}>
</table>
</td></tr>

OLD
<{/if}>
</table>
</tr>


wflinks_viewcat.html (template) - ten &'s and "absmiddle" to replace with "& a m p ;" and "middle" -- for example:

OLD
<a href="viewcat.php?cid=<{$category_id}>&orderby=titleA">
<img src="images/up.gif" alt="" align="absmiddle" /></a>
<a href="viewcat.php?cid=<{$category_id}>&orderby=titleD">
<img src="images/down.gif" alt="" align="absmiddle" /></a>

Fixing those lines left 6 validation errors, all were: value of attribute "align" cannot be "absmiddle"; must be one of "top", "middle", "bottom", "left", "right".



40
jph000
Headlines 1 (xoopsheadline module) XHTML Validation
  • 2009/2/4 23:00

  • jph000

  • Just popping in

  • Posts: 60

  • Since: 2004/8/2 2


My changes to get Headlines 1 (versus the newer module xhld 3.08) to validate for CSS level 2 and XHTML 1.0 Transitional are shown below. (Headlines 1 had already been working under XOOPS 2.3.2 and PHP5. Also, fopen had been replaced with curl code, as noted elsewhere.)

Headlines 1 module

xoopsheadline_block_rss.html (template)

NEW - provides same line space between headlines lists but no longer a line space after a list's title.

<{foreach item=feed from=$block.feeds}>
<br /><div><{$feed}></div>
<{/foreach}>

OLD

<{foreach item=feed from=$block.feeds}>
<p><{$feed}></p>
<{/foreach}>

headline_block.html (file)

NEW

<{if $items[i].title != ""}>
<li><a href="<{$xoops_url}>/modules/xoopsheadline/index.php?id=<{$site_id}>#<{$items[i].link|regex_replace:"/[\/\?\=\~]/":"_"}>"><{$items[i].title}></a></li>
<{/if}>

OLD

<{if $items[i].title != ""}>
<li><a href="<{$xoops_url}>/modules/xoopsheadline/index.php?id=<{$site_id}>#<{$items[i].link}>"><{$items[i].title}></a></li>
<{/if}>

xoopsheadline_feed.html (template)

NEW

<tr class="head">
<td colspan="3"><a id="<{$items[i].link|regex_replace:"/[\/\?\=\~]/":"_"}>"></a><a href="<{$items[i].link}>" target="_blank"><{$items[i].title}></a></td>
</tr>

OLD

<tr class="head">
<td colspan="3"><a id="<{$items[i].link}>"></a><a href="<{$items[i].link}>" target="_blank"><{$items[i].title}></a></td>
</tr>




TopTop
« 1 2 3 (4) 5 6 »



Login

Who's Online

217 user(s) are online (127 user(s) are browsing Support Forums)


Members: 0


Guests: 217


more...

Donat-O-Meter

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

Latest GitHub Commits