# Message_XH - a CMSimple_XH Plugin

MESSAGE_XH helps to make content txt or picture banner above your website.

Please do read this documentation before you encounter any problems!

## Important Notice

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

back to top

## Requirements

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

back to top

## 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 message/ to your server into CMSimple_XH's plugins directory.
4. Set write permissions to the subdirectories config/, css/ and languages/.
5. Switch to "Message" in the back-end to check if all requirements are fulfilled.

back to top

## Settings

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

You can change the default settings of Message_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 Message_XH can be customized in "Plugin Stylesheet".

back to top

## Usage

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

    <?php echo message();?>

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 message 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['message_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:message_guard('func', 1, 2, 3, 4, 5);}}}

Note, that message_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 message form is never shown when you're logged in as adminstrator.

back to top

## License

Message_XH is licensed under GPLv3.

© 2012 Christoph M. Becker

back to top

## Credits

Message_XH is inspired by 3-magi.net. Thank you!

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

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.

back to top