Love this mod Steven. This is exactly what I needed for my site.
Like a couple others on this thread, I use the top category tab and wanted a way to hide the categories there as well. I came up with this solution that is working for me....
copy: /includes/modules/categories_tab.php
to: /includes/modules/YOURTEMPLATE/categories_tab.php
around line 31, replace the code:
PHP Code:
$categories_tab_query = "select c.categories_id, cd.categories_name from " .
TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
where c.categories_id=cd.categories_id and c.parent_id= '0' and cd.language_id='" . (int)$_SESSION['languages_id'] . "' and c.categories_status='1'" .
with new code:
PHP Code:
$categories_tab_query = "select c.categories_id, cd.categories_name from " .
TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd," . TABLE_HIDE_CATEGORIES . " cde
where c.categories_id=cd.categories_id and c.categories_id=cde.categories_id and c.parent_id= '0' and cd.language_id='" . (int)$_SESSION['languages_id'] . "' and c.categories_status='1' and cde.visibility_status='0'" .
This adds an argument to the query to check the visibility status and hide any category that is not set to normal.
As with another post I read in this thread, this does require that all of your categories have a hide_categories value in the database. The other post noted this could be done through editing the database to add the value. Being a novice, I don't like to directly edit the database and found a different solution. For new categories, or categories that were created before installing the hide mod, edit the category to be hidden, save, then re-edit to normal. This creates the record needed in the database.
Hope this helps.
Bookmarks