Embedded comments aren't working

(r3d_f0x) #1

I have a sample post here: Discourse allows topics to be embedded as comments – r3d_f0x

The code I have in one of the Wordpress widgets is this:

<div id='discourse-comments'></div>

<script type="text/javascript">
  DiscourseEmbed = { discourseUrl: 'https://forum.r3df0x.com/',
                     discourseEmbedUrl: 'https://r3df0x.com<%= current_page.url %>' };

  (function() {
    var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
    d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);

I’m using discobot as the user to post new topics. Do I need to set anything for the class or the path whitelist?

(Jay Pfaffman) #2

Just checking, but you’re aware that there’s a Wordpress plugin for Discourse, right?

(r3d_f0x) #3

I just found it but I haven’t set it up yet.

It looks like it doesn’t embed the comments. It just links to them.

(Rafael dos Santos Silva) #4

Nah, you can see it on action here: A brand new discourse.org

(r3d_f0x) #5

How do I get it to show up? All I see is a link to the topic.

Is it possible to reply from the website? I don’t want users to have to go to a separate site to post comments but showing them is still good.

I got it to show up. The comments hadn’t refreshed.

(Rafael dos Santos Silva) #6

So you need to use another software, Discourse doesn’t support this.

(r3d_f0x) #7

As long as it shows the comments it’s fine. With a big link to the topic and the existing comments it’s way better then any of the alternatives. Disqus would be good but it’s a third party dependency that tracks every visitor of the site.