Dotclear

Changeset 827


Ignore:
Timestamp:
02/26/09 23:41:12 (15 years ago)
Author:
Moe
Message:

@ Reply 1.3 :

  • added a setting to display a text when the cursor is hovering the arrow
  • added absolute URL to the preview image
Location:
plugins/atReply
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • plugins/atReply/_define.php

    r658 r827  
    3030  /* Description*/  'Easily reply to comments', 
    3131  /* Author */           'Moe (http://gniark.net/)', 
    32   /* Version */               '1.2', 
     32  /* Version */               '1.3', 
    3333  /* Permissions */ 'admin' 
    3434); 
  • plugins/atReply/_public.php

    r658 r827  
    7777          } 
    7878           
     79          $title = (($settings->atreply_display_title) ? 'true' : 'false'); 
     80           
    7981          # Javascript variables 
    8082          echo( 
    8183               '<script type="text/javascript">'. 
    8284               '//<![CDATA['."\n". 
     85               'var atReplyDisplayTitle = new Boolean('.$title.');'."\n". 
    8386               'var atReplyTitle = \''. 
    8487                    html::escapeHTML(__('Reply to this comment')).'\';'. 
    8588               'var atReplyImage = \''.$image_url.'\';'."\n". 
     89               'var atReplyLink = \' <a href="#" title="\'+atReplyTitle+\'">\'+'. 
     90               '\'<img src="\'+atReplyImage+\'" alt="\'+atReplyTitle+\'" /> \'+'. 
     91               '\'<span class="at_reply_title" style="display:none;">\'+'. 
     92                    'atReplyTitle+\'</span></a>\';'."\n". 
    8693               '//]]>'. 
    8794               '</script>'. 
  • plugins/atReply/atReply.js

    r658 r827  
    11/* Inspired by http://iyus.info/at-reply-petit-plugin-wordpress-inspire-par-twitter/ */ 
    22$(function() { 
    3      /* create link */ 
    4      var atReplyLink = ' <a href="#" title="'+atReplyTitle+'">'+  
    5           '<img src="'+atReplyImage+'" alt="'+atReplyTitle+'" /> '+  
    6           '<span class="at_reply_title" style="display:none;">'+ 
    7                     atReplyTitle+'</span></a>'; 
     3     /*$('#comments dd').each(function() { 
     4          var pattern = new RegExp('^(@\b)$',"g"); 
     5          if (pattern.test($(this).text())) { 
     6               $(this).css('background-color','Red'); 
     7          } 
     8     });*/ 
    89      
    910     $('span.commentAuthor').each(function() { 
     
    2223               return false; 
    2324          }); 
    24           /* add the link and an hover event*/ 
    25           $(this).parent().append(link).hover( 
     25           
     26          /* add the link */ 
     27          $(this).parent().append(link); 
     28           
     29          if (atReplyDisplayTitle != true) {return;} 
     30          /* add an hover effect */ 
     31          $(this).parent().hover( 
    2632          function () { 
    2733               $(this).find('.at_reply_title').show(); 
  • plugins/atReply/index.php

    r658 r827  
    3939          $settings->put('atreply_active',!empty($_POST['atreply_active']), 
    4040               'boolean','Enable @ Reply'); 
     41          $settings->put('atreply_display_title',!empty($_POST['atreply_display_title']), 
     42               'boolean','Display a text when the cursor is hovering the arrow'); 
    4143          $settings->put('atreply_color',$color, 
    4244               'string','@ Reply arrow\'s color'); 
     
    138140          '/atReply/reply.png'; 
    139141     if (file_exists(path::fullFromRoot($settings->public_path, 
    140                     DC_ROOT).'/atReply/reply.png')) 
     142          DC_ROOT).'/atReply/reply.png')) 
    141143     { 
    142144          $image_url = $personalized_image; 
     145           
     146          if (substr($settings->public_url,0,1) == '/') 
     147          { 
     148               # public_path is located at the root of the website 
     149               $parsed_url = @parse_url($core->blog->url); 
     150                
     151               $image_url = $parsed_url['scheme'].'://'.$parsed_url['host']. 
     152                    $personalized_image; 
     153                
     154               unset($parsed_url); 
     155          } else { 
     156               $image_url = $core->blog->url.$personalized_image; 
     157          } 
    143158     } 
    144159} 
     
    163178               <p><?php echo(form::checkbox('atreply_active',1, 
    164179                    $settings->atreply_active)); ?> 
    165                <label class="classic" for="atreply_active"> 
    166                     <?php printf(__('Enable %s'),__('@ Reply')); ?> 
    167                </label> 
     180                    <label class="classic" for="atreply_active"> 
     181                         <?php echo(__('Add arrows to easily reply to comments on the blog')); ?> 
     182                    </label> 
    168183               </p> 
    169184               <p class="form-note"> 
    170                     <?php printf(__('%s add arrows to easily reply to comments on the blog.'), 
    171                          __('@ Reply')); 
     185                    <?php 
    172186                         # from commentsWikibar/index.php 
    173187                         echo(' '.__('Activating this plugin also enforces wiki syntax in blog comments.')); ?> 
    174188               </p> 
     189 
     190               <p><?php echo(form::checkbox('atreply_display_title',1, 
     191                    $settings->atreply_display_title)); ?> 
     192                    <label class="classic" for="atreply_display_title"> 
     193                         <?php echo(__('Display a text when the cursor is hovering the arrow')); ?> 
     194                    </label> 
     195               </p> 
    175196                
    176197               <p> 
    177                <label class="classic" for="atreply_color"> 
    178                     <?php echo(__('Create an image with another color')); ?> 
    179                </label> 
     198                    <label class="classic" for="atreply_color"> 
     199                         <?php echo(__('Create an image with another color')); ?> 
     200                    </label> 
    180201                    <?php echo(form::field('atreply_color',7,7, 
    181202                         $settings->atreply_color,'colorpicker')); ?> 
  • plugins/atReply/locales/fr/main.po

    r658 r827  
    33"Project-Id-Version: @ Reply\n" 
    44"Report-Msgid-Bugs-To: \n" 
    5 "POT-Creation-Date: 2009-01-05 23:58+0100\n" 
    6 "PO-Revision-Date: 2009-01-05 23:59+0100\n" 
     5"POT-Creation-Date: 2009-02-26 23:35+0100\n" 
     6"PO-Revision-Date: 2009-02-26 23:35+0100\n" 
    77"Last-Translator: Moe <poedit@gniark.net>\n" 
    88"Language-Team: Moe <poedit@gniark.net>\n" 
     
    1717"X-Poedit-SearchPath-0: .\n" 
    1818 
    19 #: _public.php:84 
     19#: _public.php:87 
    2020msgid "Reply to this comment" 
    2121msgstr "Répondre à ce commentaire" 
     
    2323#: _admin.php:33 
    2424#: _admin.php:67 
    25 #: index.php:161 
    26 #: index.php:166 
    27 #: index.php:171 
     25#: index.php:176 
    2826msgid "@ Reply" 
    2927msgstr "@ Reply" 
     
    3331msgstr "répondre à ce commentaire" 
    3432 
    35 #: index.php:105 
     33#: index.php:107 
    3634#, php-format 
    3735msgid "%s is not writable" 
    3836msgstr "%s n'est pas accessible en écriture" 
    3937 
    40 #: index.php:129 
     38#: index.php:131 
    4139msgid "Configuration successfully updated." 
    4240msgstr "Configuration mise à jour avec succès." 
    4341 
    44 #: index.php:166 
    45 #, php-format 
    46 msgid "Enable %s" 
    47 msgstr "Activer %s" 
    48  
    49 #: index.php:170 
    50 #, php-format 
    51 msgid "%s add arrows to easily reply to comments on the blog." 
    52 msgstr "%s ajoute des flèches pour répondre facilement aux commentaires sur le blog." 
     42#: index.php:181 
     43msgid "Add arrows to easily reply to comments on the blog" 
     44msgstr "Ajouter des flèches pour répondre facilement aux commentaires sur le blog" 
    5345 
    5446# from commentsWikibar plugin 
    55 #: index.php:173 
     47#: index.php:187 
    5648msgid "Activating this plugin also enforces wiki syntax in blog comments." 
    5749msgstr "L'activation de cette extension force la syntaxe wiki dans les commentaires du blog." 
    5850 
    59 #: index.php:178 
     51#: index.php:193 
     52msgid "Display a text when the cursor is hovering the arrow" 
     53msgstr "Afficher un texte quand le curseur survole la flèche" 
     54 
     55#: index.php:199 
    6056msgid "Create an image with another color" 
    6157msgstr "Créer une image avec une autre couleur" 
    6258 
    63 #: index.php:184 
     59#: index.php:205 
    6460msgid "Leave empty to cancel this feature." 
    6561msgstr "" 
    6662 
    67 #: index.php:185 
     63#: index.php:206 
    6864msgid "The default image will be used." 
    6965msgstr "L'image par défaut sera utilisée." 
    7066 
    71 #: index.php:188 
     67#: index.php:209 
    7268msgid "Preview :" 
    7369msgstr "Aperçu :" 
    7470 
    75 #: index.php:192 
     71#: index.php:213 
    7672msgid "Save configuration" 
    7773msgstr "Enregistrer la configuration" 
    7874 
     75#~ msgid "Enable %s" 
     76#~ msgstr "Activer %s" 
     77 
Note: See TracChangeset for help on using the changeset viewer.

Sites map