Need help with PHPLD template

Discussion in 'HTML & Website Design' started by Searchnology.com, Aug 19, 2007.

  1. #1
    I have PHPLD 3.2 installed at www.searchnology.com

    I am trying to get the 3 column template to work again but can' figure out the problem.

    Is anyone here proficient in template design and can assist? The problem is in the main.tpl file which I pasted below.

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

    {* Calculate title from path *}
    {capture name="title"}
    {if count($path) > 1} - {/if}
    {foreach from=$path item=category name=path}
    {if $smarty.foreach.path.iteration gt 2}
    >
    {/if}
    {if not $smarty.foreach.path.first}
    {$category.TITLE}
    {/if}
    {/foreach}
    {/capture}

    {strip}
    {if $title_prefix}
    {assign var="in_page_title" value=$title_prefix|cat:$category.TITLE}{else}
    {assign var="in_page_title" value=$category.TITLE}
    {/if}
    {assign var="description" value=$category.DESCRIPTION}
    {include file="header.tpl"}

    <table width="990px" border="0" cellpadding="0" cellspacing="0" >
    <tr>
    <td width="220px" valign="top" id="column" >
    {include file="left.tpl"}</td>

    <td width="590px" valign="top" id="maincontent">
    {include file="top_bar.tpl"}</td>

    {* Calculate the number of categories per row *}
    {php}
    $this->assign('cats_per_col', ceil(count($this->get_template_vars('categs')) / CATS_PER_ROW));
    {/php}{if $cats_per_col > 15}
    {php}
    $this->assign('cats_per_col', ceil(count($this->get_template_vars('categs')) / (CATS_PER_ROW + 1)));
    {/php}
    {/if}{* Show category search results *}
    {if $search_category}
    {$search_category}
    {/if}{* Show article search results *}
    {if $search_article}
    {$search_article}
    {/if}{if isset($have_search_results) and $have_search_results == 0}
    <div>
    <p>{l}Sorry, no records found that match your keyword(s){/l}: "{$search|escape|wordwrap:200:"\n":true}"</p>
    <p>{l}Suggestions{/l}:</p>
    <p>
    <ul>
    <li>{l}Make sure all words are spelled correctly{/l}.</li>
    <li>{l}Try different keywords{/l}.</li>
    <li>{l}Try more general keywords{/l}.</li>
    </ul>
    </p>
    </div>
    {/if}

    {* Categories *}
    {if !empty($categs)}
    {if !empty($category.ID)} {/if} <table border="0" cellpadding="0" cellspacing="2" width="98%"> <tr>
    {foreach from=$categs item=cat name=categs}
    {if ($smarty.foreach.categs.iteration mod $cats_per_col eq 1 and $cats_per_col gt 1) or $smarty.foreach.categs.first}<td>{/if}
    <div class="cat"><a href="{$smarty.const.DOC_ROOT}/{$cat.CACHE_URL|escape}" title="{$cat.TITLE|escape}">{$cat.TITLE|escape}</a>
    {if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</div>

    {* Display subcategories *}
    {if !empty($cat.SUBCATS)} <p class="subcat">
    {foreach from=$cat.SUBCATS item=scat name=scategs}
    <a href="{$smarty.const.DOC_ROOT}/{$scat.CACHE_URL|escape}">
    {$scat.TITLE|escape}</a>,
    {/foreach}
    </p>
    {/if}
    {if ($smarty.foreach.categs.iteration mod $cats_per_col eq 0 and $cats_per_col gt 1) or $smarty.foreach.categs.last}</td>{/if}
    {/foreach}
    </tr>
    </table>{/if}{if $smarty.const.FTR_ENABLE == 1 and !empty($feat_links)}<br><div id="topnavbar">{l}Featured Links{/l}</div><br><table width="98%" border="0" cellspacing="0" cellpadding="2"><tr> <td align="left">
    <divalign="left">{foreach from=$feat_links item=link name=links}
    </div> <div align="left">{include file="link.tpl" link=$link}</div>
    <div align="left">{/foreach}
    </div></td></tr></table>{/if}<br>

    {*Articles heading *}
    {if !empty($articles) and !$uid and !$search}<div id="topnavbar">{l}Articles{/l}</div><br><br> <table width="98%" border="0" cellspacing="0" cellpadding="5"><tr> <td align="left">
    {foreach from=$articles item=article name=name}
    {include file="articlelink.tpl" link=$article}
    {/foreach}
    </td></tr></table>{/if}<br>

    {* 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}&amp;c={$category.ID}{/if}{if $search}&amp;search={$search}{/if}{if $uid}&amp;uid={$uid}{/if}{if !empty($p)}&amp;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}&amp;c={$category.ID}{/if}{if $search}&amp;search={$search}{/if}{if $uid}&amp;uid={$uid}{/if}{if !empty($p)}&amp;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}&amp;c={$category.ID}{/if}{if $search}&amp;search={$search}{/if}{if $uid}&amp;uid={$uid}{/if}{if !empty($p)}&amp;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></td>
    </tr></table><table width="98%" border="0" cellspacing="0" cellpadding="5"><tr> <td align="left">{foreach from=$links item=link name=links} <div >{include file="link.tpl" link=$link}</div>{/foreach}
    </td></tr></table>{/if}
    {include file="bottom.tpl"}</td>
    <td width="180px" id="column">{include file="right.tpl"}</td>
    </tr>
    </table>

    {* Javascript for tracking link clicks *}
    {if $StopLinkHits eq 0}
    <script type="text/javascript">
    /* <![CDATA[ */
    var root = '{$smarty.const.DOC_ROOT}';
    {literal}
    var a = document.getElementsByTagName("a");
    for(i = 0; i< a.length; i++)
    if(a.id != '')
    a.onclick = count_link;
    function count_link() {
    i = new Image();
    i.src= root+'/cl.php?id='+this.id;
    return true;
    }
    {/literal}
    /* ]]> */
    </script>
    {/if}

    {include file="footer.tpl"}
    {/strip}
     
    Searchnology.com, Aug 19, 2007 IP
  2. Badlands07

    Badlands07 Well-Known Member

    Messages:
    2,471
    Likes Received:
    100
    Best Answers:
    0
    Trophy Points:
    155
    #2
    Have you tried to ask this question in the PHPLD forums? You may get a better/quicker response.
     
    Badlands07, Aug 19, 2007 IP
  3. Searchnology.com

    Searchnology.com Peon

    Messages:
    451
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yeah, no respnse yet.
     
    Searchnology.com, Aug 19, 2007 IP