Dotclear

Changeset 3292


Ignore:
Timestamp:
02/12/14 13:59:37 (9 years ago)
Author:
brol
Message:

v0.4.5

Location:
plugins/emailOptionnel
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • plugins/emailOptionnel/_admin.php

    r3284 r3292  
    1 <?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ 
    2 /***************************************************************\ 
    3  *  This is 'Email Optionnel', a plugin for DotClear.          * 
    4  *                                                             * 
    5  *  Copyright (c) 2007                                         * 
    6  *  Oleksandr Syenchuk                                         * 
    7  *                                                             * 
    8  *  This is an open source software, distributed under the GNU * 
    9  *  General Public License (version 2) terms and  conditions.  * 
    10  *                                                             * 
    11  *  You should have received a copy of the GNU General Public  * 
    12  *  License along with 'Email Optionnel' (see COPYING.txt);    * 
    13  *  if not, write to the Free Software Foundation, Inc.,       * 
    14  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    * 
    15 \***************************************************************/ 
     1<?php 
     2# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# This file is part of Email Optionnel, a plugin for Dotclear. 
     4# 
     5# Copyright (c) 2007-2014 Oleksandr Syenchuk, Pierre Van Glabeke 
     6# 
     7# Licensed under the GPL version 2.0 license. 
     8# A copy is available in LICENSE file or at 
     9# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     10# -- END LICENSE BLOCK ------------------------------------ 
    1611if (!defined('DC_CONTEXT_ADMIN')) { return; } 
     12 
    1713$core->addBehavior('adminBlogPreferencesForm', 
    1814     array('emailOptionnelBehaviors', 'adminBlogPreferencesForm')); 
  • plugins/emailOptionnel/_define.php

    r3284 r3292  
    1 <?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ 
    2 /***************************************************************\ 
    3  *  This is 'Email Optionnel', a plugin for DotClear.          * 
    4  *                                                             * 
    5  *  Copyright (c) 2007,2008                                    * 
    6  *  Oleksandr Syenchuk                                         * 
    7  *                                                             * 
    8  *  This is an open source software, distributed under the GNU * 
    9  *  General Public License (version 2) terms and  conditions.  * 
    10  *                                                             * 
    11  *  You should have received a copy of the GNU General Public  * 
    12  *  License along with 'Email Optionnel' (see COPYING.txt);    * 
    13  *  if not, write to the Free Software Foundation, Inc.,       * 
    14  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    * 
    15 \***************************************************************/ 
     1<?php 
     2# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# This file is part of Email Optionnel, a plugin for Dotclear. 
     4# 
     5# Copyright (c) 2007-2014 Oleksandr Syenchuk, Pierre Van Glabeke 
     6# 
     7# Licensed under the GPL version 2.0 license. 
     8# A copy is available in LICENSE file or at 
     9# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     10# -- END LICENSE BLOCK ------------------------------------ 
     11if (!defined('DC_RC_PATH')) { return; } 
    1612 
    1713# WARNING : 
     
    2016# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    2117# GNU General Public License for more details. 
    22 if (!defined('DC_RC_PATH')) { return; } 
     18 
    2319$this->registerModule( 
    24      /* Name */          "Email Optionnel", 
    25      /* Description*/    "Make e-mail address optional in comments", 
    26      /* Author */        "Oleksandr Syenchuk, Pierre Van Glabeke", 
    27      /* Version */       '0.4.4', 
     20     /* Name */          'Email Optionnel', 
     21     /* Description*/    'Make e-mail address optional in comments', 
     22     /* Author */        'Oleksandr Syenchuk, Pierre Van Glabeke', 
     23     /* Version */       '0.4.5', 
    2824     /* Properties */ 
    2925     array( 
    30           'permissions' => 'usage,contentadmin', 
     26          'permissions' => 'admin', 
    3127          'type' => 'plugin', 
    3228          'dc_min' => '2.6', 
  • plugins/emailOptionnel/_prepend.php

    r3284 r3292  
    1 <?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ 
    2 /***************************************************************\ 
    3  *  This is 'Email Optionnel', a plugin for DotClear.          * 
    4  *                                                             * 
    5  *  Copyright (c) 2007                                         * 
    6  *  Oleksandr Syenchuk                                         * 
    7  *                                                             * 
    8  *  This is an open source software, distributed under the GNU * 
    9  *  General Public License (version 2) terms and  conditions.  * 
    10  *                                                             * 
    11  *  You should have received a copy of the GNU General Public  * 
    12  *  License along with 'Email Optionnel' (see COPYING.txt);    * 
    13  *  if not, write to the Free Software Foundation, Inc.,       * 
    14  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    * 
    15 \***************************************************************/ 
     1<?php 
     2# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# This file is part of Email Optionnel, a plugin for Dotclear. 
     4# 
     5# Copyright (c) 2007-2014 Oleksandr Syenchuk, Pierre Van Glabeke 
     6# 
     7# Licensed under the GPL version 2.0 license. 
     8# A copy is available in LICENSE file or at 
     9# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     10# -- END LICENSE BLOCK ------------------------------------ 
    1611if (!defined('DC_RC_PATH')) { return; } 
     12 
    1713$GLOBALS['__autoload']['emailOptionnelBehaviors'] = dirname(__FILE__).'/behaviors.php'; 
  • plugins/emailOptionnel/_public.php

    r3284 r3292  
    1 <?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ 
    2 /***************************************************************\ 
    3  *  This is 'Email Optionnel', a plugin for DotClear.          * 
    4  *                                                             * 
    5  *  Copyright (c) 2007                                         * 
    6  *  Oleksandr Syenchuk                                         * 
    7  *                                                             * 
    8  *  This is an open source software, distributed under the GNU * 
    9  *  General Public License (version 2) terms and  conditions.  * 
    10  *                                                             * 
    11  *  You should have received a copy of the GNU General Public  * 
    12  *  License along with 'Email Optionnel' (see COPYING.txt);    * 
    13  *  if not, write to the Free Software Foundation, Inc.,       * 
    14  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    * 
    15 \***************************************************************/ 
     1<?php 
     2# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# This file is part of Email Optionnel, a plugin for Dotclear. 
     4# 
     5# Copyright (c) 2007-2014 Oleksandr Syenchuk, Pierre Van Glabeke 
     6# 
     7# Licensed under the GPL version 2.0 license. 
     8# A copy is available in LICENSE file or at 
     9# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     10# -- END LICENSE BLOCK ------------------------------------ 
    1611if (!defined('DC_RC_PATH')) { return; } 
     12 
    1713$core->addBehavior('publicPrepend', 
    1814     array('emailOptionnelBehaviors','publicPrepend')); 
  • plugins/emailOptionnel/behaviors.php

    r3284 r3292  
    1 <?php /* -*- tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ 
    2 /***************************************************************\ 
    3  *  This is 'Email Optionnel', a plugin for DotClear.          * 
    4  *                                                             * 
    5  *  Copyright (c) 2007,2008                                    * 
    6  *  Oleksandr Syenchuk                                         * 
    7  *                                                             * 
    8  *  This is an open source software, distributed under the GNU * 
    9  *  General Public License (version 2) terms and  conditions.  * 
    10  *                                                             * 
    11  *  You should have received a copy of the GNU General Public  * 
    12  *  License along with 'Email Optionnel' (see COPYING.txt);    * 
    13  *  if not, write to the Free Software Foundation, Inc.,       * 
    14  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    * 
    15 \***************************************************************/ 
    16  
     1<?php 
     2# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# This file is part of Email Optionnel, a plugin for Dotclear. 
     4#  
     5# Copyright (c) 2007-2014 Oleksandr Syenchuk, Pierre Van Glabeke 
     6#  
     7# Licensed under the GPL version 2.0 license. 
     8# A copy is available in LICENSE file or at 
     9# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     10# -- END LICENSE BLOCK ------------------------------------ 
     11if (!defined('DC_RC_PATH')) {return;} 
    1712class emailOptionnelBehaviors 
    1813{ 
    1914     public static function adminBlogPreferencesForm($core) 
    2015     { 
    21           $emailOptionnel = $core->blog->settings->get('emailoptionnel') ? true : false; 
    22           echo "<div class='fieldset'><h4>".__('Optional e-mail address')."</h4>\n". 
    23                "<p><label class=\"classic\">".form::checkbox('emailOptionnel','1',$emailOptionnel)."\n". 
    24                __('Make e-mail address optionnal in comments')."</label></p>\n". 
     16          $core->blog->settings->addNamespace('emailoptionnel'); 
     17          $emailOptionnel = $core->blog->settings->emailoptionnel->enabled ? true : false; 
     18          echo "<div class=\"fieldset\"><h4>".__('Optional e-mail address')."</h4>\n". 
     19               "<p><label class=\"classic\" for=\"emailOptionnel\">".form::checkbox('emailOptionnel','1',$emailOptionnel)."\n". 
     20               __('Make e-mail address optional in comments')."</label></p>\n". 
    2521               "</div>\n"; 
    2622     } 
     
    3228          $blog_settings->addNamespace('emailoptionnel'); 
    3329          $blog_settings->emailoptionnel->put( 
    34                'emailoptionnel', 
     30               'enabled', 
    3531               $emailOptionnel, 
    3632               'boolean', 
    37                'Make e-mail address optionnal in comments'); 
    38           $blog_settings->addNamespace('system'); 
     33               'Make e-mail address optional in comments'); 
    3934     } 
    4035      
    4136     public static function publicPrepend($core) 
    4237     { 
     38          $core->blog->settings->addNamespace('emailoptionnel'); 
     39           
    4340          if (!isset($_POST['c_content']) 
    4441          || !empty($_POST['preview']) 
    4542          || !empty($_POST['c_mail']) 
    46           || !$core->blog->settings->get('emailoptionnel')) { 
     43          || !$core->blog->settings->emailoptionnel->enabled) { 
    4744               return; 
    4845          } 
     
    5451          global $core; 
    5552           
    56           $emailOptionnel = $core->blog->settings->get('emailoptionnel') ? true : false; 
     53          $core->blog->settings->addNamespace('emailoptionnel'); 
     54           
     55          $emailOptionnel = $core->blog->settings->emailoptionnel->enabled ? true : false; 
    5756           
    5857          if ($emailOptionnel && $cur->comment_email == 'invalid@invalid') 
  • plugins/emailOptionnel/locales/fr/main.po

    r3284 r3292  
    1414msgstr "Adresse e-mail optionnelle" 
    1515 
    16 msgid "Make e-mail address optionnal in comments" 
     16msgid "Make e-mail address optional in comments" 
    1717msgstr "Rendre la saisie de l'adresse e-mail optionnelle dans les commentaires" 
Note: See TracChangeset for help on using the changeset viewer.

Sites map