Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Ban Plugin: Where to see the added IPs?
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 30, 2013 - 5:02 pm

so  yes, those are the rare errors I was talking about...  a handful of server configurations seem to throw them...

so make the code changes I showed...  we have already done that in the next version...

Avatar
Elsa
Member
Free Members
sp_UserOfflineSmall Offline
Jul 31, 2013 - 10:01 am

Thank you so much for your quick response!  I've searched everywhere, I must be blind, because I can't find the php file you said to edit.  Can you possibly provide me with the path? 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 31, 2013 - 11:33 am

its where ever you are storing sp plugins...

by default it would be wp-content/sp-resources/forum-plugins/ban

Avatar
Elsa
Member
Free Members
sp_UserOfflineSmall Offline
Jul 31, 2013 - 2:42 pm

Thank you Mr. Papa, that was helpful and I found it right away.  I edited according to your instructions, but when I tested it- the IPs are still disappearing.

Here's the entries from the error log (in case that's helpful):

Wednesday, July 31, 2013
12:32 pm
php file: saelsa/public_html/wp-content/sp-resources/forum-plugins/ban/admin/sp-ban-admin.php
line: 65
function: Unavailable
Warning | implode() [function.implode]: Invalid arguments passed
Wednesday, July 31, 2013
12:32 pm
php file: saelsa/public_html/wp-content/sp-resources/forum-plugins/ban/admin/sp-ban-admin.php
line: 65
function: implode
Warning | implode() [function.implode]: Invalid arguments passed
Wednesday, July 31, 2013
12:32 pm
php file: saelsa/public_html/wp-content/sp-resources/forum-plugins/ban/admin/sp-ban-admin.php
line: 57
function: implode
Warning | implode() [function.implode]: Invalid arguments passed
Wednesday, July 31, 2013
12:32 pm
php file: saelsa/public_html/wp-content/sp-resources/forum-plugins/ban/admin/sp-ban-admin.php
line: 47
function: implode
Warning | implode() [function.implode]: Invalid arguments passed
Wednesday, July 31, 2013
12:32 pm
php file: saelsa/public_html/wp-content/sp-resources/forum-plugins/ban/admin/sp-ban-admin.php
line: 39
function: implode
Warning | implode() [function.implode]: Invalid arguments passed

Sorry to be such a pain with this, but our Forums attract a large number of trolls and being able to get this setting to work is very important to us.  We so appreciate your help with all of this!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 31, 2013 - 4:00 pm

are you sure made the code change requested?  after the change, clear the error log and try again...  you shouldnt be seeing the error with the code change...

and the IPs are entered one per line?

Avatar
Elsa
Member
Free Members
sp_UserOfflineSmall Offline
Aug 1, 2013 - 1:47 pm

This is exactly what I did:

1. I cleared the error log

2. Edited the sp-ban-admin-save.php file per instructions (below) & uploaded file to server

function sp_ban_admin_do_save_bans() {
$ips = explode("\n", trim($_POST['ip_addr']));
sp_update_option('banned_ips', sp_esc_str($ips));

$ip_ranges = explode("\n", trim($_POST['ip_addr_range']));
sp_update_option('banned_ip_ranges', sp_esc_str($ip_ranges));

$hostnames = explode("\n", trim($_POST['hostname']));
sp_update_option('banned_hostnames', sp_esc_str($hostnames));

$user_agents = explode("\n", trim($_POST['user_agent']));
sp_update_option('banned_agents', sp_esc_str($user_agents));

return __('Bans updated', 'sp-ban');
}

3. Entered 3 IP addresses (one per line)

27.159.223.93
27.252.78.193
31.73.110.211

4. Clicked Updated Bans

5. All IP addresses disappeared and were no longer in the box

6. Checked error log (see attached pdf)

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 2, 2013 - 12:38 am

I am afraid I confused and have lost the bubble here a bit...  The code I linked doesnt look quite right and doesnt match what is in the upcoming bans plugin update...

That update is coming out tomorrow with sp 5.3...  Can we until then and just update the plugin and see if that resolves it?

Avatar
Elsa
Member
Free Members
sp_UserOfflineSmall Offline
Aug 2, 2013 - 1:59 pm

Yes, we can wait.  Thank you for all your help.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 2, 2013 - 2:50 pm

5.3 and the plugin updates, including bans, have been pushed out...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625