Filter by country

Version 1.0.22 released - Filter by country

Re: Version 1.0.22 released

by HansDutch » Wed Jun 12, 2024 5:51 pm

MarkDHamill wrote:It appears that the new MaxMind license key is exactly 40 characters, at least mine is when I got a new license key. So to solve the statistics not reporting issue change lines 103-110 in event/main_listener.php to:

Code: Select all

		// If the license key has not been entered or is not valid, the MaxMind database integration won't work. The
		// database may not have been downloaded yet. So in this event, the extension is not yet configured properly, in
		// which case we want to exit this function, allowing all traffic until this is true. Also, the new key size appears
		// to be exactly 40 characters.
		if ($this->config['phpbbservices_filterbycountry_license_key_valid'] == 0 || strlen(trim($this->config['phpbbservices_filterbycountry_license_key'])) < 40)
		{
			return;
		}
If you still have issues, you may be using the old key and need to get a new one. You can get a new one on maxmind.com.

Thanks for reporting the issue.
Not only the statistics did not working, this extension did not filter any IP address until I modified the event/main_listener.php file with the above fix.
HansDutch
Registered User
Posts: 9
Joined: Sun Aug 20, 2023 8:31 pm

Re: Version 1.0.22 released

by HansDutch » Fri Jun 14, 2024 11:20 am

Not only did the statistics of this extension no longer worked, but this extension also no longer filtered any IP addresses from selected blocked countries.

The developer's suggested change to the code of the event/main_listener.php file also solves the problem with not filtering IP addresses from selected blocked countries.

Thank you very much for the solution provided to this problem
HansDutch
Registered User
Posts: 9
Joined: Sun Aug 20, 2023 8:31 pm