Page 1 of 1
plugin feasibility question: hidden categories
Posted: Thu Dec 01, 2005 7:31 am
by jerwarren
I've yet to actually look at any of the code to see how I would accomplish this, but figured I would quickly ask if what I want to figure out is even feasible.
Would it be possible to create a plugin that allows you to specify which of your categories are included in the rss feeds and the main page? Or are these changes too broad in scope to accomplish with a plugin, requiring to modify s9y internal code?
Basically I want to be able to create special categories that are only visible when accessed directly, and it seems like a pretty useful thing so a plugin was my first thought.
Re: plugin feasibility question: hidden categories
Posted: Thu Dec 01, 2005 12:24 pm
by garvinhicking
You are able to do that. You can look at the serendipity_event_startcat plugin, which is an example for a plugin which only shows a specific category on your frontpage. I think it can be extended by separating the category IDs via ";" to make it work with multiple categories.
Excluding certain categories with the RSS feeds might work similarly.
The technical basics are there to make it work with plugins only. Hope you'll suceed and share your findings!

)
Best regards,
Garvin
Posted: Fri Dec 02, 2005 9:09 am
by jerwarren
I figured a good starting place would be to look at the categories sidebar plugin, where you can select multiple categories and clck go and it returns the posts from those categories. Sadly, I am unable to actually find that plugin. Am I just being stupid, or does this plugin not actually exist in the same form as other plugins? (I have it installed, and successfully am using it, but I can't for the life of me find it anywhere).
Posted: Fri Dec 02, 2005 12:29 pm
by garvinhicking
The category plugin is one of the "core" plugins, which reside in a global include/plugins_internal.inc.php file. So I'm sorry that it's a tad hidden there
HTH,
Garvin
Posted: Fri Dec 02, 2005 11:53 pm
by judebert
I just added a "hidden" option to my newsbox plugin, which I should be finishing in a week or so. It removes categories from the frontpage only and allows you to display entries from that category in a box of their own elsewhere on the page (or hidden).
Of course, I haven't even tried to do anything with RSS. And to totally hide a category, you'd want to remove it from other locations, and avoid displaying its category in the sidebar. I haven't even attempted those things.
But it shows that a plugin is possible. There's already an event hook for the SQL (frontend_fetchentries); I'd be surprised if there wasn't one for the RSS generation too.