Search found 3289 matches

by MarkDHamill
Mon Jul 06, 2020 4:43 pm
Forum: Extensions in Development
Topic: [3.3][RC] Filter by country - version 1.0.16
Replies: 359
Views: 33133

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

Installed 1.0.15 Only lay-out looks strange to me? Screenshot_2020-07-06 Filter by country.png Odd my editor didn't pick that up. In /adm/style/acp_filterbycountry_body.html after line 58: <dd><input type="number" id="phpbbservices_filterbycountry_seconds" name="phpbbservices_filterbycountry_second...
by MarkDHamill
Mon Jul 06, 2020 2:23 pm
Forum: Extensions in Development
Topic: [3.3][RC] Filter by country - version 1.0.16
Replies: 359
Views: 33133

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

Version 1.0.15 is released. See the first post for download links. Since the last version was 1.0.13, you might be wondering why this is 1.0.15. I committed 1.0.14 and realized I left out a few things, so I added them. Changes from version 1.0.13: As requested, you can now see in the statistics thos...
by MarkDHamill
Sun Jul 05, 2020 3:48 pm
Forum: Extensions in Development
Topic: [3.3][RC] Filter by country - version 1.0.16
Replies: 359
Views: 33133

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

Thanks for your testing. It seems to happen sporadically when access is allowed, not when it is rejected. But it seems kind of random.
by MarkDHamill
Sun Jul 05, 2020 3:23 pm
Forum: Extensions in Development
Topic: [3.3][RC] Filter by country - version 1.0.16
Replies: 359
Views: 33133

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

I have noticed in my testing that what can often happen is that two entries in the phpbb_fbc_stats table can occur for the same country a second apart. I still don't understand why the core.user_setup_after event seems to be called more than once when accessing a page. I tie into the event to prohib...
by MarkDHamill
Sun Jul 05, 2020 1:51 pm
Forum: Extension Writers Discussion
Topic: core.user_setup_after event
Replies: 8
Views: 473

Re: core.user_setup_after event

I am unfamiliar with event priorities. Can you point me to a reference?
by MarkDHamill
Sun Jul 05, 2020 1:26 pm
Forum: Extension Writers Discussion
Topic: core.user_setup_after event
Replies: 8
Views: 473

Re: core.user_setup_after event

I notice when this happens two rows are stored in the database with one second of difference between the Unix timestamps. So one approach would be to not store these statistics in this condition. However, it is possible that two separate requests from the same country would come a second apart, resu...
by MarkDHamill
Sun Jul 05, 2020 12:40 pm
Forum: Extension Writers Discussion
Topic: core.user_setup_after event
Replies: 8
Views: 473

Re: core.user_setup_after event

Thanks. That doesn't appear to be the solution because either it lets any traffic through or often records double statistics.

I wonder if I am using the wrong event or the wrong approach. I could, for example, set a session cookie and test for its presence, but it's possible cookies won't be enabled.
by MarkDHamill
Sun Jul 05, 2020 12:18 pm
Forum: Extensions in Development
Topic: [3.3][RC] Filter by country - version 1.0.16
Replies: 359
Views: 33133

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

Of course I am working on a new version. The statistics seem high to me too which is why I opened this topic in the extension writer's forum: https://www.phpbb.com/community/viewtopic.php?f=461&t=2558671 The solution to the debug message is documented here: https://www.phpbb.com/community/viewtopic....
by MarkDHamill
Sat Jul 04, 2020 9:31 pm
Forum: Extension Writers Discussion
Topic: core.user_setup_after event
Replies: 8
Views: 473

core.user_setup_after event

While working on my filter by country extension, I notice that when in the ACP and I go to the index, sometimes this event seems to be called twice, and sometimes once, but usually twice. Basically I use the event to stop any traffic coming from an unapproved country. I don't understand why this is ...
by MarkDHamill
Fri Jul 03, 2020 12:17 pm
Forum: Extensions in Development
Topic: [3.3][RC] Filter by country - version 1.0.16
Replies: 359
Views: 33133

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

Statistics can be cleared by disabling statistics and then reenabling them. Could be easier, however.
by MarkDHamill
Thu Jul 02, 2020 9:27 pm
Forum: Extensions in Development
Topic: [3.3][RC] Filter by country - version 1.0.16
Replies: 359
Views: 33133

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

Thanks for your testing and I must say those are impressive statistics that you are collecting. I gather there are no issues like those recently reported and you made the recent bug fixes. In earlier testing we figured out that VPN IPs were assigned to countries. Originally I assumed they would be c...
by MarkDHamill
Thu Jul 02, 2020 3:47 pm
Forum: Extensions in Development
Topic: [3.3][RC] Filter by country - version 1.0.16
Replies: 359
Views: 33133

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

janus_zonstraal wrote:
Thu Jul 02, 2020 2:00 pm
Now I see (sometimes) this warning

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/ext/phpbbservices/filterbycountry/event/main_listener.php on line 364: count(): Parameter must be an array or an object that implements Countable
This is line 364
if (count($insert_sql_ary) > 0)
See this post.
by MarkDHamill
Thu Jul 02, 2020 1:02 pm
Forum: Extensions in Development
Topic: [3.3][RC] Filter by country - version 1.0.16
Replies: 359
Views: 33133

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

Thank you. This is an important bug to fix I never saw before. It never occurred to me that multiple HTTP headers would have the same IP address, which is what I think happened. In the last version this would not have shown the issue because INSERT statements were made one at a time and I was direct...
by MarkDHamill
Wed Jul 01, 2020 3:37 pm
Forum: Extensions in Development
Topic: [3.3][RC] Filter by country - version 1.0.16
Replies: 359
Views: 33133

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

Thanks for the bug report. I'm guessing there are multiple HTTP headers with the same IP in it. You can try these changes to main_listener.php : After line 287: $now = time(); add: $used_countries = array(); After line 294: $country_code = $user_ip['country_code']; add: if (in_array($country_code, $...
by MarkDHamill
Wed Jul 01, 2020 3:00 pm
Forum: Extensions in Development
Topic: [3.3][RC] Filter by country - version 1.0.16
Replies: 359
Views: 33133

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

Please disable the extension while I look into it. The code is supposed to prevent this from happening, but clearly isn't.

Go to advanced search