All pastes #293952 Raw Edit

Anonymous

public text v1 · immutable
#293952 ·published 2006-12-28 01:15 UTC
rendered paste body
{* 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"}

{include file="top_bar.tpl"}

{* 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}

{* Categories *}
{if !empty($categs)}

<table width="100%" cellpadding="0" cellspacing="0" class="categories">
<tr>
<td width="100%" align="center">
	<table cellpadding="0" cellspacing="0" align="center" width="80%">
	<tr>
	<td align="left" valign="top" width="100%">
	
		  <table border="0" cellpadding="0" cellspacing="0" width="100%">
		  <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 style="margin:0px 0px 10px 0px;">
			 <h2><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h2>
	
			 {* Display subcategories *}
			 {if !empty($cat.SUBCATS)}
			 <p class="subcats">
				{foreach from=$cat.SUBCATS item=scat name=scategs}
				   <a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{$scat.TITLE_URL|escape}/{else}index.php?c={$scat.ID}{/if}">
				{$scat.TITLE|escape}</a>, {/foreach} ...
			 </p>
			 {/if}
			 </div>
			 {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>
	   
	</td>
	</tr>
	</table>
	
</td>
</tr>
</table>
{/if}

{if $smarty.const.FTR_ENABLE == 1 and isset($feat_links) and !empty($feat_links)}
<table width="100%" cellpadding="0" cellspacing="0" class="featured">
<tr>
<td width="100%" align="center">

	<table cellpadding="0" cellspacing="0" align="center" width="80%">
	<tr>
	<td><img src="{$smarty.const.DOC_ROOT}/images/flinks-top.gif" alt="" border="0" /></td>
	<td width="100%" style="background-image:url({$smarty.const.DOC_ROOT}/images/flinks-top-bg.gif); background-repeat:repeat-x;"></td>
	<td><img src="{$smarty.const.DOC_ROOT}/images/flinks-top-right.gif" alt="" border="0" /></td>
	</tr>
	
	<tr>
	<td colspan="3" align="left" valign="top" width="100%" style="background-color:#8fc905; padding:1px;">
		
		<table cellpadding="0" cellspacing="1" width="100%" style="background-color:#FFFFFF;">
		<tr>
		<td style="background-image:url({$smarty.const.DOC_ROOT}/images/flinks-bg.gif); background-repeat:repeat-x; padding:10px 10px 0px 10px;" width="100%" align="left" valign="top">
			{foreach from=$feat_links item=link name=links}
			{include file="flink.tpl" link=$link}
			{/foreach}
		</td>
		</tr>
		</table>
	   
	</td>
	</tr>
	</table>
	
</td>
</tr>
</table>
{/if}
{if $category.ID gt 0 or $qu} 
{include file="googlead.tpl"} 
{/if}
{* Links heading and sorting*}
{if ($qu or $category.ID gt 0 or $p) and isset($links) and !empty($links)}
<table width="100%" cellpadding="0" cellspacing="0" class="regular">
<tr>
<td width="100%" align="center">

	<table cellpadding="0" cellspacing="0" align="center" width="80%">
	<tr>
	<td><img src="{$smarty.const.DOC_ROOT}/images/rlinks-top.gif" alt="" border="0" /></td>
	<td width="100%" style="background-image:url({$smarty.const.DOC_ROOT}/images/rlinks-top-bg.gif); background-repeat:repeat-x;"></td>
	{if not $p}
	<td style="background-image:url({$smarty.const.DOC_ROOT}/images/sort-bg.gif); background-repeat:no-repeat;" nowrap="nowrap">
		<table width="202" cellpadding="0" cellspacing="0">
		<tr>
		<td width="100%" align="center">
		  <span class="small">{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 $qu}&amp;q={$qu}{/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 $qu}&amp;q={$qu}{/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 $qu}&amp;q={$qu}{/if}{if !empty($p)}&amp;p={$p}{/if}">{l}Alphabetical{/l}</a>{/if}
		  </span>
	  	</td>
		</tr>
		</table>
	</td>
	{/if}
	<td><img src="{$smarty.const.DOC_ROOT}/images/rlinks-top-right.gif" alt="" border="0" /></td>
	</tr>
	
	<tr>
	<td colspan="4" align="left" valign="top" width="100%" style="background-color:#79bdd0; padding:1px;">
		
		<table cellpadding="0" cellspacing="1" width="100%" style="background-color:#FFFFFF;">
		<tr>
		<td style="background-image:url({$smarty.const.DOC_ROOT}/images/rlinks-bg.gif); background-repeat:repeat-x; padding:10px 10px 0px 10px;" width="100%" align="left" valign="top">
		  {foreach from=$links item=link name=links}
			 {include file="link.tpl" link=$link}
		  {/foreach}
		</td>
		</tr>
		</table>
	   
	</td>
	</tr>
	</table>
	
</td>
</tr>
</table>
{/if}

{* Javascript for tracking link clicks *}
<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[i].id != '')
         a[i].onclick = count_link;
   function count_link() {
      i = new Image();
      i.src= root+'/cl.php?id='+this.id;
      return true;
   }
   {/literal}
/* ]]> */
</script>

{include file="footer.tpl"}
{/strip}