Changeset 3192
- Timestamp:
- 09/20/13 20:06:11 (10 years ago)
- Location:
- plugins/anonymousComment
- Files:
-
- 4 added
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/anonymousComment/_admin.php
r1677 r3192 10 10 # http://www.gnu.org/licenses/agpl-3.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 13 14 14 # ajouter le plugin dans la liste des plugins du menu de l'administration 15 $_menu[' Plugins']->addItem(15 $_menu['Blog']->addItem( 16 16 # nom du lien (en anglais) 17 17 __('Anonymous comments'), -
plugins/anonymousComment/_define.php
r2492 r3192 10 10 # http://www.gnu.org/licenses/agpl-3.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 13 12 if (!defined('DC_RC_PATH')) { return; } 14 13 … … 17 16 /* Description*/ "Allows posting comments as anonymous", 18 17 /* Author */ "Aurélien Bompard", 19 /* Version */ '1. 1',18 /* Version */ '1.2', 20 19 /* Permissions */ 'admin' 21 20 ); -
plugins/anonymousComment/_public.php
r2492 r3192 10 10 # http://www.gnu.org/licenses/agpl-3.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 12 if (!defined('DC_RC_PATH')) { return; } 13 13 14 14 $core->addBehavior('publicHeadContent', … … 21 21 public static function publicHeadContent($core,$_ctx) 22 22 { 23 if (!$core->blog->settings->anonymous _active) { return; }23 if (!$core->blog->settings->anonymousComment->anonymous_active) { return; } 24 24 // print the headers 25 25 echo "\n<!-- Anonymous comments -->\n"; … … 28 28 '//<![CDATA['."\n". 29 29 'var anonymous_name = "'. 30 html::escapeHTML($core->blog->settings->anonymous _name).30 html::escapeHTML($core->blog->settings->anonymousComment->anonymous_name). 31 31 '";'."\n". 32 32 'var anonymous_mail = "'. 33 html::escapeHTML($core->blog->settings->anonymous _email).33 html::escapeHTML($core->blog->settings->anonymousComment->anonymous_email). 34 34 '";'."\n". 35 35 '//]]>'. … … 42 42 public static function publicCommentFormBeforeContent($core,$_ctx) 43 43 { 44 if (!$core->blog->settings->anonymous _active) { return; }44 if (!$core->blog->settings->anonymousComment->anonymous_active) { return; } 45 45 echo ('<p class="field"><label for="c_anonymous">'. 46 __("Anonymous comment:")."</label>\n".47 48 "</p>\n");46 __('Anonymous comment:').'</label>'. 47 '<input name="c_anonymous" id="c_anonymous" type="checkbox" />'. 48 '</p>'); 49 49 } 50 50 } -
plugins/anonymousComment/index.php
r2540 r3192 10 10 # http://www.gnu.org/licenses/agpl-3.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 if (!defined('DC_CONTEXT_ADMIN')) { exit; } 12 13 14 $page_title = __('Anonymous comments'); 13 15 14 16 # Get settings 15 $anonymous_active = $core->blog->settings->anonymous _active;16 $anonymous_name = $core->blog->settings->anonymous _name;17 $anonymous_email = $core->blog->settings->anonymous _email;17 $anonymous_active = $core->blog->settings->anonymousComment->anonymous_active; 18 $anonymous_name = $core->blog->settings->anonymousComment->anonymous_name; 19 $anonymous_email = $core->blog->settings->anonymousComment->anonymous_email; 18 20 19 21 if ($anonymous_name === null) { … … 37 39 throw new Exception(__('No email.')); 38 40 } 39 40 $core->blog->settings-> setNameSpace('anonymousComment');41 $core->blog->settings-> put('anonymous_active',$anonymous_active,'boolean');42 $core->blog->settings-> put('anonymous_name',$anonymous_name,'string');43 $core->blog->settings-> put('anonymous_email',$anonymous_email,'string');44 $core->blog->settings-> setNameSpace('system');41 42 $core->blog->settings->addNameSpace('anonymousComment'); 43 $core->blog->settings->anonymousComment->put('anonymous_active',$anonymous_active,'boolean'); 44 $core->blog->settings->anonymousComment->put('anonymous_name',$anonymous_name,'string'); 45 $core->blog->settings->anonymousComment->put('anonymous_email',$anonymous_email,'string'); 46 $core->blog->settings->addNameSpace('system'); 45 47 46 48 http::redirect($p_url.'&upd=1'); … … 54 56 <html> 55 57 <head> 56 <title><?php echo (__('Anonymous comments')); ?></title>58 <title><?php echo $page_title; ?></title> 57 59 </head> 58 60 <body> 61 <?php 59 62 60 <h2><?php echo html::escapeHTML($core->blog->name).' › '. 61 __('Anonymous comments'); ?></h2> 63 echo dcPage::breadcrumb( 64 array( 65 html::escapeHTML($core->blog->name) => '', 66 '<span class="page-title">'.$page_title.'</span>' => '' 67 )); 62 68 63 <?php 64 if (!empty($_GET['upd'])) { 65 echo '<p class="message">'.__('Settings have been successfully updated.').'</p>'; 66 } 67 ?> 68 69 <p style="float:right;margin-right:3%"><a href="http://flattr.com/thing/48106/Dotclear-Anonymous-comment-plugin" target="_blank" style="border:none"> 70 <img src="http://api.flattr.com/button/button-static-50x60.png" alt="Flattr this" title="Flattr this" border="0" /></a></p> 69 if (!empty($_GET['upd'])) { 70 dcPage::success(__('Settings have been successfully updated.')); 71 } 72 ?> 71 73 72 74 <form method="post" action="<?php echo($p_url); ?>"> … … 78 80 __('Allow anonymous comments')); ?></label></p> 79 81 80 <p><label><?php echo(__('Replacement name: ').82 <p><label><?php echo(__('Replacement name: '). 81 83 form::field('anonymous_name',40,255, 82 $anonymous_name)); ?></ p>84 $anonymous_name)); ?></label></p> 83 85 84 <p><label><?php echo(__('Replacement email: ').86 <p><label><?php echo(__('Replacement email: '). 85 87 form::field('anonymous_email',40,255, 86 $anonymous_email)); ?></ p>88 $anonymous_email)); ?></label></p> 87 89 88 90 <p><input type="submit" name="save" 89 91 value="<?php echo __('Save'); ?>" /></p> 90 92 </form> 91 93 92 94 <?php dcPage::helpBlock('anonymousComment');?> 93 95 </body> -
plugins/anonymousComment/locales/_pot/main.pot
r1191 r3192 46 46 47 47 #: index.php:77 48 msgid "Replacement name: "48 msgid "Replacement name: " 49 49 msgstr "" 50 50 51 51 #: index.php:81 52 msgid "Replacement email: "52 msgid "Replacement email: " 53 53 msgstr "" 54 55 #: index.php:8656 msgid "Save"57 msgstr "" -
plugins/anonymousComment/locales/en/main.po
r1191 r3192 46 46 47 47 #: index.php:77 48 msgid "Replacement name: "49 msgstr "Replacement name: "48 msgid "Replacement name: " 49 msgstr "Replacement name: " 50 50 51 51 #: index.php:81 52 msgid "Replacement email:" 53 msgstr "Replacement email:" 54 55 #: index.php:86 56 msgid "Save" 57 msgstr "Save" 52 msgid "Replacement email: " 53 msgstr "Replacement email: " -
plugins/anonymousComment/locales/en/resources.php
r1191 r3192 2 2 if (!isset($__resources['help']['anonymousComment'])) 3 3 { 4 $__resources['help']['anonymousComment'] = dirname(__FILE__).'/help .html';4 $__resources['help']['anonymousComment'] = dirname(__FILE__).'/help/anonymousComment.html'; 5 5 } 6 6 ?> -
plugins/anonymousComment/locales/fr/main.po
r1677 r3192 48 48 49 49 #: index.php:77 50 msgid "Replacement name: "51 msgstr "Nom de remplacement : "50 msgid "Replacement name: " 51 msgstr "Nom de remplacement : " 52 52 53 53 #: index.php:81 54 msgid "Replacement email: "55 msgstr "E-mail de remplacement : "54 msgid "Replacement email: " 55 msgstr "E-mail de remplacement : " 56 56 57 #: index.php:8658 msgid "Save"59 msgstr "Sauvegarder"60 -
plugins/anonymousComment/locales/fr/resources.php
r1191 r3192 2 2 if (!isset($__resources['help']['anonymousComment'])) 3 3 { 4 $__resources['help']['anonymousComment'] = dirname(__FILE__).'/help .html';4 $__resources['help']['anonymousComment'] = dirname(__FILE__).'/help/anonymousComment.html'; 5 5 } 6 6 ?>
Note: See TracChangeset
for help on using the changeset viewer.