Cookie Consent Plugin 

Version: 1.0 · Author: Jan van der Mars
Compatible: CMSimple_XH 1.7+ · PHP 7.4–8.3

Overview

The Cookie Consent Plugin adds a modern, responsive cookie banner and preferences modal to your CMSimple_XH website. It lets visitors manage consent for functional, statistical and marketing cookies and stores preferences locally using localStorage, so the plugin itself does not set third-party cookies.

Features

  • Modern, mobile-friendly cookie banner with smooth animations
  • Configurable texts, colors and button placement
  • No external cookies — consent stored in localStorage
  • Optional blocking of Leaflet maps until consent is given
  • Simple integration into CMSimple_XH templates
  • Admin interface for configuration and help pages included
  • Includes Dutch language support (languages/nl.php)

Installation

Copy the plugin folder into your CMSimple_XH /plugins/ directory and activate it in the plugin manager.

Required plugin structure:
/plugins/
└── cookie-consent/
    ├── index.php
    ├── pluginloader.php
    ├── admin.php
    ├── config/config.php
    ├── languages/nl.php
    └── help/
        ├── help.htm
        └── info.htm
        

Add the following to your template (where you want the cookie button / modal code rendered):

<?php
if (function_exists('render_cookie_consent')) {
    echo render_cookie_consent();
}
?>

Tip:
most settings can be changed in Plugins → Cookie Consent → Configuratie, or directly in /plugins/cookie-consent/config/config.php.

Configuration options (high level)

  • button_text — label for the cookie settings button (e.g. “🍪 Cookie-instellingen”)
  • button_color, button_text_color — styling for the button
  • banner_text — main banner message
  • enable_leaflet_block — whether Leaflet maps are blocked until consent
  • default_marketing, default_analytics — default consent states

Notes & Extras

All user preferences are saved locally in the browser (no server-side DB required). The plugin provides help files (help/help.htm and help/info.htm) and includes an icon (icon.png). If you need multilingual support beyond Dutch, add additional language files into the languages/ folder following the existing format.

Keyword list: Cookie Consent Plugin, If, no