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

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
MarkDHamill
Registered User
Posts: 4154
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [BETA] Filter by country - version 1.0.8

Post by MarkDHamill »

I would think you'd want to make it:

Code: Select all

			phpbb_version_compare($config['version'], '3.2.0', '>=') &&
			phpbb_version_compare($config['version'], '3.3', '<=') &&
You can make permissions on the /store/phpbbservices folder 0777 and see if that works.
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
warmweer
Jr. Extension Validator
Posts: 4510
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: [BETA] Filter by country - version 1.0.8

Post by warmweer »

mastnacek wrote:
Tue Jan 14, 2020 9:25 pm
phpbb_version_compare($config['version'], '3.2.0-a1', '>=') &&
Doesn't this result in phpBB 3.2.0 not being supported (since 3.2.0 < 3.2.0-a1)? (it looks illogical but in alphanumeric order 3.2.0 is smaller than3.2.0-a1).
We should embrace problems, without which there wouldn't be any solutions.
mastnacek
Registered User
Posts: 83
Joined: Thu Oct 25, 2018 6:43 am

Re: [BETA] Filter by country - version 1.0.8

Post by mastnacek »

warmweer: on that version does not metter. With 3.2.0-a1 installed, with 3.2.0 installed.

Premmision set but same error
Unable to create the MaxMind country codes database. This may be due to insufficient permissions or an invalid license key. The file permissions for the forum’s /store/phpbbservices folder should be set to publicly writeable (777 on Unix-based systems).
User avatar
MarkDHamill
Registered User
Posts: 4154
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [BETA] Filter by country - version 1.0.8

Post by MarkDHamill »

Did anyone test on 3.2 to see if it worked there?
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
MarkDHamill
Registered User
Posts: 4154
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [BETA] Filter by country - version 1.0.9

Post by MarkDHamill »

Sorry about the problem. In /core/common.php on lines 55-59 replace:

Code: Select all

		// If the license key is blank or not 16 characters, the database cannot be downloaded, so exit this function.
		if (strlen(trim($this->config['phpbbservices_filterbycountry_license_key'])) !== 16)
		{
			return false;
		}
with:

Code: Select all

		// If on the settings page, we return true, otherwise, the screen can't come up to enter a new or corrected license key.
		if (stripos($this->user->page['query_string'], 'mode=settings'))
		{
			return true;
		}
		else
		{
			// If the license key is blank or not 16 characters, the database cannot be downloaded, so exit this function.
			if (strlen(trim($this->config['phpbbservices_filterbycountry_license_key'])) !== 16)
			{
				return false;
			}
		}
This should allow you to enter a new license key.

I'll update the 1.0.9 archive with the correction.
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.
mastnacek
Registered User
Posts: 83
Joined: Thu Oct 25, 2018 6:43 am

Re: [BETA] Filter by country - version 1.0.8

Post by mastnacek »

Works. License succesfully generated and used.
User avatar
MarkDHamill
Registered User
Posts: 4154
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [BETA] Filter by country - version 1.0.8

Post by MarkDHamill »

One other thing. I was testing and neglect to revert some code. So in /event/main_listener.php lines 142-145 may be:

Code: Select all

		$test_mode = true;
		if ($test_mode)
		{
			$test_ips[] = '128.101.101.101';	// For testing, United States IP
If so it should be:

Code: Select all

		$test_mode = false;
		if ($test_mode)
		{
			//$test_ips[] = '128.101.101.101';	// For testing, United States IP
I'll update the archive.

The effect of not changing anything is to make all traffic counted by the extension use 128.101.101.101 for the IP.
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
MarkDHamill
Registered User
Posts: 4154
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [BETA] Filter by country - version 1.0.8

Post by MarkDHamill »

Version 1.0.9 is finally on GitHub:

https://github.com/MarkDHamill/filterby ... tree/1.0.9

A list of file changes since 1.0.8 can be seen here.

If you download it from GitHub, make sure to place it in a /ext/phpbbservices/filterbycountry directory.
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.
mastnacek
Registered User
Posts: 83
Joined: Thu Oct 25, 2018 6:43 am

Re: [BETA] Filter by country - version 1.0.8

Post by mastnacek »

works, but same problem with phpbb version.
User avatar
MarkDHamill
Registered User
Posts: 4154
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: [BETA] Filter by country - version 1.0.8

Post by MarkDHamill »

It hasn't been tested for phpBB 3.3 yet, so ext.php still constrains it to PHP 3.2.
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.
focp
Registered User
Posts: 40
Joined: Mon Feb 15, 2016 10:59 am

Re: [BETA] Filter by country - version 1.0.8

Post by focp »

MarkDHamill wrote:
Tue Jan 14, 2020 9:45 pm
Did anyone test on 3.2 to see if it worked there?
once i'd got a Maxmind licence key it worked fine on 3.2.9 :)
User avatar
MarkDHamill
Registered User
Posts: 4154
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

[3.3][RC] Filter by country - version 1.0.10 released

Post by MarkDHamill »

A version of the extension that supports phpBB 3.3 is released! See the first post for download links.

One other bug was noticed and fixed: double statistical entries were being made, so I had to reexamine and fix that logic. Otherwise, other than asserting that it works on 3.3, no other changes were made. It also works on 3.2.

A list of changes since version 1.0.9 can be seen here:

https://github.com/MarkDHamill/filterby ... 9...1.0.10

If downloaded from GitHub, select the 1.0.10 branch, download and expand it, disable the extension, remove its files, then upload the new files.

Upgrading extensions from phpBB 3.2 to 3.3 so far is much less hassle than from 3.1 to 3.2, thank goodness.
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
KlausiMaus
Registered User
Posts: 174
Joined: Sat Nov 15, 2014 4:55 pm

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

Post by KlausiMaus »

There is still

Code: Select all

  "version": "1.0.9-beta", 
in the composer.json
Klaus (http://forum.kuhnert.ch/) :: Keep it simple, stupid :!:
User avatar
MarkDHamill
Registered User
Posts: 4154
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 »

Thanks. I updated the archive. It is correct on GitHub.
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
KlausiMaus
Registered User
Posts: 174
Joined: Sat Nov 15, 2014 4:55 pm

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

Post by KlausiMaus »

I tried to update from 1.0.9 on an 3.3.0 board and get this message, when i try to activate the extension:
Information

To install this extension, the store directory must be writable (0777 Unix file permissions). The allow_url_fopen directive must be enabled. The following PHP extensions are required: curl, dom and Phar. This extension works with phpBB 3.2 only.
Does that mean it is not phpBB 3.3.0 compatible? I try to switch back.
Klaus (http://forum.kuhnert.ch/) :: Keep it simple, stupid :!:
Post Reply

Return to “Extensions in Development”