The Arcive of vBulletin Modifications Site. |
|
stripping URLs and email addresses from posts Details »»
|
|||||||||||||||||||||||||||
|
stripping URLs and email addresses from posts
Developer Last Online: Jul 2003
I needed to strip URLs and Email addresses from posts as users were posting spam onto my board. I looked on this site but couldn't find anything that matched what I wanted so I devised this hack. It has been tested on Version 2.3.0 and works ok. Can somebody please try it on other versions.
Find this: Code:
// auto bypass queueing for admins/mods
if (ismoderator($foruminfo[forumid])) {
$visible=1;
}
Code:
//remove URLs and email addresses from message body
$URL_replace='<sorry the email addresses or URLs have been removed>'; //change this string to one of your choice
$pieces=explode(" ",$message);
for ($i=0;$i<count($pieces);$i++) {
$pieces[$i]=eregi_replace("^.+(\.|dot)(com|net|org|uk|us|au)",$URL_replace,$pieces[$i]); //add values to com|... (inside paretheses)for new domains
}
$message=implode(" ",$pieces);
Kevin Show Your Support
|
|||||||||||||||||||||||||||
![]() |
|
|