Embedding Topic topic-map or Topic Summary on Other Site

Related to discussions on embedding discourse comments into word-press sites and the discussion on “Embedding Discourse Comments via Javascript”, I am curious if you could advize me on embedding a topic topic-map into a another website?

I seem to recall readiing that topic-maps are not generated until at least one reply occurs. So, perhaps I am making a different request, asking for advice to embed a widget with a similar set of summary information that could be embedded off-site.

Why?, I desire to embed comments on off-site pages with limited space. Rather than the current embedding option that shows a list of comments, I feel these topic-maps are efficient summaries of discussion.

My goal would be a widget that looks something like:

Discuss this post at discourse.example.com


Topic-map examples:

Expanded:

6 Likes

This sounds like a really cool idea.

1 Like

Currently we have a completed WordPress plugin that can do this, but the question I have right now is whether or not it would be accepted as a PR on the wp-discourse repo. We can develop the settings and such for it, but don’t want to go through the trouble if it’s not an acceptable expansion on the core plugin.

Would someone from the team be willing to weigh in on this one?

6 Likes

Oh I would love to see this. You need any extra testers?

1 Like

I really like this idea. I’m not sure about adding it to the wp-discourse plugin. Would it be possible to get it to work as an extension to wp-discourse? If any additional hooks were required to get this to work, they could be added to wp-discourse.

3 Likes

The current method is simply with code added to the functions.php file. But the data required wasn’t being passed along. Let me see if there’s a way to add a hook to collect it and if so, we’ll submit a PR for it. :wink:

3 Likes

Any news on this? Or any chance you can share the code you are currently using? Or even just point us to an example site where it is deployed, @joebuhlig?

It’s not deployed publicly anywhere as it needs some filters which will be submitted to wp-discourse as PRs. But for now, the existing project lives here:

https://github.com/procourse/wpdc-embed-topic-map

I should also note that this is being sponsored by @Curtis_Kephart and the RStudio team. Big thanks to them for helping us get this going. :+1:

4 Likes

Thanks for the link, and big props to @Curtis_Kephart and RStudio!

1 Like

Ok, here we go. The repo above works when the following PR is merged.

https://github.com/discourse/wp-discourse/pull/321

@simon, I’m aware that this is quite a large PR. The biggest piece is the pulling of the popular links section. That mechanism needed quite a bit of work. So if we need to scale this back to be acceptable, just let us know.

3 Likes

Is this in use publicly anywhere yet?

No. It still requires the PR at the moment.

1 Like

Looks like it failed CI checks for mostly stylistic reasons, but there are a few errors there worth checking out.