[paid] Preference to create & embed a topic via JavaScript only when a user clicks the "Start Discussion" link

What would you like done?

Currently when Embedding Discourse Comments via Javascript, a new Discourse topic is created whenever the corresponding external page is being loaded. The feature requested consists on creating the topic only when a user would click the “Start Discussion” link in the external page.


  • This preference could be defined per host at /admin/customize/embedding.
  • The “Start Discussion” link would include a rel="nofollow" in order to avoid as much as possible the creation of pages by bots.
  • The link would open in a new tab, in order to assure that the user doesn’t end accidentally in nowhere’s land, also to give a little more time to the new topic to be created.

When do you need it done?

No rush.

What is your budget, in $ USD that you can offer for this task?

Every feature has a price. I have cut as much complexity as possible in this request with the intention of making it more affordable. I’m a hobbyist willing to invest in the solution to this problem. If I cannot afford it alone, I might ask others to help co-funding.

Background: Embedding, but don't automatically create a topic until a user chooses to comment


Hey there, Quim! I might be able to help you out here.

I was reading through the other topic on this and had a hard time nailing down what the exact process is that you want to support and whether or not it should be a PR or a plugin.

Are you wanting to follow @eviltrout’s process for it or do you want to go with your concept?


Thank you for your interest, @joebuhlig!

I’d rather go for this minimalistic concept. In principle it solves my problem and I believe it would alleviate the problem of whoever is bothered about the current behavior. Any development going deeper into this direction should probably pass through this development stage, I guess.

PR or plugin, I don’t have enough knowledge to decide. The other thread is tagged #pr-welcome. Then again, if a plugin would make the process simple for starters, so be it. I guess it would not be difficult to turn the plugin into a core feature if this is wanted in the future.

In other words, because my potential budget is humble, I will take the simplest route that provides this feature. :slight_smile:

My sense is that a PR would be the better route here. But let me pose the concept as I understand it:

  1. This would create a new /comments route that requires two parameters: url and user-click. This URL would be used under the “Start Discussion” link.
  2. The user-click parameter would be appended by javascript when clicked to stop crawlers from triggering it.
  3. If a topic already exists for the embed url passed as a parameter, then the user is redirected to that topic.
  4. If the topic does not exist, the topic is created as per usual.

My biggest question is around settings. Is this intended to be the default way this should work or is this a setting enabled in the embed setup? We may need someone from the team to answer that one. Especially if this is to be a PR.


I think this is a definite improvement but I would go one step further.

As a general rule, only create the “shadow” topic if:

  1. User is logged in to commenting site
  2. User clicked a button asking to leave a comment
  3. On click there should possibly be a transition where it shows that a “topic is being created” and then forwards you to it.

If user is not logged on and clicks “start conversation” it should head to the sign up page, after signup it can start the conversation.

@eviltrout what do you think?


Yes this is how I imagine it should work. The tricky bit will be the “creating topic…” interstitial.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.