[BETA] Filter by country - version 1.0.8

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!
Scam Warning
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: 3940
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [RC] Filter by country - version 1.0.6

Post by MarkDHamill » Tue Sep 03, 2019 8:37 pm

That database needs to be updated to change the phpbb_fbc_stats table. The country_code would need to change all ?? to ##. The next version will have a migrator program to do this.

/controller/acp_controller.php will have additional logic that will avoid invoking file_exist() if the unknown country code is selected.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
3Di
Former Team Member
Posts: 14346
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [RC] Filter by country - version 1.0.6

Post by 3Di » Tue Sep 03, 2019 10:46 pm

MarkDHamill wrote:
Tue Sep 03, 2019 8:37 pm
The country_code would need to change all ?? to ##.
You could use instead of ## something personalised like wo (World), like I did for my Country flags, and use its image located here

https://github.com/3D-I/IP-Country-Flag ... ags/wo.png
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

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

Re: [RC] Filter by country - version 1.0.6

Post by MarkDHamill » Tue Sep 03, 2019 11:10 pm

I like that better. I didn't know there was a World flag. I probably got my flags from your extension. Is this a new addition?
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
3Di
Former Team Member
Posts: 14346
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [RC] Filter by country - version 1.0.6

Post by 3Di » Tue Sep 03, 2019 11:20 pm

No, I made it on purpose. The title/alt tag is "unknown IP".

Or ZZ which is located here: https://github.com/3D-I/IP-Country-Flag ... ags/zz.png - Image

ZZ is a iso code not assigned, there are many.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

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

Re: [RC] Filter by country - version 1.0.6

Post by MarkDHamill » Tue Sep 03, 2019 11:38 pm

Thank you for investigating this and providing some solutions.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
3Di
Former Team Member
Posts: 14346
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [RC] Filter by country - version 1.0.6

Post by 3Di » Tue Sep 03, 2019 11:52 pm

There are also SVG flags here:
https://github.com/hjnilsson/country-fl ... master/svg

or even better here https://flag-icon-css.lip.is/

Which would be the better choice for 3.2 or greater.

For the user assigned codes see here: https://en.wikipedia.org/wiki/ISO_3166- ... rent_codes
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

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

Re: [RC] Filter by country - version 1.0.6

Post by MarkDHamill » Thu Sep 05, 2019 10:02 pm

Working on the new version but notice something peculiar. "Hits" are being recorded in my phpbb_fbc_stats table every thirty minutes (approximately) while my browser page is in a browser tab. I'm in the ACP, and I filter out ACP traffic. I don't have another page open in another tab. This version exists entirely on my local machine, so there is no external traffic. It's not a matter of using a system cron as I don't use one.

I don't think phpBB's cron is triggered by ACP traffic. Any ideas?

I'm using XAMPP on a Mac if that's relevant.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Version 1.0.7-rc nearing release

Post by MarkDHamill » Sat Sep 07, 2019 8:13 pm

I have a 1.0.7 release nearly ready. All it's missing is an updated Dutch language file. When I get that I will finish the release. Right now it's in GitHub on the master branch. You are of course welcome to take it for a spin:

https://github.com/MarkDHamill/filterbycountry

Some new features:
  • Allows VPN addresses only, ignoring requests that are found in the country codes database.
  • Allows known bots to be ignored in the statistics
  • Adds an unknown (world) flag on the reports. Thanks 3Di.
Two bug fixes:
  • Sort by country didn't actually work correctly in descending sequence.
  • Update check now works as composer.json now has a ssl:true setting.
List of changes can be seen here:

https://github.com/MarkDHamill/filterby ... 20b0afb4ad
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
</Solidjeuh>
Registered User
Posts: 1732
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Version 1.0.7-rc nearing release

Post by </Solidjeuh> » Sat Sep 07, 2019 8:32 pm

MarkDHamill wrote:
Sat Sep 07, 2019 8:13 pm
I have a 1.0.7 release nearly ready. All it's missing is an updated Dutch language file.
Here you go :D
https://github.com/Solidjeuh/filterbycountry

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

Re: [RC] Filter by country - version 1.0.6

Post by MarkDHamill » Sat Sep 07, 2019 9:30 pm

Yowz! So fast! Thanks.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

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

Filter by country - version 1.0.7 released

Post by MarkDHamill » Sun Sep 08, 2019 12:02 am

Follow links on the first post to download. The new features are discussed a few posts back. Thanks to </Solidjeuh> for the updated Dutch translation and 3Di for providing a flag to use when the country is unknown.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

bubbathegimp
Registered User
Posts: 39
Joined: Tue Sep 25, 2018 8:02 pm
Location: Bronston
Name: Robert Anderson
Contact:

Re: [RC] Filter by country - version 1.0.7

Post by bubbathegimp » Sun Sep 08, 2019 1:11 am

Just installed 1.07.
On 1.06, I saw that it was letting a country in that I had previously blocked.
I hope this fixes it. :D
73 De
Bubba

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

Re: [RC] Filter by country - version 1.0.7

Post by MarkDHamill » Sun Sep 08, 2019 2:00 am

The country codes should be retained once set. You can see them in the phpbb_config_text table. Since it's possible a lot of countries will be selected, I had to allow for the possibility that it would use more than 254 characters.

You may need to scroll to see the countries selected. In my browser it highlights the first one selected in the select list, scrolling down as necessary.
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

bubbathegimp
Registered User
Posts: 39
Joined: Tue Sep 25, 2018 8:02 pm
Location: Bronston
Name: Robert Anderson
Contact:

Re: [RC] Filter by country - version 1.0.7

Post by bubbathegimp » Sun Sep 08, 2019 2:11 am

I only have one country blocked. added it when I started getting with spammers trying to sell cheap metal detectors etc...
It is highlighted in the selection menu. when I switched to 1.06, that country started getting in, But nowhere as bad as before...
I've decided to block VPN access except for members already registered..
Hopefully that does the trick :D
73 De
Bubba

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

Re: [RC] Filter by country - version 1.0.7

Post by MarkDHamill » Sun Sep 08, 2019 12:40 pm

I was going to recommend turning on logging to help troubleshoot these issues. But it looks like the logging feature somehow got removed, although the setting remains. When enabled, rejected requests are written to the admin log.

It's easily fixed though if you install the extension again from the GitHub master:

https://github.com/MarkDHamill/filterbycountry

or apply the file changes here:

https://github.com/MarkDHamill/filterby ... 5a3410a3e2
Get the latest versions of my Digests and Smartfeed extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

Post Reply

Return to “Extensions in Development”