Page 2 of 12

Re: [DEV] Filter by country

Posted: Fri May 31, 2019 11:20 am
by Siava
Great ext! Now I can restrict all USA users including the author :mrgreen:

Re: [DEV] Filter by country

Posted: Fri May 31, 2019 12:00 pm
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 😜

Re: [DEV] Filter by country

Posted: Fri May 31, 2019 12:25 pm
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.

Re: [DEV] Filter by country

Posted: Sat Jun 01, 2019 5:59 am
by bubbathegimp
Forgive my Noobness..
Is it possible to show the statistics as a web page instead of viewing through the control panel??

Re: [DEV] Filter by country

Posted: Sat Jun 01, 2019 12:20 pm
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?

Re: [DEV] Filter by country

Posted: Sun Jun 02, 2019 1:48 pm
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..

Re: [DEV] Filter by country

Posted: Tue Jun 04, 2019 9:11 pm
by </Solidjeuh>
NL translation: https://github.com/Solidjeuh/filterbycountry

I even translated the country's :lol:

Re: [DEV] Filter by country

Posted: Tue Jun 04, 2019 9:55 pm
by MarkDHamill
Thanks. Working on a new version and there will be language file changes.

Re: [DEV] Filter by country

Posted: Wed Jun 05, 2019 12:51 am
by bubbathegimp
If you do it as a tab, Can you mark it as "Statistics" on the same line as "Home" & "Board index"??!
Thnx

Re: [ALPHA] Filter by country - version 1.0.1

Posted: Wed Jun 05, 2019 1:49 am
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.

Re: [DEV] Filter by country

Posted: Wed Jun 05, 2019 1:51 am
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.

Re: [ALPHA] Filter by country - version 1.0.1

Posted: Wed Jun 05, 2019 2:52 am
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

Re: [ALPHA] Filter by country - version 1.0.1

Posted: Wed Jun 05, 2019 11:57 am
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.

Re: [ALPHA] Filter by country - version 1.0.1

Posted: Wed Jun 05, 2019 1:22 pm
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

Re: [ALPHA] Filter by country - version 1.0.1

Posted: Wed Jun 05, 2019 2:51 pm
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.