Changeset 3292
- Timestamp:
- 02/12/14 13:59:37 (9 years ago)
- 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 ------------------------------------ 16 11 if (!defined('DC_CONTEXT_ADMIN')) { return; } 12 17 13 $core->addBehavior('adminBlogPreferencesForm', 18 14 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 ------------------------------------ 11 if (!defined('DC_RC_PATH')) { return; } 16 12 17 13 # WARNING : … … 20 16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 17 # GNU General Public License for more details. 22 if (!defined('DC_RC_PATH')) { return; } 18 23 19 $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', 28 24 /* Properties */ 29 25 array( 30 'permissions' => ' usage,contentadmin',26 'permissions' => 'admin', 31 27 'type' => 'plugin', 32 28 '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 ------------------------------------ 16 11 if (!defined('DC_RC_PATH')) { return; } 12 17 13 $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 ------------------------------------ 16 11 if (!defined('DC_RC_PATH')) { return; } 12 17 13 $core->addBehavior('publicPrepend', 18 14 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 ------------------------------------ 11 if (!defined('DC_RC_PATH')) {return;} 17 12 class emailOptionnelBehaviors 18 13 { 19 14 public static function adminBlogPreferencesForm($core) 20 15 { 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". 25 21 "</div>\n"; 26 22 } … … 32 28 $blog_settings->addNamespace('emailoptionnel'); 33 29 $blog_settings->emailoptionnel->put( 34 'e mailoptionnel',30 'enabled', 35 31 $emailOptionnel, 36 32 'boolean', 37 'Make e-mail address optionnal in comments'); 38 $blog_settings->addNamespace('system'); 33 'Make e-mail address optional in comments'); 39 34 } 40 35 41 36 public static function publicPrepend($core) 42 37 { 38 $core->blog->settings->addNamespace('emailoptionnel'); 39 43 40 if (!isset($_POST['c_content']) 44 41 || !empty($_POST['preview']) 45 42 || !empty($_POST['c_mail']) 46 || !$core->blog->settings-> get('emailoptionnel')) {43 || !$core->blog->settings->emailoptionnel->enabled) { 47 44 return; 48 45 } … … 54 51 global $core; 55 52 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; 57 56 58 57 if ($emailOptionnel && $cur->comment_email == 'invalid@invalid') -
plugins/emailOptionnel/locales/fr/main.po
r3284 r3292 14 14 msgstr "Adresse e-mail optionnelle" 15 15 16 msgid "Make e-mail address option nal in comments"16 msgid "Make e-mail address optional in comments" 17 17 msgstr "Rendre la saisie de l'adresse e-mail optionnelle dans les commentaires"
Note: See TracChangeset
for help on using the changeset viewer.