Opened 8 months ago
Last modified 5 months ago
#1958 new enhancement
Hierarchical Forum and Category Layout theme
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.4 |
| Component: | Theme Compatability | Version: | 2.1 |
| Severity: | normal | Keywords: | |
| Cc: | jared@…, stephen@… |
Description
Topic for reference: http://bbpress.org/forums/topic/hierarchical-forum-and-category-layout/
As discussed, people often want some degree of hierarchy for their theme and right now it would require a completely custom theme. We should help them out.
I guess one thing to determine, which would give us a direction to go in, would be what degree of hierarchy should we look to provide?
One possible scenario would be what Lynq came up with in his custom theme: http://teamoverpowered.com/forums/
Thoughts?
Change History (4)
The current train of thought has been to keep the option of a forum custom post type having either type 'forum' or 'category' assigned to each forum.
What about moving the 'category' option from the 'forum' post type to its own post type extending bbPress from the current three 'forum', 'topic' and 'reply' post types to four 'category', 'forum', 'topic' and 'reply' post types.
The current relationships are based on the database model 'hierarchical model' though introducing the 'category' post type to use one-to-many relationships with a 'network model'...
I may have now be over thinking this :)
http://en.wikipedia.org/wiki/Database_model#Hierarchical_model
http://en.wikipedia.org/wiki/Database_model#Network_model
eg. As an 'Apple' forum could be both software & hardware related you could have a single forum called 'Apple' but assign it to both the 'Software' and 'Hardware' categories. When setting up layout options for display on your site you can then have the 'Apple' forum displayed on both the 'Software' and 'Hardware' forum sections of your site.
Home / Forums / Software / Microsoft
Home / Forums / Software / Google
Home / Forums / Software / Apple
Home / Forums / Hardware / Google
Home / Forums / Hardware / Apple
Home / Forums / Hardware / Amazon
Further consider a standard WordPress site without bbPress installed and the author wrote a blog post about the recent release of the iPhone 5, this post could have both 'Software' and 'Hardware' categories added to the post as it would indeed make mention of iOS 6 and the physical iPhone 5 hardware device.
What side effects this would bring on performance or other headaches this may bring to bbPress is still at stage way beyond my skillset :P Just a thought I had on the weekend and now shared ;)
comment:4
johnjamesjacoby — 5 months ago
- Milestone changed from Future Release to 2.4
Let's try and get this going for 2.4.
Here's a quick summary of a chat I had with @jjj ~ 1 month ago...
... ideally, each subforum would have it's own freshness, topics, posts, etc...
... It will probably need to be a new function, specifically for this.
... WP_Query would need to include a 'depth' argument
... The loop in the template needs to check the post meta, bbp_is_forum_category() I think.
... If it is, loop through the parent (the category you just had) and output those forums
... The hard part of the logic will be knowing when to switch, based on where in the hierarchy we are, and if the current forum, is a forum or a category.
... And then knowing when to exit that loop and finish the container HTML.
... Because forums and categories can be mixed and matched, and the output will need to adapt to that.