[RC] Filter by country - version 1.0.7

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!
Suggested Hosts
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
Siava
Registered User
Posts: 137
Joined: Wed Jan 26, 2005 10:07 am
Contact:

Re: [DEV] Filter by country

Post by Siava » Fri May 31, 2019 11:20 am

Great ext! Now I can restrict all USA users including the author :mrgreen:

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

Re: [DEV] Filter by country

Post by </Solidjeuh> » Fri May 31, 2019 12:00 pm

Siava wrote:
Fri May 31, 2019 11:20 am
Great ext! Now I can restrict all USA users including the author :mrgreen:
Not me, i have vpn 😜

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

Re: [DEV] Filter by country

Post by MarkDHamill » Fri May 31, 2019 12:25 pm

The VPN issue is still being assessed as the MaxMind country code database apparently does not include IP ranges for VPNs. As a workaround, the extension does allow admins to allow in traffic where the IP is not found in the MaxMind database. This should work but it opens the forum to spam from spammers using VPNs.

MaxMind does sell a database for VPNs and I may integrate that. However, you would have to pay for a license and the phpBB group would have to be okay with me adding a feature like this.

https://www.maxmind.com/en/solutions/ge ... p-database

Remember this is a first cut of the extension. While it should block traffic by country, I need testers to put it through its paces to ensure it works as advertised. Enabling statistics and looking at the report will help.
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: 29
Joined: Tue Sep 25, 2018 8:02 pm
Location: Bronston
Name: Robert Anderson
Contact:

Re: [DEV] Filter by country

Post by bubbathegimp » Sat Jun 01, 2019 5:59 am

Forgive my Noobness..
Is it possible to show the statistics as a web page instead of viewing through the control panel??
73 De
Bubba

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

Re: [DEV] Filter by country

Post by MarkDHamill » Sat Jun 01, 2019 12:20 pm

If you mean allow users to see it who don't have ACP access, yes, it's possible but not currently a feature. How do you envision it working?
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: 29
Joined: Tue Sep 25, 2018 8:02 pm
Location: Bronston
Name: Robert Anderson
Contact:

Re: [DEV] Filter by country

Post by bubbathegimp » Sun Jun 02, 2019 1:48 pm

I was thinking along the lines of either as a web page showing usage, and or or as a tab on the main forum menu..
73 De
Bubba

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

Re: [DEV] Filter by country

Post by </Solidjeuh> » Tue Jun 04, 2019 9:11 pm

NL translation: https://github.com/Solidjeuh/filterbycountry

I even translated the country's :lol:

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

Re: [DEV] Filter by country

Post by MarkDHamill » Tue Jun 04, 2019 9:55 pm

Thanks. Working on a new version and there will be language file changes.
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: 29
Joined: Tue Sep 25, 2018 8:02 pm
Location: Bronston
Name: Robert Anderson
Contact:

Re: [DEV] Filter by country

Post by bubbathegimp » Wed Jun 05, 2019 12:51 am

If you do it as a tab, Can you mark it as "Statistics" on the same line as "Home" & "Board index"??!
Thnx
73 De
Bubba

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

Re: [ALPHA] Filter by country - version 1.0.1

Post by MarkDHamill » Wed Jun 05, 2019 1:49 am

Version 1.0.1-alpha is now released. See the first post for links to download the version.

The main changes are to the statistics report. You can select a relative or absolute date range. For an absolute range, you use the jQuery UI datepicker control. You can also sort by column, either ascending or descending. There has also been a lot of code clean up and code hardening.

Sorry that the NL translation is now out of date.
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: 3876
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [DEV] Filter by country

Post by MarkDHamill » Wed Jun 05, 2019 1:51 am

bubbathegimp wrote:
Wed Jun 05, 2019 12:51 am
If you do it as a tab, Can you mark it as "Statistics" on the same line as "Home" & "Board index"??!
Thnx
I have to think more about this. Probably you should concentrate on the changes to the statistics report in the ACP. To expose a public report opens a lot of questions, like who should see it and who should not, which opens a permissions issue I don't want to tackle right now.
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: 29
Joined: Tue Sep 25, 2018 8:02 pm
Location: Bronston
Name: Robert Anderson
Contact:

