Cookie Consent in ↓markdown↓ CMS
There are plenty of countries where the law requires a website to inform the visitor that web cookies are being used. The visitor can then decide whether or not to use the cookie enabled website. ↓markdown↓® CMS (md-CMS) supports informing visitors about cookies using Osano's open source Cookie Consent Manager, originally provided by Silktide.
What is a web cookie?
Most commercial and popular websites will use some form of web cookie. What is a web cookie? A web cookie is a temporary data store used by a website or a web page. It stores data that helps provided enchanced functionality to the visitor. Normally the data stored relates to the visitor and to the webpage or website itself. The popular browsers try to ensure that cookies do not present a problem to your computer or device. Good websites only store the minimum about of information required to provide full website functionality and ease future revisits. The bad websites put to much information in a cookie and over use them. The popular browsers allow cookies to be cleared through their settings options.
Web sites that display advertisements, as Tek Eye does to cover hosting costs, will usually be using cookies. The web advertisment cookies are used to determine sites visited, the content on those sites and any advertisements that are clicked. This allows the advertisers to display adverts that they think you are more likely to click on.
Cookie Consent in ↓markdown↓ CMS
In a md-CMS website the using cookies message is disabled by default. No cookies are generated by the md-CMS code. If code is added that can generate cookies, e.g. adverts, then a cookie message can be enabled. The message is only shown to a visitor once. To view different cookie message configurations see the Osano's Cookie Consent download webpage and select start coding to change the options.
In md-CMS the default cookie message code is stored in
md_cookie.txt in the
md directory in the installed location (usually the root public folder on the web server). To change the message, information link and colors go to Osano's Cookie Consent download webpage, click the start coding button and alter the various options. Copy the new code and replace the code in
md-cookie.txt with the changed code. Most website hosting providers can support editing the md-cookie.txt file through the control panel for your website. Here's how the message looks for this website:
Enable or Disable the Cookie Consent Message
To enable the display of the cookie consent message in md-CMS comment out the line with
NO_COOKIE_MESSAGE in the settings file
site-config.php. The settings file is created in the root install directory at installation (see configuring the Website Home Page for ↓markdown↓ CMS). To comment out the line add two slashes before the
//"NO_COOKIE_MESSAGE" => "", and save the file. This removes NO_COOKIE_MESSAGE from the settings array, which turns on the Osano Cookie Consent code.
To stop the cookie message do the reverse. Uncomment (delete the two slashes before) the entry
- Another useful read is the article The Ultimate Guide to Cookies by WhoIsHostingThis?
- For other articles on using ↓markdown↓ CMS see the post Build a Website from Scratch with ↓markdown↓ CMS.
- Osano's Cookie Consent on GitHub
Author:Daniel S. Fowler Published: Updated: