PDA

View Full Version : show count


Anonymous
06-25-2005, 10:37 PM
Hello--

I see in the config area that I can enable/disable show count. I like the show count feature, but I'm wondering if there is a hack for changing it's behaviour.

Right now, if I have a parent category that has 3 sub-categories, and each of those contain 50 links, show count on the home page will only display "3" (the total number of cats). What I'd prefer would be for this count to show "150", the total number of links under that parent category.

Possible? Dumb idea?

TIA!
SAM :)

David
06-26-2005, 12:33 AM
Yes, I see your point, and for some directories I have actually turned off this feature, because I thought it created confusion. This is especially the case when you have multiple levels of subcategories. I'll have to think about this one.

dcb
06-26-2005, 03:44 AM
Well, you're not the first asking for this. Counting everything beneath a category means recursion and that is expensive and/or dangerous.
I'm still thinking what would be the best approach.

Ap0s7le
06-26-2005, 05:04 AM
I agree with dcb.

Basically to do that you would have to
Get the Category ID,
if the parent_id is > 0 get that subcategory ID
Continue this until you have them all and then create your SELECT statement

That could get rowdy quickly I'd say. Thus, it's not something that's going to be done right now I don't believe. That's IMHO.

Am I off base dcb?

-Ap0

IGonza
06-30-2005, 04:42 PM
Hello.

If anyone wants me to take a little time and set the counts to your
liking, I'll be happy to spend a little time to get it the way you
want it, but a small donation would be much appreciated.

Thanks,
Igor.

RCC_SaMiaM
08-10-2005, 05:38 AM
It wouldn't be so bad if you kept a count total for each category and subcategory. You would just have to make sure you subtracted from the appropriate chain of categories (if lots of sub cats) when a link was set inactive or removed.