Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Add-On Request: Sub-Categories
I know this has been mentioned several times in the forum, but I couldn't find an 'official' add-on request for it, so here 'tis!
It would be great to be able to "group" categories, so that you end up with 2 category levels (ie, each category actually belongs to a 'main' category). For instance, let's say that I have an 'animal' forum, where people discuss their various pets. Right now, I might have the following categories:
- Dogs - Small
- Dogs - Mediuml
- Dogs - Largel
- Cats - Pure Breedl
- Cats - Mixed Breedl
- Others - Domesticl
- Others - Farml
- Others - Wildl
If I could have 'sub-categories', my list would be a lot more logical
- Dogs
- Small
- Medium
- Cats
- Pure Breed
- Mixed Breed
- Others
- Domestic
- Farm
- Wild
Even right here in this forum, having an 'extra level' of categories might help. For instance we could have:
- Add-Ons
- Official Discussions
- Requests
1
This discussion has been closed.
Comments
If not and someone implements, don't forget Named categories (friendly category links, category slugs) # 1
What about the Parent cats category? Is it a Dummy category or u can assign that to the discussion as well.
How will users pick the category per discussion? Will they be able to select the Cats category or will be forced to pick one of the subs.
How many levels are u looking at? ur not going to go all crazy with 10 level deep categories are you.
just because I'm asking questions doens't mean i'm making it.
depending on the answers my mind can and might change. Don't hold ur breath.
what happens if u select the parent category
I was thinking that if u select the parent it should pull content from all its children. that would have been an exciting thing to do.
allow parents to be clickable, clicking does what schizo said, and shows all discussions that belong to its children categories.
how are you going to display categories on the discussions page? say i have this going on:
Trucks
-Small
-Medium
-Large
Dogs
-Small
-Medium
-Large
Fries
-Small
-Medium
-Large
how are you going to handle categories with the same name? (does vanilla even allow this now, or does it just use the category id?) that being said, if you can not name the same category twice i'd see that as being a limitation, and if you can, how am i supposed to tell apart categories on the discussions page? perhaps display the parent as well, like a sort of "breadcrumb" trail (ie: Category: Televisions - Medium)? only problem is if there are a lot of sublevels, this could make for some really long entries.
just a couple thoughts.
Re: categories with the same name
Since parents cannot have the same name, the parent name would make the category URL unique, e.g.
http://www.vanillasite.com/categories/parent/child/
Re: display of category overview
Why not use the same thing SMF does, where subforums aka 'child boards' are simply listed in-line, see
http://www.simplemachines.org/community/index.php
If implemented as a list, CSS can be used to style it in different ways later.
Alternate suggestion: give each parent its own TAB.
I think the idea of clicking a parent and having it bubble up the lower branch posts is a neat idea. It would have to take permissions to the subcats into account, of course. However, if you allow posting to a category that has children, how do you differentiate those discussions from the ones that "bubbled up"? Should you?
It seems the most flexible would be a cat system with those two items as options, namely:
[yes] [no] Allow Posting to Categories with Children [yes] [no] "Bubble Up" discussions
Just those two options provide for a pretty good level of agility for something like this.
making subcategories isn't hard at all.
Making all the other extensions that use categories to be compatible with subcategories will be a mess.
Extensions like Discussion Overview, Category Jumper, Category filter etc will have to be patched to take subcategory into account. that is sooooo not going to happen.
And i don't want to take the heat if subcategory extension doesn't work with any other extension that uses categories.
Now i understand why no one wanted to do this. its a simple idea, yet no extension developer made it.
Notice how, by default, Vanilla shows EVERYTHING on the home page? That's every discussion "bubbling up" to the root category node, so to speak.
Now, add a few more levels of depth and jump to a level 1 depth -- do you see things specifically assigned directly to that category ( typical subforuming ) or does it "bubble up" discussions from lower levels like above example.
That's what I mean.
U cannot close Parent categories. They have to be normal categories. No exceptions.
You won't be able to pull discussions from the child category if ur looking at the parent category. I'm not sure about this. cause easy way is to rewrite a new Discussion page to do that. which will break all discussion page extensions. there might be a hard way to do this without requiring a new discussion page. I will look into this more carefully, before I officially reject this idea.
This preoder Tree traversal will require changes to the Vanilla core.
Doing it as ParentID won't.
20% of the effort would really be worth it.
For compatibility subcategories could be 'presented' to older add-ons as before, e.g. 'Dogs - Small'
to prevent breaking anything (note: based on past experience, popular add-ons are revised in days)
so, if i have in my forum this categories: dogs, cats, others
i could group my existing categories into a king category:
Animals <- king categorie
dogs <- categorie that i already have in forum
cats <- categorie that i already have in forum
others <- categorie that i already have in forum
was it helpful?