MyBB Community Forums

Full Version: [release] [updated for 1.6] Stopforumspam.com plugin for MyBB - Stop the Spam!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
(2012-06-03, 10:53 PM)pavemen Wrote: [ -> ]you can get that version from http://www.mybbsecurity.net/topic-stop-f...m-ip-check

Note that works differently to this plugin, and is less efficent in many ways.
sorry, I thought it was the same plugin.

I actually prefer the one I released (well, duh!), but I won't link it in this thread.
(2012-06-03, 10:00 PM)anori Wrote: [ -> ]Is there any way to change the code so that everything is echo'ed ? meaning you can just grab the page and view it instead of having to go into the cpanel to view it?

I saw the code lines where you create it etc. but could those simply be changed to:"

echo " (normal code here) "; ? 
And the removal of the die() function ofcourse.
The last small thing i would like to do is only make this viewable to the admin and nobobdy else.

Or how would you go about doing this.


Fixed it myself by creating a new PHP file with this as code:

<?php

define('IN_MYBB', 1);
require "./global.php";

$logInfo = file_get_contents('sfs_log.php');
$previous = array('Time:','/ Username:','/ Email:','/ IP:');
$replacements = array('</tr></td><tr><td>','</td><td>','</td><td>','</td><td>');


if (  ($mybb->user['usergroup'] == "X") or ($mybb->user['usergroup'] == "X") or ($mybb->user['usergroup'] == "X") )
{	
	$newString = str_replace($previous, $replacements, $logInfo);
	echo "<table border='1' cellpadding='5'><tr><th>Time :</th><th>Username :</th><th>E-Mail :</th><th>IP-adress :</th></tr>";
	echo $newString;
	echo "</table>";
}
else
{
	echo "<strong><center>Im sorry to inform you but you have no rights to view this page <br /> If this is incorrect please contact the forum administrator</strong></center>";
}

?>
TheGarfield,

emails like "[email protected]" or "[email protected]" are spammers, you can tell by the dots and name on the address without looking them up on Stopforumspam. also, their site might be getting a lot of hits when you are trying, they do go down at times, for service and updates to. there is a lot of users using this app now because of more spammers. if you are getting that error every day, then you might want to look into Stopforumspam's forums for help.
http://www.stopforumspam.com/forum/

GFXdot,

you can get this at this link, it is the latest one Wink

http://mods.mybb.com/view/stopforumspam-com-for-mybb

reason for edit: coded off site link
Made a small adjustment to my previous code, since the list was getting so incredibly large >.>

Its probably not the cleanest way of doing it but it works. And this code only displays the list for the current month and at the bottom shows the total amount of spam.

To use it create a new file with the code below.
And change the following lines to suite your forum.

The path to your forum (if its in the root simply make it ./global.php and ./sfs_log.php)
require "./forum/global.php";
$logInfo = file_get_contents('./forum/sfs_log.php');

Change the timezone to yours/your forums one:
date_default_timezone_set('Europe/Amsterdam');
List can be found here: http://php.net/manual/en/timezones.php

And the group ID's of the people allowed to view the page:
if (  ($mybb->user['usergroup'] == "4") or ($mybb->user['usergroup'] == "3") or ($mybb->user['usergroup'] == "6") )
You can allow as many group or as little amount of groups as you wish (simply remove/add them using [or ($mybb->user['usergroup'] == "X")] where x is the group id number)

<?php

define('IN_MYBB', 1);
require "./forum/global.php";
date_default_timezone_set('Europe/Amsterdam');

$logInfo = file_get_contents('./forum/sfs_log.php');

$previous = array('Mon,','Tue,','Wed,','Thu,','Fri,','Sat,','Sun,','/ Username:','/ Email:','/ IP:');
$replacements = array('</tr></td><tr><td>','</tr></td><tr><td>','</tr></td><tr><td>','</tr></td><tr><td>','</tr></td><tr><td>','</tr></td><tr><td>','</tr></td><tr><td>','</td><td>','</td><td>','</td><td>');

$cMonth = 0;
$aMonth = 0;
$cDate = date('M Y');
$lCheck = explode('Time:',$logInfo);

if (  ($mybb->user['usergroup'] == "4") or ($mybb->user['usergroup'] == "3") or ($mybb->user['usergroup'] == "6") )
{	
	echo "<table border='1' cellpadding='5'><tr><th>Time :</th><th>Username :</th><th>E-Mail :</th><th>IP-adress :</th></tr>";
	foreach ($lCheck as $cString) {
		if (strpos($cString, $cDate) !== false) {
			$newString = str_replace($previous, $replacements, $cString);			
			echo $newString;
			$cMonth++;			
		}
		else {
			$aMonth++;				
		}
	}
	echo "</table>";
	$counter = $cMonth+$aMonth; 
	if($counter !== 0){
		echo '<br />Total amount of spam detected: '.$counter.'<br />';
		echo 'Total amount of spam this month is: '.$cMonth.'<br />';
		echo 'Total amount of spam previous months/years is: '.$aMonth.'<br />'; 
	}else{
		echo 'No spam detected';
	}
}
else
{
	echo "<strong><center>Im sorry to inform you but you have no rights to view this page <br /> If this is incorrect please contact the forum administrator</strong></center>";
}

?>
Right now some rather large problems with stopforumspam.com and its services. Which is causing this plugin a lot of problems.
I notice to lots of spamers registered on my board last week,seems this plugin needs BIG update or replace it with another ones,good thing for that its this http://peoplesign.com/main/officialDemo.html Phpbb3 use this also SMF and Vbulletin,but no one wants to develop it for Mybb,only need to ask and contact Dave from people sign to give you test version and develop it for Mybb http://peoplesign.com/main/getPeoplesign.html
(2012-09-09, 08:08 AM)lexy Wrote: [ -> ]I notice to lots of spamers registered on my board last week,seems this plugin needs BIG update or replace it with another ones,good thing for that its this http://peoplesign.com/main/officialDemo.html Phpbb3 use this also SMF and Vbulletin,but no one wants to develop it for Mybb,only need to ask and contact Dave from people sign to give you test version and develop it for Mybb http://peoplesign.com/main/getPeoplesign.html

Not much the original author can do. Only thing Tim needs to keep himself busy with is their twitter feed. Which is indicating they are going to move their API from stopforumspam.com/api to api.stopforumspam.com/api the moment they do that and this plugin is used by people without making the changes in the code it becomes useless.

For the rest its currently stopforumspam.com that is having a lot of problems. Which is the cause for the not that great working plugin.
Tomm added an awesome new confidence level feature, the submission has now been updated.

The plugin now has a home on GitHub too: https://github.com/tommm/stopforumspam
I noticed that earlier. Looks like a great addition!
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26