Hiya! Long time lurker, first time poster.
I'm looking into adding a forum for our Australian tech blog (which runs on Wordpress), and so far the setup has been pretty smooth using the WP-Discourse plugin.
I've noticed two divergent behaviours, and I'm hoping someone can help me either decide between them, or (ideally), find a way to switch between them.
Right now, blogs with a Discourse integration seem to either 1) link directly to the topic thread from their index page (like Boing Boing), or 2) link to a Wordpress comment page from their index page (like the Discourse Blog), which then leads off to the thread via the 'continue the discussion' button.
I prefer 2) the way that the Discourse blog does it -- a page of Notable Replies, with a button at the bottom to jump to the thread. However, I think the only weakness of this approach is when there are no comments.
A good example on the Discourse blog is here, if you navigate to the post entitled 'Improved Image Handling' you can see it is uncommented. Right now, it has a button that says 'Leave a reply', indicating no comments.
When you click this, it jumps to the bottom of the post's page (presumably, where there would be 'notable replies' if there were any), but you can't actually comment on it until you click the 'Continue the discussion' button of this page. It's a little redundant to do go the notable replies page when there's nothing there.
What I'd love to be able to do is combine the best of both worlds, and have the 'notable replies' comments page, but only link to it when there are notable replies to see.
Essentially do something like this:
if (discourse_comments == 0) {
comment_btn = "Leave a reply"
comment_link = "forum.mysite.com/t/topic/1
} else if (discourse_comments == 1) {
comment_btn = "1 reply"
comment_link = "wordpress.mysite.com/topic#comments"
} else {
comment_btn = "[x] replies"
comment_link = "wordpress.mysite.com/topic#comments"
}
Hope that makes sense! I also made a simple diagram explaining what I mean.
I thought maybe I could do this in Wordpress by using comments_count(), but because Discourse doesn't report back a comment count to WP I don't think it's possible that way. Maybe the plugin could to be extended somehow to include a discourse comment count function that can be accessed from within the Wordpress loop? Any ideas?