1 champak Nov 07, 2005 03:31
3 champak Nov 07, 2005 05:03
I looked at that thread and seems like it wont help me. It says things should be in alphabetical order as it is now, which my _function_cats.php says it is, but the things seem to be in ID order instead. And what I really wanted to do was choose the order myself instead of leaving it up to ID or alphabetical----although I could probobly live with alphabetical, but as I said it should be doing that now which it isn't. Any other helpful directions?
4 stk Nov 07, 2005 21:32
Champak,
I've been thinking about this more and more.
IF you're not the kind of person that creates and deletes categories every 2 days, then a simple solution might be to STOP letting b2evo generate the category list and do it manually. (After all, the list is only a series of links).
EDIT ... heck ... even if you are, you could "uncomment" the php-b2evo-list generator thingie ... let it gen up a list you don't like, copy the HTML ... then rearrange it to your heart's content ... insert it into your _main.php and then comment-out the php-b2evo-list generator thingie.
Like, we've added maybe 2 categories in the past 6 months.
Adding another link, manually, isn't that big a deal. :)
This way ... you can choose whatever order you want and choose if you want images ... colors ... backgrounds ... all sorts of things [without having to worry about how to hack the thing in PHP and a b2evo file].
Just a wacky thought. (Kinda retro ... I'm mean, "manual" ... geez!) :lol:
-stk :D
PS - Congratulations Champak, you're the winner of my only b2evo post of the day AND my "wacky" thought of the day ... all rolled into one. :roll:
5 kweb Nov 11, 2005 18:11
One trick I have used in other apps is to add a 2-digit number to the beginning of each category name, and then strip off the number in the display code. That way, if the list is being sorted alphabetically, it should sort them in numeric order (or you could just use AA, AB, AC, etc. instead of numbers).
I don't have the b2evolution code in front of me at the moment, so I can't tell you what to change to strip off the first two or three characters of each category name, but it shouldn't be too hard.
6 nearo Nov 19, 2005 00:26
I understand the Hack to the category call in the _main template which you could hard code the category list but I also like the more dynamic generation of the category list but WITH a method to control the order, e.g. add some numbers or letters to the front and then strip them off. If you'd not mind demonstrating that 'striping' that'd be Brilliant.
# You can customize the following as you wish:
if(!isset($cat_all)) $cat_all = 'All'; // Set to empty to hide
# global category list delimiters:
if(!isset($cat_main_start)) $cat_main_start = '';
if(!isset($cat_main_end)) $cat_main_end = '';
# Category delimiters:
if(!isset($cat_line_start)) $cat_line_start = '<li>';
if(!isset($cat_line_end)) $cat_line_end = '</li>';
if(!isset($cat_line_checkbox)) $cat_line_checkbox = false;
# Category group delimiters:
if(!isset($cat_group_start)) $cat_group_start = '<ul>';
if(!isset($cat_group_end)) $cat_group_end = '</ul>';
# When multiple blogs are listed on same page:
if(!isset($cat_blog_start)) $cat_blog_start = '<h4>';
if(!isset($cat_blog_end)) $cat_blog_end = '</h4>';
http://forums.b2evolution.net/viewtopic.php?t=3262 might get you going in the right direction.