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.

Child categories (aka subcategories)

edited March 2010 in Vanilla 2.0 - 2.8
The admin UI doesn't seem to offer nested categories, but class.categorymodel.php contains a lot of relevant cogwheels. Is this something that's likely to be enabled in the near future ?

We are considering moving a medium sized phpBB 3.x board (45k users), I could definitely help with the migration script and probably a Drupal 6.x bridge. The other thing we need to look into is an ajaxy way for users to filter out categories they are not interested in.


  • Welcome!

    More help on the conversion tool will most likely be very welcome! These will be of interest to you then...
  • Curious about the plan for the child categories though, it's a potential blocker and it's not clear to me what the missing pieces are. I don't mind writing plugins but this would be a very intrusive component to maintain.

    I'll continue exploring the code in the mean time.
  • If you can suggest things to make it easier to maintain a child category plugin that wouldn't too adversely affect the rest of the application, I'm sure @Mark would be willing to hear.
  • edited March 2010
    I think we are talking past each other. There *is* code in the core to support child categories, just search for ParentCategoryID in

    In the first post I am asking what the intentions are with respect to this code, it doesn't make sense to plan a plugin without knowing where the core is going. I see now that Mark worked on it the same day I started this discussion, so I guess we will find out when he has time to look this way.
  • MarkMark Vanilla Staff
    It allows nesting one level deep right now.

    When creating a category, uncheck the "allow discussions to be posted in this category" checkbox. This will make it a "parent" category that only contains other categories and no discussions. The child categories contain the discussions.

    When looking at the categories on the category admin page, you will see that children are indented and parents are not. You can drag them up or down to put them under different parents. Parents can only contain children - they cannot contain other parents.
  • Aha... I had just created three categories with this setting enabled, and was dragging them around without success. Suggested description: "Allow discussions to be posted in this category. Otherwise this category will act as a container for subcategories."

    Will have to think about whether that suffices or whether I will attempt to propose a patch.

    Thank you for the response.
  • @Mark, the problem I discovered with the current form is that categories are required, were I would like to group only four of my 7 categories. I could do it via SQL, but dragging stuff via the admin panel reset everything.
  • MarkMark Vanilla Staff
    I'm a self-confessed hater of categories. They do need work, but since Vanilla is typically used by smaller communities - they often are irrelevant. We've got some clients that need more flushed out categories, though. So expect improvements.
  • Yah, we don't need categories luckily, but it was a bit weird how it did work. Also, I see parent categories more a bit of organizing the categories in the category list, not as a definite tree structure.
  • I've discovered that once a category is dragged into a parent you can't drag it outside again, although you can drag it to another parent.

  • @Mark: there is no box with "allow discussions to be posted in this category" in the form for creating new categories. I am using the last beta version 2.0.18b2 and there is nothing there for NESTING categories.

    I can't understand why the Vanilla documentation explains in detail how to display the child categories, but does not explain at all how to create them!
  • TimTim Operations Vanilla Staff
    @horia_m In the graphical Categories UI on the dashboard, simply drag any categories you want to be 'children' to the right, effectively indenting them. You can then assign their parent using vertical sorting.

    Vanilla Forums COO [GitHub, Twitter,]

  • @Mark: there is no box with "allow discussions to be posted in this category" in the form for creating new categories. I am using the last beta version 2.0.18b2 and there is nothing there for NESTING categories.
    I too can't see this, but would really like to know as this is one of two major issues I have with Vanilla.

  • @Tim:
    thanks, this is really simple, but it is not easy at all if you don't know it in advance.
    I played a lot with the graphical UI of the categories, but I never thought of "indenting" them. Now that I know, it's very simple. It would be good to mention this in the documentation! A screenshot would be enough.
  • My categories are nested/indented....What I am after is the "allow discussions to be posted in this category" checkbox. At the moment users are able to post in category headings, which shouldn't be.

    This is apparently on track for version 2.1, but if this is already included somewhere it sounds like it will do the trick.
  • Yes, @Homebrew, in the meantime I discovered that this nesting of the categories may need sometimes that one does NOT post in the main category, which becomes just a kind of recipient that holds subcategories.
    main category: projects.
    sub-categories: project sketches / projects in work / finished projects

    in this kind of categories system, one does not want to post in "projects"; but just in the sub-categories.

    @Mark would say that this is not a good idea, but some people really prefer not to have all categories or discussions listed in an endless list, but in a 1-or-2-level-hierarchy.

    This is like the dispute between email organized à la Google Mail (no hierarchy, if you need something, you search) or à la Outlook (hierarchical, with folders and subfolders and filtering rules). There is no clear "better" solution, it is a question of choice and personal preferences.

  • So,

    Where does one find this mystical "allow discussions to be posted in this category" checkbox? I'm running the latest beta, but can't find it.
Sign In or Register to comment.