How to Modify Flarum Theme Post-Related Properties
First, I also created a Flarum site. However, when many users post, they enter titles carelessly, sometimes with only one or two characters, making the entire site look unattractive. Therefore, post properties must be restricted. This article mainly explains how to restrict properties related to discussion topics.
Discussion Title Length
Modify the following file:
vendor/flarum/core/src/Core/Validator/DiscussionValidator.phpSet min:3 and max:80 to require a minimum of 3 characters and a maximum of 80 characters. Modify them according to your needs.
Post Content Length
Modify the following file:
vendor/flarum/core/src/Core/Validator/PostValidator.phpChange max:65535 to max:2147483647, so the post content limit changes from 21845 Chinese characters to being essentially unlimited.
Warning: Excessively long posts may sometimes cause unnecessary errors.
Posting Interval
Modify the following file:
vendor/flarum/core/src/Core/Post/Floodgate.phpChange -10 seconds to the interval you need (the default is 10 seconds).
Comments
(0)No comments yet. Start the conversation.