Hi there,
Has anyone had any success adding a cookie opt-in button to a Modx site?
I have a client that is insisting that we comply with the EU cookie law.
Any advice would be greatly appreciated.
Thanks!
-
☆ A M B ☆
- 24,524 Posts
It's just a matter of setting a cookie, you can do that easily enough in MODX.
This may be of help
https://www.markhamstra.com/modx/2012/08/this-site-uses-cookies-and-they-taste-great/
Hi, yes I had a look at that but it links to a widget that you have to pay for.
Here is a nice free one I've found, which creates a cookie called controlCookies with the states no and yes, all you have to do is modify to the code which sets the cookies on your site.
I think the only cookie that modx is setting is PHPSESSID, can someone tell me where this is being set please?
Thanks
-
☆ A M B ☆
- 24,524 Posts
-
☆ A M B ☆
- 24,524 Posts
MODX sets the session cookie in the modx class, in PHP code. Line 245 of core/model/modx/modx.class.php, in the function _initSession(). I would not advise meddling with that code - the function is protected for a reason. For one thing, any changes you make would be lost during an upgrade.
What exactly needs to be changed? You may be able to just modify some of the System Settings that configure the cookie settings. See the Session and Cookie area of the System Settings.
maybe use these. i have used cookiecuttr.com for a site which worked fine.
https://github.com/cfenollosa/eu-cookie-law
http://cookiecuttr.com/
Evolution user, I like the back-end speed and simplicity
