5
Thanks James.
Here is the Template_c file:
<?php /* Smarty version 2.6.13, created on 2007-03-19 13:14:41
compiled from db:xdir_index.html */ ?>
<?php echo ; ?>
<?php echo $this->_tpl_vars['xoops_module_header']; ?>
<table width="888" border="0" align="center" cellpadding="0" cellspacing="0" class="c_search">
<tr>
<td class="c_search_l"><?php echo @_MD_DIRHEADER; ?>
</td>
<td class="c_search_table">
<?php if ($this->_tpl_vars['usesearch'] != '0'): ?>
<!--Search Table-->
<form name='search' id='search' action='<?php echo $this->_tpl_vars['xoops_url']; ?>
/search.php' method='post' onsubmit='return xoopsFormValidate_search();'>
<input type='hidden' name='mids[]' value='<?php echo $this->_tpl_vars['xmid']; ?>
' />
<input name='query' type='text' class="c_search_input" id='query' value='' size='20' maxlength='255' />
<select name='andor' size='1' class="c_search_select" id='andor'>
<option value='AND' selected='selected'><?php echo @_MD_ALLWORDS; ?>
</option>
<option value='OR'><?php echo @_MD_ANYWORDS; ?>
</option>
<option value='exact'><?php echo @_MD_EXACTMATCH; ?>
</option>
</select>
<input type='submit' class='c_searchbutton' name='submit' id='submit' value='<?php echo @_MD_SEARCH; ?>
' />
<input type='hidden' name='action' id='action' value='results' />
</form>
<?php endif; ?>
</td>
<td class="c_search_r"><div><a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/modules/<?php echo $this->_tpl_vars['smartydir']; ?>
/savings.php?cid=<?php echo $this->_tpl_vars['category_id']; ?>
"><?php echo @_MD_SAVINGS; ?>
</a></div>
<div><a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/modules/<?php echo $this->_tpl_vars['smartydir']; ?>
/submit.php"><?php echo @_MD_SUBMITLINK; ?>
</a></div></td>
</tr>
<?php if ($this->_tpl_vars['usealpha'] != '0'): ?>
<tr align="center">
<td colspan="3" class="c_select_letters"><?php echo @_MD_SEARCHFOR; ?>
: <?php echo $this->_tpl_vars['letters']; ?>
</td>
</tr>
<?php endif; ?>
</table>
<hr />
<script type='text/javascript'>
<!--
function xoopsFormValidate_search(){}
//-->
</script>
<!-- Start category loop -->
<?php $_from = $this->_tpl_vars['categories']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['tlcat'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['tlcat']['total'] > 0):
foreach ($_from as $this->_tpl_vars['category']):
$this->_foreach['tlcat']['iteration']++;
if (($this->_foreach['tlcat']['iteration'] <= 1)): ?>
<table cellspacing='5' style="border-style: none; padding: 0px; text-align: left;">
<tr>
<?php endif; ?>
<td valign="top">
<?php if ($this->_tpl_vars['category']['image'] != ""): ?>
<a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/modules/<?php echo $this->_tpl_vars['smartydir']; ?>
/viewcat.php?cid=<?php echo $this->_tpl_vars['category']['id']; ?>
"><img src="<?php echo $this->_tpl_vars['category']['image']; ?>
" alt="" height="50" border="0" class="c_img_display" /></a>
<?php endif; ?> </td>
<td valign="top" width="33%"><span class="index_category_title"><a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/modules/<?php echo $this->_tpl_vars['smartydir']; ?>
/viewcat.php?cid=<?php echo $this->_tpl_vars['category']['id']; ?>
" class="c_title"><?php echo $this->_tpl_vars['category']['title']; ?>
</a> </span> <span class="index_subcats">(<?php echo $this->_tpl_vars['category']['totallink']; ?>
)<br />
<?php echo $this->_tpl_vars['category']['subcategories']; ?>
</span> </td>
<?php if (!($this->_tpl_vars['category']['count'] % 3)): ?> </tr><tr>
<?php endif; ?>
<?php if (($this->_foreach['tlcat']['iteration'] == $this->_foreach['tlcat']['total'])): ?>
</tr>
</table>
<br /><br />
<div class="c_desc"><?php echo $this->_tpl_vars['lang_thereare']; ?>
</div>
<hr /><br />
<?php endif; ?>
<?php endforeach; endif; unset($_from); ?>
<!-- End category loop -->
<?php if ($this->_tpl_vars['links'] != ""): ?>
<h4 class="c_title"><?php echo $this->_tpl_vars['lang_latestlistings']; ?>
</h4>
<table width="100%" class="index_category_links_display">
<tr><td width="100%" align="center" valign="top">
<!-- Start new link loop -->
<?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['category']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
$this->_sections['i']['total'] = $this->_sections['i']['loop'];
if ($this->_sections['i']['total'] == 0)
$this->_sections['i']['show'] = false;
} else
$this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):
for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
$this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
$this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first'] = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last'] = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
<?php echo $this->_tpl_vars['link']['category']; ?>
<?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['links']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
$this->_sections['i']['total'] = $this->_sections['i']['loop'];
if ($this->_sections['i']['total'] == 0)
$this->_sections['i']['show'] = false;
} else
$this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):
for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
$this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
$this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first'] = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last'] = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "db:xdir_link.html", 'smarty_include_vars' => array('link' => $this->_tpl_vars['links'][$this->_sections['i']['index']])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>
<?php endfor; endif; ?>
<?php endfor; endif; ?>
<!-- End new link loop -->
</td></tr>
</table>
<?php endif; ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'db:system_notification_select.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>
Here is the xdir_index.html file:
<{$xoops_module_header}>
<table width="888" border="0" align="center" cellpadding="0" cellspacing="0" class="c_search">
<tr>
<td class="c_search_l"><{$smarty.const._MD_DIRHEADER}></td>
<td class="c_search_table">
<{if $usesearch != "0"}>
<!--Search Table-->
<form name='search' id='search' action='<{$xoops_url}>/search.php' method='post' onsubmit='return xoopsFormValidate_search();'>
<input type='hidden' name='mids[]' value='<{$xmid}>' />
<input name='query' type='text' class="c_search_input" id='query' value='' size='20' maxlength='255' />
<select name='andor' size='1' class="c_search_select" id='andor'>
<option value='AND' selected='selected'><{$smarty.const._MD_ALLWORDS}></option>
<option value='OR'><{$smarty.const._MD_ANYWORDS}></option>
<option value='exact'><{$smarty.const._MD_EXACTMATCH}></option>
</select>
<input type='submit' class='c_searchbutton' name='submit' id='submit' value='<{$smarty.const._MD_SEARCH}>' />
<input type='hidden' name='action' id='action' value='results' />
</form>
<{/if}>
</td>
<td class="c_search_r"><div><a href="<{$xoops_url}>/modules/<{$smartydir}>/savings.php?cid=<{$category_id}>"><{$smarty.const._MD_SAVINGS}></a></div>
<div><a href="<{$xoops_url}>/modules/<{$smartydir}>/submit.php"><{$smarty.const._MD_SUBMITLINK}></a></div></td>
</tr>
<{if $usealpha != "0"}>
<tr align="center">
<td colspan="3" class="c_select_letters"><{$smarty.const._MD_SEARCHFOR}>: <{$letters}>
</td>
</tr>
<{/if }>
</table>
<hr />
<script type='text/javascript'>
<!--
function xoopsFormValidate_search(){}
//-->
</script>
<!-- Start category loop -->
<{foreach name=tlcat item=category from=$categories}><{if $smarty.foreach.tlcat.first}>
<table cellspacing='5' style="border-style: none; padding: 0px; text-align: left;">
<tr>
<{/if}>
<td valign="top">
<{if $category.image != ""}>
<a href="<{$xoops_url}>/modules/<{$smartydir}>/viewcat.php?cid=<{$category.id}>"><img src="<{$category.image}>" alt="" height="50" border="0" class="c_img_display" /></a>
<{/if}> </td>
<td valign="top" width="33%"><span class="index_category_title"><a href="<{$xoops_url}>/modules/<{$smartydir}>/viewcat.php?cid=<{$category.id}>" class="c_title"><{$category.title}></a> </span> <span class="index_subcats">(<{$category.totallink}>)<br />
<{$category.subcategories}></span> </td>
<{if $category.count is div by 3}> </tr><tr>
<{/if}>
<{if $smarty.foreach.tlcat.last}>
</tr>
</table>
<br /><br />
<div class="c_desc"><{$lang_thereare}></div>
<hr /><br />
<{/if}>
<{/foreach}>
<!-- End category loop -->
<{if $links != ""}>
<h4 class="c_title"><{$lang_latestlistings}></h4>
<table width="100%" class="index_category_links_display">
<tr><td width="100%" align="center" valign="top">
<!-- Start new link loop -->
<{section name=i loop=$category}>
<{$link.category link=$category[i]}>
<{section name=i loop=$links}>
<{include file="db:xdir_link.html" link=$links[i]}>
<{/section}>
<{/section}>
<!-- End new link loop -->
</td></tr>
</table>
<{/if}>
<{include file='db:system_notification_select.html'}>
Thanks, Technobia
www.PrideDEPOT.com
Everybody Has A Right!