View Full Version : Featured only appear IF regular exists?
Freeman1
01-06-2008, 04:47 AM
I just noticed a problem. It appears that my featured links are not appearing in their category unless a regular link is also in that section. Has anyone come across this?
proprod
01-06-2008, 05:34 AM
I've never had that problem. Sounds like an out of place {if} statement in the main.tpl
Check this using the default phpLD template and if it works correctly, you know it's a problem in your template and to contact the template creator.
Freeman1
01-06-2008, 05:36 AM
Do you know off hand what the code is that tells the program to show this?
James
01-06-2008, 05:44 AM
{if $smarty.const.FTR_ENABLE == 1 and !empty($feat_links)}
<h3>{l}Featured Links{/l}</h3>
{foreach from=$feat_links item=link name=links}
{include file="link.tpl" link=$link}
{/foreach}
{/if}
is the basic code for showing featured links
itis above this
{* Links heading and sorting*}
{if ($uid or $search or !empty($category.ID) or $list) and !empty($links)}
<h3>{l}Links{/l} {if not $list}<span class="small" style="margin-left:50px;">{l}Sort by{/l}:
{if $smarty.const.ENABLE_PAGERANK and $smarty.const.SHOW_PAGERANK}{if $sort eq 'P'}<span class="sort"> {l}PageRank{/l}</span>{else}<a href="?s=P{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}"> {l}PageRank{/l}</a>{/if} |{/if}
{if $sort eq 'H'} <span class="sort">{l}Hits{/l}</span>{else} <a href="?s=H{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}">{l}Hits{/l}</a>{/if}
{if $sort eq 'A'} | <span class="sort">{l}Alphabetical{/l}</span>{else} | <a href="?s=A{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}">{l}Alphabetical{/l}</a>{/if}
</span>{/if}</h3>
<div id="links">
{foreach from=$links item=link name=links}
{include file="link.tpl" link=$link}
{/foreach}
</div>
{/if}
in the main.tpl
Freeman1
01-06-2008, 06:03 AM
This is the following code I have for that spot... I tried switching it with your code but still no go...
<table width="500" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="500" colspan="3" bgcolor="#D7DCE8" height="20">
<div id="idone" align="center">{l}<strong>Featured Links</strong>{/l}</div></td>
</tr>
<tr>
<td rowspan="2" width="1" bgcolor="#D7DCE8"></td>
<td width="498" bgcolor="#F0F0F0">
<div align="center"><a href="http://www. (http://www.gofishing.net/directory/submit.php)mysite.com" class="three">Get Listed Today!</a></div><div id="idone">
{if $smarty.const.FTR_ENABLE == 1 and !empty($feat_links)}
{foreach from=$feat_links item=link name=links}
{include file="link.tpl" link=$link}
{/foreach}
{/if}</div>
</td>
<td rowspan="2" width="1" bgcolor="#D7DCE8"></td>
</tr>
<tr>
<td height="1" bgcolor="#D7DCE8"></td>
</tr>
</table>
James
01-06-2008, 06:06 AM
post the whole main tpl please :)
Freeman1
01-06-2008, 06:07 AM
I did a quick search for IF statements and I have none missing as far as I can tell. {if = 50, and {/if = 50.. I imagine the code wouldn't run if I was missing one though. Here is what I have for that links heading/sorting in case it matters.
{* Links heading and sorting*}
{if ($uid or $search or !empty($category.ID) or $list) and !empty($links)}
<br>{if not $list}<span class="small" style="margin-left:5px;">{l}Sort by{/l}:
{if $smarty.const.ENABLE_PAGERANK and $smarty.const.SHOW_PAGERANK}{if $sort eq 'P'}<span class="sort"> {l}PageRank{/l}</span>{else}<a href="?s=P{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}"> {l}PageRank{/l}</a>{/if} |{/if}
{if $sort eq 'H'} <span class="sort">{l}Hits{/l}</span>{else} <a href="?s=H{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}">{l}Hits{/l}</a>{/if}
{if $sort eq 'A'} | <span class="sort">{l}Alphabetical{/l}</span>{else} | <a href="?s=A{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}">{l}Alphabetical{/l}</a>{/if}
</span><br><br>
{/if}
</div>
</td></tr></table>
James
01-06-2008, 06:11 AM
it isnt a question of a missing /if it is one in the wrong place :)
Freeman1
01-06-2008, 06:13 AM
I can't post my main.tpl because the forum won't allow 15307 characters.. I'll try sending it as a pm.
James
01-06-2008, 06:15 AM
or upload it someplace as main.txt and pm me the link
Freeman1
01-06-2008, 06:15 AM
just sent you a pm
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.