How's about a button on the Who's Online page (per visitor) to click 'block this IP' which would add that IP to the blocked list?
Any thoughts or a proper pain in the proverbial to implement?
How's about a button on the Who's Online page (per visitor) to click 'block this IP' which would add that IP to the blocked list?
Any thoughts or a proper pain in the proverbial to implement?
The IP-blocker code requires some restructuring (which is kind of on my list, anyway) to allow this to happen in a non-kludgy way. It would also require some form of consolidation, as mc12345678 referred to a couple of posts ago, to keep the database from (potentially) getting too large.
Of course that was why I was asking about how some parts work, I'm looking to incorporate the "process" into User Tracking (reflects a log or history of actions not just what is happening at that one moment). Still trying to consider a button, or a link to implement, but I think a button/form is the right way to go. Allows a Post operation, etc.
Trying to contemplate/minimize resource use, single read of all the blocked/allowed ip addresses from the database, be able to compare each logged entry against both the block and allow lists and then provide the applicable button(s) add to allow, add to block, if covered in both the blocked and allowed an appropriate an understandable choice.
Was also looking at the effect if any of continuing to capture the "presenece" or attempt of the "offender" to access the site if that is not yet afforded. Otherwise, some of the options above would be useless, as it would not be known that a blocked visitor attempted to access the site, and then would more than likely have to dig through server logs to confirm the ip address used by the individual that was blocked. Okay too much thought for a Saturday morning. Would certainly appreciate any code streamlining, but in the meantime gonna "make it work" :)
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Great!
So, had a question and just skimming the posted notes about this version. I'm trying to figure out why the init_ip_blocker file doesn't appear in the list of loaded files when on a page, why the two functions inside it are not "available" for "use" and how to make them available without potentially sacrificing security if that was the reason the file was coded/loaded the way it was. :/
Insight? Is it the load point that forced it to not remain as always visible, and was that a security determination (on purpose), or just shear luck?![]()
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
I'm not sure what you mean by "the init_ip_blocker file doesn't appear in the list of loaded files when on a page" nor do I understand why the functions wouldn't be available for use. It's an initialization file, not a class, so calling the function ip_blocker_block anytime after checkpoint 71 (when the init-file is loaded) should work just fine.
I think I figured it out... The init file with related functions are only loaded on the store side, and not from the init_loader on the admin side. The plugin I'm revising provides data review from the admin side and I was incorrectly "expecting" it to use code that is on the store side. I'll have to add a call to the store's version for once a user has logged in. BTW, appears that if a user has been able to login to the admin panel the ip_blocker won't stop them until at least they timeout or logout and then try to login again. But, by calling the function(s) from the admin init_includes, then ip addresses will be controlled for logged in users as well. (like it or not...) That said, and if it was by design to *not* be able to stop someone that is already logged into the admin, then the alternate fix is to move/copy the functions in the init_ip_blocker file to a location reachable from both the store and the admin, preferably without having to be duplicated in the other side.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Would you mind taking the discussion of your plugin that's under development to a separate thread, please. I'd be happy to answer any additional questions that you have there.
I've submitted v2.1.0 to the plugins area. This version provides a single screen for the admin configuration, provides IP address "consolidation", no longer used two database fields to store your selections (to reduce database space) and includes, if the IP Blocker is enabled, a link next to each IP address in the whos_online script's display, allowing you a single-click add to the blocked IP address list.
Bookmarks