Fork me on GitHub
Current releases are 2.1.3 (9 Sept 2014) and 2.0.18.13 (5 Aug 2014)

Ready for 2.1? Find out if your favorite plugins are compatible. The 2.0 branch will no longer receive updates after Dec 2014.

MUCH needed: Categories as Namespaces... aka. Subforums

edited February 2011 in Vanilla 2.0 Help
I've found a bit of discussion of similar ideas on here... but nothing fresh and nothing that led anywhere.

Here's a feature that will pretty much make or break several large sites I'd like to install Vanilla on: the ability to treat categories like namepaces, à la the subforums of other forum software.

From a category page, I'd like to be able to search solely within the category, as well as display tag clouds/tag searches within that category.

Imagine a large car forum. Wouldn't it be nice to restrict your searches to the Toyota category when your Corolla transmission breaks down?

This feature would even be very useful on this very forum. I'm getting pretty tired of coming up with dozens of outdated threads on Vanilla 1 whenever I do a search.

Can anyone point me in any directions on how to implement this?

Comments

  • A bonus addendum feature to this would be to allow users to "join" and "unjoin" categories, allowing them to only see threads in categories they're interested in.
  • LincLinc Community Instigator Detroit Vanilla Staff
    You're basically asking for search by category, right?

    Sr Developer at Vanilla Forums [GitHub, Twitter] and humble servant of Lord Brackos.

  • More than just search, if I understand correctly. This is about namespaces - once you drill down into the areas of interest (whether categories or sub-forums) then all your operations stay within that area, whether reading, subscribing, posting etc. Presumably there would be a means to step outside of that namespace to look at the bigger picture and pull in other areas that may now be of interest.
  • LincLinc Community Instigator Detroit Vanilla Staff
    It seems to me that would be confusing unless the visual style reinforced the refined scope. I wouldn't expect a search box in the header to change scope just because I'm viewing a subcategory.

    Sr Developer at Vanilla Forums [GitHub, Twitter] and humble servant of Lord Brackos.

  • edited December 2010
    @Lincoln - Yes, styling would be important. I was imagining the category search box below the category header. The global search would remain right where it is.

    @judgej - Glad I got across, thanks for restating that so well. Another operation example would be generation of tag clouds. A post in the Toyota category tagged "transmission" would be listed under a global tag cloud as well as more refined Toyota tag cloud on the Toyota category page.
  • Any ideas of how to approach this? Or a category search box, at worst?
  • edited December 2010
    Why not add a link "Advanced Search" next to or under the search box which then takes the user to a advanced search form. Here you can check the categories in which you want to search and maybe add an author and then also specify if you want to look in the topic title, body or both.

    Searching in categories would be great, but why not step it up a notch?
  • How is this advanced search accessed?
  • LincLinc Community Instigator Detroit Vanilla Staff
    It doesn't exist yet.

    Sr Developer at Vanilla Forums [GitHub, Twitter] and humble servant of Lord Brackos.

  • Well... any ideas on how this might be implemented? Even just the within-category search?

    I haven't figured out much of the Vanilla code or API yet, but I'll try to jump into the code if someone can give me at least a few words of direction.
  • JeffDunneJeffDunne New
    edited December 2010
    We have different domains and sub-domains pointing to the one installation.

    To do this, we created a bootstrap.before.php in the conf directory which contains a switch on $_SERVER["HTTP_HOST"] to determine which domain name was used to enter the site.

    We then set the PATH_CONF setting to point to the config.php to use. This allows us to use different themes,plugins & defaults based on the domain name. We also set a constant that sets a DomainID to use when filtering searches.

    To filter categories & discussions, we've modified the core models for discussions and categories. Been planning to try and add this as a plugin but we're still modifying the two model files on each update (the two files haven't really changed much over recent updates so it's not a big deal). A lot of our site is custom applications so we find the DomainID a useful filter.

    Initially we added a DomainID column to the Category table, but we now use a custom CategoryDomain table to keep a list of DomainID/CategoryID valid combinations to filter categories by domain. Found this gave us more flexibility.

    Hope this helps. There might be another way but we find this simple and gives us the flexibility we need.
  • Thanks for the suggestions Jeff. This is all feeling like more developing than I'm prepared to handle. I think I might be moving in on Buddypress territory.

    Incidentally, though, I'm just noticing that the Vanilla addon database allow search by several different taxonomies. Could this be merged to the normal forums?
  • Looks like this plugin is implements the Tag cloud by Category namespace part of the problem... http://vanillaforums.org/addon/tagging-plugin
  • sprockettsprockett New
    edited January 2011
    Yes, the plugin currently addresses the tag by category, but in the next few versions I hope to improve it such that the db schema is flexible enough to get tags by various criteria such as:

    tags by user
    tags by user's created posts
    tags by user's followed posts
    tags by user's participated posts
    tags by category
    (and any combination of the above eg. tags by user within one category)

    to make things even more complex, I also hope to include do "related tags". This one in particular is more complex. Well actually its not that hard, but will get very complex if we want to do a truly scalable solution.

    oh also forgot to mention "tag labels" (which also allows you to group tags together and apply a "label" to that group, and compulsory tagging (whereby a user MUST choose one or more pre-defined tags for any post)

    I have done this in another app i programmed (which was built to mimic Delicious' tagging system), but will take some time to port over the logic / DB schema into Vanilla.

    Do check out delicious.com (and create an account if you haven't) to get an idea of what I'm talking about...
  • MarkMark Vanilla Staff
    In an upcoming release of Vanilla, we've got proper nested categories (with a killer UI). We haven't done any augmentation to the search thereof yet, but it shouldn't be *that* difficult. It would make sense for us to create a more "advanced" search page than we've got in the core right now.
Sign In or Register to comment.