[CDB] Filter by country - version 1.0.19

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

Re: [DEV] Filter by country

Post by Siava »

Great ext! Now I can restrict all USA users including the author :mrgreen:
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [DEV] Filter by country

Post by </Solidjeuh> »

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

Re: [DEV] Filter by country

Post by MarkDHamill »

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.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
bubbathegimp
Registered User
Posts: 192
Joined: Tue Sep 25, 2018 8:02 pm
Location: Off Plumb
Name: Bubba
Contact:

Re: [DEV] Filter by country

Post by bubbathegimp »

Forgive my Noobness..
Is it possible to show the statistics as a web page instead of viewing through the control panel??
If at first you don't succeed, Sky diving is not for you....
Ymmv
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [DEV] Filter by country

Post by MarkDHamill »

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?
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
bubbathegimp
Registered User
Posts: 192
Joined: Tue Sep 25, 2018 8:02 pm
Location: Off Plumb
Name: Bubba
Contact:

Re: [DEV] Filter by country

Post by bubbathegimp »

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..
If at first you don't succeed, Sky diving is not for you....
Ymmv
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [DEV] Filter by country

Post by </Solidjeuh> »

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

I even translated the country's :lol:
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [DEV] Filter by country

Post by MarkDHamill »

Thanks. Working on a new version and there will be language file changes.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
bubbathegimp
Registered User
Posts: 192
Joined: Tue Sep 25, 2018 8:02 pm
Location: Off Plumb
Name: Bubba
Contact:

Re: [DEV] Filter by country

Post by bubbathegimp »

If you do it as a tab, Can you mark it as "Statistics" on the same line as "Home" & "Board index"??!
Thnx
If at first you don't succeed, Sky diving is not for you....
Ymmv
User avatar
MarkDHamill
Registered User
Posts: 4885
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 »

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.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [DEV] Filter by country

Post by MarkDHamill »

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.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
bubbathegimp
Registered User
Posts: 192
Joined: Tue Sep 25, 2018 8:02 pm
Location: Off Plumb
Name: Bubba
Contact:

Re: [ALPHA] Filter by country - version 1.0.1

Post by bubbathegimp »

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
If at first you don't succeed, Sky diving is not for you....
Ymmv
User avatar
MarkDHamill
Registered User
Posts: 4885
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 »

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.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
</Solidjeuh>
Registered User
Posts: 1788
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> »

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: 4885
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 »

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.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
Locked

Return to “Extensions in Development”