[DEV] Auto Ban

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
Locked
User avatar
UseLess
Registered User
Posts: 521
Joined: Mon Jul 22, 2002 7:26 pm
Location: North East UK

[DEV] Auto Ban

Post by UseLess » Mon Jan 05, 2009 7:23 pm

Greetings,

MOD Title: Auto Ban
MOD Description: Will ban a user if they attempt to make a post that contains anything on the Ban List, the List is controlled from the ACP.

MOD Features:
  • User is banned for 1 Year, if a non spammer is caught out the ban is easily removed in the ACP
  • Can also check the users profile: ICQ, MSN, Signature etc (Optional)
  • adds log entry(Optional)
MOD Notes:
This mod was originally written for phpBB 2 by CyberAlien when he had phpbbstyles.com it just worked. I then altered it to support template vars etc and it was never released to the public and only ever used on 3 forums.

With 'spam' on the increase I thought it was about time I got my fingers wet, not done anything with phpBB 3, and updated the mod and released it.

MOD Changelog:
  • Version 1.0.1:
    • Updated mod for phpBB 3.0.4 and released
  • Version 0.0.2:
    • added extra features
    • added support for template files and template vars
    • added check for duplicates function
    • mod still not released, however it's proved useful ;)
  • Version 0.0.1:
    Original mod created for phpBB 2.0.x (mod was never released to the public)
MOD Version: 1.0.1
MOD Download:
http://custombuiltsoftware.co.uk/downlo ... s/autoban/ (phpBB3 ModX package)

Mod Homepage: None

Demo: None

ACP Screen Shot:
http://custombuiltsoftware.co.uk/downlo ... utoban.jpg

MVP Notes
Just checked the mod with the MVP and got the following errors:
[ FAIL ] You are missing the required XSL file for displaying the XML file in the browser.

[ FAIL ] You are missing the required license.txt file.

[ FAIL ] No MODX files found in package

[ FAIL ] e2d67ad1e659a5c1d757cfe1ca1526dc.zip: File has been detected as non binary, while the extension IS binary. Checking for PHP for security reasons.

[ WARNING ] e2d67ad1e659a5c1d757cfe1ca1526dc.zip: A define for IN_PHPBB is missing or there is no check for IN_PHPBB is set.
I think the last error points to the 'includes/acp/info/' file, and there is not an 'IN_PHPBB' in any of the other files in that dir.

Is the problem with MVP or me?

[edit]: Fixed an issue with the function file already been included.
Movie Quote:
It's not the years honey, it's the mileage...
phpBB 3 Mods @ phpBBStyles

RedCraft
Registered User
Posts: 8
Joined: Sun Oct 12, 2008 12:58 pm
Location: Russia, Moscow

Re: [DEV] Auto Ban

Post by RedCraft » Sat Jan 10, 2009 8:19 pm

Hi, errors:
Installation Instructions:
1. includes/functions_posting.php
and
2. INSERT INTO `phpbb_web` (config_name, config_value) VALUES ('autobanlist', '')

Code: Select all

Error: #1146 - Table '404.phpbb_web' doesn't exist 

User avatar
UseLess
Registered User
Posts: 521
Joined: Mon Jul 22, 2002 7:26 pm
Location: North East UK

Re: [DEV] Auto Ban

Post by UseLess » Fri Jan 16, 2009 3:13 pm

Greetings,

Thanks for spotting that, file updated. I went through the file twice before I uploaded it and couldn't see the wood for the trees... ;)
Movie Quote:
It's not the years honey, it's the mileage...
phpBB 3 Mods @ phpBBStyles

RedCraft
Registered User
Posts: 8
Joined: Sun Oct 12, 2008 12:58 pm
Location: Russia, Moscow

Re: [DEV] Auto Ban

Post by RedCraft » Sat Jan 24, 2009 8:28 pm

Thanks for corrections :) but I again have the error.
php4 supports this mod??
I Install this mod, go to ACP then purge the cache, аdd Admin Module, add ACP_AUTOBAN_MODE, save and have the error:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/acp/acp_modules.php on line 202: Undefined index: auth

Code: Select all

SQL ERROR [ mysql4 ]

Column 'module_auth' cannot be null [1048]

SQL

