Here's a short code to incorporate vbstopforumspam to the
One-touch Ban and Clean hack.
You have to have vbstopforumspam and One-touch Ban and Clean already installed before performing the steps below.
As always, I am not to be held liable on any disaster to your data and/or forum settings so proceed at your own risk.
I also don't visit very often so those who understand PHP, please help others with their problems.
Instructions:- Sign-up for a Stop Forum Spam API key. Keep the key handy since you'll need it on step 5.
- In AdminCP->Plug-ins & Products->Plugin Manger, look for Product : One-touch Ban & Spam Cleanup, and click Form Actions.
- For easy editing, you need to copy the contents of the Plugin PHP Code field on to your favorite text editor (Notepad, TextMate, etc).
- Almost towards the end of the script, look for:
PHP Code:
$message .= ($deletedthreads > 0) ? construct_phrase($vbphrase['onetouchspamban_threads_deleted'], $deletedthreads) : null;
- Above, add the following (note that you need to replace XXXXXXXXXXX with your API key from step 1 -- make sure that the key is inside the double quotes):
PHP Code:
/* Stop Forum Spam Routine - Start */
/* http://www.stopforumspam.com/apis */
$spammer = $vbulletin->db->query_first("SELECT username, ipaddress, email FROM ". TABLE_PREFIX . "user WHERE userid = $banuserid");
// check to see if user was manually added (no ip)
if (!empty($spammer['ipaddress']))
{
// specify your API key below
$api_key="XXXXXXXXXXX";
$url_parms="?username=". urlencode($spammer['username'])."&ip_addr=". $spammer['ipaddress']."&email=". urlencode($spammer['email'])."&api_key=".$api_key;
$url="http://www.stopforumspam.com/add.php".$url_parms;
$ret = file_get_contents($url);
}
/* Stop Forum Spam Routine - End */
- Copy back the whole code to the Plugin PHP Code field and hit Save.
- That's it! Now every time you do a One-touch Ban and Clean, you also add that user to the Stop Forum Spam database for everyone to use.

I hope this helps.
-- Reggie