Welcome, Guest. Please Login or Register.
May 10, 2025, 11:19:31 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Minimum Message Size? « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Minimum Message Size?  (Read 568 times)
Brekkee
Noobie
*
Posts: 6


ICQ - 1296479 WWW
Minimum Message Size?
« on: March 28, 2003, 01:42:06 AM »
Reply with quote

I'm looking for a mod that would allow the admins to set a specific amount of characters that a message would have to contain before it was allowed to be posted.  Basically the opposite of limiting the maximum size of a message.

Does something like this exist?

Thanks!

--Brekkee
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:Minimum Message Size?
« Reply #1 on: March 28, 2003, 02:22:18 AM »
Reply with quote

u dont like ppl to post one liners? :P
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Brekkee
Noobie
*
Posts: 6


ICQ - 1296479 WWW
Re:Minimum Message Size?
« Reply #2 on: March 28, 2003, 02:37:16 AM »
Reply with quote

One liners aren't the problem.. it's the one word posts the the site owner doesn't like :)
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:Minimum Message Size?
« Reply #3 on: March 28, 2003, 02:51:14 AM »
Reply with quote

open Post.php, search for:
   if (trim($message) == '')
      fatal_error($txt[78]);

add after   if (strlen(trim($message)) < 10)
      fatal_error("Your message is too short.");

where 10 is the minumum characters in a post
and "Your message is too short." is the error message

you can also do it with javascript, but imo this way is better for ppl that post only 1 word :P
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Minimum Message Size?
« Reply #4 on: March 28, 2003, 02:51:19 AM »
Reply with quote

I agree there.... one word posts are terrible...

As a really simple method of doing it... (they will still be able to edit it and make it short, but I did say simple!)

Post.php...
Search:    if (strlen($message) > $MaxMessLen)
      fatal_error($txt[499]);


Replace:    if (strlen($message) > $MaxMessLen)
      fatal_error($txt[499]);

   if (strlen($message) < 15)
      fatal_error('Your message is too short.  Please make your posts meaningful, so as to contribute to the community.');


I didn't bother to test it... but if that doesn't work I'll eat my hat ;).  (wait... I'm not wearing a hat....)

[edit: Blah! 5 seconds... I had to read it over to make sure it would work.]

-[Unknown]
« Last Edit: March 28, 2003, 02:53:10 AM by [Unknown] » Logged
Brekkee
Noobie
*
Posts: 6


ICQ - 1296479 WWW
Re:Minimum Message Size?
« Reply #5 on: March 28, 2003, 03:50:07 AM »
Reply with quote

Thank you both for your wonderfully quick and helpful responses.  No need to eat any hats.  It worked great!


Thanks again
Logged
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:Minimum Message Size?
« Reply #6 on: March 28, 2003, 03:50:34 AM »
Reply with quote

 ;D
Logged

Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Minimum Message Size? « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.013 seconds with 16 queries.