[OzzModz] Country Registration Ban

[OzzModz] Country Registration Ban 2.2.0 Beta 1

No permission to download

Snog

Well-known member
Snog submitted a new resource:

Country Registration Ban - Ban countries from registering on your site

Ban countries from registering on your site and optionally remove the register tab when someone is from a country that is banned.

This add-on uses MaxMind's GeoLite2-Country database and MaxMind's DB Reader. This add-on does not require mod_geoip to be installed on your server.

NOTE: This add-on connects to the MaxMind database site to download the MaxMind database during installation. If it is unable to connect to MaxMind, the installation will...

Read more about this resource...
 
Thanks for this Brilliant addon.

optionally remove the register tab when someone is from a country that is banned.
Does this feature still works even if I have Full Page Caching enabled?
 
I tried using TOR and it doesn't detect though.
What error does a blocked visitor gets?
 
Maybe. You could argue it's more like a VPN.

Either way, you would have to take this up with the MaxMind GeoLite2-Country database. That's not an issue with this add-on.
 
but the database that one uses is not free except for smaller forums
That's why this one was made. ;)

It should belong to: Anonymous Proxy
TOR isn't an anonymous proxy in the country sense, as @djbaxter said it's a browser and/or a VPN.

The add-on uses the visitor's IP address to detect what country a user is from. Using a TOR browser just changes the user's IP address.

If you're looking to block TOR exit nodes and other hosts, try this...
That add-on can do what you want, but it does take some active research on your part to get the proper blocks in place. (I use it on my site).
 
Last edited:
Does this feature still works even if I have Full Page Caching enabled?
I can't answer that. I don't use full page caching on dynamic sites simply because it is a dangerous thing to do, and can cause problems when there is literally no static content on a dynamic site like XenForo. Literally anything and everything can change on any page in XenForo in the blink of an eye. So caching pages isn't really a good idea.

But, I would imagine the worst that might happen is the registration button would still be available and the visitor would get the error message when they click it. Or, the button won't be available for visitors that should see it. It all depends on when the cache is created.
 
Last edited:
Thanks for this Brilliant addon.


Does this feature still works even if I have Full Page Caching enabled?
I mean this built-in feature on XF 2.1
 
Hey Snog, great addon. But is it possible to add hiding the "contact us" link, and the login from from the blocked countries too, like you're doing the "register" link?
 
It's not planned, but I will think about it if I need to go in and change something else.
 
I've tried installing this on a couple of my sites and get the following error each time.

Code:
ErrorException: [E_WARNING] file_put_contents(C:\root\Forums\MyForums\data/countryban/cloudflare_cookie.txt): failed to open stream: No such file or directory in src\vendor\guzzlehttp\guzzle\src\Cookie\FileCookieJar.php at line 59
XF::handlePhpError()
file_put_contents() in src\vendor\guzzlehttp\guzzle\src\Cookie\FileCookieJar.php at line 59
GuzzleHttp\Cookie\FileCookieJar->save() in src\vendor\guzzlehttp\guzzle\src\Cookie\FileCookieJar.php at line 39
GuzzleHttp\Cookie\FileCookieJar->__destruct() in src\addons\Snog\CountryBan\Setup.php at line 79
Snog\CountryBan\Setup->checkRequirements() in src\XF\AddOn\AddOn.php at line 444
XF\AddOn\AddOn->checkRequirements() in src\XF\Admin\Controller\AddOn.php at line 772
XF\Admin\Controller\AddOn->getAddOnWarningsAndErrors() in src\XF\Admin\Controller\AddOn.php at line 366
XF\Admin\Controller\AddOn->actionInstall() in src\XF\Mvc\Dispatcher.php at line 321
XF\Mvc\Dispatcher->dispatchClass() in src\XF\Mvc\Dispatcher.php at line 244
XF\Mvc\Dispatcher->dispatchFromMatch() in src\XF\Mvc\Dispatcher.php at line 100
XF\Mvc\Dispatcher->dispatchLoop() in src\XF\Mvc\Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src\XF\App.php at line 2178
XF\App->run() in src\XF.php at line 390
XF::runApp() in admin.php at line 13
 
Back
Top Bottom