Dotclear

Changeset 2746


Ignore:
Timestamp:
11/12/10 01:41:01 (13 years ago)
Author:
Moe
Message:

@ Reply 1.6:

  • added setting to automatically subscribe to comments email of replied comments (closes #496)
  • used array() with form::*() to remove multiple id="" on pages
Location:
plugins/atReply
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • plugins/atReply/_admin.php

    r2745 r2746  
    7171          global $core; 
    7272           
    73           $comment_content = '<p>@<a href="#c'. 
     73          $comment_content = '<p>'. 
     74               sprintf(__('@%s:'),'<a href="#c'. 
    7475               html::escapeHTML($rs->comment_id).'">'. 
    75                html::escapeHTML($rs->comment_author).'</a>: </p>'; 
     76               html::escapeHTML($rs->comment_author).'</a>').' </p>'; 
    7677           
    7778          return( 
    7879               # from /dotclear/admin/post.php, modified 
    7980               '<form action="comment.php" method="post">'. 
    80                form::hidden('comment_author',html::escapeHTML($core->auth->getInfo('user_cn'))). 
    81                form::hidden('comment_email',html::escapeHTML($core->auth->getInfo('user_email'))). 
    82                form::hidden('comment_site',html::escapeHTML($core->auth->getInfo('user_url'))). 
    83                form::hidden('comment_content',html::escapeHTML($comment_content)). 
    84                form::hidden('comment_atreply_comment_status',-1). 
    85                form::hidden('post_id',$rs->post_id). 
    86                form::hidden('go_to_the_comment',1). 
     81               form::hidden(array('comment_author'),html::escapeHTML($core->auth->getInfo('user_cn'))). 
     82               form::hidden(array('comment_email'),html::escapeHTML($core->auth->getInfo('user_email'))). 
     83               form::hidden(array('comment_site'),html::escapeHTML($core->auth->getInfo('user_url'))). 
     84               form::hidden(array('comment_content'),html::escapeHTML($comment_content)). 
     85               form::hidden(array('comment_atreply_comment_status'),-1). 
     86               form::hidden(array('post_id'),$rs->post_id). 
     87               form::hidden(array('at_reply'),1). 
     88               form::hidden(array('at_reply_email_address'),html::escapeHTML($rs->comment_email)). 
    8789               $core->formNonce(). 
    8890               '<p><strong>'.__('@ Reply:').'</strong> '. 
     
    114116     public static function adminAfterCommentCreate($cur,$comment_id) 
    115117     { 
    116           if (isset($_POST['go_to_the_comment'])) 
     118          global $core; 
     119 
     120          if (isset($_POST['at_reply'])) 
    117121          { 
     122               if ($core->blog->settings->atreply_subscribe_replied_comment == true) 
     123               { 
     124                    if ($core->plugins->moduleExists('subscribeToComments')) 
     125                    { 
     126                         # subscribe the email address of the replied comment 
     127                         $subscriber = new subscriber($_POST['at_reply_email_address']); 
     128                         $subscriber->subscribe($cur->post_id); 
     129                    } 
     130               } 
     131                
    118132               http::redirect('comment.php?id='.$comment_id.'&at_reply_creaco=1'); 
    119133          } 
  • plugins/atReply/_define.php

    r2745 r2746  
    3232  /* Description*/  'Easily reply to comments', 
    3333  /* Author */           'Moe (http://gniark.net/) append extension by buns.fr', 
    34   /* Version */               '1.5', 
     34  /* Version */               '1.6', 
    3535  /* Permissions */ 'admin' 
    3636); 
  • plugins/atReply/index.php

    r2745 r2746  
    5555          $settings->put('atreply_show_switch',!empty($_POST['atreply_show_switch']), 
    5656               'boolean','Display a switch to toggle threading'); 
     57 
     58          $settings->put('atreply_subscribe_replied_comment', 
     59               !empty($_POST['atreply_subscribe_replied_comment']), 
     60               'boolean','Subscribe replied comments to "Subscribe to comments"'); 
    5761           
    5862          # inspired by lightbox/admin.php 
     
    220224                         __('Append replies to appropriate comments')); ?> 
    221225               </p> 
     226 
     227               <p><?php echo(form::checkbox('atreply_subscribe_replied_comment',1, 
     228                    $settings->atreply_subscribe_replied_comment)); ?> 
     229                    <label class="classic" for="atreply_subscribe_replied_comment"> 
     230                         <?php printf(__('When clicking on the "%s" button in a comment list of the administration, subscribe to comments the email address of the replied comment with the %s plugin'), 
     231                              __('reply to this comment'),__('Subscribe to comments')); ?> 
     232                    </label> 
     233               </p> 
     234               <p class="form-note"> 
     235                    <?php printf(__('Requires the %s plugin.'), 
     236                         __('Subscribe to comments')); ?> 
     237               </p> 
    222238                
    223239               <p> 
  • plugins/atReply/locales/fr/admin.lang.php

    r2745 r2746  
    11<?php 
    22// Language: Français  
    3 // Module: atReply - 1.5 
    4 // Date: 2010-11-11 23:08:36  
     3// Module: atReply - 1.6 
     4// Date: 2010-11-12 00:32:59  
    55// Translated with dcTranslater - 1.5  
     6 
     7#_admin.php:62 
     8#_admin.php:90 
     9$GLOBALS['__l10n']['@ Reply:'] = '@ Reply&nbsp;:'; 
    610 
    711#_admin.php:64 
    812$GLOBALS['__l10n']['Please edit and publish it.'] = 'Veuillez l\'éditer et le publier.'; 
    913 
    10 #index.php:118 
     14#index.php:119 
    1115$GLOBALS['__l10n']['%s is not writable'] = '%s n\'est pas accessible en écriture'; 
    1216 
    13 #index.php:142 
     17#index.php:143 
    1418$GLOBALS['__l10n']['Configuration successfully updated.'] = 'Configuration mise à jour avec succès.'; 
    1519 
    16 #index.php:192 
     20#index.php:193 
    1721$GLOBALS['__l10n']['Add arrows to easily reply to comments on the blog'] = 'Ajouter des flèches pour répondre facilement aux commentaires sur le blog'; 
    1822 
    19 #index.php:198 
     23#index.php:199 
    2024$GLOBALS['__l10n']['Activating this plugin also enforces wiki syntax in blog comments.'] = 'L\'activation de cette extension force la syntaxe wiki dans les commentaires du blog.'; 
    2125 
    22 #index.php:204 
     26#index.php:205 
    2327$GLOBALS['__l10n']['Display a text when the cursor is hovering the arrow'] = 'Afficher un texte quand le curseur survole la flèche'; 
    2428 
    25 #index.php:211 
    26 #index.php:223 
     29#index.php:212 
     30#index.php:224 
    2731$GLOBALS['__l10n']['Append replies to appropriate comments'] = 'Attacher les réponses aux commentaires afférents'; 
    2832 
    29 #index.php:218 
     33#index.php:219 
    3034$GLOBALS['__l10n']['Display a switch to toggle threading'] = 'Afficher un bouton pour basculer l\'affichage en fil de commentaires'; 
    3135 
    32 #index.php:222 
     36#index.php:223 
    3337$GLOBALS['__l10n']['Requires %s.'] = 'Nécessite %s.'; 
    3438 
    35 #index.php:228 
     39#index.php:230 
     40$GLOBALS['__l10n']['When clicking on the "%s" button in a comment list of the administration, subscribe to comments the email address of the replied comment with the %s plugin'] = 'Lors du clic sur le bouton "%s" dans une liste de commentaires de l\'administration, abonner aux commentaires l\'adresse email du commentaire répondu avec l\'extension %s'; 
     41 
     42#index.php:235 
     43$GLOBALS['__l10n']['Requires the %s plugin.'] = 'Ceci nécessite l\'extension %s.'; 
     44 
     45#index.php:241 
    3646$GLOBALS['__l10n']['Create an image with another color'] = 'Créer une image avec une autre couleur'; 
    3747 
    38 #index.php:235 
     48#index.php:248 
    3949$GLOBALS['__l10n']['The default image will be used.'] = 'L\'image par défaut sera utilisée.'; 
    4050 
    41 #index.php:238 
     51#index.php:251 
    4252$GLOBALS['__l10n']['Preview:'] = 'Aperçu&nbsp;:'; 
    4353 
    44 #index.php:254 
     54#index.php:255 
    4555$GLOBALS['__l10n']['Save configuration'] = 'Enregistrer la configuration'; 
    4656 
  • plugins/atReply/locales/fr/admin.po

    r2745 r2746  
    11# Language: Français 
    2 # Module: atReply - 1.5 
    3 # Date: 2010-11-11 23:08:36 
     2# Module: atReply - 1.6 
     3# Date: 2010-11-12 00:32:59 
    44# Translated with translater 1.5 
    55 
     
    77msgstr "" 
    88"Content-Type: text/plain; charset=UTF-8\n" 
    9 "Project-Id-Version: atReply 1.5\n" 
     9"Project-Id-Version: atReply 1.6\n" 
    1010"POT-Creation-Date: \n" 
    11 "PO-Revision-Date: 2010-11-11T23:08:36+00:00\n" 
     11"PO-Revision-Date: 2010-11-12T00:32:59+00:00\n" 
    1212"Last-Translator: Ubuntu\n" 
    1313"Language-Team: \n" 
     
    1515"Content-Transfer-Encoding: 8bit\n" 
    1616 
     17#: _admin.php:62 
     18#: _admin.php:90 
     19msgid "@ Reply:" 
     20msgstr "@ Reply&nbsp;:" 
     21 
    1722#: _admin.php:64 
    1823msgid "Please edit and publish it." 
    1924msgstr "Veuillez l'éditer et le publier." 
    2025 
    21 #: index.php:118 
     26#: index.php:119 
    2227msgid "%s is not writable" 
    2328msgstr "%s n'est pas accessible en écriture" 
    2429 
    25 #: index.php:142 
     30#: index.php:143 
    2631msgid "Configuration successfully updated." 
    2732msgstr "Configuration mise à jour avec succès." 
    2833 
    29 #: index.php:192 
     34#: index.php:193 
    3035msgid "Add arrows to easily reply to comments on the blog" 
    3136msgstr "Ajouter des flèches pour répondre facilement aux commentaires sur le blog" 
    3237 
    33 #: index.php:198 
     38#: index.php:199 
    3439msgid "Activating this plugin also enforces wiki syntax in blog comments." 
    3540msgstr "L'activation de cette extension force la syntaxe wiki dans les commentaires du blog." 
    3641 
    37 #: index.php:204 
     42#: index.php:205 
    3843msgid "Display a text when the cursor is hovering the arrow" 
    3944msgstr "Afficher un texte quand le curseur survole la flèche" 
    4045 
    41 #: index.php:211 
    42 #: index.php:223 
     46#: index.php:212 
     47#: index.php:224 
    4348msgid "Append replies to appropriate comments" 
    4449msgstr "Attacher les réponses aux commentaires afférents" 
    4550 
    46 #: index.php:218 
     51#: index.php:219 
    4752msgid "Display a switch to toggle threading" 
    4853msgstr "Afficher un bouton pour basculer l'affichage en fil de commentaires" 
    4954 
    50 #: index.php:222 
     55#: index.php:223 
    5156msgid "Requires %s." 
    5257msgstr "Nécessite %s." 
    5358 
    54 #: index.php:228 
     59#: index.php:230 
     60msgid "When clicking on the \"%s\" button in a comment list of the administration, subscribe to comments the email address of the replied comment with the %s plugin" 
     61msgstr "Lors du clic sur le bouton \"%s\" dans une liste de commentaires de l'administration, abonner aux commentaires l'adresse email du commentaire répondu avec l'extension %s" 
     62 
     63#: index.php:235 
     64msgid "Requires the %s plugin." 
     65msgstr "Ceci nécessite l'extension %s." 
     66 
     67#: index.php:241 
    5568msgid "Create an image with another color" 
    5669msgstr "Créer une image avec une autre couleur" 
    5770 
    58 #: index.php:235 
     71#: index.php:248 
    5972msgid "The default image will be used." 
    6073msgstr "L'image par défaut sera utilisée." 
    6174 
    62 #: index.php:238 
     75#: index.php:251 
    6376msgid "Preview:" 
    6477msgstr "Aperçu&nbsp;:" 
    6578 
    66 #: index.php:254 
     79#: index.php:255 
    6780msgid "Save configuration" 
    6881msgstr "Enregistrer la configuration" 
  • plugins/atReply/locales/fr/main.lang.php

    r2745 r2746  
    11<?php 
    22// Language: Français  
    3 // Module: atReply - 1.5 
    4 // Date: 2010-11-11 23:08:36  
     3// Module: atReply - 1.6 
     4// Date: 2010-11-12 00:32:59  
    55// Translated with dcTranslater - 1.5  
    66 
    77#_admin.php:40 
    8 #index.php:187 
     8#index.php:188 
    99$GLOBALS['__l10n']['@ Reply'] = '@ Reply'; 
    1010 
    11 #_admin.php:96 
    12 #index.php:245 
     11#_admin.php:74 
     12$GLOBALS['__l10n']['@%s:'] = '@%s&nbsp;:'; 
     13 
     14#_admin.php:92 
     15#index.php:231 
    1316$GLOBALS['__l10n']['reply to this comment'] = 'répondre à ce commentaire'; 
    1417 
  • plugins/atReply/locales/fr/main.po

    r2745 r2746  
    11# Language: Français 
    2 # Module: atReply - 1.5 
    3 # Date: 2010-11-11 23:08:36 
     2# Module: atReply - 1.6 
     3# Date: 2010-11-12 00:32:59 
    44# Translated with translater 1.5 
    55 
     
    77msgstr "" 
    88"Content-Type: text/plain; charset=UTF-8\n" 
    9 "Project-Id-Version: atReply 1.5\n" 
     9"Project-Id-Version: atReply 1.6\n" 
    1010"POT-Creation-Date: \n" 
    11 "PO-Revision-Date: 2010-11-11T23:08:36+00:00\n" 
     11"PO-Revision-Date: 2010-11-12T00:32:59+00:00\n" 
    1212"Last-Translator: Ubuntu\n" 
    1313"Language-Team: \n" 
     
    1616 
    1717#: _admin.php:40 
    18 #: index.php:187 
     18#: index.php:188 
    1919msgid "@ Reply" 
    2020msgstr "@ Reply" 
    2121 
    22 #: _admin.php:96 
    23 #: index.php:245 
     22#: _admin.php:74 
     23msgid "@%s:" 
     24msgstr "@%s&nbsp;:" 
     25 
     26#: _admin.php:92 
     27#: index.php:231 
    2428msgid "reply to this comment" 
    2529msgstr "répondre à ce commentaire" 
Note: See TracChangeset for help on using the changeset viewer.

Sites map