Re: [ALPHA] Filter by country - version 1.0.1

Post by bubbathegimp » Wed Jun 05, 2019 2:52 am

Fatal error: Uncaught ArgumentCountError: Too few arguments to function phpbbservices\filterbycountry\controller\acp_controller::__construct(), 10 passed in /home3/kd8dey/Forums.cornpone.net/cache/production/container_dbdbe80dc7030ae9bd39ee30cca82130.php on line 3974 and exactly 12 expected in /home3/kd8dey/Forums.cornpone.net/ext/phpbbservices/filterbycountry/controller/acp_controller.php:51 Stack trace: #0 /home3/kd8dey/Forums.cornpone.net/cache/production/container_dbdbe80dc7030ae9bd39ee30cca82130.php(3974): phpbbservices\filterbycountry\controller\acp_controller->__construct(Object(phpbb\config\db), Object(phpbb\language\language), Object(phpbb\log\log), Object(phpbb\request\request), Object(phpbb\template\twig\twig), Object(phpbb\user), Object(phpbb\config\db_text), Object(phpbbservices\filterbycountry\core\common), Object(phpbb\db\driver\factory), 'phpbb_') #1 /home3/kd8dey/Forums.cornpone.net/vendor/symfony/dependency-injection/Container.php(295): phpbb_cache_container->getPhpbbservices_Filterbycountry_Controller_A in /home3/kd8dey/Forums.cornpone.net/ext/phpbbservices/filterbycountry/controller/acp_controller.php on line 51
73 De
Bubba

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

Re: [ALPHA] Filter by country - version 1.0.1

Post by MarkDHamill » Wed Jun 05, 2019 11:57 am

This can happen if you did not follow the procedures for updating extensions. It must minimally be disabled first, the old software removed, then the new software uploaded. If you want to make this go away, manually purging the /cache/production folder should work.
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: 1703
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [ALPHA] Filter by country - version 1.0.1

Post by </Solidjeuh> » Wed Jun 05, 2019 1:22 pm

I also have an error when updating.

I disabled the ext & deleted data.
Deleted /cache/productions
Deleted all files, and uploaded new ones.
Enabled the ext.

Now when I go to the "settings" page I get:

Code: Select all

