Extension:CookieWarning
CookieWarning État de la version : stable |
|
---|---|
Implémentation | Interface utilisateur |
Description | Ajoute un avis en haut de la page, qui informe l'utilisateur, que ce wiki utilise des cookies pour fonctionner. |
Auteur(s) | |
Dernière version | 0.3.0 (février 2021) |
MediaWiki | 1.35+ |
PHP | 7.1+ |
Licence | Licence MIT |
Téléchargement | |
|
|
Téléchargements trimestriels | 61 (Ranked 76th) |
Utilisé par les wikis publics | 985 (Ranked 258th) |
Traduire l’extension CookieWarning sur translatewiki.net si elle y est disponible | |
Problèmes | Tâches ouvertes · Signaler un bogue |
L'extension CookieWarning est une petite extension simple qui ajoute une bannière d'information petite mais bien visible à votre wiki, qui informe les utilisateurs que le wiki utilise des cookies pour fonctionner correctement. Le message par défaut comprend également une phrase indiquant que l'utilisateur, s'il continue à utiliser le wiki, accepte l'utilisation des cookies par le wiki.
Contexte
In some countries, it is required 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[1]). To make it easier for wiki administrators to implement these notices, this extension was created (by Florianschmidtwelzow, primarily for use on droidwiki.de).
Historique
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 .
Installation
- Téléchargez et placez le(s) fichier(s) dans un répertoire appelé
CookieWarning
dans votre dossierextensions/
.
Les développeurs et les contributeurs au code doivent à la place installer l'extension à partir de Git en utilisant:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning - Ajoutez le code suivant à la fin de votre fichier LocalSettings.php :
wfLoadExtension( 'CookieWarning' );
- Fait – Accédez à Special:Version sur votre wiki pour vérifier que l'extension a bien été installée.
Configuration
After the successful installation of CookieWarning, you need to enable it with the configuration option $wgCookieWarningEnabled
, which you need to set to true
in your LocalSettings.php
.
If you have a page explaining 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, $wgCookieWarningMoreUrl
, 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 [[MediaWiki:Cookiewarning-more-link]]
to the URL of your site's privacy policy or similar page which explains about cookies.
Paramètres de configuration
Il existe d'autres configurations qui peuvent vous aider à cibler les bons utilisateurs avec la barre d'informations sur les cookies. Le tableau suivant contient toutes les options possibles. The following table contains all possible options.
Configuration | Default value | Description |
---|---|---|
$wgCookieWarningEnabled
|
false
|
You have to set this variable to true to make the extension work.
|
$wgCookieWarningMoreUrl
|
''
|
Set the URL to your 'More Information' page. |
$wgCookieWarningGeoIPServiceURL
|
''
|
An IP location service takes the visitor's IP address and returns a JSON string that complies with the freegeoip.net schema (example). CAUTION: If the geo-targeting is enabled, the IP address of your users will be directly (NOT anonymized!) sent to the service configured in this option, which may be a problem in some countries or jurisdictions. |
$wgCookieWarningGeoIPLookup
|
'none'
|
When and how do you want the wiki to try locating the user? Possible values:
|
$wgCookieWarningForCountryCodes
|
{
"EU": "Europe",
"AD": "Andorra",
"AL": "Albania",
"AT": "Austria",
"BA": "Bosnia and Herzegovina",
"BE": "Belgium",
"BG": "Bulgaria",
"BY": "Belarus",
"CH": "Switzerland",
"CS": "Serbia and Montenegro",
"CZ": "Czech Republic",
"DE": "Germany",
"DK": "Denmark",
"EE": "Estonia",
"ES": "Spain",
"FI": "Finland",
"FO": "Faroe Islands",
"FR": "France",
"FX": "France, Metropolitan",
"GB": "United Kingdom",
"GI": "Gibraltar",
"GR": "Greece",
"HR": "Croatia",
"HU": "Hungary",
"IE": "Ireland",
"IS": "Iceland",
"IT": "Italy",
"LI": "Liechtenstein",
"LT": "Lithuania",
"LU": "Luxembourg",
"LV": "Latvia",
"MC": "Monaco",
"MD": "Moldova, Republic of",
"MK": "Macedonia",
"MT": "Malta",
"NL": "Netherlands",
"NO": "Norway",
"PL": "Poland",
"PT": "Portugal",
"RO": "Romania",
"SE": "Sweden",
"SI": "Slovenia",
"SJ": "Svalbard and Jan Mayen",
"SK": "Slovakia",
"SM": "San Marino",
"UA": "Ukraine",
"VA": "Holy See (Vatican City State)"
}
|
The list of regions in which users should see the cookie notification bar. |
Messages système
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"
Migration depuis l'extension CookiePolicy
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 on what you need to do to migrate CookiePolicy to CookieWarning.
[[MediaWiki:Cookie-policy-link]]
The [[MediaWiki:Cookie-policy-link]]
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 backward compatibility reasons, it is strongly recommended to change to the message [[MediaWiki:Cookiewarning-more-link]]
, e.g., by moving the page on your wiki, or using the configuration option $wgCookieWarningMoreUrl
to configure the target link.
Ciblage géographique basé sur JavaScript
La logique pour localiser un utilisateur utilisée dans CookiePolicy a été fusionnée dans CookieWarning.
Cependant, vous devez configurer certaines choses pour l'activer en définissant les options suivantes dans votre LocalSettings.php
:
$wgCookieWarningEnabled = true;
$wgCookieWarningGeoIPLookup = 'js';
$wgCookiePolicyGeoIPServiceURL
The $wgCookiePolicyGeoIPServiceURL
configuration option is named $wgCookieWarningGeoIPServiceURL
in CookieWarning, you need to change it in your LocalSettings.php, if you use it.
See also
- Extension:CookieConsent - Provides a more intrusive but GDPR-compliant warning
Références
Cette extension est incluse dans les fermes de wikis ou les hôtes suivants et / ou les paquets : Cette liste ne fait pas autorité. Certaines fermes de wikis ou hôtes et / ou paquets peuvent contenir cette extension même s'ils ne sont pas listés ici. Vérifiez toujours cela avec votre ferme de wikis ou votre hôte ou votre paquet avant de confirmer. |