Extension:CookieWarning

The CookieWarning extension is a small and simple extension, that adds a way to show a small but "good visible" information banner to your wiki, which informs the user, that the wiki uses cookies to operate properly. The Pre-defined messages also includes a sentence, that the user, if he uses the wiki, agrees, that the wiki uses cookies.

This extension was merged with the former CookiePolicy extension, which provided a similar functionality and was originally written by Liz Lee for Wikia and further cleaned up and enhanced by Jack Phoenix for ShoutWiki.

Background
In some countries, it's requires by law (e.g. in the european union), that you, as a website operator, ask your users for permission to use cookies with your website. In the EU, some of your partners may require you to ask your users to use cookies (e.g. because you use Google AdSense, which requires this notice ). To make it easier for wiki administartors to implement these notices, I created this extension (primarily for use on droidwiki.de).

Configuration
After the successful installation of CookieWarning, you need to enable it with the configuration option, which you need to set to true in your "LocalSettings.php". If you have a page, where you explain how you and your partners use cookies in your wiki, you may want to link to this page. For this, you can add another configuration option,, which simply takes the URL of the page (full or relative, but relative may not work, if you use subpages in your wiki!). Alternatively you can set  to the URL of your site's privacy policy or similar page which explains about cookies.

Configuration parameters
There're some other configurations, that can help you to target the correct users with the cookie information bar. The the following table contains all possible options.

System messages
If you would like to change the text of the messages shown navigate to the following pages and adjust as required:
 * "MediaWiki:Cookiewarning-info"
 * "MediaWiki:Cookiewarning-moreinfo-label"
 * "MediaWiki:Cookiewarning-more-link"
 * "MediaWiki:Cookiewarning-ok-label"

Migrating from CookiePolicy extension
In October 2016, the CookiePolicy extension was merged into the CookieWarning extension, as both tried to solve the same problem. The following sections will give you the information, what you need to do to migrate CookiePolicy to CookieWarning.

MediaWiki:Cookie-policy-link
The  interface message will be observed by CookieWarning, too, so you can use your customization of the message shown to the user with CookieWarning, too. However, as this is just for backwards compatibility reasons, it's strongly recommended to change to the CookieWarning message, e.g. by moving the page on your wiki, or using the configuration option   to configure the target link.

JavaScript based geo-targeting
The logic to locate an user used in CookiePolicy was merged into CookieWarning. However you need to configure some things to enable it by setting the following options into your :

The  configuration option is named   in CookieWarning, you need to change it in your LocalSettings.php, if you use it.

It's too simple! I need help! (aka I found a bug, what should I do?)
You can always request help and report problems on the talk page or at Phabricator.