2 of 2
2
Plugin: Category Count
Posted: 19 March 2010 12:51 PM   [ Ignore ]   [ # 19 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  151
Joined  10-18-2007

Hi Zac

sorry, yes, I need to use segment id, but as he has that “C” letter, I’m already using it to other custom query with SEGMENT operation to split it, but I get error when need to use it with your plugin, as I’m not so good at php, do you think or know what is best way to use category that is open, only one.

thanx

Profile
 
 
Posted: 19 March 2010 02:21 PM   [ Ignore ]   [ # 20 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  389
Joined  10-24-2007

Hey Davor,

I might not have the time to add this patch to the official plugin, but here is a patch that will work.

Open up the pi.catcount.php file and on line number 25 and 26 you should see the following:

$cat_id $TMPL->fetch_param('cat_id');
$status $TMPL->fetch_param('status'); 

Insert the following in between the two lines so it looks like this:

$cat_id $TMPL->fetch_param('cat_id');
$cat_id substr($cat_id ,1);
$status $TMPL->fetch_param('status'); 

Note that this will only work now if you pass it a url segment that has the C at the front of it.

When I get some more time I will post a solution that can automatically figure out if the C is at the front of the parameter value.

Please let me know if this works for you!

Zac

 Signature 

Zac Gordon is a Professional Web Educator and owner of a Washington, DC based ExpressionEngine Development Company

Profile
 
 
Posted: 13 April 2010 06:43 PM   [ Ignore ]   [ # 21 ]  
Grad Student
Avatar
Rank
Total Posts:  31
Joined  03-28-2007

Hey Zac -

Thanks for the effort on this plugin.

Before I throw out all my custom code (see here) and switch to this I’ve got a question and an idea.

First, I’m wondering if it includes future dated posts in the category count? Ideally not, but figured I’d ask.

Also, not sure if you’re planning any upgrades, but one thing I’ve done with my code is allowed for a minimum posts threshold so it’ll only show categories with more than a certain number of posts. That way you can use it for a “popular categories” type sidebar item.

Thanks for considering these ideas and again for the effort.

TL

 Signature 

Mashware : Hand-crafted mashups, blogs, and websites

Profile
 
 
Posted: 14 April 2010 08:01 AM   [ Ignore ]   [ # 22 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  389
Joined  10-24-2007

Hey Todd,

These are some good points to consider in extending the plugin.  I should have some time in the next few days to get back into the plugin and make some changes.  I’ll post back up when I have it done!

Cheers and thanks for the suggestions,
Zac

 Signature 

Zac Gordon is a Professional Web Educator and owner of a Washington, DC based ExpressionEngine Development Company

Profile
 
 
Posted: 31 May 2010 07:48 PM   [ Ignore ]   [ # 23 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  874
Joined  01-07-2003

Hi Zac G.

Just put this into play counting cats in an EE 2.0 site and it works like a charm.

*pun intended… and too good to pass up.

Thanks so much!

 Signature 

learn more at eeSiteKit.com


NetRaising | a web services company


Custom Designed Dynamic Websites for Mission Driven Organizations

Profile
 
 
   
2 of 2
2