INSERT INTO phpbb_modules (module_basename, module_enabled, module_display, parent_id, module_class, module_langname, module_mode, module_auth, left_id, right_id) VALUES ('autoban', 0, 1, 251, 'acp', 'ACP_AUTOBAN_MODE', 'list', NULL, 321, 322)

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal_mysql->sql_error()

FILE: includes/acp/acp_modules.php
LINE: 806
CALL: dbal_mysql->sql_query()

FILE: includes/acp/acp_modules.php
LINE: 205
CALL: acp_modules->update_module_data()

FILE: includes/functions_module.php
LINE: 507
CALL: acp_modules->main()

FILE: adm/index.php
LINE: 77
CALL: p_master->load_active()

User avatar
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany
Contact:

Re: [DEV] Auto Ban

Post by darkonia » Sat Jan 24, 2009 9:14 pm

is it automatically 1 year or can i adjust it so its only 1 - 12 months oder smaller?
MMOG-Heaven - Das Gaming Portal
Community bedeutet Gleichgesinnte finden - MMOG-Heaven ist Deine Community! Von Spielern für Spieler bietet Dir dieses Portal genau das, was ein Spieler braucht. Bleibe ständig informiert, finde die neuesten MMORPGs, oder suche die frischesten News aus der Welt des Online Gamings - dieses und vieles mehr erwartet Dich auf MMOG-Heaven.

User avatar
drndos
Registered User
Posts: 82
Joined: Tue Jan 29, 2008 7:47 am
Location: Slovakia
Contact:

Re: [DEV] Auto Ban

Post by drndos » Sat Feb 21, 2009 12:03 pm

Solution:
open includes/acp/info/acp_autoban.php and find

Code: Select all

//                     'auth' => 'acl_a_autoban',
Replace with

Code: Select all

                     'auth' => 'acl_a_autoban',
Install module, after installation go to phpmyadmin and execute this query:

Code: Select all

UPDATE phpbb_modules SET module_auth=NULL WHERE module_basename="autoban";
Don't forget to change phpbb_ to your own prefix.

joao_pimentel
Registered User
Posts: 93
Joined: Thu Jan 26, 2012 8:44 pm
Location: Lisbon
Name: João Pimentel Ferreira
Contact:

Re: [DEV] Auto Ban

Post by joao_pimentel » Wed Jun 19, 2013 7:21 pm

Hi

Is it possible to analyze only the title, to avoid words like HELP, URGENT, PLEASE etc. ?

Thanks a lot

cyber_sleuth
Registered User
Posts: 9
Joined: Fri Jun 21, 2013 9:04 am

Re: [DEV] Auto Ban

Post by cyber_sleuth » Fri Jun 21, 2013 9:52 am

I think auto-banning on something like this is a bit OTT, I think a much better option would be one of the following:
1) Auto-unapprove (see mybb/vb for more of an explanation on this -> basically hides thread and adds it to moderation queue)

2) Moves the thread to a mod-only forum where they can pick through the thread at their leisure

3) Lock out the user until a mod has checked the post

I mean, you've got to remember a ban is a pretty extreme feature for a simple word detection...

joao_pimentel
Registered User
Posts: 93
Joined: Thu Jan 26, 2012 8:44 pm
Location: Lisbon
Name: João Pimentel Ferreira
Contact:

Re: [DEV] Auto Ban

Post by joao_pimentel » Fri Jun 21, 2013 2:31 pm

Thank you

Yes, you're right, not banning but for example warning automatically...

But is it possible to analyze only the title?

Thank you

cyber_sleuth
Registered User
Posts: 9
Joined: Fri Jun 21, 2013 9:04 am

Re: [DEV] Auto Ban

Post by cyber_sleuth » Sat Jun 29, 2013 2:49 am

joao_pimentel wrote:Thank you

Yes, you're right, not banning but for example warning automatically...

But is it possible to analyze only the title?

Thank you
I haven't looked through the code/implemented this, but if you have some technical knowledge yourself, it shouldnt be too difficult to find the SQL commands that fetch the post content/post titles and simply edit them accordingly. You shouldnt even really need to edit much else tbh, so it should be a fairly simple job. It does ofc depend on how it is all setup... Just a thought though :)

Locked

Return to “[3.0.x] MODs in Development”