The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
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'];
$password = $HTTP_POST_VARS['password'];
Code:
$subject = preg_replace("/([\?\!]+)/e", "substr('\\1',0,1)", $subject);
![]() Have fun. Kier [edited for ridiculous mistake ]Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
|
#3
|
||||
|
||||
|
problem it removed !!!!!! from message and not title
![]() wrong variable $message ? is it $subject ?????? |
|
#4
|
|||
|
|||
|
Wow, I've been waiting for this!
![]() When the problems are resolved I'll have it installed in a flash. |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
LOL oops
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?
|
|
#7
|
||||
|
||||
|
Quote:
|
|
#8
|
||||
|
||||
|
works fine kier
|
|
#9
|
|||
|
|||
|
Thanks Kier, working great now.
|
|
#10
|
||||
|
||||
|
Will this also stop things like "?!?!?!?!?!?!"?
|
![]() |
|
|