/**
Category Listing modification by Dr. Deejay
Module created for SimplePortal
Version 1.0.1
*/
global $smcFunc, $settings;
// Meh, we need a list!
echo '<ul class="sp_list">';
// Retrieve the categories form the database
$result = $smcFunc['db_query']('', 'SELECT *
FROM {db_prefix}categories
ORDER BY cat_order ASC', array());
// If we don't have anything do show, just say we haven't
if($smcFunc['db_num_rows']($result) == 0)
echo '
<li>No categories found</li>';
// Show them!
while($category = $smcFunc['db_fetch_assoc']($result))
{
// A simple echo...
echo '
<li>' . sp_embed_image('dot') . ' <a href="#c'.$category['id_cat'].'" class="smalltext">'.$category['name'].'</a></li>';
}
echo '</ul>';
but now i have another problem when click on category, nothing happensIt only works on the boardindex (where the categories and boards are).
<ul class="sp_list">
</ul>
within that block (though of course sp_list could appear in other simpleportal blocks as well).$result = $smcFunc['db_query']('', 'SELECT *
FROM {db_prefix}categories
ORDER BY cat_order ASC', array());
if($smcFunc['db_num_rows']($result) == 0)
Please tryecho '<p>number of rows: ' , $smcFunc['db_num_rows']($result), '</p>';
if($smcFunc['db_num_rows']($result) == 0)
and see what kind of output you get.
This is is pretty cool block but I noticed that there is no way to hide certain categories from being listed. I have categories on the forum with hidden boards, all the boards are hidden in that category, yet the hidden category is still listed in this block's category list.
Is there any way to hide those categories from showing in this block?