![]() |
This is a really simple little hack that was requested on vBulletin.com, but some people might find it useful, especially those of you who run support-type forums.
Basically, it prevents people typing HELP ME!!!!!!!!! or WHAT'S WRONG?????????!!?!?!?! (or other equally annoying things with multiple ? and ! characters) as thread titles. It couldn't be simpler really - edit newthread.php and find this: Code:
$username = $HTTP_POST_VARS['username']; Code:
$subject = preg_replace("/([\?\!]+)/e", "substr('\\1',0,1)", $subject); Have fun. Kier [edited for ridiculous mistake ;)] |
:cool:
|
problem it removed !!!!!! from message and not title :(
wrong variable $message ? is it $subject ?????? |
Wow, I've been waiting for this! :)
When the problems are resolved I'll have it installed in a flash. |
Neither of the below are working for me:
$subject $message I have tried adding ", removing spaces (I am not a PHP guru by far). I am not sure what the problem is, although it would be a nice hack to have if it worked. |
LOL oops :o
Edited the code in the original post so that it works now... that'll teach me to not test it in the actual vBulletin code eh? ;) |
Quote:
|
works fine kier :D
|
Thanks Kier, working great now.
|
Will this also stop things like "?!?!?!?!?!?!"?
|
All times are GMT. The time now is 10:30 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|