Search found 3017 matches

by MarkDHamill
Sun Jun 23, 2019 1:33 pm
Forum: Extension Writers Discussion
Topic: Best event for blocking traffic and double logging
Replies: 0
Views: 259

Best event for blocking traffic and double logging

Working on a filter by country extension and it seems to be working correctly. I have a few issues and concerns. I am using the core.user_setup_after event for blocking traffic. That's where I check the IP and if it is not associated with allowed countries. I use trigger_error to block traffic: // N...
by MarkDHamill
Fri Jun 21, 2019 10:07 pm
Forum: Extension Writers Discussion
Topic: event folder
Replies: 19
Views: 740

Re: event folder

That's essentially what I did. The only problem is that if a template is copied from the base style like prosilver, the base template may have changes made to it over time. The only way to catch those changes is to periodically look at the template comparing it with previous versions and apply them ...
by MarkDHamill
Fri Jun 21, 2019 1:19 am
Forum: Extension Writers Discussion
Topic: event folder
Replies: 19
Views: 740

Re: event folder

I was hoping to avoid hard coding in a template itself because upgrades will overwrite them. Thanks for your insight.
by MarkDHamill
Fri Jun 21, 2019 1:06 am
Forum: Extension Writers Discussion
Topic: event folder
Replies: 19
Views: 740

Re: event folder

It's not in the extension. It's in the main file system, ex /styles/prosilver/template/event.
by MarkDHamill
Fri Jun 21, 2019 12:54 am
Forum: Extension Writers Discussion
Topic: event folder
Replies: 19
Views: 740

Re: event folder

Stuff like this works in my extension too. I assumed the logic would work outside of an extension for minor customizations for clients. Perhaps not?
by MarkDHamill
Fri Jun 21, 2019 12:25 am
Forum: Extension Writers Discussion
Topic: event folder
Replies: 19
Views: 740

event folder

Am I understanding this wrong? This is not part of an extension, just some work I am doing for a client. I am trying to add some text before the username field on the registration form. In the template, I see an event: <!-- EVENT ucp_register_credentials_before --> So I create an event folder /style...
by MarkDHamill
Tue Jun 18, 2019 1:50 am
Forum: Extensions in Development
Topic: [BETA] Filter by country - version 1.0.3
Replies: 77
Views: 3273

Re: [BETA] Filter by country - version 1.0.2

Awesome suggestions and testing everyone! I'll incorporate these soon (in the middle of a big job at the moment).
by MarkDHamill
Mon Jun 17, 2019 5:43 pm
Forum: Extensions in Development
Topic: [BETA] Filter by country - version 1.0.3
Replies: 77
Views: 3273

Re: [BETA] Filter by country - version 1.0.2

We don't know if these solutions will work. That will take time.
by MarkDHamill
Mon Jun 17, 2019 4:30 pm
Forum: Extensions in Development
Topic: [BETA] Filter by country - version 1.0.3
Replies: 77
Views: 3273

Re: [BETA] Filter by country - version 1.0.2

These are excellent ideas. Maybe using a function like htmlspecialchars() is all I need when loading the $countries array. If not, using the array approach sounds promising.
by MarkDHamill
Mon Jun 17, 2019 4:03 pm
Forum: Extensions in Development
Topic: [BETA] Filter by country - version 1.0.3
Replies: 77
Views: 3273

Re: [BETA] Filter by country - version 1.0.2

I haven't changed any defaults in phpStorm. I would think it would default to UTF-8 encoding.
by MarkDHamill
Mon Jun 17, 2019 3:41 pm
Forum: Extensions in Development
Topic: [BETA] Filter by country - version 1.0.3
Replies: 77
Views: 3273

Re: [BETA] Filter by country - version 1.0.2

I could apply the change to my GitHub master if you publish it. When I copy and paste it I see the error you described. The question is what's causing it? The page asserts UTF-8 content: <meta charset="utf-8"> This data comes from your language file. I use phpStorm for my editor. I can choose any en...
by MarkDHamill
Mon Jun 17, 2019 3:23 pm
Forum: Extensions in Development
Topic: [BETA] Filter by country - version 1.0.3
Replies: 77
Views: 3273

Re: [BETA] Filter by country - version 1.0.2

In your language file, I see: https://github.com/Solidjeuh/filterbycountry/blob/master/phpbbservices/filterbycountry/language/nl/common.php for Belgium: <option value="BE">Belgie</option> but I do see it for Ukraine: <option value="UA">Oekraïne</option> I installed the Dutch language pack. On the st...
by MarkDHamill
Mon Jun 17, 2019 12:06 pm
Forum: Extensions in Development
Topic: [BETA] Filter by country - version 1.0.3
Replies: 77
Views: 3273

Re: [BETA] Filter by country - version 1.0.2

This is a good analysis. It may be that I am not using the right event. I doubt it hurts to recheck, as I am sure the call to MaxMind's database is quick. If the IP is not in the database, I believe you get an automatic refresh in the form of a page with the error message. A lot of it may be that.
by MarkDHamill
Mon Jun 17, 2019 1:22 am
Forum: Extensions in Development
Topic: [BETA] Filter by country - version 1.0.3
Replies: 77
Views: 3273

Re: [BETA] Filter by country - version 1.0.2

The statistics can be erased by turning them off. I think there may be some double counting going on, page refreshes or something similar. The details are in the phpbb_fbc_stats table if you want to look at them. This table does not collect the IP address, but if you have logging turned on these wil...
by MarkDHamill
Sun Jun 16, 2019 9:33 pm
Forum: Extensions in Development
Topic: [BETA] Filter by country - version 1.0.3
Replies: 77
Views: 3273

[BETA] Filter by country - version 1.0.2 released

A new beta version is out. Some changes of note: The settings page looks a bit different. In particular, a setting has been renamed "Allow VPN services" because it more accurately describes what happens if an IP is not found in the MaxMind database ... it is most likely access from a VPN. MaxMind se...

Go to advanced search