Support Forums

HTML Markup defined in Admin

This is a discussion on HTML Markup defined in Admin within the Technical Support forums, part of the Technical Support Forums category; In my quest to make our site WC3 error free, I have run into something that I don't know where ...


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-17-2009, 06:40 AM   #1
Member
 
Join Date: May 2009
Posts: 66
Rep Power: 0
Exclamation HTML Markup defined in Admin

In my quest to make our site WC3 error free, I have run into something that I don't know where to edit the code to fix. Majority of the errors are coming from the "Browse Categories" .tpl that I have included in the home page. Now since this section is defined through the admin, where do I go to modify the tags around these values? Here is the link to the errors:

[Invalid] Markup Validation of http://www.industrialpost.com/indextest.php - W3C Markup Validator

As you can see, the errors are coming from the core of 68C, relating to the </tr>, <td> and </html> tags.
__________________
68C | Developer License | Running v4.1.3

Last edited by industrialpost; 06-17-2009 at 06:46 AM.
industrialpost is offline  
Old 06-17-2009, 06:46 AM   #2
Member
 
Join Date: May 2009
Posts: 66
Rep Power: 0
Default

I may have found the problem. So scratch this until I post again.
__________________
68C | Developer License | Running v4.1.3
industrialpost is offline  
Old 06-17-2009, 07:05 AM   #3
Member
 
Join Date: May 2009
Posts: 66
Rep Power: 0
Exclamation

Yes, I found an interesting part of the browse.tpl file that is causing the problem for my categorylist_index.tpl file that I am calling in the home page. Here is the code from browse.tpl:

---------------------------------------------------------------------
{*$Revision: 165 $*}
{modulehook function="tpl_category_head" options=""}

{include file="categories/breadcrumb.tpl"}

{$promo}

{if $showsubcat}
<table class="main" width="100%">
<tr>
<th>{$smarty.const.LANG_BROWSE_CATEGORY}</th>
</tr>
<tr>
<td>
<table width="100%">
{section name=tr loop=$data step=$cols}
<tr>
{section name=td start=$smarty.section.tr.index loop=$smarty.section.tr.index+$cols}
<td valign="top">
{if $data[td]<>""}
{$data[td].start_link}<img src="{$data[td].image}" border="0" alt="{$data[td].name}" /></a> 
{$data[td].start_link}<strong>{$data[td].name}</strong></a>
{if $data[td].total <> ''}
({$data[td].total})
{/if}
<!--<br />-->
<!--{$data[td].subcats}-->
{$data[td].description}
{/if}
 
</td>
<td>
{/section}
</tr>
{/section}
</table>

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

{if $custom <> ''}
{include file=$custom}
{elseif $showlistings=="Y" && $sTemplate==1}
{include file="showlistings.tpl"}
{elseif $showlistings=="Y" && $sTemplate==2}
{include file="showlistings2.tpl"}
{/if}

{modulehook function="tpl_category_footer" options=""}

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

Here is what I am using from browse.tpl to create categorylist_index.tpl:

---------------------------------------------------------------------------------
<table width="100%">
<tr>
<td>
<table width="100%">
{section name=tr loop=$data step=$cols}
<tr>
{section name=td start=$smarty.section.tr.index loop=$smarty.section.tr.index+$cols}
<td valign="top">
{if $data[td]<>""}
{$data[td].start_link}<img src="{$data[td].image}" border="0" alt="{$data[td].name}" /></a> 
{$data[td].start_link}<strong>{$data[td].name}</strong></a>
{if $data[td].total <> ''}
({$data[td].total})
{/if}
<!--<br />-->
<!--{$data[td].subcats}-->
{$data[td].description}
{/if}
 
</td>
<td>
{/section}
</tr>
{/section}
</table>

</td>
</tr>
</table>
<br />
{/if}
--------------------------------------------------------------------------------

So it looks like there is a problem with this part of the code for browse.tpl included in the template download:

 
</td>
<td>
{/section}
</tr>
{/section}
</table>

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

The syntax is not right. It should look like this and should be fixed in browse.tpl:

{/if}
 
</td>
{/section}
</tr>
{/section}
</table>
</td>
</tr>
</table>
__________________
68C | Developer License | Running v4.1.3
industrialpost is offline  
Old 06-17-2009, 08:01 AM   #4
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,342
Rep Power: 84
seymourjames is a jewel in the rough
Default

