Please upgrade here. These earlier versions are no longer being updated and have security issues.

All Categories 'within' categories

Has anyone ever achieved this succesfully or written any plugins that can allow you to have an All Categories within Q&A so you can create nested categories within Q&A but view a single list containing all the posts across all the nested categories, and still have the discussion categories running separately under the main All categories?

I'd really like to be able to have an All Categories within a category.

Answers

  • hgtonighthgtonight ∞ · New Moderator

    All children categories?

    I believe @R_J and @businessdad were working on something like that, but I can't find it right now.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • businessdadbusinessdad Stealth contributor MVP
  • hgtonighthgtonight ∞ · New Moderator

    It wasn't @R_J at all!

    Thanks @businessdad :)

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Thanks @businessdad yes I had already seen and read that post and wasn't overly sure if this had been achieved yet and could be achieved without performance issues on the database as mentioned by @Linc ?

  • The kind of category structure i'd like to adopt would look like this:

    All Categories (Top Parent)
    -London
    - Q&A
    - All Categories
    - Nested/Sub Categories
    - Disucssions
    - All Categories
    - Nested/Sub Categories

    -Manchester
    - Q&A
    - All Categories
    - Nested/Sub Categories
    - Disucssions
    - All Categories
    - Nested/Sub Categories

  • businessdadbusinessdad Stealth contributor MVP
    edited March 2015

    @TownFish The queries I posted won't kill any database. The other suggested methods, i.e. using the CategoryModel::GetSubtree(), will fire multiple queries, which are far less efficient on a standard self-hosted site. Lincoln mentioned that those methods "will use the cache, if available", but that is rarely the case with self-hosted Vanilla installations (hosted installations have a powerful caching system in place, not available to self-hosted).

    Regarding the availability of a plugin that does what you are asking, I don't think there is one.

  • businessdadbusinessdad Stealth contributor MVP

    Furthermore, with the limited amount of categories you have, as long as you will ensure that you don't fetch hundreds of thousands discussions and comments every time, performance will be ok.

    Lincoln always has an eye on scaling and performance, but those concerns can often fall into the realm of premature optimisation.

  • Thanks @businessdad, great news to hear it can be done, I think if we ever got big enough to be concerned about performance we would invest in a powerful caching system.

    Do you think this is something I could pay you to do for my forum categories?

  • businessdadbusinessdad Stealth contributor MVP

    That's a good approach. If you will suddenly find yourself with a million users and the site will become slow because of that code, it will be a wonderful problem to have. Most likely, you will see a slower growth, giving you plenty of time for performance tuning.

    Regarding the project itself, I'm quite busy, but you can send me some more details and I will see if I can fit that project in the schedule. :)

  • Just in addition to this, if we create 2 all categories lists one for Q&A and one for Discussions, is it then possible to have a seperate search for each list and a seperate sort by filter (ie hot posts, unread, mine, bookmarked, zero comments, etc)?

  •  I can't find it right now.

Sign In or Register to comment.