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
Thanks man, this is very helpful Smile
(2010-04-22, 01:44 AM)Shemo Wrote: [ -> ]this thing is STRICT if you leave the option to check usernames!

I made a test account of 'andrew' and it kept blocking me..

yup. one of my suggestions that I posted earlier in this thread is to include a setting for each test type that would only trigger the denial when a username or whatever has more than X entries in the database.

my own version of this plugin is doing this and it is working very well.
Sorry to bump this thread (again Toungue), what are the core edits he's talking about here that need to be made?


(2010-01-28, 12:57 AM)pavemen Wrote: [ -> ]Regarding point 3, two lines of code added to the banning.php module (yes it requires a core edit) will let you add check boxes to the user ban page and then your plugin can process the SFS ban if you had checked the boxes. The admin_ban_commit hook (i think that is it) can be used to check if the admin checked the SFS boxes and then process accordingly.

i agree that the cache version is a lot of effort for most sites, but a busy site can benefit from it, especially if there are connectivity issues with the SFS site or you do reach that limit and get a 403.

I had posted my plugin to the mods page months ago, but it was never looked at so it was not approved and i removed it and kept it to myself. glad to see someone else tackling a public version.
actually single line to add the check boxes.
look in \<board_root>\admin\modules\users\banning.php and find

	$form_container->output_row($lang->ban_time, "", $form->generate_select_box('bantime', $length_list, $mybb->input['bantime'], array('id' => 'bantime')), 'bantime');

	$form_container->end();

and change it to

	$form_container->output_row($lang->ban_time, "", $form->generate_select_box('bantime', $length_list, $mybb->input['bantime'], array('id' => 'bantime')), 'bantime');	
	//SFS EDIT START
	$form_container->output_row('Add to SFS', "", $form->generate_check_box('sfsaddregip', 1, 'Registration IP', array('checked' => 0, 'id' => 'sfsaddregip')).$form->generate_check_box('sfsaddlastip', 1, 'Last Post IP', array('checked' => 1, 'id' => 'sfsaddlastip')).$form->generate_check_box('sfsaddemail', 1, 'Email', array('checked' => 1, 'id' => 'sfsaddemail')).$form->generate_check_box('sfsaddusername', 1, 'Username', array('checked' => 1, 'id' => 'sfsaddusername')), 'addsfs');
	//SFS EDIT END

	$form_container->end();

Then you need to create a new plugin or add to the one in this thread that sets

 $plugins->add_hook("admin_user_banning_start_commit", "sfs_submit_data");

and then create a function sfs_submit_data() and using CURL, send the required data (per the check box settings and user info) to StopForumSpam along with your API key.

You will need to figure out all that for yourself, this function can get rather large depending on what info you send and how you optimize the CURL delivery
Thanks. I made all the edits except that last one, I have no idea at all what a CURL even is or how to use it. I just want to send the basic info: Username, email, and ip. Can you make me an example code with a fake api key?
the last one is what makes use of the core file edits. without it, the banning page edits never get used.
I know that, I know what it's "used for", I just have absolutely no idea how to make the CURL thing whatever you're talking about there.
i think there is an example on the SFS site in their forums, or download one of the plugins the host there and use that code as a basis
Alright, fine I'll just post a thread there. Anyone else needing help getting this so-called CURL thing done just go here instead, I'm sure they know how to do it. Thanks! Smile

http://www.stopforumspam.com/forum/viewt...9217#p9217
cURL is a program. You have to install it on your server.
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