ok, guys, here is a "ripoff" from ACP -> Edit categories
1) insert into includes/functions.php:function get_category_html_bits($cat_id = 0, $cid = 0, $depth = 1) {
global $site_db, $html_cat_cache, $cat_cache, $site_sess;
if (!isset($html_cat_cache[$cid])) {
return "";
}
$category_list = "";
foreach ($html_cat_cache[$cid] as $key => $category_id) {
if (check_permission("auth_viewcat", $category_id)) {
if ($depth > 1) {
$category_list .= str_repeat(" ", $depth - 1)."<img src=\"".get_gallery_image("folder_path.gif")."\" alt=\"\">\n";
}
$category_list .= "<img src=\"".get_gallery_image("folder.gif")."\" alt=\"\"><b><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\">".$cat_cache[$category_id]['cat_name']."</a></b><br />";
$category_list .= get_category_html_bits($cat_id, $category_id, $depth + 1);
}
}
unset($html_cat_cache[$cid]);
return $category_list;
}
Then insert into index.php or any other files where u want the category list to be displayed, above //-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
this block:$html_cat_cache = $cat_parent_cache;
$site_template->register_vars(array(
"categories_list" => get_category_html_bits()
));
3) Now, in the "main" template (home.html) that is associates with the file u've insert the code (index.php) use this tag: {categories_list}
P.S. almost forgot, copy admin/images/folder_path.gif into templates/<your template>/images/ folder