Dotclear

Changeset 3033


Ignore:
Timestamp:
05/14/11 21:27:03 (12 years ago)
Author:
Moe
Message:

@ Reply 1.6.2:

  • Dotclear 2.2 settings
  • added author name on @Reply arrows (closes #657)
Location:
plugins/atReply
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • plugins/atReply/_admin.php

    r2908 r3033  
    9191               '<p><strong>'.__('@ Reply:').'</strong> '. 
    9292                    '<input type="submit" name="add" value="'. 
    93                     __('reply to this comment').'" /></p>'. 
     93                    __('Reply to this comment').'" /></p>'. 
    9494               '</form>' 
    9595               # /from /dotclear/admin/post.php, modified 
  • plugins/atReply/_define.php

    r2908 r3033  
    3232  /* Description*/  'Easily reply to comments', 
    3333  /* Author */           'Moe (http://gniark.net/) append extension by buns.fr', 
    34   /* Version */               '1.6.1', 
     34  /* Version */               '1.6.2', 
    3535  /* Permissions */ 'usage,contentadmin' 
    3636); 
  • plugins/atReply/_public.php

    r2459 r3033  
    3131$core->addBehavior('templateAfterValue',array('AtReplyTpl','templateAfterValue')); 
    3232 
    33 if ($core->blog->settings->atreply_active) 
     33$core->blog->settings->addNamespace('atreply'); 
     34 
     35if ($core->blog->settings->atreply->atreply_active) 
    3436{ 
    3537     $core->addBehavior('publicHeadContent',array('AtReplyTpl','publicHeadContent')); 
     
    5961     public static function publicHeadContent($core) 
    6062     { 
    61           $set = $core->blog->settings; 
     63          $set = $core->blog->settings->atreply; 
    6264           
    6365          $QmarkURL = $core->blog->getQmarkURL(); 
     
    6769               && (file_exists($core->blog->public_path.'/atReply/reply.png'))) 
    6870          { 
    69                $image_url = $set->public_url.'/atReply/reply.png'; 
     71               $image_url = $core->blog->settings->system->public_url. 
     72                    '/atReply/reply.png'; 
    7073          } 
    7174          else 
     
    7679           
    7780          $entry_url = ''; 
     81           
    7882          # simple and effective test on entry, from dcTemplate::SysIf()) 
    7983          if (($GLOBALS['_ctx']->posts !== null) 
     
    8488          } 
    8589           
    86           $title = (($set->atreply_display_title) ? 'true' : 'false'); 
     90          $title = (($set->atreply_display_title) ? '1' : '0'); 
    8791           
    8892          # Javascript 
     
    9296               'var atReplyEntryURL = \''. 
    9397                    html::escapeHTML($entry_url).'\';'."\n". 
    94                'var atReplyDisplayTitle = new Boolean('.$title.');'."\n". 
     98               'var atReplyDisplayTitle = '.$title.';'."\n". 
    9599               'var atReplyTitle = \''. 
    96                     html::escapeHTML(__('Reply to this comment')).'\';'."\n". 
     100                    html::escapeHTML(__('Reply to this comment by {author}')).'\';'."\n". 
    97101               'var atReplyImage = \''.$image_url.'\';'."\n". 
    98102               'var atReply_switch_text = \''. 
  • plugins/atReply/index.php

    r2908 r3033  
    3737} 
    3838 
    39 $settings =& $core->blog->settings; 
     39$core->blog->settings->addNameSpace('atReply'); 
     40 
     41$settings =& $core->blog->settings->atreply; 
    4042 
    4143try 
     
    4749          $color = trim($_POST['atreply_color']); 
    4850           
    49           $settings->setNameSpace('atreply'); 
    5051          $settings->put('atreply_active',!empty($_POST['atreply_active']), 
    5152               'boolean','Enable @ Reply'); 
     
    6869               !empty($_POST['atreply_subscribe_replied_comment']), 
    6970               'boolean','Subscribe replied comments to "Subscribe to comments"'); 
    70            
    71           # inspired by lightbox/admin.php 
    72           $settings->setNameSpace('system'); 
    7371           
    7472          # if there is a color 
     
    155153$image_url = $core->blog->getQmarkURL().'pf=atReply/img/reply.png'; 
    156154 
     155$system = $core->blog->settings->system; 
     156 
    157157# personalized image 
    158 if (strlen($core->blog->settings->atreply_color) > 1) 
    159 { 
    160      $personalized_image = $core->blog->settings->public_url. 
     158if (strlen($settings->atreply_color) > 1) 
     159{ 
     160     $personalized_image = $system->public_url. 
    161161          '/atReply/reply.png'; 
    162162      
    163      if (file_exists(path::fullFromRoot($settings->public_path, 
     163     if (file_exists(path::fullFromRoot($system->public_path, 
    164164          DC_ROOT).'/atReply/reply.png')) 
    165165     { 
    166166          $image_url = $personalized_image; 
    167167           
    168           if (substr($settings->public_url,0,1) == '/') 
     168          if (substr($system->public_url,0,1) == '/') 
    169169          { 
    170170               # public_path is located at the root of the website 
    171171               $image_url = $core->blog->host.'/'.$personalized_image; 
    172172          } 
    173           elseif (substr($settings->public_url,0,4) == 'http') 
     173          elseif (substr($system->public_url,0,4) == 'http') 
    174174          { 
    175175               $image_url = $personalized_image; 
     
    238238                    <label class="classic" for="atreply_subscribe_replied_comment"> 
    239239                         <?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'), 
    240                               __('reply to this comment'),__('Subscribe to comments')); ?> 
     240                              __('Reply to this comment'),__('Subscribe to comments')); ?> 
    241241                    </label> 
    242242               </p> 
  • plugins/atReply/js/atReply.js

    r2277 r3033  
    1515          /* duplicate the link to create an element on-the-fly, 
    1616               because the element with its event can't be used twice */ 
     17           
     18          var commentAuthor = $(this).parent().children('.commentAuthor'); 
     19          var id = commentAuthor.attr('id').replace('atreply_','c'); 
     20          var name = commentAuthor.attr('title'); 
     21                     
    1722          var link = $(atReplyLink).click( function () { 
    18                var commentAuthor = $(this).parent().children('.commentAuthor'); 
    19                var id = commentAuthor.attr('id').replace('atreply_','c'); 
    20                var name = commentAuthor.attr('title'); 
    2123               $('#c_content').val($('#c_content').val()+ 
    2224                    '@['+name+'|'+atReplyEntryURL+'#'+id+'] : '); 
     
    3234          $(this).parent().append(link); 
    3335           
    34           if (atReplyDisplayTitle != true) {return;} 
    35           /* add an hover effect */ 
    36           $(this).parent().hover( 
    37           function () { 
    38                $(this).find('.at_reply_title').show(); 
    39           }, 
    40           function () { 
    41                $(this).find('.at_reply_title').hide(); 
    42           }); 
     36          var titleWithAuthor = 
     37               $(this).parent().find('a:last').attr('title').replace("{author}",name); 
     38           
     39          $(this).parent().find('a').attr('title', titleWithAuthor); 
     40          $(this).parent().find('img').attr('alt', titleWithAuthor); 
     41          $(this).parent().find('.at_reply_title').html(titleWithAuthor); 
     42           
     43          if (atReplyDisplayTitle) 
     44          { 
     45               /* add an hover effect */ 
     46               $(this).parent().hover( 
     47               function () { 
     48                    $(this).find('.at_reply_title').show(); 
     49               }, 
     50               function () { 
     51                    $(this).find('.at_reply_title').hide(); 
     52               }); 
     53          } 
    4354     }); 
    4455} 
  • plugins/atReply/locales/fr/admin.lang.php

    r2746 r3033  
    11<?php 
    22// Language: Français  
    3 // Module: atReply - 1.6 
    4 // Date: 2010-11-12 00:32:59  
     3// Module: atReply - 1.6.2 
     4// Date: 2011-05-14 19:23:45  
    55// Translated with dcTranslater - 1.5  
    66 
    7 #_admin.php:62 
    8 #_admin.php:90 
     7#_admin.php:63 
     8#_admin.php:91 
    99$GLOBALS['__l10n']['@ Reply:'] = '@ Reply&nbsp;:'; 
    1010 
    11 #_admin.php:64 
     11#_admin.php:65 
    1212$GLOBALS['__l10n']['Please edit and publish it.'] = 'Veuillez l\'éditer et le publier.'; 
    1313 
    14 #index.php:119 
     14#_admin.php:93 
     15#index.php:240 
     16$GLOBALS['__l10n']['Reply to this comment'] = 'Répondre à ce commentaire'; 
     17 
     18#index.php:126 
    1519$GLOBALS['__l10n']['%s is not writable'] = '%s n\'est pas accessible en écriture'; 
    1620 
    17 #index.php:143 
     21#index.php:150 
    1822$GLOBALS['__l10n']['Configuration successfully updated.'] = 'Configuration mise à jour avec succès.'; 
    1923 
    20 #index.php:193 
     24#index.php:202 
    2125$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'; 
    2226 
    23 #index.php:199 
     27#index.php:208 
    2428$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.'; 
    2529 
    26 #index.php:205 
     30#index.php:214 
    2731$GLOBALS['__l10n']['Display a text when the cursor is hovering the arrow'] = 'Afficher un texte quand le curseur survole la flèche'; 
    2832 
    29 #index.php:212 
    30 #index.php:224 
     33#index.php:221 
     34#index.php:233 
    3135$GLOBALS['__l10n']['Append replies to appropriate comments'] = 'Attacher les réponses aux commentaires afférents'; 
    3236 
    33 #index.php:219 
     37#index.php:228 
    3438$GLOBALS['__l10n']['Display a switch to toggle threading'] = 'Afficher un bouton pour basculer l\'affichage en fil de commentaires'; 
    3539 
    36 #index.php:223 
     40#index.php:232 
    3741$GLOBALS['__l10n']['Requires %s.'] = 'Nécessite %s.'; 
    3842 
    39 #index.php:230 
     43#index.php:239 
    4044$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'; 
    4145 
    42 #index.php:235 
     46#index.php:244 
    4347$GLOBALS['__l10n']['Requires the %s plugin.'] = 'Ceci nécessite l\'extension %s.'; 
    4448 
    45 #index.php:241 
     49#index.php:250 
    4650$GLOBALS['__l10n']['Create an image with another color'] = 'Créer une image avec une autre couleur'; 
    4751 
    48 #index.php:248 
     52#index.php:257 
    4953$GLOBALS['__l10n']['The default image will be used.'] = 'L\'image par défaut sera utilisée.'; 
    5054 
    51 #index.php:251 
     55#index.php:260 
    5256$GLOBALS['__l10n']['Preview:'] = 'Aperçu&nbsp;:'; 
    5357 
    54 #index.php:255 
     58#index.php:264 
    5559$GLOBALS['__l10n']['Save configuration'] = 'Enregistrer la configuration'; 
    5660 
  • plugins/atReply/locales/fr/admin.po

    r2746 r3033  
    11# Language: Français 
    2 # Module: atReply - 1.6 
    3 # Date: 2010-11-12 00:32:59 
     2# Module: atReply - 1.6.2 
     3# Date: 2011-05-14 19:23:45 
    44# Translated with translater 1.5 
    55 
     
    77msgstr "" 
    88"Content-Type: text/plain; charset=UTF-8\n" 
    9 "Project-Id-Version: atReply 1.6\n" 
     9"Project-Id-Version: atReply 1.6.2\n" 
    1010"POT-Creation-Date: \n" 
    11 "PO-Revision-Date: 2010-11-12T00:32:59+00:00\n" 
     11"PO-Revision-Date: 2011-05-14T19:23:45+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 
     17#: _admin.php:63 
     18#: _admin.php:91 
    1919msgid "@ Reply:" 
    2020msgstr "@ Reply&nbsp;:" 
    2121 
    22 #: _admin.php:64 
     22#: _admin.php:65 
    2323msgid "Please edit and publish it." 
    2424msgstr "Veuillez l'éditer et le publier." 
    2525 
    26 #: index.php:119 
     26#: _admin.php:93 
     27#: index.php:240 
     28msgid "Reply to this comment" 
     29msgstr "Répondre à ce commentaire" 
     30 
     31#: index.php:126 
    2732msgid "%s is not writable" 
    2833msgstr "%s n'est pas accessible en écriture" 
    2934 
    30 #: index.php:143 
     35#: index.php:150 
    3136msgid "Configuration successfully updated." 
    3237msgstr "Configuration mise à jour avec succès." 
    3338 
    34 #: index.php:193 
     39#: index.php:202 
    3540msgid "Add arrows to easily reply to comments on the blog" 
    3641msgstr "Ajouter des flèches pour répondre facilement aux commentaires sur le blog" 
    3742 
    38 #: index.php:199 
     43#: index.php:208 
    3944msgid "Activating this plugin also enforces wiki syntax in blog comments." 
    4045msgstr "L'activation de cette extension force la syntaxe wiki dans les commentaires du blog." 
    4146 
    42 #: index.php:205 
     47#: index.php:214 
    4348msgid "Display a text when the cursor is hovering the arrow" 
    4449msgstr "Afficher un texte quand le curseur survole la flèche" 
    4550 
    46 #: index.php:212 
    47 #: index.php:224 
     51#: index.php:221 
     52#: index.php:233 
    4853msgid "Append replies to appropriate comments" 
    4954msgstr "Attacher les réponses aux commentaires afférents" 
    5055 
    51 #: index.php:219 
     56#: index.php:228 
    5257msgid "Display a switch to toggle threading" 
    5358msgstr "Afficher un bouton pour basculer l'affichage en fil de commentaires" 
    5459 
    55 #: index.php:223 
     60#: index.php:232 
    5661msgid "Requires %s." 
    5762msgstr "Nécessite %s." 
    5863 
    59 #: index.php:230 
     64#: index.php:239 
    6065msgid "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" 
    6166msgstr "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" 
    6267 
    63 #: index.php:235 
     68#: index.php:244 
    6469msgid "Requires the %s plugin." 
    6570msgstr "Ceci nécessite l'extension %s." 
    6671 
    67 #: index.php:241 
     72#: index.php:250 
    6873msgid "Create an image with another color" 
    6974msgstr "Créer une image avec une autre couleur" 
    7075 
    71 #: index.php:248 
     76#: index.php:257 
    7277msgid "The default image will be used." 
    7378msgstr "L'image par défaut sera utilisée." 
    7479 
    75 #: index.php:251 
     80#: index.php:260 
    7681msgid "Preview:" 
    7782msgstr "Aperçu&nbsp;:" 
    7883 
    79 #: index.php:255 
     84#: index.php:264 
    8085msgid "Save configuration" 
    8186msgstr "Enregistrer la configuration" 
  • plugins/atReply/locales/fr/main.lang.php

    r2746 r3033  
    11<?php 
    22// Language: Français  
    3 // Module: atReply - 1.6 
    4 // Date: 2010-11-12 00:32:59  
     3// Module: atReply - 1.6.2 
     4// Date: 2011-05-14 19:23:45  
    55// Translated with dcTranslater - 1.5  
    66 
    7 #_admin.php:40 
    8 #index.php:188 
     7#_admin.php:41 
     8#index.php:197 
    99$GLOBALS['__l10n']['@ Reply'] = '@ Reply'; 
    1010 
    11 #_admin.php:74 
     11#_admin.php:75 
    1212$GLOBALS['__l10n']['@%s:'] = '@%s&nbsp;:'; 
    1313 
    14 #_admin.php:92 
    15 #index.php:231 
    16 $GLOBALS['__l10n']['reply to this comment'] = 'répondre à ce commentaire'; 
     14#_public.php:100 
     15$GLOBALS['__l10n']['Reply to this comment by {author}'] = 'Répondre à ce commentaire par {author}'; 
    1716 
    18 #_public.php:96 
    19 $GLOBALS['__l10n']['Reply to this comment'] = 'Répondre à ce commentaire'; 
    20  
    21 #_public.php:99 
     17#_public.php:103 
    2218$GLOBALS['__l10n']['Threaded comments'] = 'Fil de discussion'; 
    2319 
  • plugins/atReply/locales/fr/main.po

    r2746 r3033  
    11# Language: Français 
    2 # Module: atReply - 1.6 
    3 # Date: 2010-11-12 00:32:59 
     2# Module: atReply - 1.6.2 
     3# Date: 2011-05-14 19:23:45 
    44# Translated with translater 1.5 
    55 
     
    77msgstr "" 
    88"Content-Type: text/plain; charset=UTF-8\n" 
    9 "Project-Id-Version: atReply 1.6\n" 
     9"Project-Id-Version: atReply 1.6.2\n" 
    1010"POT-Creation-Date: \n" 
    11 "PO-Revision-Date: 2010-11-12T00:32:59+00:00\n" 
     11"PO-Revision-Date: 2011-05-14T19:23:45+00:00\n" 
    1212"Last-Translator: Ubuntu\n" 
    1313"Language-Team: \n" 
     
    1515"Content-Transfer-Encoding: 8bit\n" 
    1616 
    17 #: _admin.php:40 
    18 #: index.php:188 
     17#: _admin.php:41 
     18#: index.php:197 
    1919msgid "@ Reply" 
    2020msgstr "@ Reply" 
    2121 
    22 #: _admin.php:74 
     22#: _admin.php:75 
    2323msgid "@%s:" 
    2424msgstr "@%s&nbsp;:" 
    2525 
    26 #: _admin.php:92 
    27 #: index.php:231 
    28 msgid "reply to this comment" 
    29 msgstr "répondre à ce commentaire" 
     26#: _public.php:100 
     27msgid "Reply to this comment by {author}" 
     28msgstr "Répondre à ce commentaire par {author}" 
    3029 
    31 #: _public.php:96 
    32 msgid "Reply to this comment" 
    33 msgstr "Répondre à ce commentaire" 
    34  
    35 #: _public.php:99 
     30#: _public.php:103 
    3631msgid "Threaded comments" 
    3732msgstr "Fil de discussion" 
Note: See TracChangeset for help on using the changeset viewer.

Sites map