I am interesting in making a lightweight plugin that removes posting limitations. My forum would love to reply to a post with just a single ?. However that gets caught in the filter. I was hoping someone could point me in the right direction to do so. I am bit new to discourse and the likes. I downloaded the source zip from
then did a directory search in atom but got no results on the popup, Body seems unclear, is it a complete sentence?
There is friction here because posting giant streams of short nonsense with an absurd post to metadata ratio … is not the intended use of Discourse. For that you should use a chat system like Discord.
I understand it is not intended. However we were an old vbulletin forum that migrated and some of the users resent not being able to respond with just a ? or quoting the above poster with no other characters in the post.
I figured, that this functionality was something discourse was not going to support. So I was looking for direction to create a plugin that would allow this functionality. I will admit that my attempts were nothing above downloading the source code and searching for the error message. Oddly that didn’t even give me a result.
I understand and I enjoy a lot of other features. I was hoping this was something I could work on for my site. I did not expect any support from the staff. Sorry if it came off this way. I can live with it. I just though it wouldn’t be that hard.
with a min_post_length set to 1 symbols would still fail because of this
in lib\text_sentinel.rb
def symbols_regex
/[\ -\/\[-\`\:-\@\{-\~]/m
end
def seems_pronounceable?
# At least some non-symbol characters
# (We don't have a comprehensive list of symbols, but this will eliminate some noise)
@text.gsub(symbols_regex, '').size > 0
end
Which honestly is right. However for my case this caused problems. It was not hard to write a small plugin to basically allow symbols to count towards the size check.
Ok, good detective work. @techAPJ can you verify a min post size of 1 works, without bugs in our code? It is not advisable for the above reasons, but it should work.
It should work. In my dev environment, normal character single body posts worked. It was just symbols that got caught in the regex.
Which was kind if fun to figure out how that worked. Didn’t even realize you could do like ASCII ranges in regex. I starred at that longer than I would like to admit trying to figure out how ? was matching.