Privacy_XH - a CMSimple_XH Plugin

Privacy_XH helps to make a website conforming to the EU cookie law and other regulations regarding the privacy of visitors. It does so by emitting a form on every page with relevant information giving the visitor the possibility to explicitely opt in. After the visitor opted in, a respective cookie is set, and the message won't be shown again. In addition Privacy_XH facilitates to guard the execution of other code that sets cookies which might violate the privacy of users.

Please do read this documentation before you encounter any problems!

Important Notice

Privacy_XH couldn't be tested so far in various environments. It is a so called BETA version. Use with caution!

Requirements

Privacy_XH is a plugin for CMSimple_XH. It requires a UTF-8 encoded version.

Installation

The installation is done as with many other CMSimple_XH plugins. See the CMSimple_XH wiki for further details.

  1. Backup the data on your server.
  2. Unzip the distribution on your computer.
  3. Upload the whole directory privacy/ to your server into CMSimple_XH's plugins directory.
  4. Set write permissions to the subdirectories config/, css/ and languages/.
  5. Switch to "Privacy" in the back-end to check if all requirements are fulfilled.

Settings

The plugin's configuration is done as with many other CMSimple_XH plugins in the website's back-end. Select "Privacy" from "Plugins".

You can change the default settings of Privacy_XH in "Plugin Config". Hints for the options will be displayed when hovering over the help icons with your mouse.

Localization is done in "Plugin Language". You can translate the character strings to your own language, or customize them according to your needs.

The look of the Privacy_XH can be customized in "Plugin Stylesheet".

Usage

To activate the privacy form, add the following to your template in a prominent place:

<?php echo privacy();?>

You should adapt the message in "Plugin Language" according to your needs. To make extensive information available you should prepare a hidden CMSimple page with the privacy notice, and link to it from the message.

To avoid cookies being sent from other plugins or extensions before the user has opted in, you have to make some changes to the way these extensions are integrated. If the code is in the template, you can guard it from being executed before the visitor has opted in by encapsulating it the following way:

<?php if (isset($_COOKIE['privacy_agreed'])): ?>
<!-- code that requires opt in -->
<?php endif; ?>

If the code that has to be guarded is called from the content, instead of e.g. calling:

{{{PLUGIN:func(1, 2, 3, 4, 5);}}}

just call:

{{{PLUGIN:privacy_guard('func', 1, 2, 3, 4, 5);}}}

Note, that privacy_guard() accepts any number of arguments in addition to the function name

Which plugins and extensions have to be guarded depends on the jurisdiction of your country (or probably the country where the website is hosted; IANAL), and of course on which information these extensions are storing in the cookies. This should be documented in the plugin's or extension's manual; otherwise ask the vendor.

Please note that the privacy form is never shown when you're logged in as adminstrator.

License

Privacy_XH is licensed under GPLv3.

© 2012 Christoph M. Becker

Credits

Privacy_XH is inspired by oldnema, who pointed me to the EU cookie law, and the usefulness of such a plugin. Thank you!

The plugin icon is designed by Alexander Moore. Many thanks for publishing this icon under GPL.

This plugin uses free applications icons from Aha-Soft. Many thanks for making these icons freely available.

And last but not least many thanks to Peter Harteg, the "father" of CMSimple, and all developers of CMSimple_XH without whom this amazing CMS wouldn't exist.