Very good. So now you see why you were advised you to validate your code using W3C before trying to hunt down one display problem which was so difficult to spot. Take out all the layout errors first so there are no interactions going on. Then for each page you will find it easier to isolate display problems.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates & Modules
Get the Best U.S Hosting, Best U.K Hosting
seymourjames is offline  
Old 06-17-2009, 08:08 AM   #5
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by industrialpost
Yes, I found an interesting part of the browse.tpl file that is causing the problem for my categorylist_index.tpl file that I am calling in the home page. Here is the code from browse.tpl:
Maybe I am the only one, but I am having a very hard time trying to follow this thread.

Where is categorylist_index.tpl coming from and what do you mean a PART of browse.tpl is causing a problem in the file category_list_index.tpl????

Did you make your own new template file using parts of another template file and saying the parts you took are causing problems?
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 06-17-2009, 10:26 AM   #6
Member
 
Join Date: May 2009
Posts: 66
Rep Power: 0
Default

Larry, categorylist_index.tpl is a condensed version of browse.tpl. The reason for this is because I just want the list of categories that the database populates, not the other elements that browse.tpl produces for category.php. Does this make sense? So the code is directly from browse.tpl and there was a major cluster of errors that WC3 was picking up because of the extra <td> in that file. I am talking about over 50 errors. Yes, the index page is running custom .tpl files that are only used on the index.php page. It is using a custom Category list, Feartured Listings, and a custom layout.

I am doing this process to validate all code so that I can track down the buggy interaction with the continue button and the page numbers that show up on the all posts page. I don't know if these errors that I am finding are causing the problems, but I just noticed that there was an error on the core file.
__________________
68C | Developer License | Running v4.1.3

Last edited by industrialpost; 06-17-2009 at 10:31 AM.
industrialpost is offline  
Old 06-17-2009, 10:45 AM   #7
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 135
Eric Barnes is just really nice Eric Barnes is just really nice
Default

I believe this may be related to this issue report:
http://www.68classifieds.com/forums/issue-313/
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 06-17-2009, 10:47 AM   #8
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by industrialpost
Larry, categorylist_index.tpl is a condensed version of browse.tpl. The reason for this is because I just want the list of categories that the database populates, not the other elements that browse.tpl produces for category.php. Does this make sense?
Does it make sense, YES.......BUT read below.


Quote:
Originally Posted by industrialpost
So the code is directly from browse.tpl and there was a major cluster of errors that WC3 was picking up because of the extra <td> in that file. I am talking about over 50 errors. Yes, the index page is running custom .tpl files that are only used on the index.php page. It is using a custom Category list, Feartured Listings, and a custom layout.
Have you run the default unmolested template through the validator? If so, did the browse.tpl produce errors?

If browse did not produce any errors in the default template and you took code from it and applied it to your own template and are now getting errors, guess what? Its not 68Cs fault or the fault of the core code as you stated above.

I can understand you goals and can appreciate your zeal BUT you cant always grab some code, especially if there is smarty content, and slap it somewhere else and expect it to work the same way.

Often times smarty variables not only contain variables but on occasion HTML as well. So, with that in mind unless you are 100% certain you know that the smarty variables do not contain any presentation logic (ie css/html) using them can cause problems.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 06-17-2009, 11:29 AM   #9
Member
 
Join Date: May 2009
Posts: 66
Rep Power: 0
Default

Eric is right, this is related to the home.tpl file. The "unmolested" browse.tpl file has an extra <td> which caused the 50+ errors. The main thing to remember, is that this is not directly related to having custom .tpl files.

This is just a simple observation of the default code as downloaded while trying to debug my custom code.
__________________
68C | Developer License | Running v4.1.3

Last edited by industrialpost; 06-17-2009 at 11:31 AM.
industrialpost is offline  
Old 06-17-2009, 11:32 AM   #10
curmudgeon
 
Join Date: Mar 2006
Posts: 5,413
Rep Power: 138
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by industrialpost
Eric is right, this is related to the home.tpl file. The "unmolested" browse.tpl file has an extra <td> which caused the 50+ errors. The main thing to remember, is that this is not directly related to having custom .tpl files.

This is just a simple observation of the default code as downloaded while trying to debug my custom code.
I was just warning you that some smarty vars contain presentation data and that if your not certain of its content it can cause you a lot of problems.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
IE CSS/HTML Help LittleRascal Templates, HTML, CSS, and Design Help 1 05-26-2009 08:10 PM
Ad Pack - Sorry, no packages have been defined. jbrown5030 Technical Support 5 04-30-2009 05:15 PM


All times are GMT -4. The time now is 09:52 PM.


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