[Wed Jun 05 15:17:30.160907 2019] [fcgid:warn] [pid 10532:tid 140342447789824] [client 212.92.116.86:52602] mod_fcgid: stderr: #3 /var/www/vhosts/solidjeuh.be/httpdocs/cache/production/twig/4d/4d72d833269a422a088088d5eb482c9c6dd3e96388783659b9ef5bb28a61888e.php(42): phpbb\\template\\twig\\environment->findTemplate('@phpbbservices_...'), referer: https://www.solidjeuh.be/adm/index.php?sid=6a26e35d547f183d32ad64508c96b265&i=32
[Wed Jun 05 15:17:30.160924 2019] [fcgid:warn] [pid 10532:tid 140342447789824] [client 212.92.116.86:52602] mod_fcgid: stderr: #4 /var/www/vhosts/solidjeuh.be/httpdocs/vendor/twig/twig/src/Te in /var/www/vhosts/solidjeuh.be/httpdocs/vendor/twig/twig/src/Loader/FilesystemLoader.php on line 222, referer: https://www.solidjeuh.be/adm/index.php?sid=6a26e35d547f183d32ad64508c96b265&i=32
[Wed Jun 05 15:17:36.358090 2019] [fcgid:warn] [pid 10532:tid 140342332401408] [client 212.92.116.86:52872] mod_fcgid: stderr: PHP Fatal error:  Uncaught Twig\\Error\\LoaderError: There are no registered paths for namespace "phpbbservices_selectivemassemails" in "@phpbbservices_filterbycountry/event/acp_overall_footer_after.html" at line 4. in /var/www/vhosts/solidjeuh.be/httpdocs/vendor/twig/twig/src/Loader/FilesystemLoader.php:222, referer: https://www.solidjeuh.be/adm/index.php?sid=6a26e35d547f183d32ad64508c96b265&i=32
[Wed Jun 05 15:17:36.358206 2019] [fcgid:warn] [pid 10532:tid 140342332401408] [client 212.92.116.86:52872] mod_fcgid: stderr: Stack trace:, referer: https://www.solidjeuh.be/adm/index.php?sid=6a26e35d547f183d32ad64508c96b265&i=32
[Wed Jun 05 15:17:36.358233 2019] [fcgid:warn] [pid 10532:tid 140342332401408] [client 212.92.116.86:52872] mod_fcgid: stderr: #0 /var/www/vhosts/solidjeuh.be/httpdocs/phpbb/template/twig/loader.php(135): Twig\\Loader\\FilesystemLoader->findTemplate('@phpbbservices_...'), referer: https://www.solidjeuh.be/adm/index.php?sid=6a26e35d547f183d32ad64508c96b265&i=32
[Wed Jun 05 15:17:36.358264 2019] [fcgid:warn] [pid 10532:tid 140342332401408] [client 212.92.116.86:52872] mod_fcgid: stderr: #1 /var/www/vhosts/solidjeuh.be/httpdocs/vendor/twig/twig/src/Loader/FilesystemLoader.php(155): phpbb\\template\\twig\\loader->findTemplate('@phpbbservices_...'), referer: https://www.solidjeuh.be/adm/index.php?sid=6a26e35d547f183d32ad64508c96b265&i=32
[Wed Jun 05 15:17:36.358292 2019] [fcgid:warn] [pid 10532:tid 140342332401408] [client 212.92.116.86:52872] mod_fcgid: stderr: #2 /var/www/vhosts/solidjeuh.be/httpdocs/phpbb/template/twig/environment.php(328): Twig\\Loader\\FilesystemLoader->getCacheKey('@phpbbservices_...'), referer: https://www.solidjeuh.be/adm/index.php?sid=6a26e35d547f183d32ad64508c96b265&i=32
[Wed Jun 05 15:17:36.358329 2019] [fcgid:warn] [pid 10532:tid 140342332401408] [client 212.92.116.86:52872] mod_fcgid: stderr: #3 /var/www/vhosts/solidjeuh.be/httpdocs/cache/production/twig/4d/4d72d833269a422a088088d5eb482c9c6dd3e96388783659b9ef5bb28a61888e.php(42): phpbb\\template\\twig\\environment->findTemplate('@phpbbservices_...'), referer: https://www.solidjeuh.be/adm/index.php?sid=6a26e35d547f183d32ad64508c96b265&i=32
[Wed Jun 05 15:17:36.358379 2019] [fcgid:warn] [pid 10532:tid 140342332401408] [client 212.92.116.86:52872] mod_fcgid: stderr: #4 /var/www/vhosts/solidjeuh.be/httpdocs/vendor/twig/twig/src/Te in /var/www/vhosts/solidjeuh.be/httpdocs/vendor/twig/twig/src/Loader/FilesystemLoader.php on line 222, referer: https://www.solidjeuh.be/adm/index.php?sid=6a26e35d547f183d32ad64508c96b265&i=32

Code: Select all

There are no registered paths for namespace "phpbbservices_selectivemassemails" in "@phpbbservices_filterbycountry/event/acp_overall_footer_after.html"
/ext/phpbbservices/filterbycountry/adm/style/event/acp_overall_footer_after.html
I guess '@phpbbservices_selectivemassemails/jquery-ui-1.12.1.min.js' needs to be '@phpbbservices_filterbycountry/jquery-ui-1.12.1.min.js'

NL updated: https://github.com/Solidjeuh/filterbycountry

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

Re: [ALPHA] Filter by country - version 1.0.1

Post by MarkDHamill » Wed Jun 05, 2019 2:51 pm

That explains it. Thanks. It didn't fail for me because I had selective mass emails extension installed, which I am also developing. Thanks for updating your language translation so quickly as well. I will update master with it, along with this bug fix.
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”