Benjamin Pick
Forum Replies Created
-
Forum: Plugins
In reply to: [Geolocation IP Detection] Working with CachingIf these three options are possible or not depends on the caching system, not on Geolocation IP Detection.
However, you can also leave the caching system enabled and use AJAX mode, this is made for page caching scenarios (supposing the ajax request isn’t cached).
It is just a warning, not an error. Try out if the lookup works (e.g. under Tools) and if yes, you don’t need to worry about it.
Forum: Plugins
In reply to: [Geolocation IP Detection] Shortcode Showing Nothing1. Try this shortcode:
[geoip_detect2_user_info]
Is the IP correct?2. Try calling the site in the private mode of the browser. (Because AJAX mode caches the looked up data for 1 week by default, private mode looks it up again.)
Forum: Plugins
In reply to: [Geolocation IP Detection] Shortcode Showing NothingOk then the shortcode works, but probably it does not detect “CA” correctly.
Can you add this please:Detected country: [geoip_detect2 property=”country.isoCode”]
Forum: Plugins
In reply to: [Geolocation IP Detection] Shortcode Showing NothingAre there JS execution errors (check in the development console)? – If yes, please copy them here. If no:
In the HTML, do you find the class “js-geoip-detect-show-if” ? – If no, the shortcodes are not evaluated server-side.
If yes, change the shortcode to :[geoip_detect2_show_if country=”CA”] TEXT [else] ELSE [/geoip_detect2_show_if]
to check if the “else” condition is triggered.
Forum: Plugins
In reply to: [Geolocation IP Detection] Shortcode Showing NothingYou need to add the option “Resolve shortcodes via AJAX”
Are you using AJAX mode? I’m not sure what Esi does but AJAX mode is made for page caching plugins active.
Forum: Plugins
In reply to: [Geolocation IP Detection] Load JS in Head to avoid flash of hidden content?Yes you could create the body classes server-side, by removing ajax-mode and making content caching country-dependent? I’m not sure Cloudflare is able to do that.
For a test, can you disable ajax mode and check without caching?Forum: Plugins
In reply to: [Geolocation IP Detection] Load JS in Head to avoid flash of hidden content?Hm, good question. The problem is that regardless how much we optimize it, there can always be a timeframe between “HTML is received and rendered” and “CSS is received and rendered” – the length mainly depends on the speed of the connection, probably.
How about the strategy that AngularJS is using:
https://stackoverflow.com/questions/16074673/angularjs-strategy-to-prevent-flash-of-unstyled-content-for-a-classBasically – hiding everything at first, then showing only what needs to be shown. You can do this already by using the show_if shortcode instead of the CSS method:
[geoip_detect2_show_if country="US"] TEXT [/geoip_detect2_show_if]
[geoip_detect2_hide_if country="US"] TEXT [/geoip_detect2_hide_if]
Because in that case, the resulting html has already an attribute ‘style=”display: none!important”‘ by default.
Does this solve your problem?
Forum: Plugins
In reply to: [Geolocation IP Detection] Changing language and saving it in cookieI suggest instead of setting such a cookie, you can use the override function:
https://github.com/yellowtree/geoip-detect/wiki/API:-AJAX#storing-data-that-overrides-detected-data
Internally, this is also setting a cookie, but probably it will simplify your code (override means – whenever lookup is called, send the override instead of the visitor’s real location.)
Forum: Plugins
In reply to: [Geolocation IP Detection] Maxmind database not foundProbably that is the precision trial for free.
Which error do you see when you are on “automatic update” and click on “update now” ?
Forum: Plugins
In reply to: [Geolocation IP Detection] Maxmind database not foundFull *file* paths also work, e.g. /var/html/wordpress/wp-content/… – depending on your hosting environment.
However, it is better if you use “Automatic update” and enter your licence key details there – because the database should be updated regularly.
Forum: Plugins
In reply to: [Geolocation IP Detection] Redirect before page loadYou can use ‘init’ or ‘plugins_loaded’ instead of the ‘template_redirect’ filter to let this be run earlier – however, not all templating function such as is_home() might work correctly by that point (the main query is initialized later I think).
Forum: Plugins
In reply to: [Geolocation IP Detection] Redirect before page loadYes this is possible, you need to adapt this example to your needs:
https://github.com/yellowtree/geoip-detect/wiki/API-Usage-Examples#redirect-depending-on-country
Forum: Plugins
In reply to: [Double Opt-In Helper] Documentation of ConsentEmail delivery: That is true. However storing the DOI is not so much for proof that it was sent, but rather *what* was sent (so that it can be verified what was consented to at the time of consent).
As “proof” the timestamps of when DOI E-Mail was requested & when it was confirmed might be enough (there are different opinions about it on the web). Storing the IP address would be based on “this is necessary to proof who gave this consent” but arguably, accessing the DOI E-Mail should be proof enough.
I still think Flamingo would be the best place to store the sent DOI E-Mails (maybe as a seperate channel) & the 2 timestamps so that the date is readily available if needed (you could even export it via csv). On shared hosting you won’t be able to access the E-Mail logs.