Dotclear

Changeset 2774


Ignore:
Timestamp:
11/20/10 19:00:21 (13 years ago)
Author:
JcDenis
Message:

rateIt 2.0-beta1:

  • Fixed install on nightly build
  • Added plural on rateItTotal (closes #605)
Location:
plugins/rateIt
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • plugins/rateIt/_define.php

    r2584 r2774  
    1717     /* Description*/         "Rating system for your blogs", 
    1818     /* Author */             "JC Denis", 
    19      /* Version */            '2.0-alpha6', 
     19     /* Version */            '2.0-beta1', 
    2020     /* Permissions */        'admin' 
    2121); 
    22      /* date */          #20100828 
     22     /* date */          #20101120 
    2323?> 
  • plugins/rateIt/_install.php

    r2584 r2774  
    2020{ 
    2121     # Check DC version 
    22      if (version_compare(DC_VERSION,'2.2-alpha','<')) 
     22     if (version_compare(str_replace("-r","-p",DC_VERSION),'2.2-alpha','<')) 
    2323     { 
    24           throw new Exception('Plugin called rateIt requires Dotclear 2.2 or higher.'); 
     24          throw new Exception('rateIt requires Dotclear 2.2'); 
    2525     } 
    2626     # Old addons (now included in rateIt) 
     
    6060      
    6161     # Settings 
     62     $core->blog->settings->addNamespace('rateit'); 
    6263     $s = $core->blog->settings->rateit; 
    6364      
  • plugins/rateIt/_prepend.php

    r2584 r2774  
    1212 
    1313if (!defined('DC_RC_PATH')){return;} 
    14 if (version_compare(DC_VERSION,'2.2-alpha','<')){return;} 
     14if (version_compare(str_replace("-r","-p",DC_VERSION),'2.2-alpha','<')){return;} 
    1515 
    1616global $__autoload, $core; 
  • plugins/rateIt/_public.php

    r2427 r2774  
    427427          $r = ''; 
    428428          if (isset($attr['totaltext']) && $attr['totaltext'] == 1) { 
     429                
     430               $none = 'no rate'; 
     431               $one = 'one rate'; 
     432               $more = '%d rates'; 
     433                
     434               if (isset($attr['none'])) { 
     435                    $none = addslashes($attr['none']); 
     436               } 
     437               if (isset($attr['one'])) { 
     438                    $one = addslashes($attr['one']); 
     439               } 
     440               if (isset($attr['more'])) { 
     441                    $more = addslashes($attr['more']); 
     442               } 
     443                
    429444               $r =  
    430445               "<?php \n". 
    431446               "if (\$_ctx->rateIt->total == 0) { \n". 
    432                "  \$total = sprintf(__('no rate'),\$_ctx->rateIt->total); \n". 
     447               "  \$total = sprintf(__('".$none."'),\$_ctx->rateIt->total); \n". 
    433448               "} elseif (\$_ctx->rateIt->total == 1) {\n". 
    434                "  \$total = sprintf(__('one rate'),\$_ctx->rateIt->total); \n". 
     449               "  \$total = sprintf(__('".$one."'),\$_ctx->rateIt->total); \n". 
    435450               "} else { \n". 
    436                "  \$total = sprintf(__('%d rates'),\$_ctx->rateIt->total); \n". 
     451               "  \$total = sprintf(__('".$more."'),\$_ctx->rateIt->total); \n". 
    437452               "} \n". 
    438453               "\$_ctx->rateIt->total = \$total; ?>\n"; 
  • plugins/rateIt/release.txt

    r2584 r2774  
    44 - Not added public API 
    55 - Not completed modules behaviors (delete/edit category, tag...) 
     6 
     72.0-beta1 20101120 
     8 * Fixed install on nightly build 
     9 * Added plural on rateItTotal (closes #605) 
    610 
    7112.0-alpha6 20100828 
Note: See TracChangeset for help on using the changeset viewer.

Sites map