Posting single question mark reply limitations


#1

Hey guys,

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?

Thanks for your direction.


(Jeff Atwood) #2

Edit your site settings to allow this. You don’t need a plugin at all. Search.


#3

Sorry if i am a newb. Do you mean the entropy setting? Because mine is at 0. Which i assume is off, false or none.


(Jeff Atwood) #4

That’s a big assumption you’ve made there.


#5

Okay. is there somewhere i can RTFM?


(Jeff Atwood) #6

If you want posts of length 1, why wouldn’t you enter 1 there?


#7

Interesting I assumed 0 would be off and 1 is true, but you know what happens when we assume lol.

So I tried with 1 on body entropy, and still got the same error.

might be a bit hard to see on the window behind. I enjoy darker themes.


#8

yes I am semi aware the characters mean the string limit. just assumed at a minimum 0 mean no limit.


(Jeff Atwood) #9

And was it an all uppercase post?

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.


#10

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.


(Jeff Atwood) #11

I am not sure, in theory a 1 char post should work with the correct site settings … but

  • I don’t really care if it works or not, since what you are asking for is a chat software behavior, not a discussion behavior

  • you are experiencing intended friction to steer people away from stuff they should not be doing, at least, not in this software

  • this kind of community should pick different software, as I can guarantee you they will be unhappy with Discourse.

Note that a quote with nothing else is a zero character post from Discourse’s perspective.


#12

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.

Thanks for your responses!


#13

I did find the right place to look into this!

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.


(Jeff Atwood) #14

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.


#15

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.

Man I like doing new things.


(Stephen) #16

Isn’t this why plugins like retort exist?


#17

i tossed it up here incase anyone wants this for some reason.

Been working on my site for a week now with no problem.


(Stephen) #18

Did you look at retort? It would allow users to react with a single character like a ? without needlessly bumping the topic.


#19

Our users want to “bump” the topic. We have retort.