• MomDad

    (@momdad)


    Great plugin — very handy! I’ve put it to use immediately. One feature that would be extremely helpful is the addition of a toggle to display instance counts alongside each entry in the text areas. What I mean by this is a count of how many times each individual IP, email address, or URL was used in the current batch of spam. This will give a better indication whether a specific IP or email address was a one-time spammer or a chronic/heavy spammer/repeat offender. This will help in deciding who to permanently blacklist and/or IP ranges to set firewall blocks on.

    So for example, there could be a checkbox labeled something along the lines of “Display offence counts”, and when enabled, the text box output would include the counts in brackets, sorted descending by offence count, then ascending by IP/email address/URL — e.g.:

    IP addresses: 180
    109.230.216.xxx (76)
    85.222.103.xx (6)
    178.137.142.xxx (5)
    208.77.101.xxx (5)
    107.20.251.xxx (3)
    ...
    e-mails: 313
    336qqyttoo2@xxxxx.com (7)
    biuro@xxxxxxxxxx.pl (5)
    dfdfhssx@xx.pl (2)
    kirilklime@xxxxxx.com (1)
    obivan7893@xxxx.com (1)
    ...

    (Note: I’ve included some anonymized sample output above for IPs/email addresses, but didn’t include output from the URLs for obvious reasons)

    So from the example above, we can see that in the current batch of spam, 109.230.216.225 would be worthy of blocking since it offended 76 times, as opposed to ones further down the list which only did a single time.

    [Edit]

    I had some spare time, so I went ahead and made the additions to include this functionality. I noticed in the code that you’ve planned for stored/changeable options. The modifications I made will need one additional option added ($display_counts). I’ve temporarily set a hard default of 1 for it on my end while testing, but ultimately it’d be set to 0 and toggled by the user once you’ve added in the UI & handling for that.

    Here’s the modified function (Pastebin’d as per Forum Rules): http://pastebin.com/5vMuP99r

    It’d be great if you could incorporate this into the next version of the plugin.

    http://wordpress.org/extend/plugins/wp-blacklister/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Luke Mlsna

    (@bitacre)

    Sorry it took me so long to get back to you, but I hadn’t noticed this message.

    This is a fantastic idea! Thanks so much for going ahead and modifying the function for me. I will definitely add this functionality in the next version! Is there a specific author name and URI you would like me to use to attribute you? (otherwise I’m just going to use MomDad and your wordpress author page).

    Thanks again, I’m going to get started right now!

    Plugin Author Luke Mlsna

    (@bitacre)

    I’ve just pushed out version 1.2.0 which includes the changes you suggested. Thanks again for the input. If you want to get a hold of me in the future, the plugin’s homepage is usually a much faster route.

    Thread Starter MomDad

    (@momdad)

    That’s great news! I’m glad you liked the idea and that you’ve incorporated it in your latest build. I just saw the notification in WP that there was a new version available :D. Sure, “MomDad” and a link to my WordPress profile is fine.

    One other idea I had that I toyed with the thought of adding in was an option to also do geo-location lookup on the IPs and display the IP’s country of origin in brackets after. I know there are some free/open-source geo-location lookup services/APIs out there, but haven’t dug any further into the idea. Usually for the top offending IPs, I’ll cut-n-paste and do a manual lookup at http://ip-address-lookup-v4.com for example. Having it do automated lookups would be handy, although it may add quite a bit of overhead if you have hundreds or thousands of IPs in the spam list, so I don’t know how practical that’d really be. Just an idea though 🙂

    Thanks again — you made my day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP-Blacklister] [FEATURE REQUEST] Toggle to Display Instance Count (Code Provided)’ is closed to new replies.