As some of you know, I've been working on a new WordPress plugin that adds a forum to your WordPress install. You are all welcome to try it out here:
http://popcritics.com/forums
That's not why I'm posting right now. Since many of you are devs, I'd like to get your honest feedback on how the data should be structured and which APIs to use.
Note that the term "post" here refers to a post in a forum, a reply to a topic made. It doesn't refer to a blog post in WP.
Here's how everything is currently structured:
Here's how I'm considering structuring things:
- Forums - custom taxonomy.
- Topics - custom post type.
- Posts - custom comment type.
Why change the structure?
- Forums - custom taxonomy.
- Topics - custom post type.
- Posts - custom post type.
I've been facing a few problems that definitely need to be addressed with the comment system:
These problems could easily be fixed using a custom post type, plus give some extra:
- There's no 'edit_comment' capability, so allowing users to edit their posts is problematic.
- 'comment-page-x' isn't an appropriate permalink structure for pagination (I'm not sure how easy it is to change).
- Attachments (uploading media) would likely have to be attached to the topic instead of the individual post.
Workarounds using the comment system:
- Allow singular views of individual posts outside of the topic.
- Should work with cool front-end editor plugins (I think there may be a couple).
- Don't have to filter so many of the comment functions to get around settings and theme setups.
- Posts could support their own taxonomies, even though taxonomies should be possible with comments.
- Allow titles for individual posts (though comment meta would allow this too).
- Loading data is probably easier than the crazy functions I'm using now.
Let's suppose we use a custom post type for forum posts.
- 'edit_comment' capability? No idea right now.
- Paginated comment permalink? No idea right now.
- Attachments? Give the attachment to the topic and use the attachment metadata to "attach" it to a post/comment.
I'm leaning toward the former because you can still give a 'post_parent' the ID of something from another type.
- Should we use separate 'forum_topic' and 'forum_reply' non-hierarchical post types?
- Should we use a single 'forum_post' hierarchical post type?
Thoughts? Opinions?
I really want to make a great forum plugin, and I could use as much feedback as possible. If you see potential problems or solutions, I want to hear about them. Or, if you want to know how I'm handling certain functionality, please ask.
Also, you can see a bit of this conversation in the IRC logs:
https://irclogs.wordpress.org/chanlo...6-25&sort=desc


LinkBack URL
About LinkBacks
Reply With Quote
