Direct link to composing a comment?

If a topic is located at:

discourse-forum(dot)com/t/topic/123

Is it possible to create a link that automatically opens the reply box when clicked?

I am curious if maybe the link can be appended to something like:

discourse-forum(dot)com/t/topic/123#comment

…only an example. But is this possible so that when the URL is clicked, the reply window/box opens up automatically, and the user can begin typing reply?

Thanks

1 Like

This is not possible. You can create a link that automatically opens the post editor for a new topic, but you cannot create a link that functions in that way for replies to an existing topic. Details about creating links for new topics are here: Create a link to start a new topic with pre-filled information.

3 Likes

Hi!

Out of curiosity, what would be a use case for such a feature?

2 Likes

Thanks @simon

@Canapin … well. Don’t be too harsh on the reasoning. But …I wanted to use those links for the WP-Discourse blog comments; a direct link when clicking the comment button. :grimacing:

Basically, from a WordPress blog post, clicking on the comment button would take the reader to the compose box on that connected discourse thread so they can begin typing. (or signup/login popup if not already registered).

Removes a few extra clicks to help encourage participation.

3 Likes

That makes sense. I’m thinking that if users are being encouraged to post in this way (without first encouraging them to read all comments on a topic) it might be better to just reduce all friction and allow them to comment directly from the WordPress page. This isn’t possible at the moment, but it’s something that should maybe be considered as an addition to the WP Discourse plugin for WordPress sites that are using DiscourseConnect to log users into Discourse. For WordPress sites that aren’t using DiscourseConnect, it would be a lot more complex to allow users to comment directly on WordPress.

The current setup already shows if there are additional comments:

…I don’t have a problem with that. (it encourages readers to use our discourse forums) I hope that never gets replaced with what you are mentioning.

I didn’t mention the WP-Discourse plugin in OP because I’m happy with it as it stands.

I really prefer to keep encouraging any discussions to take place within Discourse. What you suggest isn’t only more complex but also removes some of the need/habit of visiting the forums.

Also, my blog has a lot of caching enabled, so there’s that as well.

2 Likes

I still use a theme component for this:

It could use an update, but still works.

My use case is that I use one topic per board game to track user ratings, and submitting a review is a reply to the topic.

4 Likes

Cool.saw your post. I am guessing you need the script you made?