The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Minimum Characters Per Post

View previous topic View next topic Go down

Minimum Characters Per Post

67% 67% 
[ 2 ]
33% 33% 
[ 1 ]
 
Total Votes : 3

Minimum Characters Per Post

Post by eagle8x on April 25th 2011, 9:48 pm

I saw this hackmod from phpbb com. Users must type at least a number of characters before submitting new post.
Code:
    #
    #-----[ OPEN ]-----------------------
    #
    includes/message_parser.php
    #
    #-----[ FIND ]------------------------
    #
          // Check for "empty" message
          if ($mode !== 'sig' && !utf8_clean_string($this->message))
          {
            $this->warn_msg[] = $user->lang['TOO_FEW_CHARS'];
            return $this->warn_msg;
          }
    #
    #-----[ AFTER, ADD ]----------------
    #
          // Check for character limit
          if ($mode !== 'sig' && strlen(utf8_clean_string($this->message)) < 30)
          {
            $this->warn_msg[] = $user->lang['TOO_FEW_CHARS_POST'];
            return $this->warn_msg;
          }
    #
    #-----[ OPEN ]-----------------------
    #
    language/en/posting.php
    #
    #-----[ FIND ]------------------------
    #
      'TOO_FEW_CHARS'            => 'Your message contains too few characters.',
    #
    #-----[ AFTER, ADD ]----------------
    #
      'TOO_FEW_CHARS_POST'      => 'Your message contains too few characters. The message must be at least 30 characters length.',

eagle8x
Forumember

Male Posts : 362
Reputation : 15
Language : Vietnamese

http://diendan.chinhphuc.info

Back to top Go down

Re: Minimum Characters Per Post

Post by Sanket on April 3rd 2013, 4:16 pm


Sanket
ForumGuru

Male Posts : 48766
Reputation : 2819
Language : English
Location : Mumbai

http://webartzforum.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum