Support Forums

Xhtml

This is a discussion on Xhtml within the Technical Support forums, part of the Technical Support Forums category; When I include featured listings on my site french property classifieds they do not validate as XHTML 1.0 strict or ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 06-09-2008, 11:36 AM   #1
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,670
Rep Power: 41
seymourjames has a spectacular aura about
Default Xhtml

When I include featured listings on my site french property classifieds they do not validate as XHTML 1.0 strict or XHTML transitional. I have set my site to Transitional.

The layout.tpl file is fine as supplied XHTML 1.0 strict but certain bits of standard code do not validate. For example on the home page

e.g. {feature_listings_horizontal number=6 cols=3 table_attr='width="100%" cellpadding="10" cellspacing="3"' td_attr='style="border-top: 1px dashed #999;"'}

The browse.tpl file does not validate either. It is not a major thing but one of completeness. Is there anybody with a fix using CSS or something?

Last edited by seymourjames; 06-09-2008 at 11:37 AM. Reason: miss typed url
seymourjames is offline  
Old 06-09-2008, 11:45 AM   #2
Coder
 
Join Date: Mar 2006
Posts: 4,680
Rep Power: 114
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Im not sure how the validator your using processes the page, but the feature_listings_horizontal is actually a smarty function that is in essence php code that queries the database, builds a table and displays it on the home page.

Is the validator your using chocking on the actual line you mentioned above or the output that line is returning?
__________________
Larry

What I post here should be used only as a guide to point you in the right direction. If the code I post doesnt make any sense or work as posted then you should spend more time reading the various manuals and tutorials so it does make sense and you can tweak it to work. A sure fire way to get yourself in trouble is to implement changes you dont have an intimate understanding of. Im happy to help, but I am not here to teach you to code or create your site for you.
Lhotch is offline  
Old 06-10-2008, 04:03 AM   #3
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,670
Rep Power: 41
seymourjames has a spectacular aura about
Default

Hi,

For example if I put my page french properties for sale into http://validator.w3.org/ I get errors at the point it reaches the table for featured properties.

It throws this wobbly and then lots of errors afterwards which may or may not exist.

<p><table width="100%" cellpadding="10" cellspacing="3">

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>").


Then on the browse page likewise with the table. It throws wobblies.

Just wondering why.
seymourjames is offline  
Old 06-10-2008, 04:51 AM   #4
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,670
Rep Power: 41
seymourjames has a spectacular aura about
Default

I just looked into it more. It is clocking the output from this standard piece of code supplied

{feature_listings_horizontal number=6 cols=3 table_attr='width="100%" cellpadding="10" cellspacing="3"' td_attr='style="border-top: 1px dashed #999;"'}

The output is

<p><table width="100%" cellpadding="10" cellspacing="3">
<tr>

It does not like this line.

I fixed the browse.tpl file which generates a table. There is actually an error in the default template that I have which I have copied through onto my site. There is an extra <td> which is not required. It may have been me who added it so people should check but it still exists in my default version. The red <td> is not required near the bottom of the file.

{$data[td].description}
{/if}
 
</td>
<td>
{/section}
seymourjames is offline  
Old 06-11-2008, 07:20 PM   #5
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,670
Rep Power: 41
seymourjames has a spectacular aura about
Default

I just spent the best part of the day making sure my site is XHTML 1.0 transitional.

BUT

the standard featured listings on the home page will not validate

{feature_listings_horizontal number=6 cols=3 table_attr='width="100%" cellpadding="10" cellspacing="3"' td_attr='style="border-top: 1px dashed #999;"'}

can some please confirm they have the problem with the featured listings on the homepage with http://validator.w3.org/

Neither will the standard search box validate - it does'nt like the attribute onChange.

And finally, the listings of items (viewlistings2.tpl) will not validate with lots of errors. Some of them I can get rid of as they are obvious to fix like alt tags (even if dummies need to be put in). Some I can't rectify easily because they are related to the contact forms or the popups. A much bigger coding effort.

Last edited by seymourjames; 06-11-2008 at 08:06 PM.
seymourjames is offline  
Old 06-12-2008, 07:30 PM   #6
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,670
Rep Power: 41
seymourjames has a spectacular aura about
Default

There is now a plugin for featured listings which is XHTML compliant. Here

I need a hand on smarty please...

Necessary though to use Canariasdata's solution to put style into the CSS file.
seymourjames is offline  
Old 06-16-2008, 01:19 PM   #7
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 1,670
Rep Power: 41
seymourjames has a spectacular aura about
Default

I have made the whole of my site XHTML transitional at a small cost in terms flexibility. However I cannot seem to make just one page complaint - the basic search page. W3C markup validation reports there is a problem with the search box.

Line 197, Column 47: there is no attribute "onChange" .
<select name="type" id="type" onChange="displaySec(this);">

Has anybody got a work around?
seymourjames is offline  
Old 06-16-2008, 01:34 PM   #8
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,119
Rep Power: 120
Eric Barnes is a jewel in the rough
Default

You can try changing it to:
<select name="type" id="type" onchange="displaySec(this);">

Basically all lower case.
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is online now  
Old 06-16-2008, 01:35 PM   #9
Coder
 
Join Date: Mar 2006
Posts: 4,680
Rep Power: 114
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

change this......

<select name="type" id="type" onChange="displaySec(this);">


to......

<select name="type" id="type" onchange="displaySec(this);">
__________________
Larry

What I post here should be used only as a guide to point you in the right direction. If the code I post doesnt make any sense or work as posted then you should spend more time reading the various manuals and tutorials so it does make sense and you can tweak it to work. A sure fire way to get yourself in trouble is to implement changes you dont have an intimate understanding of. Im happy to help, but I am not here to teach you to code or create your site for you.
Lhotch is offline  
Old 06-16-2008, 01:35 PM   #10
Coder
 
Join Date: Mar 2006
Posts: 4,680
Rep Power: 114
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

ya beat me to it eric
__________________
Larry

What I post here should be used only as a guide to point you in the right direction. If the code I post doesnt make any sense or work as posted then you should spend more time reading the various manuals and tutorials so it does make sense and you can tweak it to work. A sure fire way to get yourself in trouble is to implement changes you dont have an intimate understanding of. Im happy to help, but I am not here to teach you to code or create your site for you.
Lhotch is offline  
Closed Thread

Thread Tools
Display Modes



All times are GMT -4. The time now is 10:33 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0