I have successfully installed the script (on Zen 1.3.9), sideboxes/search etc are all working, but am having a problem with my custom tpl_header.php file.
The version of the file I have for my template does not seem to call the cat_filter function. I am not a php programmer, but think the bit of code that needs to change is shown below. Can anyone tell me what I need to code so that when the menu is created, it filters out the categories which are not meant to be shown for that site... at the moment, all categories are shown regardless of what sitename is put in the admin screen against the categores.
Thanks in advance.
<div class="horizontal-cat">
<!--bof-drop down menu display-->
<!-- menu area -->
<div id="dropMenuWrapper">
<div id="dropMenu">
<ul class="level1">
<?php
$categories_query = mysql_query("select c.categories_status, c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_status = '1' and c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$_SESSION['languages_id'] ."' order by sort_order, cd.categories_name LIMIT 0,10");
while ($categories = mysql_fetch_array($categories_query)) {
?>
<?php
if (zen_has_category_subcategories($categories['categories_id']) > 0) {
$class = ' class="submenu"';
}
?>
<li<?php echo $class;?>><a href="<?php echo zen_href_link(FILENAME_DEFAULT, 'cPath='.$categories['categories_id']); ?>"><?php echo $categories['categories_name']; ?></a>
<?php
if (zen_has_category_subcategories($categories['categories_id']) > 0) {
?>
<ul class="level2">
<?php
$categories_query_1 = mysql_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '".$categories['categories_id']."' and c.categories_id = cd.categories_id and cd.language_id='" . (int)$_SESSION['languages_id'] ."' order by sort_order, cd.categories_name LIMIT 6");
while ($categories_1 = mysql_fetch_array($categories_query_1)) {
?>
<li><a href="<?php echo zen_href_link(FILENAME_DEFAULT, 'cPath='.$categories['categories_id'].'_'.$categories_1['categories_id']); ?>"><?php echo $categories_1['categories_name']; ?></a></li>
<?php } ?>
</ul>
<?php } ?>
</li>
<?php } ?>
</ul>
</div>
</div>
<div class="clearBoth"></div>
<!--eof-drop down menu display-->
</div>
</div>


Reply With Quote
. Glad you got it fixed

