diff --git a/CHANGELOG b/CHANGELOG
new file mode 100644
index 0000000..df11225
--- /dev/null
+++ b/CHANGELOG
@@ -0,0 +1,41 @@
+v0.8.1 - 22-04-2015 - Pierre Van Glabeke
+* modif url support
+* modif tpl (validation html5)
+
+v0.8 - 20-02-2015 - Pierre Van Glabeke
+* ajout barre d'édition dcLegacyEditor
+* correction tpl mustek disclaimer.html
+
+v0.7 - 16-01-2015 - Pierre Van Glabeke
+* compatibilité dc2.7
+* modification tpl pour html5 (currywurst et mustek)
+* modification localisation
+* modification fichier css
+
+v0.6.2 - 2013-11-14
+* Switch to Dotclear 2.6
+
+v0.6.1 - 2010-11-12
+* Fixed install on nightly build
+* Fixed some post fields
+
+v0.6 - 2010-06-05
+* Switched to DC 2.2
+
+v0.5 - 2009-12-13
+* Added LICENSE
+* Added versioning
+* Prepared DC 2.2 break
+
+v0.4.1 - 2009-11-12
+* Fixed ''header'' errors on public side
+
+v0.4 - 2009-09-23
+* Fixed DC 2.1.6 URL handlers ending
+
+v0.3 - 2009-09-15
+* Fixed search engine indexing
+* Added support of plugin dcAdvancedCleaner
+
+v0.2 - 2009-08-16
+* Fixed php 5.3 compatibility
diff --git a/LICENSE b/LICENSE
index 8cdb845..d511905 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,12 +1,12 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -56,7 +56,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
- GNU GENERAL PUBLIC LICENSE
+ GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
- END OF TERMS AND CONDITIONS
+ END OF TERMS AND CONDITIONS
- How to Apply These Terms to Your New Programs
+ How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@@ -290,8 +290,8 @@ to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
- {description}
- Copyright (C) {year} {fullname}
+
+ Copyright (C)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -329,7 +329,7 @@ necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
- {signature of Ty Coon}, 1 April 1989
+ , 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
@@ -337,4 +337,3 @@ proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
-
diff --git a/README.md b/README.md
index dee55e0..d3ffcbf 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,106 @@
-# disclaimer
-Ajoute un avertissement à l'entrée sur le blog
+# README
+
+## QU'EST CE QUE DISCLAIMER ?
+
+"disclaimer" est un plugin pour l'outil open source de
+publication web nommé Dotclear.
+
+Ce plugin permet d'ajouter un texte d'avertissement
+pour le visiteur avant son entrée sur le blog.
+
+Le code de ce plugin est largement inspiré du plugin
+"Private mode" d'Osku.
+
+## LICENCE
+
+This file is part of disclaimer, a plugin for Dotclear 2.
+Copyright (c) 2009 JC Denis and contributors
+jcdenis@gdwd.com
+Licensed under the GPL version 2.0 license.
+A copy of this license is available at
+http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+
+Some icons from Silk icon set 1.3 by Mark James at:
+http://www.famfamfam.com/lab/icons/silk/
+under a Creative Commons Attribution 2.5 License at
+http://creativecommons.org/licenses/by/2.5/
+
+## SUPPORT
+
+http://forum.dotclear.net
+
+### Note
+
+Certains thèmes ne sont pas compatibles avec ce plugin.
+
+## USAGE
+
+### Paramètres
+
+La configuration du plugin est situé dans
+la rubrique "Disclaimer" de la page des paramètres du blog.
+
+#### Activer le plugin
+
+Permet d'activer ou non la page d'avertissement.
+
+#### Se souvenir de l'utilisateur
+
+Permet d'envoyer un cookie au visiteur pour qu'il n'ait pas
+à revalider l'avertissement lors d'une visite ultérieure.
+
+#### Titre
+
+C'est le titre principale de la page d'avertissement.
+
+#### Lien de sortie
+
+Lien vers lequel sera renvoyé le visiteur s'il refuse les termes.
+
+#### Avertissement
+
+Texte principal de la page d'avertissement, cette page accepte le code html.
+(sauf si l'attribut encode_html est actif dans les templates)
+
+#### Liste des robots autorisés à indexer les pages du site
+
+Liste des robots d'indexation séparés par un point-virgule.
+Cela permet au robot utilisant ce user-agent de ne pas être bloqué par
+le disclaimer.
+
+#### Désactiver l'autorisation d'indexation par les moteurs de recherches
+
+Permet de désactiver la fonction de recherche de user-agent et de rediriger
+tous les user-agent vers le disclaimer.
+
+### Templates
+
+Le fichier de template par default pour la page d'avertissement
+se situe dans le repertoire "/default-template/mustek/disclaimer.html" ou
+"/default-template/currywurst/disclaimer.html" du plugin.
+
+Il faut le copier dans le repertoire /tpl du thème pour le modifier.
+
+
+### Balises
+
+Le plugin ajoute les balises de template suivantes :
+
+#### DisclaimerTitle
+
+Titre de l'avertissement.
+
+#### DisclaimerText
+
+Texte de l'avertissement.
+
+#### DisclaimerFormURL
+
+A mettre dans l'attribut "action" de la balise "form".
+
+Ces balises supportent les attributs communs.
+
+
+---
+Cordialement et en français dans le texte,
+Jean-Christian Denis
\ No newline at end of file
diff --git a/_admin.php b/_admin.php
new file mode 100644
index 0000000..4732a34
--- /dev/null
+++ b/_admin.php
@@ -0,0 +1,207 @@
+addBehavior(
+ 'adminBeforeBlogSettingsUpdate',
+ array('adminDisclaimer', 'adminBeforeBlogSettingsUpdate')
+);
+$core->addBehavior(
+ 'adminBlogPreferencesHeaders',
+ array('adminDisclaimer', 'adminDisclaimerHeaders')
+);
+$core->addBehavior(
+ 'adminBlogPreferencesForm',
+ array('adminDisclaimer', 'adminBlogPreferencesForm')
+);
+
+/**
+ * @ingroup DC_PLUGIN_DISCLAIMER
+ * @brief Public disclaimer - Admin methods.
+ * @since 2.6
+ */
+class adminDisclaimer
+{
+
+ /**
+ * Save settings
+ *
+ * @param dcSettings $blog_settings dcSettings instance
+ */
+ public static function adminBeforeBlogSettingsUpdate(dcSettings $blog_settings)
+ {
+ $blog_settings->addNamespace('disclaimer');
+ $s = $blog_settings->disclaimer;
+ try {
+ $disclaimer_active =
+ isset($_POST['disclaimer_active']);
+ $disclaimer_remember =
+ isset($_POST['disclaimer_remember']);
+ $disclaimer_redir =
+ isset($_POST['disclaimer_redir']) ?
+ $_POST['disclaimer_redir'] : '';
+ $disclaimer_title =
+ isset($_POST['disclaimer_title']) ?
+ $_POST['disclaimer_title'] : '';
+ $disclaimer_text =
+ isset($_POST['disclaimer_text']) ?
+ $_POST['disclaimer_text'] : '';
+ $disclaimer_bots_unactive =
+ isset($_POST['disclaimer_bots_unactive']);
+ $disclaimer_bots_agents =
+ isset($_POST['disclaimer_bots_agents']) ?
+ $_POST['disclaimer_bots_agents'] : '';
+
+ $s->put('disclaimer_active', $disclaimer_active);
+ $s->put('disclaimer_remember', $disclaimer_remember);
+ $s->put('disclaimer_redir', $disclaimer_redir);
+ $s->put('disclaimer_title', $disclaimer_title);
+ $s->put('disclaimer_text', $disclaimer_text);
+ $s->put('disclaimer_bots_unactive', $disclaimer_bots_unactive);
+ $s->put('disclaimer_bots_agents', $disclaimer_bots_agents);
+ }
+ catch (Exception $e) {
+ $s->drop('disclaimer_active');
+ $s->put('disclaimer_active', 0);
+ }
+ }
+
+ public static function adminDisclaimerHeaders()
+{
+ global $core;
+
+ $post_format = $core->auth->getOption('post_format');
+ $post_editor = $core->auth->getOption('editor');
+
+ $admin_post_behavior = '';
+ if ($post_editor && !empty($post_editor[$post_format])) {
+ $admin_post_behavior = $core->callBehavior('adminPostEditor', $post_editor[$post_format],
+ 'disclaimer_text', array('#disclaimer_text')
+ );
+ }
+
+ return
+ dcPage::jsToolBar().
+ $admin_post_behavior.
+ dcPage::jsConfirmClose('opts-forms').
+ dcPage::jsLoad('index.php?pf=disclaimer/js/config.js');
+}
+ /**
+ * Form
+ *
+ * @param dcCore $core dcCore instance
+ * @param dcSettings $blog_settings dcSettings instance
+ */
+ public static function adminBlogPreferencesForm(dcCore $core, dcSettings $blog_settings)
+ {
+ $blog_settings->addNamespace('disclaimer');
+ $s = $blog_settings->disclaimer;
+ $disclaimer_active = (boolean) $s->disclaimer_active;
+ $disclaimer_remember = (boolean) $s->disclaimer_remember;
+ $disclaimer_redir = (string) $s->disclaimer_redir;
+ $disclaimer_title = (string) $s->disclaimer_title;
+ $disclaimer_text = (string) $s->disclaimer_text;
+ $disclaimer_bots_unactive = (boolean) $s->disclaimer_bots_unactive;
+ $disclaimer_bots_agents = $s->disclaimer_bots_agents;
+ if (!$disclaimer_bots_agents) {
+ $disclaimer_bots_agents =
+ 'bot;Scooter;Slurp;Voila;WiseNut;Fast;Index;Teoma;'.
+ 'Mirago;search;find;loader;archive;Spider;Crawler';
+ }
+
+ echo
+ '
+
+
\ No newline at end of file
diff --git a/js/config.js b/js/config.js
new file mode 100644
index 0000000..4261c95
--- /dev/null
+++ b/js/config.js
@@ -0,0 +1,6 @@
+$(function() {
+ if ($.isFunction(jsToolBar)) {
+ var tbUser = new jsToolBar(document.getElementById('disclaimer_text'));
+ tbUser.draw('xhtml');
+ }
+});
\ No newline at end of file
diff --git a/locales/fr/main.po b/locales/fr/main.po
new file mode 100644
index 0000000..7e376d6
--- /dev/null
+++ b/locales/fr/main.po
@@ -0,0 +1,69 @@
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: disclaimer 0.6.2\n"
+"POT-Creation-Date: \n"
+"PO-Revision-Date: 2013-11-14T16:46:36+00:00\n"
+"Last-Translator: Jean-Christian Denis\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "disclaimer"
+msgstr "disclaimer"
+
+#: _admin.php:102
+#: _public.php:27
+#: disclaimer.html:9
+#: disclaimer.html:15
+msgid "Disclaimer"
+msgstr "Disclaimer"
+
+#: _admin.php:112
+msgid "Enable disclaimer"
+msgstr "Activer l'avertissement"
+
+#: _admin.php:133
+msgid "Remember the visitor"
+msgstr "Se souvenir du visiteur"
+
+#: _admin.php:136
+msgid "Link output:"
+msgstr "Lien de sortie :"
+
+msgid "Leave blank to redirect to the site Dotclear"
+msgstr "Laisser vide pour rediriger vers le site de Dotclear"
+
+#: _admin.php:148
+msgid "Disclaimer:"
+msgstr "Avertissement :"
+
+#: _admin.php:158
+msgid "List of robots allowed to index the site pages (separated by semicolons):"
+msgstr "Liste des robots autorisés à indexer les pages du site (séparés par un point virgule) :"
+
+#: _admin.php:173
+msgid "Disable the authorization of indexing by search engines"
+msgstr "Désactiver l'autorisation d'indexation par les moteurs de recherches"
+
+#: _public.php:28
+#: disclaimer.html:43
+msgid "Accept terms of uses"
+msgstr "Accepter les conditions d'utilisation"
+
+#: _public.php:29
+#: disclaimer.html:46
+msgid "I agree"
+msgstr "J'accepte"
+
+#: _public.php:30
+#: disclaimer.html:47
+msgid "I disagree"
+msgstr "Je refuse"
+
+msgid "Add a disclaimer to your blog entrance"
+msgstr "Ajoute un avertissement à l'entrée sur le blog"
+
+msgid "