Log in

View Full Version : Is there a hack, that will not allow users to post in all caps?


neocorteqz
10-22-2002, 04:58 AM
as you know posting in all caps is rather rude. So i was wondering, is there a hack out there that will automatically edit a users post if it's in all caps? that way a mod or admin doesn't have to continue to edit post every time it happens.

Or is there a way I can set the forum (all forums and sub forums) to not allow all caps at all.

Thanks.

Logician
10-23-2002, 09:26 AM
edit newreply.php and newthread.php, find:

$message=trim($message);
if ($message=="") {
eval("standarderror(\"".gettemplate("error_nosubject")."\");");
exit;
}

After that add:


if ($message==strtoupper($message)) {
eval("standarderror(\"".gettemplate("error_noallcaps")."\");");
exit;
}


Create a new template named "error_noallcaps" and give your warning.

Notices:
1- This will give your users the error if their post does not contain any letters. Examples:
: )
11
****
etc.
2- Even if one letter is in lowercase, error will not be displayed. So this can be posted:

wHO SAYS I CANT POST IN ALL CAPS!!!!!

while this will produce the error:

WHO SAYS I CANT POST IN ALL CAPS!!!!!

3- If posts includes bbcode and if that code is in lowercase, error will not be displayed

neocorteqz
10-23-2002, 05:34 PM
Thanks. :) or should I say THANKS :p :D