[3.3][RC] Filter by country - version 1.0.16

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
MarkDHamill
Registered User
Posts: 4280
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.10

Post by MarkDHamill »

This is probably due to a cut and paste error. I posted the change to the GitHub master. I suggest installing that.

https://github.com/MarkDHamill/filterbycountry
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
User avatar
Hero.73
Registered User
Posts: 62
Joined: Fri Feb 14, 2020 8:27 pm
Location: Germany

Re: [3.3][RC] Filter by country - version 1.0.10

Post by Hero.73 »

hiii friends where can I get the key for country files
Your license key is invalid. Enter a valid MaxMind license key.
Attachments
Cattura.PNG
User avatar
janus_zonstraal
Registered User
Posts: 4857
Joined: Sat Aug 30, 2014 1:30 pm

Re: [3.3][RC] Filter by country - version 1.0.10

Post by janus_zonstraal »

Click on the link (last line from your image)
Sorry! My English is bat ;) !!!
PeterLeinen
Registered User
Posts: 8
Joined: Thu May 04, 2017 5:29 pm

Re: [3.3][RC] Filter by country - version 1.0.10

Post by PeterLeinen »

Hi there,

thanks a lot for the software. I got it running without any problem including the licence information for the geoinformation on my testserver.

I have one question concerning the "allow or restrict the selected countries". I would like to start with three countries to deny any access to my forum. Can I add a next country later, by only select this country ans click on deny or have I to select all four countries and then select on deny?

Regards
Peter
User avatar
MarkDHamill
Registered User
Posts: 4280
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.10

Post by MarkDHamill »

You can change it at any time. However, your only option is to either deny a set of countries or allow only a set of countries.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
PeterLeinen
Registered User
Posts: 8
Joined: Thu May 04, 2017 5:29 pm

Re: [3.3][RC] Filter by country - version 1.0.10

Post by PeterLeinen »

Thanks and sorry to bother again:

I have to start from scratch each time I would like to change the configuration?

is there a way to see which countries are allowed or block (depending wheter I choose allow or deny in ACP)?
Regards
Peter
User avatar
janus_zonstraal
Registered User
Posts: 4857
Joined: Sat Aug 30, 2014 1:30 pm

Re: [3.3][RC] Filter by country - version 1.0.10

Post by janus_zonstraal »

Selected Country's are blue
Screenshot_2020-05-09 Filter by country.png
Screenshot_2020-05-09 Filter by country.png (12.1 KiB) Viewed 840 times
Be sure to click on "send" after selecting the Country's :!:
Sorry! My English is bat ;) !!!
PeterLeinen
Registered User
Posts: 8
Joined: Thu May 04, 2017 5:29 pm

Re: [3.3][RC] Filter by country - version 1.0.10

Post by PeterLeinen »

Thanks.

This is not my point. I can select multiple countries, so that users with an IP address from these countries will be denied access. This works great.

My question was the following:

Today I select a list of countries, let's say: A, C, D, F

After some time, however, countries B and G should now be added to the list of countries. As I understood it, I have to
Select A,B,C,D,F,G and it is not enough to select B and G, because then A,C,D,F would be missing.

But it's okay, I just need to know. I have found the appropriate place in the database, and so I can find out which countries are stored within the system.

Regards
Peter

Translated with www.DeepL.com/Translator (free version)
User avatar
MarkDHamill
Registered User
Posts: 4280
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.10

Post by MarkDHamill »

This is not an issue with the extension, but how HTML works. If you want to add options to a dropdown select list, you hold down CTRL (CMD on a Mac). This retains the existing list while allowing you to selectively add or remove others. Granted, a lot of browser users don't understand this is a feature, not a bug.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
PeterLeinen
Registered User
Posts: 8
Joined: Thu May 04, 2017 5:29 pm

Re: [3.3][RC] Filter by country - version 1.0.10

Post by PeterLeinen »

Hi there,

At the end everything is fine.

Until just now I was not aware that the countries stored in the database are already selected/highlighted in the list of countries when entering the configuration page. This caused the misunderstanding that I would have to select the list of countries each time from the beginning when I changed the configuration of the extension. This also was the reason for my question where to find an information of the actual list of countries stored in the database.

My fault, sorry.

Thanks again for the software.
Peter
PeterLeinen
Registered User
Posts: 8
Joined: Thu May 04, 2017 5:29 pm

Re: [3.3][RC] Filter by country - version 1.0.10

Post by PeterLeinen »

Hello,

I have received today a registration from an IP, which is assigned to the country Hungary (which is in the country of allowed countries) according to whois. But in the log files of the extension I cannot find any access from this country.

While searching for possible errors I saw that the database is installed but not renewed, it is dated 10.5.

The cron settings in Server > Run periodic tasks from system cron is set to No.

What might be wrong?

Regards
Peter
User avatar
MarkDHamill
Registered User
Posts: 4280
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.10

Post by MarkDHamill »

If you enable logging, it will only log access errors. So if Hungary is an allowed country, it won't leave an entry in the log.

A phpBB cron should kick off the update of the country codes database, which is dependent on board traffic. If for some reason it would not be updated, it should make a note of it in phpBB's error log. The most likely cause is a permissions issue. You need 777 folder permissions for /store/phpbbservices/filterbycountry.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
PeterLeinen
Registered User
Posts: 8
Joined: Thu May 04, 2017 5:29 pm

Re: [3.3][RC] Filter by country - version 1.0.10

Post by PeterLeinen »

PeterLeinen wrote:
Tue May 19, 2020 7:40 pm
But in the log files of the extension ...
Sorry my mistake, I meant the statistics.

There is no entry for Hungary. The statistic shows me for yesterday only accesses from Germany and France.

Is it possible that the IP assignment in the database (MaxMind) is wrong?

Peter
User avatar
MarkDHamill
Registered User
Posts: 4280
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [3.3][RC] Filter by country - version 1.0.10

Post by MarkDHamill »

It is possible but unlikely. If the database hasn't been updated in a while, it's more likely.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Kindle and paper versions available.
PeterLeinen
Registered User
Posts: 8
Joined: Thu May 04, 2017 5:29 pm

Re: [3.3][RC] Filter by country - version 1.0.10

Post by PeterLeinen »

Ok. The database was updated today. I will see what happens now with regstrations and logins.

As it concern the permissions:

The database is owned by the user www-data under which the webserver is running, then permission 644 for the database and 755 for the directory seems to be sufficient.

drwxr-xr-x 2 www-data www-data 4096 May 20 07:14 ./
drwxr-xr-x 3 www-data www-data 4096 May 20 07:14 ../
-rw-r--r-- 1 www-data www-data 3801363 May 20 07:14 GeoLite2-Country.mmdb
Post Reply

Return to “Extensions in Development”