While using this module, I got an idea, that add rules support for this module.
We should only add rules condition,but this will give extra flexible for this module.
For example:
event => system init
condition => IP is XX(country)
action => redirect to specific page or set a welcome message etc
This will make thing more interesting.
meanwhile, I would like to request as co-maintainer to work on this feature. and I am sure this feature will make this module more welcome:)
Thank you for your attention.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2023471.patch | 2.74 KB | tr |
| #2 | ip2country-rules-support-2023471-2.patch.patch | 3.91 KB | jantoine |
| #1 | ip2country-rules_support-2023471-1.patch | 1.4 KB | zterry95 |
Comments
Comment #1
zterry95 commentedHere is the patch and it has actually used in one of our production site and works well.
Below is a rules example for explain the usage.
Attachment is the patch.
Comment #2
jantoine commentedI have attempted to make the following improvements to the patch in #1:
Comment #4
tr commentedI rewrote #2 to be more like I think it should be, and I also added a Rules action to Set the country.
I would appreciate it if someone could give this patch a test. I welcome any suggestions for additional rules integration, and it would be great if someone could post some useful examples for the documentation.
Comment #5
yurg commentedHi,
Thank you for patch: it works great for me so far. There is one issue remains, may be if it's Rules-specific though: redirect works everywhere but front page.
Comment #6
tr commentedCommitted. Thanks.