Max character length of Discourse Replies below WP Posts

AI-generated summary

The discussion revolves around the maximum character length of Discourse replies displayed below WordPress posts. erikmolenaarnl suggests limiting the length of replies and adding a link to continue reading on Discourse, as very long replies can appear spammy. They provide a real-life example and propose settings for the WordPress plugin. erikmolenaarnl corrects a code snippet and asks for PHP expertise. Later, erikmolenaarnl shares a plugin created by joebuhlig that addresses this issue.

Hi Discourse team,

Sometimes replies below WP Posts are very long. This is great content when reading directly in Discourse, but sometimes too much to handle to show below a WP Post. It can almost look kinda spammy.

A real live example is at: Radware Captcha Page. I always show 5 replies and the 4th reply is almost 16,000 pixels in height. Great when reading it in Discourse, but not so much below a post.

I would like to suggest to limit the length of the reply and show a link to continue reading the reply on Discourse.

Suggested settings in Wordpress plugin:

Thanks for listening and looking forward to your reply.

Please note the {discourse_url} in above code should be {comment_url}, but these are not parsed as these should be in HTML and not PHP.

Anyone more skilled in PHP out there who could take a look at my code? Thx :slight_smile:

For everyone interested, the amazing @joebuhlig created a plugin for us at NetworkLessons.com which does just that. I like to share it with the community:

https://github.com/procourse/wp-discourse-sanitize-comments