Hey all, just for everyones information, the docs and plugin are at:
version 1.02 - 10/26/2005
There were some bugs with the doc (I had too many revisions, and it bit me in the bud), so before you try fixing some code directy, try upgrading and see if that works.
You can get the latest version at: http://www.miasmaofmusings.com/index.php/weblog/dl_cl/
Bug one: As for bugs for versions of PHP, try it, I do not know if that will work or not, but if it does not, let me know, I will debug it and fix it for you.
Bug two: Yes change it to “weblog1”
Bug three: There is a text version of the file available at the above URL. D/L it and change the extension to php and that should work.
-JB
This plugin has potential, but at the moment I am finding the lack of some fundamental parameters quite crippling. 😉
Could you please use the show=”” parameter, because people may want to find out the number of entries for specific category(s), not just trawl through the entire list. Also a parent=”” parameter would help to in allowing the plugin to only look at children.
Just my 2c 😊
the plugin works perfect for my circumstances.
the following code gives a solution for a) cat_lister output as a 3level suckerfish-based horizontal popup-menu in a fixed-header* (works in ie6/7 and ff1.5, would be fine to get some feedback for other browsers.) and b) excluding some categories via their parent (1st-level) id. this also works, if you have “Auto-Assign Category Parents” set to NO.
<div id="top-bar">
<div id="topbar-inner">
<?php
/* -----------------------------------------------------
exclude this cat-id`s from cat_lister result
----------------------------------------------------- */
$exclude_array = array();
$exclude_array[]= "346";
$exclude_array[]= "379";
$exclude_array[]= "353";
/* -----------------------------------------------------------------------
init some helping vars for parent-cat & nestlevel
----------------------------------------------------------------------- */
$par_check = 0;
$nlvl_check = 1;
$initlist = 0;
?>
<!-- start the list -->
<ul id="nav">
{exp:cat_lister weblog="sep" max_depth="3" }
<?php
$tmp = 0;
$tmp = "{cid}";
$nlvl = 0;
$nlvl = "{nest_lvl}";
$par = 0;
$par = "{parent}";
/* -----------------------------------------------------------------------
compare to an array of cat_id`s and exclude this from further steps ...
----------------------------------------------------------------------- */
if(!in_array($tmp, $exclude_array) and (!in_array($par, $exclude_array)))
{
/* check description. we use cat-names in urls, so we have to define a
description for output. if there`s no cat-desc, we use the cat_id
for linking to the category. this is a little bit individual,
maybe nevertheless helpful :blush: */
$cat_desc_status = 0;
$cat_name = "";
$cat_desc = "";
$cat_desc .= "{cat_desc}";
$cat_name = "{name}";
if($cat_desc != "" and $cat_desc != "0") $cat_desc_status = 1;
$cpath = "";
$cspell = "";
$ccall = "";
/* construct the path for cat-link */
if($cat_desc_status == 1)
{
$cpath .= "on/".$cat_name."/";
$cspell .= $cat_desc;
$ccall .= $cat_name;
}
if($cat_desc_status == 0)
{
$cpath .= "C".$tmp."/";
$cspell .= $cat_name;
$ccall .= "C".$tmp;
}
/* ---------------------------------------------------------------------
the ul construction. did it manually,
why? cat_listers ul-construction seems buggy on sublists,
(closing </li> before starting sublist by default in v.1.2)
--------------------------------------------------------------------- */
if($nlvl == $nlvl_check and ($par === 0 && $par == $par_check)) echo "</li>";
if($nlvl > $nlvl_check) echo "<ul>";
if($nlvl == $nlvl_check and ($par > 0 && $par == $par_check)) echo "</li>";
/* find and close sub/subsubs ul`s via nestlevel (this for a 3level structure) */
if($nlvl_check-$nlvl == 1) echo "</li></ul></li>";
if($nlvl_check-$nlvl == 2) echo "</li></ul></li></ul></li>";
?>
<li>
<a href="http://<?php">__ <?php echo $cspell; ?> ({entries}/{total_e})</a>
<?php
/* backup parent-cat & nestlevel for next turn */
$par_check = $par;
$nlvl_check = $nlvl;
$initlist = 1;
}
?>
{/exp:cat_lister}
<!-- and close the list -->
</ul>
</div>
</div>
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.