Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How about those sub categories?

CodersCoders New
edited December 2009 in Vanilla 2.0 - 2.8
any chance of sub categories for v2? like a drop down box so lets say u have

General v

Blah1

Blah2



and it drops down, that would be pretty cool.

Comments

  • LincLinc Admin
    edited December 2009
    This would require a plugin.

    My (tangentially related) plan is to create a set of tags/labels for each category. So say I have 3 top categories: Tech, Gaming, and Lifestyle. Then under Tech I have (checkbox) labels like: Graphics, Processors, Memory, Overclocking, Cooling, etc. Then if someone has a problem related to both their Processor and Memory, they won't scratch their head deciding how to categorize it. My first tier categories are either/or, but I find my second tiers have a lot of overlap so this is the compromise I'm looking to work out.
  • I agree with Lincon. The concept of categories and subcategories is so rigid and old. Tagging is the right way to go.

    Let us know when you start working on it.
  • wtf? epic!!!
    let me know when its up on your repo. sounds like a good plan. tagging is awesome.
  • MBZMBZ
    edited January 2010
    Lincoln, I think this would be an excellent addition to Vanilla 2! Have you had a chance to work on such code?

    I'm scratching my head, wondering if tags need to relate to multiple categories - ie:

    // Construct the tag table.

    $Structure->Table('Tag')

    ->PrimaryKey('TagID', 'int', FALSE, 'primary')

    ->Column('Tag', 'varchar(30)')

    ->Set(FALSE, FALSE);


    // Construct the category to tag table.

    $Structure->Table('CategoryTag')

    ->PrimaryKey('CategoryTagID', 'int', FALSE, 'primary')

    ->Column('TagID', 'int', FALSE, 'primary')

    ->Column('CategoryID', 'int', FALSE, 'primary')

    ->Set(FALSE, FALSE);


    // Construct the discussion to tag table.

    $Structure->Table('DiscussionTag')

    ->PrimaryKey('DiscussionTagID', 'int', FALSE, 'primary')

    ->Column('TagID', 'int', FALSE, 'primary')

    ->Column('DiscussionID', 'int', FALSE, 'primary')

    ->Set(FALSE, FALSE);


    Where you could have say a Recipes forum (yes, lame example), with categories such as Appetizers, Desserts, Drinks. With tags, such as Sugar, Ice, Lemon, Frosting, Bread. The breakdown could look like:

    Appetizers: Bread, Lemon

    Desserts: Sugar, Lemon, Frosting

    Drinks: Sugar, Lemon


    Thoughts?
  • LincLinc Admin
    edited January 2010
    @ArmoredMBZ I haven't been coding the last 2 weeks; clients have taken precedence. This is something I need before I migrate one of my sites, however, so it's definitely still on the front burner.

    I hadn't planned to make tags cross-category. Is this academic curiosity or did you need it to work that way?
  • Purely academic curiosity - and after sleeping on it, I think it's probably overkill. I do, however, look forward to peeking at your code when your clients decide to leave you alone ;)
Sign In or Register to comment.