Discourse WordPress plugin version 0.6.6


(Ben Word) #1

The wp-discourse plugin got updated to version 0.6.6 just now. Thanks to @pjv and @nigelb for these updates!

0.6.6: July 30th, 2015

  • Add custom datetime format string to admin settings (#160)
  • Add a log entry when HTTP request fails (#159)
  • Log out of WordPress when logging out of Discourse (#158)
  • Fix security issue, add missing esc_url_raw() (#157)
  • Fix SSO login (#156)
  • Use wp_remote_get instead of file_get_contents (#155)
  • Fix user mention links (8b6fe46)
  • Allow showing existing WP comments under Discourse (#137)
  • Add <time> to allowed tags (#135)
  • Don’t do a replace if already an absolute URL (#131)

You can download the new version from Releases · discourse/wp-discourse · GitHub or via Composer


Using Discourse as you do for the Blog
Embedding Discourse Comments via Javascript
(Steven Greco) #2

On my site when I check the box to allow exisitng WP comments the WP reply box also shows up allwoing WP comments to be added along with Discourse. Is this by design? This should not show correct?


(Ben Word) #3

You’ll need to remove comment_form from the comments template found in your theme — the plugin wouldn’t be able to handle that.


(Steven Greco) #4

thanks for the quick response.


(Erlend Sogge Heggen) #5

Since my whines about this have been distributed across only loosely related posts, I’ll have another go at it in here:

Any chance you could start making this plugin available on the official WordPress.org plugin repository? There’s a :cookie: in it for you.

I can’t speak from experience, but there are a lot of solid-looking avenues for it these days:


(Ben Word) #6

There’s still major issues in the plugin that need to be addressed.

Users can install the plugin, configure it incorrectly, and get stuck. There are not error messages that can help them figure out how to fix their settings, and there’s not functionality in place to prevent someone from putting in bad settings (eg URL validation).

This is why there’s been so many issues, on GitHub and on meta, related to users not being able to get the plugin to work. There’s been some downstream improvements that I’d like to see make it into the plugin.

:cookie: to anyone who has time to help contribute to making the plugin more stable to be available on the official WordPress.org plugin repository. I don’t think it’d be a good idea to put it up in its current state. I imagine there’d be lots of “doesn’t work for me” followed by 1-star ratings. I’d love to help get it to that point, but having the time to do it isn’t easy to come by.


Discourse and Wordpress Integration
(Fabio Boscolo) #7

There is a “website case” where somebody can build a community website based on a Wordpress blog-Sso-discourse for comments and forum with suggestion for a preferable theme?

I would like to build a fishing blog- community but need some guidance because I really like discourse.


(Alexandra) #8

I have been looking at the options to tie my Wordpress install in with Discourse and I would like to use WP as the SSO provider for Discourse. I might also, at some point, want to use Discourse to manage WP comments.

There currently seem to be two SSO plugins for WP/Discourse integration: The official one mentioned in this thread and the PrimeTime WordPress + Discourse SSO from the WordPress repository, developed by @etc.

@benword You mentioned “serious issues” with the official plugin. What’s the current status on that?

Which of the two available plugins would you guys recommend for a non-developer such as I am?

Thanks!


(etc) #9

My PrimeTime plugin is dedicated to the SSO feature and that’s it. The official plugin has a more comprehensive feature set. Really depends on what your ultimate use case is.


(Alexandra) #10

Thanks @etc, that’s good to know.


(Alexandra) #11

Decided to go with the PrimeTime plugin. Works great, thanks @etc.


(Nick Putman) #12

Sorry for being dumb. I am presuming that this is a different method of using discourse with WordPress blog posts - as I understand it there is a different method whereby WP comments can be synced manually with a topic in discourse - if so, where can I find the guide for how to do this?

Can this embed method also be used for WP posts - I have tried to paste the embed code in a WP blog post and I am getting an error on the page as WP is adding

tags to the script.


(Robin Ward) #13

There is no way to sync wordpress comments to discourse. You can use discourse to show comments and have people create them on your discourse forum. The easiest way to do that is using the official discourse plugin for wordpress.


Wordpress blog, comments and manually copying it to Discourse
(Nick Putman) #14

Thanks for your reply Robin. I have the official discourse plugin installed, and my understanding from this is that I can sync comments from discourse back to WP blog articles. I am basing this on this line on the info page for the wp-discourse plugin:

Periodically sync the “best” posts in Discourse topics back to the associated WordPress blog entry as WordPress comments

But I am not sure how to do this.

Then I saw the embedding method from this topic, and wondered if there is a better way of integrating discourse with my WP blog.

If I can use discourse in a way that works well with the blog, then I would like to go with this solution. I suppose I could use another commenting system, such as WP built in, or Disqus, with a SSO, but it seems to me that if there is a way of integrating with discourse this would be best.

I don’t mind people having to use discourse to post their replies, but I do need the comments to show under the associated blog entry. So, if I am right and the embedding method above is different to the wp-discourse method, which is best for my purposes, and if the latter, how do I get topics replies to show under the blog entry?

I hope this is clear!


(Robin Ward) #15

The wordpress plugin can be used in the way you are requesting. I just meant you can’t take comments from wordpress and import them into discourse. The other direction works quite well.

If you’re having trouble with the wordpress plugin I suggest you ask here (I’ve moved the topic). I’m not sure what problems you’re having but the plugin is supported and someone such as @techAPJ can probably help you.


(Nick Putman) #16

Thanks Robin. Glad to know that I have understood correctly and that there are two different methods. In terms of this thread then, I am wanting to know how to do the following, as it is not clear to me:

Periodically sync the “best” posts in Discourse topics back to the associated WordPress blog entry as WordPress comments.

I will ask the question relating to the embedding method on the other topic, but I suppose I can ask here, as well as there, what the pros/cons of the different methods are, as I am not clear on this.


(Simon Cossar) #17

With the wp-discourse plugin, you can control which posts (comments) are pulled back to the WordPress blog by adjusting the plugin settings for:

  • min score of posts (score = 15 points per like, 5 per reply, 5 per incoming link, 0.2 per read)
  • min trust level (the trust level required of a user before their posts are pulled to the WordPress site)
  • bypass trust level score - (bypasses the min trust level for posts with a high enough score)

There is also an option to ‘Only import comments liked by a moderator’. Setting this to true and setting the ‘min score of posts’ option to 0 should give you full control over what posts end up on the WordPress site.


(Nick Putman) #18

Thanks Simon. I have got this working now. What I am seeing though is just a list of comments numbered in order. Is this the expected behaviour? I would rather like to have details of who has made the posts - i.e. name and avatar. Do I have to use the embed method, mentioned here to achieve this?


(Simon Cossar) #19

You should be seeing something like this, but with a proper avatar for the user:

The template for this can be set in the WordPress plugin settings page. The setting is labeled ‘HTML Template to use for each comment’. In case that has been altered, here’s the default html for that setting:

<li class="comment even thread-even depth-1">
  <article class="comment-body">
    <footer class="comment-meta">
      <div class="comment-author vcard">
        <img alt="" src="{avatar_url}" class="avatar avatar-64 photo avatar-default" height="64" width="64">
        <b class="fn"><a href="{topic_url}" rel="external" class="url">{fullname}</a></b>
        <span class="says">says:</span>
      </div><!-- .comment-author -->
      <div class="comment-metadata">
        <time pubdate="" datetime="{comment_created_at}">{comment_created_at}</time>
      </div><!-- .comment-metadata -->
    </footer><!-- .comment-meta -->
    <div class="comment-content">{comment_body}</div><!-- .comment-content -->
  </article><!-- .comment-body -->
</li>

The comments are displayed in an ordered list ol.comment-list. To get rid of the numbers on the comments your WordPress theme should be setting the css for that to something like:

/* twentysixteen/style.css 2177 */

.comment-list {
	list-style: none;
        margin: 0;
}

(Nick Putman) #20

Thanks Simon. I’d be happy to see that, but I’m actually just seeing this:

I changed the title from ‘Notable Replies’ to ‘Comments’ as I want to show all comments.