Dotclear

Changeset 2405


Ignore:
Timestamp:
06/28/10 12:46:50 (13 years ago)
Author:
JcDenis
Message:

kUtRL 0.4

  • Switched to DC 2.2
  • Fixed no short urls on preview mode
  • Fixed lock hash of deleted urls
  • Fixed hide new short url widget on kutrl pages
  • Fixed typo
  • Added active mode that shorten urls on default template values
  • Added special tweeter message for post (can include post title)
  • Added kutrl special 404 page
Location:
plugins/kUtRL
Files:
3 added
17 edited

Legend:

Unmodified
Added
Removed
  • plugins/kUtRL/_admin.php

    r2274 r2405  
    2323); 
    2424 
    25 $s = kutrlSettings($core); 
    26  
    2725# Admin behaviors 
    28 if ($s->kutrl_active) 
     26if ($core->blog->settings->kUtRL->kutrl_active) 
    2927{ 
    3028     $core->addBehavior('adminPostHeaders',array('adminKutrl','adminPostHeaders')); 
     
    3937 
    4038# Import/export 
    41 if ($s->kutrl_extend_importexport) 
     39if ($core->blog->settings->kUtRL->kutrl_extend_importexport) 
    4240{ 
    4341     $core->addBehavior('exportFull',array('backupKutrl','exportFull')); 
     
    5553          return dcPage::jsLoad('index.php?pf=kUtRL/js/admin.js'); 
    5654     } 
    57  
     55      
    5856     public static function adminPostFormSidebar($post) 
    5957     { 
    6058          global $core; 
    61           $s = kutrlSettings($core); 
    62  
     59          $s = $core->blog->settings->kUtRL; 
     60           
    6361          if (!$s->kutrl_active || !$s->kutrl_admin_service 
    6462           || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 
    65  
    66           try { 
    67                $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 
    68           } 
    69           catch (Exception $e) { 
    70                return; 
    71           } 
    72  
     63           
     64          try 
     65          { 
     66               $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 
     67          } 
     68          catch (Exception $e) 
     69          { 
     70               return; 
     71          } 
     72           
    7373          if ($post) 
    7474          { 
     
    8181               $rs = false; 
    8282          } 
    83  
     83           
    8484          echo  
    8585          '<h3 id="kutrl-form-title" class="clear">'.__('Short link').'</h3>'. 
    8686          '<div id="kutrl-form-content">'. 
    8787          form::hidden(array('kutrl_old_post_url'),$post_url); 
    88  
     88           
    8989          if (!$rs) 
    9090          { 
     
    131131               } 
    132132               $href = $kut->url_base.$rs->hash; 
    133  
     133                
    134134               echo  
    135135               '<p><label class="classic">'. 
     
    140140          echo '</div>'; 
    141141     } 
    142  
     142      
    143143     public static function adminAfterPostUpdate($cur,$post_id) 
    144144     { 
    145145          global $core; 
    146           $s = kutrlSettings($core); 
    147  
     146          $s = $core->blog->settings->kUtRL; 
     147           
    148148          # Create: see adminAfterPostCreate 
    149149          if (!empty($_POST['kutrl_create']) 
    150150           || !$s->kutrl_active || !$s->kutrl_admin_service  
    151151           || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 
    152  
    153           try { 
    154                $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 
    155           } 
    156           catch (Exception $e) { 
    157                return; 
    158           } 
    159  
     152           
     153          try 
     154          { 
     155               $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 
     156          } 
     157          catch (Exception $e) 
     158          { 
     159               return; 
     160          } 
     161           
    160162          if (empty($_POST['kutrl_old_post_url'])) return; 
    161  
     163           
    162164          $old_post_url = $_POST['kutrl_old_post_url']; 
    163  
     165           
    164166          if (!($rs = $kut->isKnowUrl($old_post_url))) return; 
    165  
     167           
    166168          $rs = $core->blog->getPosts(array('post_id'=>$post_id)); 
    167  
     169           
    168170          if ($rs->isEmpty()) return; 
    169  
     171           
    170172          $new_post_url = $rs->getURL(); 
    171  
     173           
    172174          # Delete 
    173175          if (!empty($_POST['kutrl_delete'])) 
     
    179181          { 
    180182               if ($old_post_url == $new_post_url) return; 
    181  
     183                
    182184               $kut->remove($old_post_url); 
    183  
     185                
    184186               $rs = $kut->hash($new_post_url,$custom); // better to update (not yet implemented) 
    185187               $url = $kut->url_base.$rs->hash; 
    186  
     188                
    187189               # Send new url by libDcTwitter 
    188                if (!empty($rs) && !empty($_POST['kutrl_twit_send'])) { 
     190               if (!empty($rs) && !empty($_POST['kutrl_twit_send'])) 
     191               { 
     192                    $twit = $core->blog->settings->kUtRL->kutrl_twit_post_msg; 
     193                    if (!$twit) 
     194                    { 
     195                         $twit = kutrlLibDcTwitter::getMessage('kUtRL'); 
     196                    } 
     197                    if ($twit) 
     198                    { 
     199                         $twit = str_replace( 
     200                              array('%L','%B','%U'), 
     201                              array($url,$core->blog->name,$core->auth->getInfo('user_cn')) 
     202                              ,$twit 
     203                         ); 
     204                         kutrlLibDcTwitter::sendMessage('kUtRL',$twit); 
     205                    } 
     206               } 
     207          } 
     208     } 
     209      
     210     public static function adminAfterPostCreate($cur,$post_id) 
     211     { 
     212          global $core; 
     213          $s = $core->blog->settings->kUtRL; 
     214           
     215          if (empty($_POST['kutrl_create'])  
     216           || !$s->kutrl_active || !$s->kutrl_admin_service  
     217           || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 
     218           
     219          try 
     220          { 
     221               $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 
     222          } 
     223          catch (Exception $e) 
     224          { 
     225               return; 
     226          } 
     227           
     228          $rs = $core->blog->getPosts(array('post_id'=>$post_id)); 
     229           
     230          if ($rs->isEmpty()) return; 
     231           
     232          $custom = !empty($_POST['kutrl_create_custom']) && $kut->allow_customized_hash ? 
     233               $_POST['kutrl_create_custom'] : null; 
     234           
     235          $rs = $kut->hash($rs->getURL(),$custom); 
     236          $kut->url_base.$rs->hash; 
     237           
     238          # Send new url by libDcTwitter 
     239          if (!empty($rs) && !empty($_POST['kutrl_twit_send'])) 
     240          { 
     241               $twit = $core->blog->settings->kUtRL->kutrl_twit_post_msg; 
     242               if (!$twit) 
     243               { 
    189244                    $twit = kutrlLibDcTwitter::getMessage('kUtRL'); 
     245               } 
     246               if ($twit) 
     247               { 
    190248                    $twit = str_replace( 
    191249                         array('%L','%B','%U'), 
     
    197255          } 
    198256     } 
    199  
    200      public static function adminAfterPostCreate($cur,$post_id) 
    201      { 
    202           global $core; 
    203           $s = kutrlSettings($core); 
    204  
    205           if (empty($_POST['kutrl_create'])  
    206            || !$s->kutrl_active || !$s->kutrl_admin_service  
    207            || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 
    208  
    209           try { 
    210                $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 
    211           } 
    212           catch (Exception $e) { 
    213                return; 
    214           } 
    215  
     257      
     258     public static function adminBeforePostDelete($post_id) 
     259     { 
     260          global $core; 
     261          $s = $core->blog->settings->kUtRL; 
     262           
     263          if (!$s->kutrl_active || !$s->kutrl_admin_service  
     264           || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 
     265           
     266          try 
     267          { 
     268               $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 
     269          } 
     270          catch (Exception $e) 
     271          { 
     272               return; 
     273          } 
     274           
    216275          $rs = $core->blog->getPosts(array('post_id'=>$post_id)); 
    217  
     276           
    218277          if ($rs->isEmpty()) return; 
    219  
    220           $custom = !empty($_POST['kutrl_create_custom']) && $kut->allow_customized_hash ? 
    221                $_POST['kutrl_create_custom'] : null; 
    222  
    223           $rs = $kut->hash($rs->getURL(),$custom); 
    224           $kut->url_base.$rs->hash; 
    225  
    226           # Send new url by libDcTwitter 
    227           if (!empty($rs) && !empty($_POST['kutrl_twit_send'])) { 
    228                $twit = kutrlLibDcTwitter::getMessage('kUtRL'); 
    229                $twit = str_replace( 
    230                     array('%L','%B','%U'), 
    231                     array($url,$core->blog->name,$core->auth->getInfo('user_cn')) 
    232                     ,$twit 
    233                ); 
    234                kutrlLibDcTwitter::sendMessage('kUtRL',$twit); 
    235           } 
    236      } 
    237  
    238      public static function adminBeforePostDelete($post_id) 
    239      { 
    240           global $core; 
    241           $s = kutrlSettings($core); 
    242  
    243           if (!$s->kutrl_active || !$s->kutrl_admin_service  
    244            || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 
    245  
    246           try { 
    247                $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 
    248           } 
    249           catch (Exception $e) { 
    250                return; 
    251           } 
    252  
    253           $rs = $core->blog->getPosts(array('post_id'=>$post_id)); 
    254  
    255           if ($rs->isEmpty()) return; 
    256  
     278           
    257279          $kut->remove($rs->getURL()); 
    258280     } 
    259  
     281      
    260282     public static function adminPostsActionsCombo($args) 
    261283     { 
    262284          global $core; 
    263           $s = kutrlSettings($core); 
    264  
     285          $s = $core->blog->settings->kUtRL; 
     286           
    265287          if (!$s->kutrl_active || !$s->kutrl_admin_service 
    266288           || !$core->auth->check('admin',$core->blog->id)  
    267289           || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 
    268  
     290           
    269291          $args[0][__('kUtRL')][__('create short link')] = 'kutrl_create'; 
    270292          $args[0][__('kUtRL')][__('delete short link')] = 'kutrl_delete'; 
     
    275297          if ($action != 'kutrl_create'  
    276298           && $action != 'kutrl_delete') return; 
    277  
    278           $s = kutrlSettings($core); 
    279  
     299           
     300          $s = $core->blog->settings->kUtRL; 
     301           
    280302          if (!$s->kutrl_active || !$s->kutrl_admin_service  
    281303           || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 
    282  
    283           try { 
    284                $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 
    285           } 
    286           catch (Exception $e) { 
    287                return; 
    288           } 
    289  
     304           
     305          try 
     306          { 
     307               $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 
     308          } 
     309          catch (Exception $e) 
     310          { 
     311               return; 
     312          } 
     313           
    290314          while ($posts->fetch()) 
    291315          { 
    292316               $url = $posts->getURL(); 
    293  
     317                
    294318               if ($action == 'kutrl_create') 
    295319               { 
    296320                    $kut->hash($url); 
    297321               } 
    298  
     322                
    299323               if ($action == 'kutrl_delete') 
    300324               { 
     
    319343          ); 
    320344     } 
    321  
     345      
    322346     public static function exportFull($core,$exp) 
    323347     { 
    324348          $exp->exportTable('kutrl'); 
    325349     } 
    326  
     350      
    327351     public static function importInit($bk,$core) 
    328352     { 
     
    330354          $bk->kutrl = new kutrlLog($core); 
    331355     } 
    332  
     356      
    333357     public static function importSingle($line,$bk,$core) 
    334358     { 
     
    342366          } 
    343367     } 
    344  
     368      
    345369     public static function importFull($line,$bk,$core) 
    346370     { 
     
    348372          { 
    349373               $bk->cur_kutrl->clean(); 
    350  
     374                
    351375               $bk->cur_kutrl->kut_id = (integer) $line->kut_id; 
    352376               $bk->cur_kutrl->blog_id = (string) $line->blog_id; 
     
    358382               $bk->cur_kutrl->kut_counter = (integer) $line->kut_counter; 
    359383               $bk->cur_kutrl->kut_password = (string) $line->kut_password; 
    360  
     384                
    361385               $bk->cur_kutrl->insert(); 
    362386          } 
  • plugins/kUtRL/_define.php

    r2274 r2405  
    1717     /* Description*/         "Use, create and serve short url on your blog", 
    1818     /* Author */             "JC Denis", 
    19      /* Version */            '0.3.3', 
     19     /* Version */            '0.4', 
    2020     /* Permissions */        'admin' 
    2121); 
    22      /* date */          #20100528 
     22     /* date */          #20100628 
    2323?> 
  • plugins/kUtRL/_install.php

    r2190 r2405  
    2323try 
    2424{ 
    25      # Check DC version (dev on) 
    26      if (!version_compare(DC_VERSION,'2.1.6','>=')) 
     25     if (version_compare(DC_VERSION,'2.2-alpha','<')) 
    2726     { 
    28           throw new Exception('Plugin called kUtRL requires Dotclear 2.1.6 or higher.'); 
     27          throw new Exception('Plugin called kUtRL requires Dotclear 2.2 or higher.'); 
    2928     } 
    30  
     29      
    3130     # Table 
    3231     $t = new dbStruct($core->con,$core->prefix); 
     
    4140          ->kut_password('varchar',32,true) 
    4241          ->kut_counter('bigint',0,false,0) 
    43  
     42           
    4443          ->primary('pk_kutrl','kut_id') 
    4544          ->index('idx_kut_blog_id','btree','blog_id') 
     
    4746          ->index('idx_kut_service','btree','kut_service') 
    4847          ->index('idx_kut_type','btree','kut_type'); 
    49  
     48      
    5049     $ti = new dbStruct($core->con,$core->prefix); 
    5150     $changes = $ti->synchronize($t); 
    52  
     51      
    5352     # Settings 
    54      $s = kutrlSettings($core); 
     53     $core->blog->settings->addNamespace('kUtRL'); 
     54     $s = $core->blog->settings->kUtRL; 
    5555     $s->put('kutrl_active',false,'boolean','Enabled kutrl plugin',false,true); 
    5656     $s->put('kutrl_admin_service','local','string','Service to use to shorten links on admin',false,true); 
     
    5858     $s->put('kutrl_wiki_service','local','string','Service to use to shorten links on contents',false,true); 
    5959     $s->put('kutrl_limit_to_blog',false,'boolean','Limited short url to current blog\'s url',false,true); 
    60      $s->put('kutrl_tpl_passive',true,'boolean','Template return long url if kutrl is unactivate',false,true); 
     60     $s->put('kutrl_tpl_passive',true,'boolean','Return long url on kutrl tags if kutrl is unactivate',false,true); 
     61     $s->put('kutrl_tpl_active',false,'boolean','Return short url on dotclear tags if kutrl is active',false,true); 
    6162     $s->put('kutrl_admin_entry_default',true,'boolean','Create short link an new entry by default',false,true); 
    6263     # Settings for features related to others plugins 
     
    7172     $s->put('kutrl_srv_local_public',false,'boolean','Enabled local service public page',false,true); 
    7273     $s->put('kutrl_srv_local_css',$local_css,'string','Special CSS for kutrl local service',false,true); 
     74     $s->put('kutrl_srv_local_404_active',false,'boolean','Use special 404 page on unknow urls',false,true); 
    7375     # Settings for "bilbolinks" service 
    7476     $s->put('kutrl_srv_bilbolinks_base','http://tux-pla.net/','string','URL of bilbolinks service',false,true); 
    7577     # Twitter settings 
    76      $s->put('kutrl_twit_msg','%B : %U (from kUtRL)','string','Twit message to post',false,true); 
    77      $s->put('kutrl_twit_onadmin',true,'boolean','Post twit on new link on administration form',false,true); 
    78      $s->put('kutrl_twit_onpublic',false,'boolean','Post twit on new link on public form',false,true); 
    79      $s->put('kutrl_twit_ontpl',false,'boolean','Post twit on new link on templates',false,true); 
    80      $s->put('kutrl_twit_onwiki',false,'boolean','Post twit on new link on wiki synthax',false,true); 
     78     $s->put('kutrl_twit_msg','%L by %U on %B','string','Tweet message to send',false,true); 
     79     $s->put('kutrl_twit_onadmin',true,'boolean','Send tweet on new link on administration form',false,true); 
     80     $s->put('kutrl_twit_onpublic',false,'boolean','Send tweet on new link on public form',false,true); 
     81     $s->put('kutrl_twit_ontpl',false,'boolean','Send tweet on new link on templates',false,true); 
     82     $s->put('kutrl_twit_onwiki',false,'boolean','Send tweet on new link on wiki synthax',false,true); 
     83     $s->put('kutrl_twit_post_msg','%T on %L','string','Special tweet message to send on admin edit entry page',false,true); 
    8184      
    82  
    8385     # Version 
    8486     $core->setVersion('kUtRL',$new_version); 
    85  
     87      
    8688     # Get dcMiniUrl records as this plugin do the same 
    8789     if ($core->plugins->moduleExists('dcMiniUrl')) 
  • plugins/kUtRL/_prepend.php

    r2274 r2405  
    1212 
    1313if (!defined('DC_RC_PATH')) return; 
     14if (version_compare(DC_VERSION,'2.2-alpha','<')){return;} 
    1415 
    1516global $__autoload, $core; 
     17 
     18# Namespace for settings 
     19$core->blog->settings->addNamespace('kUtRL'); 
    1620 
    1721# Main class 
     
    2327 
    2428$__autoload['localKutrlService'] = dirname(__FILE__).'/inc/services/class.local.service.php'; 
     29$__autoload['isgdKutrlService'] = dirname(__FILE__).'/inc/services/class.isgd.service.php'; 
     30$__autoload['shorttoKutrlService'] = dirname(__FILE__).'/inc/services/class.shortto.service.php'; 
     31$__autoload['trimKutrlService'] = dirname(__FILE__).'/inc/services/class.trim.service.php'; 
     32$__autoload['bitlyKutrlService'] = dirname(__FILE__).'/inc/services/class.bitly.service.php'; 
     33$__autoload['bilbolinksKutrlService'] = dirname(__FILE__).'/inc/services/class.bilbolinks.service.php'; 
     34 
    2535$core->kutrlServices['local'] = 'localKutrlService'; 
    26  
    27 $__autoload['isgdKutrlService'] = dirname(__FILE__).'/inc/services/class.isgd.service.php'; 
    2836$core->kutrlServices['isgd'] = 'isgdKutrlService'; 
    29  
    30 $__autoload['shorttoKutrlService'] = dirname(__FILE__).'/inc/services/class.shortto.service.php'; 
    3137$core->kutrlServices['shortto'] = 'shorttoKutrlService'; 
    32  
    33 $__autoload['trimKutrlService'] = dirname(__FILE__).'/inc/services/class.trim.service.php'; 
    3438$core->kutrlServices['trim'] = 'trimKutrlService'; 
    35  
    36 $__autoload['bitlyKutrlService'] = dirname(__FILE__).'/inc/services/class.bitly.service.php'; 
    3739$core->kutrlServices['bitly'] = 'bitlyKutrlService'; 
    38  
    39 $__autoload['bilbolinksKutrlService'] = dirname(__FILE__).'/inc/services/class.bilbolinks.service.php'; 
    4040$core->kutrlServices['bilbolinks'] = 'bilbolinksKutrlService'; 
    4141 
     
    5252$__autoload['kutrlLibDcTwitter'] = dirname(__FILE__).'/inc/lib.dc.twitter.php'; 
    5353 
    54 # DC 2.1.6 vs 2.2 settings 
    55 function kutrlSettings($core,$namespace='kUtRL') 
    56 { 
    57      if (version_compare(DC_VERSION,'2.2-alpha','>=')) {  
    58           $core->blog->settings->addNamespace($namespace);  
    59           return $core->blog->settings->{$namespace};  
    60      } else {  
    61           $core->blog->settings->setNamespace($namespace);  
    62           return $core->blog->settings;  
    63      } 
    64 } 
    65  
    6654# Add kUtRL events on plugin activityReport 
    67 if (kutrlSettings($core)->kutrl_extend_activityreport && defined('ACTIVITY_REPORT')) 
     55if ($core->blog->settings->kUtRL->kutrl_extend_activityreport && defined('ACTIVITY_REPORT')) 
    6856{ 
    6957     require_once dirname(__FILE__).'/inc/lib.kutrl.activityreport.php'; 
  • plugins/kUtRL/_public.php

    r2274 r2405  
    1515require_once dirname(__FILE__).'/_widgets.php'; 
    1616 
    17 $core->addBehavior('publicBeforeDocument',array('urlKutrl','publicBeforeDocument')); 
    18 $core->addBehavior('publicHeadContent',array('urlKutrl','publicHeadContent')); 
     17$core->tpl->setPath($core->tpl->getPath(),dirname(__FILE__).'/default-templates'); 
     18 
     19$core->addBehavior('publicBeforeDocument',array('pubKutrl','publicBeforeDocument')); 
     20$core->addBehavior('publicHeadContent',array('pubKutrl','publicHeadContent')); 
     21$core->addBehavior('publicBeforeContentFilter',array('pubKutrl','publicBeforeContentFilter')); 
    1922 
    2023$core->tpl->addBlock('kutrlPageIf',array('tplKutrl','pageIf')); 
     
    4548     { 
    4649          global $core, $_ctx; 
    47           $s = kutrlSettings($core); 
    48  
     50          $s = $core->blog->settings->kUtRL; 
     51           
     52          # Not active, go to default 404 
    4953          if (!$s->kutrl_active) 
    5054          { 
     
    5256               return; 
    5357          } 
    54  
     58          # Not a valid url, go to kutrl 404 
    5559          if (!preg_match('#^(|(/(.*?)))$#',$args,$m)) 
    5660          { 
    57                self::p404(); 
    58                return; 
    59           } 
    60  
     61               self::kutrl404(); 
     62               return; 
     63          } 
     64           
    6165          $args = isset($m[3]) ? $m[3] : ''; 
    6266          $_ctx->kutrl_msg = ''; 
    6367          $_ctx->kutrl_hmf = hmfKutrl::create(); 
    6468          $_ctx->kutrl_hmfp = hmfKutrl::protect($_ctx->kutrl_hmf); 
    65  
     69           
    6670          $kut = new $core->kutrlServices['local']($core,$s->kutrl_limit_to_blog); 
    67  
     71           
     72          # Nothing on url 
    6873          if ($m[1] == '/') 
    6974          { 
    7075               $_ctx->kutrl_msg = 'No link given.'; 
    7176          } 
    72  
    73           // find suffix on redirect url 
     77          # find suffix on redirect url 
    7478          $suffix = ''; 
    7579          if (preg_match('@^([^?/#]+)(.*?)$@',$args,$more)) 
     
    7882               $suffix = $more[2]; 
    7983          } 
    80  
     84          # No arg, go to kurtl page 
    8185          if ($args == '') 
    8286          { 
     
    8488               return; 
    8589          } 
    86  
     90          # Not find, go to kutrl 404 
    8791          if (false === ($url = $kut->getUrl($args))) 
    8892          { 
    89                $_ctx->kutrl_msg = 'Failed to find short link.'; 
    90                self::pageKutrl($kut); 
    91                return; 
    92           } 
    93  
     93               //$_ctx->kutrl_msg = 'Failed to find short link.'; 
     94               //self::pageKutrl($kut); 
     95                
     96               self::kutrl404(); 
     97               return; 
     98          } 
     99          # Removed (empty url), go to kutrl 404 
     100          if (!$url) 
     101          { 
     102               self::kutrl404(); 
     103               return; 
     104          } 
     105           
    94106          $core->blog->triggerBlog(); 
    95107          http::redirect($url.$suffix); 
    96108          return; 
    97109     } 
    98  
     110      
    99111     private static function pageKutrl($kut) 
    100112     { 
    101113          global $core, $_ctx; 
    102           $s = kutrlSettings($core); 
    103  
    104           if (!$s->kutrl_active || !$s->kutrl_srv_local_public) 
     114          $s = $core->blog->settings->kUtRL; 
     115           
     116          # Not active, go to default 404 
     117          if (!$s->kutrl_active) 
    105118          { 
    106119               self::p404(); 
    107120               return; 
    108121          } 
    109  
    110           # Valid form 
     122          # Public page not active, go to kutrl 404 
     123          if (!$s->kutrl_srv_local_public) 
     124          { 
     125               self::kutrl404(); 
     126               return; 
     127          } 
     128          # Validation form 
    111129          $url = !empty($_POST['longurl']) ? trim($core->con->escape($_POST['longurl'])) : ''; 
    112130          if (!empty($url)) 
     
    114132               $hmf = !empty($_POST['hmf']) ? $_POST['hmf'] : '!'; 
    115133               $hmfu = !empty($_POST['hmfp']) ? hmfKutrl::unprotect($_POST['hmfp']) : '?'; 
    116  
     134                
    117135               $err = false; 
    118136               if (!$err) 
     
    217235               } 
    218236          } 
    219  
     237           
    220238          $core->tpl->setPath($core->tpl->getPath(),dirname(__FILE__).'/default-templates'); 
    221239          self::serveDocument('kutrl.html'); 
    222240          return; 
    223241     } 
    224  
     242      
     243     protected static function kutrl404() 
     244     { 
     245          global $core; 
     246           
     247          if (!$core->blog->settings->kUtRL->kutrl_srv_local_404_active) 
     248          { 
     249               self::p404(); 
     250               return; 
     251          } 
     252           
     253          $core->tpl->setPath($core->tpl->getPath(),dirname(__FILE__).'/default-templates'); 
     254          $_ctx =& $GLOBALS['_ctx']; 
     255          $core = $GLOBALS['core']; 
     256           
     257          header('Content-Type: text/html; charset=UTF-8'); 
     258          http::head(404,'Not Found'); 
     259          $core->url->type = '404'; 
     260          $_ctx->current_tpl = 'kutrl404.html'; 
     261          $_ctx->content_type = 'text/html'; 
     262           
     263          echo $core->tpl->getData($_ctx->current_tpl); 
     264           
     265          # --BEHAVIOR-- publicAfterDocument 
     266          $core->callBehavior('publicAfterDocument',$core); 
     267          exit; 
     268     } 
     269} 
     270 
     271class pubKutrl 
     272{ 
     273     # Replace long urls on the fly for default tags 
     274     public static function publicBeforeContentFilter($core,$tag,$args) 
     275     { 
     276          if (!$core->blog->settings->kUtRL->kutrl_active  
     277           || !$core->blog->settings->kUtRL->kutrl_tpl_active) return; 
     278           
     279          $know_tags = array( 
     280               'AttachmentURL', 
     281               'MediaURL', 
     282               'EntryAuthorURL', 
     283               'EntryURL', 
     284               'CommentAuthorURL', 
     285               'CommentPostURL' 
     286          ); 
     287           
     288          # Unknow tag 
     289          if (!in_array($tag,$know_tags)) return; 
     290           
     291          global $_ctx; 
     292           
     293          # Oups 
     294          if (!$_ctx->exists('kutrl')) return; 
     295           
     296          # Existing 
     297          if (false !== ($kutrl_rs = $_ctx->kutrl->isKnowUrl($args[0]))) 
     298          { 
     299               $args[0] = $_ctx->kutrl->url_base.$kutrl_rs->hash; 
     300          } 
     301          # New 
     302          elseif (false !== ($kutrl_rs = $_ctx->kutrl->hash($args[0]))) 
     303          { 
     304               $args[0] = $_ctx->kutrl->url_base.$kutrl_rs->hash; 
     305           
     306               # Send new url by libDcTwitter 
     307               if ($_ctx->kutrl_twit_ontpl) 
     308               { 
     309                    $twit = kutrlLibDcTwitter::getMessage('kUtRL'); 
     310                    $twit = str_replace(array('%L','%B','%U'),array($_ctx->kutrl->url_base.$kutrl_rs->hash,$core->blog->name,__('public')),$twit); 
     311                    kutrlLibDcTwitter::sendMessage('kUtRL',$twit); 
     312               } 
     313          } 
     314     } 
     315      
    225316     public static function publicBeforeDocument($core) 
    226317     { 
    227318          global $_ctx; 
    228           $s = kutrlSettings($core); 
     319          $s = $core->blog->settings->kUtRL; 
    229320 
    230321          # Passive : all kutrl tag return long url 
     
    232323          # Twitter feature when auto create short link on template 
    233324          $_ctx->kutrl_twit_ontpl = (boolean) $s->kutrl_twit_ontpl; 
    234  
     325           
    235326          if (!$s->kutrl_active || !$s->kutrl_tpl_service  
    236327           || !isset($core->kutrlServices[$s->kutrl_tpl_service])) return; 
    237  
     328           
    238329          $_ctx->kutrl = new $core->kutrlServices[$s->kutrl_tpl_service]($core,$s->kutrl_limit_to_blog); 
    239330     } 
    240  
     331      
    241332     public static function publicHeadContent($core) 
    242333     { 
    243           $s = kutrlSettings($core); 
    244           $css = $s->kutrl_srv_local_css; 
     334          $css = $core->blog->settings->kUtRL->kutrl_srv_local_css; 
    245335          if ($css) 
    246336          { 
     
    261351          return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("kutrl")').'; ?>'; 
    262352     } 
    263  
     353      
    264354     public static function pageIf($attr,$content) 
    265355     { 
    266356          $operator = isset($attr['operator']) ? self::getOperator($attr['operator']) : '&&'; 
    267  
     357           
    268358          if (isset($attr['is_active'])) 
    269359          { 
    270360               $sign = (boolean) $attr['is_active'] ? '' : '!'; 
    271                $if[] = $sign.'$s->kutrl_srv_local_public'; 
    272           } 
    273  
     361               $if[] = $sign.'$core->blog->settings->kUtRL->kutrl_srv_local_public'; 
     362          } 
     363           
    274364          if (empty($if)) 
    275365          { 
    276366               return $content; 
    277367          } 
    278  
     368           
    279369          return  
    280           "<?php \$s = kutrlSettings(\$core); ". 
    281           "if(".implode(' '.$operator.' ',$if).") : ?>\n". 
     370          "<?php if(".implode(' '.$operator.' ',$if).") : ?>\n". 
    282371          $content. 
    283372          "<?php endif; unset(\$s);?>\n"; 
    284373     } 
    285  
     374      
    286375     public static function pageMsgIf($attr,$content) 
    287376     { 
    288377          $operator = isset($attr['operator']) ? self::getOperator($attr['operator']) : '&&'; 
    289  
     378           
    290379          if (isset($attr['has_message'])) 
    291380          { 
     
    293382               $if[] = '"" '.$sign.'= $_ctx->kutrl_msg'; 
    294383          } 
    295  
     384           
    296385          if (empty($if)) 
    297386          { 
    298387               return $content; 
    299388          } 
    300  
     389           
    301390          return  
    302391          "<?php if(".implode(' '.$operator.' ',$if).") : ?>\n". 
     
    304393          "<?php endif; ?>\n"; 
    305394     } 
    306  
     395      
    307396     public static function pageMsg($attr) 
    308397     { 
    309398          return '<?php echo $_ctx->kutrl_msg; ?>'; 
    310399     } 
    311  
     400      
    312401     public static function humanField($attr) 
    313402     { 
    314403          return "<?php echo sprintf(__('Rewrite \"%s\" in next field to show that you are not a robot:'),\$_ctx->kutrl_hmf); ?>"; 
    315404     } 
    316  
     405      
    317406     public static function humanFieldProtect($attr) 
    318407     { 
     
    321410          "<?php echo \$core->formNonce(); ?>"; 
    322411     } 
    323  
     412      
    324413     public static function AttachmentKutrlIf($attr,$content) 
    325414     { 
    326415          return self::genericKutrlIf('$attach_f->file_url',$attr,$content); 
    327416     } 
    328  
     417      
    329418     public static function AttachmentKutrl($attr) 
    330419     { 
    331420          return self::genericKutrl('$attach_f->file_url',$attr); 
    332421     } 
    333  
     422      
    334423     public static function MediaKutrlIf($attr,$content) 
    335424     { 
    336425          return self::genericKutrlIf('$_ctx->file_url',$attr,$content); 
    337426     } 
    338  
     427      
    339428     public static function MediaKutrl($attr) 
    340429     { 
    341430          return self::genericKutrl('$_ctx->file_url',$attr); 
    342431     } 
    343  
     432      
    344433     public static function EntryAuthorKutrlIf($attr,$content) 
    345434     { 
    346435          return self::genericKutrlIf('$_ctx->posts->user_url',$attr,$content); 
    347436     } 
    348  
     437      
    349438     public static function EntryAuthorKutrl($attr) 
    350439     { 
    351440          return self::genericKutrl('$_ctx->posts->user_url',$attr); 
    352441     } 
    353  
     442      
    354443     public static function EntryKutrlIf($attr,$content) 
    355444     { 
    356445          return self::genericKutrlIf('$_ctx->posts->getURL()',$attr,$content); 
    357446     } 
    358  
     447      
    359448     public static function EntryKutrl($attr) 
    360449     { 
    361450          return self::genericKutrl('$_ctx->posts->getURL()',$attr); 
    362451     } 
    363  
     452      
    364453     public static function CommentAuthorKutrlIf($attr,$content) 
    365454     { 
    366455          return self::genericKutrlIf('$_ctx->comments->getAuthorURL()',$attr,$content); 
    367456     } 
    368  
     457      
    369458     public static function CommentAuthorKutrl($attr) 
    370459     { 
    371460          return self::genericKutrl('$_ctx->comments->getAuthorURL()',$attr); 
    372461     } 
    373  
     462      
    374463     public static function CommentPostKutrlIf($attr,$content) 
    375464     { 
    376465          return self::genericKutrlIf('$_ctx->comments->getPostURL()',$attr,$content); 
    377466     } 
    378  
     467      
    379468     public static function CommentPostKutrl($attr) 
    380469     { 
    381470          return self::genericKutrl('$_ctx->comments->getPostURL()',$attr); 
    382471     } 
    383  
     472      
    384473     protected static function genericKutrlIf($str,$attr,$content) 
    385474     { 
    386475          $operator = isset($attr['operator']) ? self::getOperator($attr['operator']) : '&&'; 
    387  
     476           
    388477          if (isset($attr['is_active'])) 
    389478          { 
     
    391480               $if[] = $sign.'$_ctx->exists("kutrl")'; 
    392481          } 
    393  
     482           
    394483          if (isset($attr['passive_mode'])) 
    395484          { 
     
    397486               $if[] = $sign.'$_ctx->kutrl_passive'; 
    398487          } 
    399  
     488           
    400489          if (isset($attr['has_kutrl'])) 
    401490          { 
     
    403492               $if[] = '($_ctx->exists("kutrl") && false '.$sign.'== $_ctx->kutrl->select('.$str.',null,null,"kutrl"))'; 
    404493          } 
    405  
     494           
    406495          if (empty($if)) 
    407496          { 
     
    413502          "<?php endif; ?>\n"; 
    414503     } 
    415  
     504      
    416505     protected static function genericKutrl($str,$attr) 
    417506     { 
     
    419508          return  
    420509          "<?php \n". 
     510          # Preview 
     511          "if (\$_ctx->preview) { \n". 
     512          " echo ".sprintf($f,$str)."; ". 
     513          "} else { \n". 
     514          # Disable 
    421515          "if (!\$_ctx->exists('kutrl')) { \n". 
     516          # Passive mode 
    422517          " if (\$_ctx->kutrl_passive) { ". 
    423518          "  echo ".sprintf($f,$str)."; ". 
     
    436531           "\$twit = kutrlLibDcTwitter::getMessage('kUtRL'); ". 
    437532           "\$twit = str_replace(array('%L','%B','%U'),array(\$_ctx->kutrl->url_base.\$kutrl_rs->hash,\$core->blog->name,__('public')),\$twit); ". 
    438            "kutrlLibDcTwitter::sendMessage('kUtRL',\$twit); "; 
     533           "kutrlLibDcTwitter::sendMessage('kUtRL',\$twit); ". 
    439534           " unset(\$twit); ". 
    440535          "} \n". 
    441  
     536           
    442537          " } \n". 
    443538          " unset(\$kutrl_rs); \n". 
     
    445540          "?>\n"; 
    446541     } 
    447  
     542      
    448543     protected static function getOperator($op) 
    449544     { 
     
    464559{ 
    465560     public static $chars = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'; 
    466  
     561      
    467562     public static function create($len=6) 
    468563     { 
     
    470565          $chars = self::$chars; 
    471566 
    472           for($i = 0;$i < $len; $i++) { 
     567          for($i = 0;$i < $len; $i++) 
     568          { 
    473569               $res .= $chars[rand(0,strlen($chars)-1)]; 
    474570          } 
    475  
     571           
    476572          return $res; 
    477573     } 
    478  
     574      
    479575     public static function protect($str) 
    480576     { 
     
    482578          $chars = self::$chars; 
    483579 
    484           for($i = 0; $i < strlen($str);$i++) { 
     580          for($i = 0; $i < strlen($str);$i++) 
     581          { 
    485582               $res .= $chars[rand(0,strlen($chars)-1)].$str[$i]; 
    486583          } 
    487  
     584           
    488585          return $res; 
    489586     } 
    490  
     587      
    491588     public static function unprotect($str) 
    492589     { 
    493590          $res = ''; 
    494591 
    495           for($i = 0; $i < strlen($str);$i++) { 
     592          for($i = 0; $i < strlen($str);$i++) 
     593          { 
    496594               $i++; 
    497595               $res .= $str[$i]; 
    498596          } 
    499  
     597           
    500598          return $res; 
    501599     } 
  • plugins/kUtRL/_widgets.php

    r2259 r2405  
    3030          ); 
    3131     } 
    32  
     32      
    3333     public static function adminRank($w) 
    3434     { 
     
    8080          ); 
    8181     } 
    82  
     82      
    8383     public static function publicShorten($w) 
    8484     { 
    8585          global $core; 
    86           $s = kutrlSettings($core); 
    87  
     86          $s = $core->blog->settings->kUtRL; 
     87           
    8888          if (!$s->kutrl_active  
    8989           || !$s->kutrl_srv_local_public  
    90            || !$w->homeonly && $core->url->type != 'default') return; 
    91  
     90           || $w->homeonly && $core->url->type != 'default' 
     91           || $core->url->type == 'kutrl') return; 
     92           
    9293          $hmf = hmfKutrl::create(); 
    9394          $hmfp = hmfKutrl::protect($hmf); 
    94  
     95           
    9596          return  
    9697          '<div class="shortenkutrlwidget">'. 
     
    113114          '</div>'; 
    114115     } 
    115  
     116      
    116117     public static function publicRank($w) 
    117118     { 
    118119          global $core; 
    119           $s = kutrlSettings($core); 
    120  
     120          $s = $core->blog->settings->kUtRL; 
     121           
    121122          if (!$s->kutrl_active  
    122123           || $w->homeonly && $core->url->type != 'default') return; 
    123  
     124           
    124125          $type = in_array($w->type,array('localnormal','localmix','localcustom')) ? 
    125126               "AND kut_type ='".$w->type."' " : 
    126127               "AND kut_type ".$core->con->in(array('localnormal','localmix','localcustom'))." "; 
    127  
     128           
    128129          $hide = (boolean) $w->hideempty ? 'AND kut_counter > 0 ' : ''; 
    129  
     130           
    130131          $more = ''; 
    131           if ($w->type == 'localmix' && '' != $w->mixprefix) { 
     132          if ($w->type == 'localmix' && '' != $w->mixprefix) 
     133          { 
    132134               $more = "AND kut_hash LIKE '".$core->con->escape($w->mixprefix)."%' "; 
    133135          } 
    134  
     136           
    135137          $order = ($w->sortby && in_array($w->sortby,array('kut_dt','kut_counter','kut_hash'))) ?  
    136138               $w->sortby.' ' : 'kut_dt '; 
    137  
     139           
    138140          $order .= $w->sort == 'desc' ? 'DESC' : 'ASC'; 
    139  
     141           
    140142          $limit = $core->con->limit(abs((integer) $w->limit)); 
    141  
     143           
    142144          $rs = $core->con->select( 
    143145               'SELECT kut_counter, kut_hash '. 
     
    147149               $type.$hide.$more.'ORDER BY '.$order.$limit 
    148150          ); 
    149  
     151           
    150152          if ($rs->isEmpty()) return; 
    151  
     153           
    152154          $content = ''; 
    153155          $i = 0; 
    154  
     156           
    155157          while($rs->fetch()) 
    156158          { 
    157159               $i++; 
    158160               $rank = '<span class="rankkutrl-rank">'.$i.'</span>'; 
    159  
     161                
    160162               $hash = $rs->kut_hash; 
    161163               $url = $core->blog->url.$core->url->getBase('kutrl').'/'.$hash; 
    162164               $cut_len = - abs((integer) $w->urllen); 
    163  
     165                
    164166               if (strlen($url) > $cut_len) 
     167               { 
    165168                    $url = '...'.substr($url,$cut_len); 
     169               } 
    166170/* 
    167171               if (strlen($hash) > $cut_len) 
     172               { 
    168173                    $url = '...'.substr($hash,$cut_len); 
    169 */ 
     174               } 
     175//*/ 
    170176               if ($rs->kut_counter == 0) 
     177               { 
    171178                    $counttext = __('never followed'); 
     179               } 
    172180               elseif ($rs->kut_counter == 1) 
     181               { 
    173182                    $counttext = __('followed one time'); 
     183               } 
    174184               else 
     185               { 
    175186                    $counttext = sprintf(__('followed %s times'),$rs->kut_counter); 
    176  
     187               } 
     188                
    177189               $content .=  
    178190                    '<li><a href="'. 
     
    187199 
    188200          } 
    189  
     201           
    190202          if (!$content) return; 
    191  
     203           
    192204          return  
    193205          '<div class="rankkutrlwidget">'. 
  • plugins/kUtRL/default-templates/kutrl.html

    r1949 r2405  
    5050      <p><strong>{{tpl:kutrlMsg}}</strong></p> 
    5151     </tpl:kutrlMsgIf> 
    52  
     52  
    5353     <tpl:kutrlPageIf is_active="1"> 
    5454      <form name="dokutrl" method="post" action="{{tpl:kutrlPageURL}}"> 
     
    6464      </p> 
    6565      </form> 
    66      <tpl:kutrlPageIf> 
     66     </tpl:kutrlPageIf> 
    6767  </div> 
    6868   
  • plugins/kUtRL/inc/index.link.php

    r2274 r2405  
    1818$s_limit_to_blog = (boolean) $s->kutrl_limit_to_blog; 
    1919 
    20 if (isset($core->kutrlServices[$s_admin_service])) { 
     20if (isset($core->kutrlServices[$s_admin_service])) 
     21{ 
    2122     $kut = new $core->kutrlServices[$s_admin_service]($core,$s_limit_to_blog); 
    2223} 
     
    2526if ($action == 'createlink') { 
    2627 
    27      try { 
     28     try 
     29     { 
    2830          if (!isset($core->kutrlServices[$s_admin_service])) 
    2931               throw new Exception('Unknow service'); 
    30  
     32           
    3133          $url = trim($core->con->escape($_POST['str'])); 
    3234          $hash = empty($_POST['custom']) ? null : $_POST['custom']; 
    33  
     35           
    3436          if (empty($url)) 
    3537               throw new Exception(__('There is nothing to shorten.')); 
    36  
     38           
    3739          if (!$kut->testService()) 
    3840               throw new Exception(__('Service is not well configured.')); 
    39  
     41           
    4042          if (null !== $hash && !$kut->allow_customized_hash) 
    4143               throw new Exception(__('This service does not allowed custom hash.')); 
    42  
     44           
    4345          if (!$kut->isValidUrl($url)) 
    4446               throw new Exception(__('This link is not a valid URL.')); 
    45  
     47           
    4648          if (!$kut->isLongerUrl($url)) 
    4749               throw new Exception(__('This link is too short.')); 
    48  
     50           
    4951          if (!$kut->isProtocolUrl($url)) 
    5052               throw new Exception(__('This type of link is not allowed.')); 
    51  
     53           
    5254          if ($s_limit_to_blog && !$kut->isBlogUrl($url)) 
    5355               throw new Exception(__('Short links are limited to this blog URL.')); 
    54  
     56           
    5557          if ($kut->isServiceUrl($url)) 
    5658               throw new Exception(__('This link is already a short link.')); 
    57  
     59           
    5860          if (null !== $hash && false !== ($rs = $kut->isKnowHash($hash))) 
    5961               throw new Exception(__('This custom short url is already taken.')); 
    60  
     62           
    6163          if (false !== ($rs = $kut->isKnowUrl($url))) 
    6264          { 
     
    7476               if (false === ($rs = $kut->hash($url,$hash))) 
    7577               { 
    76                     if ($kut->error->flag()) { 
     78                    if ($kut->error->flag()) 
     79                    { 
    7780                         throw new Exception($kut->error->toHTML()); 
    7881                    } 
     
    9194 
    9295                    # Send new url by libDcTwitter 
    93                     if ($s->kutrl_twit_onadmin) { 
     96                    if ($s->kutrl_twit_onadmin) 
     97                    { 
    9498                         $twit = kutrlLibDcTwitter::getMessage('kUtRL'); 
    9599                         $twit = str_replace( 
     
    103107          } 
    104108     } 
    105      catch (Exception $e) { 
     109     catch (Exception $e) 
     110     { 
    106111          $core->error->add($e->getMessage()); 
    107112     } 
     
    117122'</h2>'.$msg; 
    118123 
    119 if (!isset($core->kutrlServices[$s_admin_service])) { 
    120  
     124if (!isset($core->kutrlServices[$s_admin_service])) 
     125{ 
    121126     echo '<p>'.__('You must set an admin service.').'</p>'; 
    122127} 
     
    125130     echo ' 
    126131     <form id="create-link" method="post" action="'.$p_url.'"> 
    127  
     132      
    128133     <h3>'.sprintf(__('Shorten link using service "%s"'),$kut->name).'</h3> 
    129134     <p class="classic"><label for="str">'.__('Long link:'). 
    130135     form::field('str',100,255,'').'</label></p>'; 
    131  
    132      if ($kut->allow_customized_hash) { 
    133  
     136      
     137     if ($kut->allow_customized_hash) 
     138     { 
    134139          echo 
    135140          '<p class="classic"><label for="custom">'. 
     
    137142          form::field('custom',50,32,'').'</label></p>'. 
    138143          '<p class="form-note">'.__('Only if you want a custom short link.').'</p>'; 
    139  
    140           if ($s_admin_service == 'local') { 
     144           
     145          if ($s_admin_service == 'local') 
     146          { 
    141147               echo '<p class="form-note">'. 
    142148               __('You can use "bob!!" if you want a semi-custom link, it starts with "bob" and "!!" will be replaced by an increment value.'). 
     
    144150          } 
    145151     } 
    146  
     152      
    147153     echo ' 
    148154     <div class="clear"> 
  • plugins/kUtRL/inc/index.setting.php

    r2274 r2405  
    2121$s_limit_to_blog = (boolean) $s->kutrl_limit_to_blog; 
    2222$s_tpl_passive = (boolean) $s->kutrl_tpl_passive; 
     23$s_tpl_active = (boolean) $s->kutrl_tpl_active; 
    2324$s_admin_entry_default = (string) $s->kutrl_admin_entry_default; 
    2425 
     
    2728$s_twit_ontpl = (boolean) $s->kutrl_twit_ontpl; 
    2829$s_twit_onwiki = (boolean) $s->kutrl_twit_onwiki; 
     30$s_twit_post_msg = (string) $s->kutrl_twit_post_msg; 
    2931 
    3032$section = isset($_REQUEST['section']) ? $_REQUEST['section'] : ''; 
     
    4244          $s_limit_to_blog = isset($_POST['s_limit_to_blog']); 
    4345          $s_tpl_passive = isset($_POST['s_tpl_passive']); 
     46          $s_tpl_active = isset($_POST['s_tpl_active']); 
    4447          $s_admin_entry_default = isset($_POST['s_admin_entry_default']); 
    4548 
     
    4851          $s_twit_ontpl = isset($_POST['s_twit_ontpl']); 
    4952          $s_twit_onwiki = isset($_POST['s_twit_onwiki']); 
     53          $s_twit_post_msg = $_POST['s_twit_post_msg']; 
    5054 
    5155          $s->put('kutrl_active',$s_active); 
     
    5559          $s->put('kutrl_limit_to_blog',$s_limit_to_blog); 
    5660          $s->put('kutrl_tpl_passive',$s_tpl_passive); 
     61          $s->put('kutrl_tpl_active',$s_tpl_active); 
    5762          $s->put('kutrl_admin_entry_default',$s_admin_entry_default); 
    5863 
     
    6166          $s->put('kutrl_twit_ontpl',$s_twit_ontpl); 
    6267          $s->put('kutrl_twit_onwiki',$s_twit_onwiki); 
     68          $s->put('kutrl_twit_post_msg',$s_twit_post_msg); 
    6369 
    6470          # Save libDcTwitter settings 
     
    100106 
    101107<fieldset id="setting-plugin"><legend>'. __('Plugin activation').'</legend> 
    102 <p class="field"><label>'. 
     108<p><label class="classic">'. 
    103109form::checkbox(array('s_active'),'1',$s_active). 
    104110__('Enable plugin').'</label></p> 
     
    106112 
    107113<fieldset id="setting-option"><legend>'. __('General rules').'</legend> 
    108 <p class="field"><label>'. 
     114<p><label class="classic">'. 
    109115form::checkbox(array('s_limit_to_blog'),'1',$s_limit_to_blog). 
    110116__('Limit short link to current blog').'</label></p> 
    111117<p class="form-note">'.__('Only link started with this blog URL could be shortened.').'</p> 
    112 <p class="field"><label>'. 
     118<p><label class="classic">'. 
    113119form::checkbox(array('s_tpl_passive'),'1',$s_tpl_passive). 
    114120__('Passive mode').'</label></p> 
    115 <p class="form-note">'.__('If this extension is disabled and the passive mode is enabled, "kutrl" tags will display long urls instead of nothing on templates.').'</p> 
    116 <p class="field"><label>'. 
     121<p class="form-note">'.__('If this extension is disabled and the passive mode is enabled, "kutrl" tags (like EntryKurl) will display long urls instead of nothing on templates.').'</p> 
     122<p><label class="classic">'. 
     123form::checkbox(array('s_tpl_active'),'1',$s_tpl_active). 
     124__('Active mode').'</label></p> 
     125<p class="form-note">'.__('If the active mode is enabled, all know default template tags (like EntryURL) will display short urls instead of long ones on templates.').'</p> 
     126<p><label class="classic">'. 
    117127form::checkbox(array('s_admin_entry_default'),'1',$s_admin_entry_default). 
    118128__('Create short link for new entries').'</label></p> 
     
    121131 
    122132<fieldset id="setting-service"><legend>'. __('Default services').'</legend> 
    123 <p class="field"><label>'; 
     133<p><label>'; 
    124134if (!empty($msg) && isset($core->kutrlServices[$s_admin_service])) { 
    125135     $o = new $core->kutrlServices[$s_admin_service]($core); 
    126136     echo $o->testService() ? $img_green : $img_red; 
    127137} 
    128 echo '&nbsp;'.__('Administration:'). 
     138echo '&nbsp;'.__('Administration:').'<br />'. 
    129139form::combo(array('s_admin_service'),$services_combo,$s_admin_service).' 
    130140</label></p> 
    131141<p class="form-note">'.__('Service to use in this admin page and on edit page of an entry.').'</p> 
    132 <p class="field"><label>'; 
     142<p><label>'; 
    133143if (!empty($msg) && isset($core->kutrlServices[$s_tpl_service])) { 
    134144     $o = new $core->kutrlServices[$s_tpl_service]($core); 
    135145     echo $o->testService() ? $img_green : $img_red; 
    136146} 
    137 echo '&nbsp;'.__('Templates:'). 
     147echo '&nbsp;'.__('Templates:').'<br />'. 
    138148form::combo(array('s_tpl_service'),$ext_services_combo,$s_tpl_service).' 
    139149</label></p> 
    140150<p class="form-note">'.__('Shorten links automatically when using template value like "EntryKutrl".').'</p> 
    141 <p class="field"><label>'; 
     151<p><label>'; 
    142152if (!empty($msg) && isset($core->kutrlServices[$s_wiki_service])) { 
    143153     $o = new $core->kutrlServices[$s_wiki_service]($core); 
    144154     echo $o->testService() ? $img_green : $img_red; 
    145155} 
    146 echo '&nbsp;'.__('Contents:'). 
     156echo '&nbsp;'.__('Contents:').'<br />'. 
    147157form::combo(array('s_wiki_service'),$ext_services_combo,$s_wiki_service).' 
    148158</label></p> 
     
    158168echo ' 
    159169<p class="form-note">'.__('Use wildcard %L for short URL, %B for blog name, %U for user name.').'</p> 
     170<p><label class="classic">'.__('Entry message:').'<br />'. 
     171form::field('s_twit_post_msg',50,255,$s_twit_post_msg,'',2).' 
     172</label></p> 
     173<p class="form-note">'.__('This is a special message that can be used on admin enrty page, use wildcard %T for entry title, %L for short URL, %B for blog name, %U for user name.').'</p> 
    160174</div><div class="col"> 
    161175<h3>'.__('Activation').'</h3> 
    162176<p>'.__('Send message when short url is created on:').'</p> 
    163 <p class="field"><label>'. 
     177<p><label class="classic">'. 
    164178form::checkbox(array('s_twit_onadmin'),'1',$s_twit_onadmin). 
    165179__('administration form').'</label></p> 
    166 <p class="field"><label>'. 
     180<p><label class="classic">'. 
    167181form::checkbox(array('s_twit_onpublic'),'1',$s_twit_onpublic). 
    168182__('public form').'</label></p> 
    169 <p class="field"><label>'. 
     183<p><label class="classic">'. 
    170184form::checkbox(array('s_twit_ontpl'),'1',$s_twit_ontpl). 
    171185__('template').'</label></p> 
    172 <p class="field"><label>'. 
     186<p><label class="classic">'. 
    173187form::checkbox(array('s_twit_onwiki'),'1',$s_twit_onwiki). 
    174188__('content').'</label></p> 
  • plugins/kUtRL/inc/lib.kutrl.log.php

    r2190 r2405  
    103103          return $rs->isEmpty() ? false : $rs; 
    104104     } 
     105      
     106     public function clear($id) 
     107     { 
     108          $id = (integer) $id; 
     109           
     110          $cur = $this->con->openCursor($this->table); 
     111          $this->con->writeLock($this->table); 
     112           
     113          try 
     114          { 
     115               $cur->kut_url = ''; 
     116               $cur->kut_dt = date('Y-m-d H:i:s'); 
     117               $cur->kut_counter = 0; 
     118                
     119               $cur->update( 
     120                    "WHERE blog_id='".$this->blog."' ". 
     121                    "AND kut_id='".$id."' " 
     122               ); 
     123               $this->con->unlock(); 
     124                
     125               return true; 
     126          } 
     127          catch (Exception $e) 
     128          { 
     129               $this->con->unlock(); 
     130               throw $e; 
     131          } 
     132          return false; 
     133     } 
    105134 
    106135     public function delete($id) 
  • plugins/kUtRL/inc/lib.kutrl.srv.php

    r2190 r2405  
    3232     { 
    3333          $this->core = $core; 
    34           $this->s = kutrlSettings($core); 
     34          $this->s = $core->blog->settings->kUtRL; 
    3535          $this->log = new kutrlLog($core); 
    3636          $this->limit_to_blog = (boolean) $limit_to_blog; 
     
    173173     } 
    174174 
    175      # Delete url on service 
    176      public function deleteUrl($url) 
     175     # Delete url on service (second argument really delete urls) 
     176     public function deleteUrl($url,$delete=false) 
    177177     { 
    178178          return null; 
  • plugins/kUtRL/inc/lib.wiki.kutrl.php

    r2274 r2405  
    2020     { 
    2121          global $core; 
    22           $s = kutrlSettings($core); 
     22          $s = $core->blog->settings->kUtRL; 
    2323 
    2424          # Do nothing on comment preview and post preview 
    2525          if (!empty($_POST['preview'])  
    26            || !empty($GLOBALS['c_ctx']) && $GLOBALS['c_ctx']->preview) return; 
    27  
     26           || !empty($GLOBALS['_ctx']) && $GLOBALS['_ctx']->preview) return; 
     27           
    2828          if (!$s->kutrl_active || !$s->kutrl_wiki_service  
    2929           || !isset($core->kutrlServices[$s->kutrl_wiki_service])) return; 
    30  
    31           try { 
     30           
     31          try 
     32          { 
    3233               $kut = new $core->kutrlServices[$s->kutrl_wiki_service]($core,$s->kutrl_limit_to_blog); 
    3334          } 
    34           catch (Exception $e) { 
     35          catch (Exception $e) 
     36          { 
    3537               return; 
    3638          } 
    37  
     39           
    3840          foreach($kut->allowed_protocols as $protocol) 
    3941          { 
     
    4446          } 
    4547     } 
    46  
     48      
    4749     public static function transform($url,$content) 
    4850     { 
    4951          global $core; 
    50           $s = kutrlSettings($core); 
    51  
     52          $s = $core->blog->settings->kUtRL; 
     53           
    5254          if (!$s->kutrl_active || !$s->kutrl_wiki_service  
    5355           || !isset($core->kutrlServices[$s->kutrl_wiki_service])) return; 
    54  
    55           try { 
     56           
     57          try 
     58          { 
    5659               $kut = new $core->kutrlServices[$s->kutrl_wiki_service]($core,$s->kutrl_limit_to_blog); 
    5760          } 
    58           catch (Exception $e) { 
     61          catch (Exception $e) 
     62          { 
    5963               return array(); 
    6064          } 
    61  
     65           
    6266          # Test if long url exists 
    6367          $is_new = false; 
    6468          $rs = $kut->isKnowUrl($url); 
    65           if (!$rs) { 
     69          if (!$rs) 
     70          { 
    6671               $is_new = true; 
    6772               $rs = $kut->hash($url); 
     
    7984               $res['title'] = sprintf(__('%s (Shorten with %s)'),$rs->url,__($kut->name)); 
    8085               if ($testurl == $content) $res['content'] = $res['url']; 
    81  
     86                
    8287               # Send new url by libDcTwitter 
    83                if ($s->kutrl_twit_onwiki && $is_new) { 
     88               if ($s->kutrl_twit_onwiki && $is_new) 
     89               { 
    8490                    $user = !defined('DC_CONTEXT_ADMIN') ? __('public') : $core->auth->getInfo('user_cn'); 
    8591                    $twit = kutrlLibDcTwitter::getMessage('kUtRL'); 
     
    8793                    kutrlLibDcTwitter::sendMessage('kUtRL',$twit); 
    8894               } 
    89  
     95                
    9096               return $res; 
    9197          } 
  • plugins/kUtRL/inc/services/class.local.service.php

    r2190 r2405  
    3333     public function saveSettings() 
    3434     { 
    35           $this->s->put('kutrl_srv_local_protocols',$_POST['kutrl_srv_local_protocols']); 
    36           $this->s->put('kutrl_srv_local_public',isset($_POST['kutrl_srv_local_public'])); 
    37           $this->s->put('kutrl_srv_local_css',$_POST['kutrl_srv_local_css']); 
     35          $this->s->put('kutrl_srv_local_protocols',$_POST['kutrl_srv_local_protocols'],'string'); 
     36          $this->s->put('kutrl_srv_local_public',isset($_POST['kutrl_srv_local_public']),'boolean'); 
     37          $this->s->put('kutrl_srv_local_css',$_POST['kutrl_srv_local_css'],'string'); 
     38          $this->s->put('kutrl_srv_local_404_active',isset($_POST['kutrl_srv_local_404_active']),'boolean'); 
    3839     } 
    3940 
     
    4142     { 
    4243          echo 
     44          '<div class="two-cols"><div class="col">'. 
     45           
     46          '<p><strong>'.__('Settings:').'</strong></p>'. 
     47         '<p><label class="classic">'. 
     48          __('Allowed protocols:').'<br />'. 
     49         form::field(array('kutrl_srv_local_protocols'),50,255,$this->s->kutrl_srv_local_protocols). 
     50          '</label></p>'. 
     51 
     52         '<p class="form-note">'. 
     53         __('Use comma seperated list like: "http:,https:,ftp:"'). 
     54         '</p>'. 
     55 
     56          '<p><label class="classic">'. 
     57          form::checkbox(array('kutrl_srv_local_public'),'1',$this->s->kutrl_srv_local_public).' '. 
     58          __('Enable public page for visitors to shorten links'). 
     59          '</label></p>'. 
     60 
     61          '<p class="area" id="style-area"><label for="_style">'.__('CSS:').'</label>'. 
     62          form::textarea('kutrl_srv_local_css',50,3,html::escapeHTML($this->s->kutrl_srv_local_css),'',2). 
     63          '</p>'. 
     64          '<p class="form-note">'.__('You can add here special cascading style sheet. Body of page has class "dc-kutrl" and widgets have class "shortenkutrlwidget" and "rankkutrlwidget".').'</p>'. 
     65 
     66          '<p><label class="classic">'. 
     67          form::checkbox(array('kutrl_srv_local_404_active'),'1',$this->s->kutrl_srv_local_404_active).' '. 
     68          __('Enable special 404 error public page for unknow urls'). 
     69          '</label></p>'. 
     70          '<p class="form-note">'.__('If this is not activated, the default 404 page of the theme will be display.').'</p>'. 
     71 
     72          '</div><div class="col">'. 
     73           
     74          '<p><strong>'.__('Note:').'</strong></p>'. 
    4375          '<p>'. 
    4476          __('This service use your own Blog to shorten and serve URL.').'<br />'. 
     
    5991          echo  
    6092          '</p>'. 
    61  
    62          '<p><label class="classic">'. 
    63           __('Allowed protocols:').'<br />'. 
    64          form::field(array('kutrl_srv_local_protocols'),50,255,$this->s->kutrl_srv_local_protocols). 
    65           '</label></p>'. 
    66  
    67          '<p class="form-note">'. 
    68          __('Use comma seperated list like: "http:,https:,ftp:"'). 
    69          '</p>'. 
    70  
    71           '<p><label class="classic">'. 
    72           form::checkbox(array('kutrl_srv_local_public'),'1',$this->s->kutrl_srv_local_public).' '. 
    73           __('Enable public page for visitors to shorten links'). 
    74           '</label></p>'. 
    75  
    76           '<p class="area" id="style-area"><label for="_style">'.__('CSS:').'</label>'. 
    77           form::textarea('kutrl_srv_local_css',50,3,html::escapeHTML($this->s->kutrl_srv_local_css),'',2). 
    78           '</p>'. 
    79           '<p class="form-note">'.__('You can add here special cascading style sheet. Body of page has class "dc-kutrl" and widgets have class "shortenkutrlwidget" and "rankkutrlwidget".').'</p>'; 
     93          '<p>'.__('There are two templates delivered with kUtRL, if you do not use default theme, you may adapt them to yours.').'<br />'. 
     94          __('Files are in plugin directory /default-templates, just copy them into your theme and edit them.').'</p>'. 
     95           
     96          '</div></div>'; 
    8097     } 
    8198 
     
    223240               return false; 
    224241          } 
     242          if (!$rs->url) //previously removed url 
     243          { 
     244               return false; 
     245          } 
     246           
    225247          $this->log->counter($rs->id,'up'); 
    226248          return $rs->url; 
    227249     } 
    228250 
    229      public function deleteUrl($url) 
     251     public function deleteUrl($url,$delete=false) 
    230252     { 
    231253          if (false === ($rs = $this->log->select($url,null,null,'local'))) 
     
    233255               return false; 
    234256          } 
    235           $this->log->delete($rs->id); 
     257          if ($delete) 
     258          { 
     259               $this->log->delete($rs->id); 
     260          } 
     261          else 
     262          { 
     263               $this->log->clear($rs->id,''); 
     264          } 
    236265          return true; 
    237266     } 
  • plugins/kUtRL/index.php

    r2190 r2405  
    1717 
    1818# Settings 
    19 $s = kutrlSettings($core); 
     19$s = $core->blog->settings->kUtRL; 
    2020 
    2121# Default values 
     
    6666 
    6767?> 
    68 ?> 
  • plugins/kUtRL/locales/fr/main.lang.php

    r2190 r2405  
    11<?php 
    2 // Language: français  
    3 // Module: kUtRL - 0.3 
    4 // Date: 2010-04-14 22:23:45  
    5 // Translated with dcTranslater - 1.3  
     2// Language: Français  
     3// Module: kUtRL - 0.4 
     4// Date: 2010-06-28 10:43:43  
     5// Translated with dcTranslater - 1.4.1  
    66 
    77#_admin.php:19 
    88#_widgets.php:22 
    99#default-templates/kutrl.html:48 
    10 #inc/index.link.php:112 
     10#inc/index.link.php:117 
    1111#inc/index.links.php:203 
    1212#inc/index.service.php:42 
    13 #inc/index.setting.php:87 
     13#inc/index.setting.php:93 
    1414#index.php:41 
    1515#index.php:42 
     
    2424 
    2525#_admin.php:108 
    26 #inc/index.link.php:136 
     26#inc/index.link.php:141 
    2727$GLOBALS['__l10n']['Custom short link:'] = 'Lien court personnalisé :'; 
    2828 
     
    3131 
    3232#_admin.php:122 
    33 #_widgets.php:171 
     33#_widgets.php:178 
    3434$GLOBALS['__l10n']['never followed'] = 'jamais suivi'; 
    3535 
    3636#_admin.php:126 
    37 #_widgets.php:173 
     37#_widgets.php:182 
    3838$GLOBALS['__l10n']['followed one time'] = 'suivi une fois'; 
    3939 
    4040#_admin.php:130 
    41 #_widgets.php:175 
     41#_widgets.php:186 
    4242$GLOBALS['__l10n']['followed %s times'] = 'suivi %s fois'; 
    4343 
    4444#_admin.php:137 
    45 #_admin.php:268 
     45#_admin.php:292 
    4646$GLOBALS['__l10n']['delete short link'] = 'effacer un lien court'; 
    4747 
    48 #_admin.php:267 
     48#_admin.php:291 
    4949$GLOBALS['__l10n']['create short link'] = 'créer un lien court'; 
    5050 
    51 #_public.php:123 
     51#_public.php:141 
    5252$GLOBALS['__l10n']['Failed to verify protected field.'] = 'Impossible de vérifier le champs de protection.'; 
    5353 
    54 #_public.php:131 
    55 #inc/index.link.php:38 
     54#_public.php:149 
     55#inc/index.link.php:40 
    5656#inc/services/class.bilbolinks.service.php:64 
    5757#inc/services/class.bitly.service.php:76 
    58 #inc/services/class.local.service.php:89 
     58#inc/services/class.local.service.php:106 
    5959#inc/services/class.trim.service.php:65 
    6060$GLOBALS['__l10n']['Service is not well configured.'] = 'Le service n\'est pas correctement configuré.'; 
    6161 
    62 #_public.php:139 
     62#_public.php:157 
    6363$GLOBALS['__l10n']['This string is not a valid URL.'] = 'Cette chaine n\'est pas un lien valide.'; 
    6464 
    65 #_public.php:147 
    66 #inc/index.link.php:47 
     65#_public.php:165 
     66#inc/index.link.php:49 
    6767$GLOBALS['__l10n']['This link is too short.'] = 'Ce lien est trop court.'; 
    6868 
    69 #_public.php:155 
    70 #inc/index.link.php:50 
     69#_public.php:173 
     70#inc/index.link.php:52 
    7171$GLOBALS['__l10n']['This type of link is not allowed.'] = 'Ce type de lien n\'est pas autorisé.'; 
    7272 
    73 #_public.php:164 
    74 #inc/index.link.php:53 
     73#_public.php:182 
     74#inc/index.link.php:55 
    7575$GLOBALS['__l10n']['Short links are limited to this blog URL.'] = 'Les liens courts sont limités à l\'URL de ce blog.'; 
    7676 
    77 #_public.php:172 
    78 #inc/index.link.php:56 
     77#_public.php:190 
     78#inc/index.link.php:58 
    7979$GLOBALS['__l10n']['This link is already a short link.'] = 'Ce lien est dèjà un lien court.'; 
    8080 
    81 #_public.php:185 
    82 #_public.php:204 
    83 #inc/index.link.php:67 
    84 #inc/index.link.php:87 
     81#_public.php:203 
     82#_public.php:222 
     83#inc/index.link.php:69 
     84#inc/index.link.php:90 
    8585$GLOBALS['__l10n']['Short link for %s is %s'] = 'Le lien court pour %s est %s'; 
    8686 
    87 #_public.php:196 
     87#_public.php:214 
    8888$GLOBALS['__l10n']['Failed to create short link.'] = 'Impossible de créer le lien court.'; 
    8989 
    90 #_public.php:213 
    91 #_public.php:432 
    92 #inc/lib.wiki.kutrl.php:78 
     90#_public.php:231 
     91#_public.php:310 
     92#_public.php:532 
     93#inc/lib.wiki.kutrl.php:90 
    9394$GLOBALS['__l10n']['public'] = 'publique'; 
    9495 
    95 #_public.php:314 
    96 #_widgets.php:105 
     96#_public.php:403 
     97#_widgets.php:106 
    9798$GLOBALS['__l10n']['Rewrite "%s" in next field to show that you are not a robot:'] = 'Recopier "%s" dans le champs suivant pour montrer que vous n\'êtes pas une machine :'; 
    9899 
     
    141142$GLOBALS['__l10n']['Hide no followed links'] = 'Cacher les liens non suivis'; 
    142143 
    143 #_widgets.php:101 
     144#_widgets.php:102 
    144145#default-templates/kutrl.html:55 
    145 #inc/index.link.php:129 
     146#inc/index.link.php:134 
    146147$GLOBALS['__l10n']['Long link:'] = 'Lien long :'; 
    147148 
    148 #_widgets.php:108 
     149#_widgets.php:109 
    149150#default-templates/kutrl.html:62 
    150151$GLOBALS['__l10n']['Create'] = 'Créer'; 
    151152 
    152 #inc/index.link.php:35 
     153#default-templates/kutrl404.html:14 
     154#default-templates/kutrl404.html:38 
     155$GLOBALS['__l10n']['URL not found'] = 'URL non trouvée'; 
     156 
     157#default-templates/kutrl404.html:42 
     158$GLOBALS['__l10n']['The URL you are looking for does not exist.'] = 'Le lien que vous recherchez n\'existe pas.'; 
     159 
     160#default-templates/kutrl404.html:45 
     161$GLOBALS['__l10n']['Create your own short URL'] = 'Créer votre propre lien court'; 
     162 
     163#inc/index.link.php:37 
    153164$GLOBALS['__l10n']['There is nothing to shorten.'] = 'I n\'y a rien à réduire.'; 
    154165 
    155 #inc/index.link.php:41 
     166#inc/index.link.php:43 
    156167$GLOBALS['__l10n']['This service does not allowed custom hash.'] = 'Ce service n\'accepte pas les liens court personnalisés.'; 
    157168 
    158 #inc/index.link.php:44 
     169#inc/index.link.php:46 
    159170$GLOBALS['__l10n']['This link is not a valid URL.'] = 'Ce lien n\'est pas valide.'; 
    160171 
    161 #inc/index.link.php:59 
     172#inc/index.link.php:61 
    162173$GLOBALS['__l10n']['This custom short url is already taken.'] = 'Ce lien court personnalisé est déjà pris.'; 
    163174 
    164 #inc/index.link.php:79 
     175#inc/index.link.php:82 
    165176$GLOBALS['__l10n']['Failed to create short link. This could be caused by a service failure.'] = 'Impossible de créé un lien court. Ceci peut être causé par un problème du service.'; 
    166177 
    167 #inc/index.link.php:116 
     178#inc/index.link.php:121 
    168179#inc/index.links.php:207 
    169180#inc/index.service.php:52 
    170 #inc/index.setting.php:97 
     181#inc/index.setting.php:103 
    171182$GLOBALS['__l10n']['New link'] = 'Nouveau lien'; 
    172183 
    173 #inc/index.link.php:121 
     184#inc/index.link.php:126 
    174185$GLOBALS['__l10n']['You must set an admin service.'] = 'Vous devez définir un service admin.'; 
    175186 
    176 #inc/index.link.php:128 
     187#inc/index.link.php:133 
    177188$GLOBALS['__l10n']['Shorten link using service "%s"'] = 'Raccourcir un lien en utilisant le service "%s"'; 
    178189 
    179 #inc/index.link.php:138 
     190#inc/index.link.php:143 
    180191$GLOBALS['__l10n']['Only if you want a custom short link.'] = 'Uniquement si vous souhaitez un lien court personnalisé.'; 
    181192 
    182 #inc/index.link.php:142 
     193#inc/index.link.php:148 
    183194$GLOBALS['__l10n']['You can use "bob!!" if you want a semi-custom link, it starts with "bob" and "!!" will be replaced by an increment value.'] = 'Vous pouvez utiliser "bob!!" si vous souhaitez un lien semi-personnalisé, il commencera par "bob" et "!!" sera remplacé par une valeur incrémentale.'; 
    184195 
     
    193204 
    194205#inc/index.links.php:132 
    195 #inc/index.setting.php:82 
     206#inc/index.setting.php:88 
    196207$GLOBALS['__l10n']['disabled'] = 'Désactivé'; 
    197208 
     
    218229$GLOBALS['__l10n']['Learn more about %s.'] = 'En savoir plus à propos de %s.'; 
    219230 
    220 #inc/index.setting.php:96 
     231#inc/index.setting.php:102 
    221232#index.php:36 
    222233$GLOBALS['__l10n']['Settings'] = 'Paramètres'; 
    223234 
    224 #inc/index.setting.php:101 
     235#inc/index.setting.php:107 
    225236$GLOBALS['__l10n']['Plugin activation'] = 'Activation de l\'extension'; 
    226237 
    227 #inc/index.setting.php:104 
     238#inc/index.setting.php:110 
    228239$GLOBALS['__l10n']['Enable plugin'] = 'Activer l\'extension'; 
    229240 
    230 #inc/index.setting.php:107 
     241#inc/index.setting.php:113 
    231242$GLOBALS['__l10n']['General rules'] = 'Réglages'; 
    232243 
    233 #inc/index.setting.php:110 
     244#inc/index.setting.php:116 
    234245$GLOBALS['__l10n']['Limit short link to current blog'] = 'Limiter les liens court à ce blog'; 
    235246 
    236 #inc/index.setting.php:111 
     247#inc/index.setting.php:117 
    237248$GLOBALS['__l10n']['Only link started with this blog URL could be shortened.'] = 'Uniquement les liens commençant par l\'URL de ce blog pourront être réduits.'; 
    238249 
    239 #inc/index.setting.php:114 
     250#inc/index.setting.php:120 
    240251$GLOBALS['__l10n']['Passive mode'] = 'Mode passif'; 
    241252 
    242 #inc/index.setting.php:115 
    243 $GLOBALS['__l10n']['If this extension is disabled and the passive mode is enabled, "kutrl" tags will display long urls instead of nothing on templates.'] = 'Si cette extension est désactivée et que le mode passif est activé, les balises "kutrl" afficheront les longues URL au lieu de rien.'; 
    244  
    245 #inc/index.setting.php:118 
     253#inc/index.setting.php:121 
     254$GLOBALS['__l10n']['If this extension is disabled and the passive mode is enabled, "kutrl" tags (like EntryKurl) will display long urls instead of nothing on templates.'] = 'Si cette extension est désactivée et que le mode passif est activé, les balises "kutrl" (comme EntryKutrl) afficheront les liens longs au lieu de rien.'; 
     255 
     256#inc/index.setting.php:124 
     257$GLOBALS['__l10n']['Active mode'] = 'Mode actif'; 
     258 
     259#inc/index.setting.php:125 
     260$GLOBALS['__l10n']['If the active mode is enabled, all know default template tags (like EntryURL) will display short urls instead of long ones on templates.'] = 'Si le mode actif est acitvé, les balises de thème (comme EntryURL) afficheront les liens court au lieu des longs.'; 
     261 
     262#inc/index.setting.php:128 
    246263$GLOBALS['__l10n']['Create short link for new entries'] = 'Créer un lien court pour les nouveaux billets'; 
    247264 
    248 #inc/index.setting.php:119 
     265#inc/index.setting.php:129 
    249266$GLOBALS['__l10n']['This can be changed on page of creation/edition of an entry.'] = 'Ceci peut être changé sur la page d\'édition / création d\'un billet.'; 
    250267 
    251 #inc/index.setting.php:122 
     268#inc/index.setting.php:132 
    252269$GLOBALS['__l10n']['Default services'] = 'Services par défaut'; 
    253270 
    254 #inc/index.setting.php:128 
     271#inc/index.setting.php:138 
    255272$GLOBALS['__l10n']['Administration:'] = 'Administration :'; 
    256273 
    257 #inc/index.setting.php:131 
     274#inc/index.setting.php:141 
    258275$GLOBALS['__l10n']['Service to use in this admin page and on edit page of an entry.'] = 'Service à utiliser sur cette page d\'administration ou sur la page d\'édition d\'un billet.'; 
    259276 
    260 #inc/index.setting.php:137 
     277#inc/index.setting.php:147 
    261278$GLOBALS['__l10n']['Templates:'] = 'Templates :'; 
    262279 
    263 #inc/index.setting.php:140 
     280#inc/index.setting.php:150 
    264281$GLOBALS['__l10n']['Shorten links automatically when using template value like "EntryKutrl".'] = 'Réduit automatiquement les liens des templates utilisant les balises tels que "EntryKutrl".'; 
    265282 
    266 #inc/index.setting.php:146 
     283#inc/index.setting.php:156 
    267284$GLOBALS['__l10n']['Contents:'] = 'Contenus :'; 
    268285 
    269 #inc/index.setting.php:149 
     286#inc/index.setting.php:159 
    270287$GLOBALS['__l10n']['Shorten links automatically found in contents using wiki synthax.'] = 'Réduit automatiquement les liens des contenus utilisant la syntax wiki.'; 
    271288 
    272 #inc/index.setting.php:159 
     289#inc/index.setting.php:169 
    273290$GLOBALS['__l10n']['Use wildcard %L for short URL, %B for blog name, %U for user name.'] = 'Utiliser les jokers %L pour le lien court, %B pour le nom du blog, %U pour l\'utilisateur.'; 
    274291 
    275 #inc/index.setting.php:161 
     292#inc/index.setting.php:170 
     293$GLOBALS['__l10n']['Entry message:'] = 'Message d\'un billet :'; 
     294 
     295#inc/index.setting.php:173 
     296$GLOBALS['__l10n']['This is a special message that can be used on admin enrty page, use wildcard %T for entry title, %L for short URL, %B for blog name, %U for user name.'] = 'C\'est un message spécial qui sera utilisé sur la page d\'édition d\'un billet, utiliser les jokers %T pour le titre du billet, %L pour le lien court, %B pour le blog, %U pour l\'utilisateur.'; 
     297 
     298#inc/index.setting.php:175 
    276299$GLOBALS['__l10n']['Activation'] = 'Activation'; 
    277300 
    278 #inc/index.setting.php:162 
    279 $GLOBALS['__l10n']['Send message when short url is created on:'] = 'Envoyer un message lorsqu\'un lien court est créé sur :'; 
    280  
    281 #inc/index.setting.php:165 
     301#inc/index.setting.php:176 
     302$GLOBALS['__l10n']['Send message when short url is created on:'] = 'Envoyer un message lorsqu\'un lien court est créé dans :'; 
     303 
     304#inc/index.setting.php:179 
    282305$GLOBALS['__l10n']['administration form'] = 'le formulaire de la page d\'administration'; 
    283306 
    284 #inc/index.setting.php:168 
    285 $GLOBALS['__l10n']['public form'] = 'le forumlaire publique'; 
    286  
    287 #inc/index.setting.php:171 
    288 $GLOBALS['__l10n']['template'] = 'le thème'; 
    289  
    290 #inc/index.setting.php:174 
    291 $GLOBALS['__l10n']['content'] = 'le contenu'; 
     307#inc/index.setting.php:182 
     308$GLOBALS['__l10n']['public form'] = 'le formulaire de la page publique'; 
     309 
     310#inc/index.setting.php:185 
     311$GLOBALS['__l10n']['template'] = 'les balises de thème'; 
     312 
     313#inc/index.setting.php:188 
     314$GLOBALS['__l10n']['content'] = 'le contenu (wiki)'; 
    292315 
    293316#inc/lib.dc.twitter.php:169 
     
    310333$GLOBALS['__l10n']['Message'] = 'Message'; 
    311334 
    312 #inc/lib.dc.twitter.php:301 
     335#inc/lib.dc.twitter.php:296 
    313336$GLOBALS['__l10n']['User is not set.'] = 'L\'utilisateur est pas renseigné.'; 
    314337 
    315 #inc/lib.dc.twitter.php:309 
     338#inc/lib.dc.twitter.php:304 
    316339$GLOBALS['__l10n']['Nothing to send.'] = 'Il n\'y a rien à envoyer.'; 
    317340 
    318 #inc/lib.dc.twitter.php:333 
     341#inc/lib.dc.twitter.php:328 
    319342$GLOBALS['__l10n']['Failed to send message (%s)'] = 'Impossible d\'envoyer le message (%s)'; 
    320343 
    321 #inc/lib.dc.twitter.php:393 
     344#inc/lib.dc.twitter.php:388 
    322345$GLOBALS['__l10n']['Failed to get short url (%s)'] = 'Impossible de récupérer le lien court (%s)'; 
    323346 
    324 #inc/lib.dc.twitter.php:399 
     347#inc/lib.dc.twitter.php:394 
    325348$GLOBALS['__l10n']['Failed to get short url'] = 'Impossible de récupérer le lien court'; 
    326349 
     
    337360$GLOBALS['__l10n']['There is nothing to configure for this service.'] = 'Il n\'y a rien à configurer pour ce service.'; 
    338361 
    339 #inc/lib.wiki.kutrl.php:73 
     362#inc/lib.wiki.kutrl.php:84 
    340363$GLOBALS['__l10n']['%s (Shorten with %s)'] = '% (réduit avec %s)'; 
    341364 
     
    383406$GLOBALS['__l10n']['An error occured with code %s and message "%s"'] = 'Une erreur est survenu avec le code "%s" et le message "%s"'; 
    384407 
    385 #inc/services/class.local.service.php:44 
     408#inc/services/class.local.service.php:46 
     409$GLOBALS['__l10n']['Settings:'] = 'paramètre :'; 
     410 
     411#inc/services/class.local.service.php:48 
     412$GLOBALS['__l10n']['Allowed protocols:'] = 'Protocoles autorisés :'; 
     413 
     414#inc/services/class.local.service.php:53 
     415$GLOBALS['__l10n']['Use comma seperated list like: "http:,https:,ftp:"'] = 'Utiliser une virgule pour séparer la liste des protocoles. Ex: "http:,https:,ftp:"'; 
     416 
     417#inc/services/class.local.service.php:58 
     418$GLOBALS['__l10n']['Enable public page for visitors to shorten links'] = 'Activer la page publique pour que les visiteurs puissent réduire des liens'; 
     419 
     420#inc/services/class.local.service.php:61 
     421$GLOBALS['__l10n']['CSS:'] = 'CSS :'; 
     422 
     423#inc/services/class.local.service.php:64 
     424$GLOBALS['__l10n']['You can add here special cascading style sheet. Body of page has class "dc-kutrl" and widgets have class "shortenkutrlwidget" and "rankkutrlwidget".'] = 'Vous pouvez ajouter des styles ici. La balise "body" a la class "dc-kutrl" et les widgets ont les class "shortenkutrlwidget" et "rankkutrlwidget".'; 
     425 
     426#inc/services/class.local.service.php:68 
     427$GLOBALS['__l10n']['Enable special 404 error public page for unknow urls'] = 'Activer la page spéciale d\'erreur 404 pour les liens inconnus'; 
     428 
     429#inc/services/class.local.service.php:70 
     430$GLOBALS['__l10n']['If this is not activated, the default 404 page of the theme will be display.'] = 'Si cette option est désactivée, la page d\'erreur 404 par défaut du thème sera utilisée.'; 
     431 
     432#inc/services/class.local.service.php:74 
     433$GLOBALS['__l10n']['Note:'] = 'Note :'; 
     434 
     435#inc/services/class.local.service.php:76 
    386436$GLOBALS['__l10n']['This service use your own Blog to shorten and serve URL.'] = 'Ce service utilise votre propre blog pour réduire et servir des liens.'; 
    387437 
    388 #inc/services/class.local.service.php:45 
     438#inc/services/class.local.service.php:77 
    389439$GLOBALS['__l10n']['This means that with this service short links start with "%s".'] = 'Cela signifie qu\'avec ce service vos liens courts commencent par "%s".'; 
    390440 
    391 #inc/services/class.local.service.php:48 
     441#inc/services/class.local.service.php:80 
    392442$GLOBALS['__l10n']['You can use Dotclear\'s plugin called myUrlHandlers to change short links prefix on your blog.'] = 'Vous pouvez utiliser l\'extension myUrlHandlers pour Dotclear afin de changer le prefix de vos liens courts depuis votre blog.'; 
    393443 
    394 #inc/services/class.local.service.php:54 
     444#inc/services/class.local.service.php:86 
    395445$GLOBALS['__l10n']['We recommand that you use a rewrite engine in order to remove \'index.php\' from your blog\'s URL.'] = 'Nous vous recommandons d\'utiliser la réécriture d\'URL pour supprimer \'index.php de l\'URL de votre blog.'; 
    396446 
    397 #inc/services/class.local.service.php:56 
     447#inc/services/class.local.service.php:88 
    398448$GLOBALS['__l10n']['You can find more about this on the Dotclear\'s documentation.'] = 'Vous trouverez plus d\'information à ce sujet dans la documentation Dotclear.'; 
    399449 
    400 #inc/services/class.local.service.php:63 
    401 $GLOBALS['__l10n']['Allowed protocols:'] = 'Protocoles autorisés :'; 
    402  
    403 #inc/services/class.local.service.php:68 
    404 $GLOBALS['__l10n']['Use comma seperated list like: "http:,https:,ftp:"'] = 'Utiliser une virgule pour séparer la liste des protocoles. Ex: "http:,https:,ftp:"'; 
    405  
    406 #inc/services/class.local.service.php:73 
    407 $GLOBALS['__l10n']['Enable public page for visitors to shorten links'] = 'Activer la page publique pour que les visiteurs puissent réduire des liens'; 
    408  
    409 #inc/services/class.local.service.php:76 
    410 $GLOBALS['__l10n']['CSS:'] = 'CSS :'; 
    411  
    412 #inc/services/class.local.service.php:79 
    413 $GLOBALS['__l10n']['You can add here special cascading style sheet. Body of page has class "dc-kutrl" and widgets have class "shortenkutrlwidget" and "rankkutrlwidget".'] = 'Vous pouvez ajouter des styles ici. La balise "body" a la class "dc-kutrl" et les widgets ont les class "shortenkutrlwidget" et "rankkutrlwidget".'; 
    414  
    415 #inc/services/class.local.service.php:120 
     450#inc/services/class.local.service.php:93 
     451$GLOBALS['__l10n']['There are two templates delivered with kUtRL, if you do not use default theme, you may adapt them to yours.'] = 'Il y a deux templates livrés avec kUtRL, si vous n\'utilisez pas le thème par défaut, vous devrez peut-être les adapter au votre.'; 
     452 
     453#inc/services/class.local.service.php:94 
     454$GLOBALS['__l10n']['Files are in plugin directory /default-templates, just copy them into your theme and edit them.'] = 'Les fichiers sont dans le répertoire /default-templates du plugin, copiez les dans votre thème et modifiez les.'; 
     455 
     456#inc/services/class.local.service.php:137 
    416457$GLOBALS['__l10n']['Custom short link is already taken.'] = 'Le lien court personnalisé est déjà pris.'; 
    417458 
    418 #inc/services/class.local.service.php:130 
     459#inc/services/class.local.service.php:147 
    419460$GLOBALS['__l10n']['Custom short link is not valid.'] = 'Le lien court personnalisé n\'est pas valide.'; 
    420461 
    421 #inc/services/class.local.service.php:141 
     462#inc/services/class.local.service.php:158 
    422463$GLOBALS['__l10n']['Failed to save link.'] = 'Impossible d\'enregistrer le lien.'; 
    423464 
  • plugins/kUtRL/locales/fr/main.po

    r2190 r2405  
    1 # Language: français 
    2 # Module: kUtRL - 0.3 
    3 # Date: 2010-04-14 22:23:46 
    4 # Translated with translater 1.3 
     1# Language: Français 
     2# Module: kUtRL - 0.4 
     3# Date: 2010-06-28 10:43:43 
     4# Translated with translater 1.4.1 
    55 
    66msgid "" 
    77msgstr "" 
    88"Content-Type: text/plain; charset=UTF-8\n" 
    9 "Project-Id-Version: kUtRL 0.3\n" 
     9"Project-Id-Version: kUtRL 0.4\n" 
    1010"POT-Creation-Date: \n" 
    11 "PO-Revision-Date: 2010-04-14T22:23:46+00:00\n" 
     11"PO-Revision-Date: 2010-06-28T10:43:43+00:00\n" 
    1212"Last-Translator: JC Denis\n" 
    1313"Language-Team: \n" 
     
    1818#: _widgets.php:22 
    1919#: default-templates/kutrl.html:48 
    20 #: inc/index.link.php:112 
     20#: inc/index.link.php:117 
    2121#: inc/index.links.php:203 
    2222#: inc/index.service.php:42 
    23 #: inc/index.setting.php:87 
     23#: inc/index.setting.php:93 
    2424#: index.php:41 
    2525#: index.php:42 
     
    3737 
    3838#: _admin.php:108 
    39 #: inc/index.link.php:136 
     39#: inc/index.link.php:141 
    4040msgid "Custom short link:" 
    4141msgstr "Lien court personnalisé :" 
     
    4646 
    4747#: _admin.php:122 
    48 #: _widgets.php:171 
     48#: _widgets.php:178 
    4949msgid "never followed" 
    5050msgstr "jamais suivi" 
    5151 
    5252#: _admin.php:126 
    53 #: _widgets.php:173 
     53#: _widgets.php:182 
    5454msgid "followed one time" 
    5555msgstr "suivi une fois" 
    5656 
    5757#: _admin.php:130 
    58 #: _widgets.php:175 
     58#: _widgets.php:186 
    5959msgid "followed %s times" 
    6060msgstr "suivi %s fois" 
    6161 
    6262#: _admin.php:137 
    63 #: _admin.php:268 
     63#: _admin.php:292 
    6464msgid "delete short link" 
    6565msgstr "effacer un lien court" 
    6666 
    67 #: _admin.php:267 
     67#: _admin.php:291 
    6868msgid "create short link" 
    6969msgstr "créer un lien court" 
    7070 
    71 #: _public.php:123 
     71#: _public.php:141 
    7272msgid "Failed to verify protected field." 
    7373msgstr "Impossible de vérifier le champs de protection." 
    7474 
    75 #: _public.php:131 
    76 #: inc/index.link.php:38 
     75#: _public.php:149 
     76#: inc/index.link.php:40 
    7777#: inc/services/class.bilbolinks.service.php:64 
    7878#: inc/services/class.bitly.service.php:76 
    79 #: inc/services/class.local.service.php:89 
     79#: inc/services/class.local.service.php:106 
    8080#: inc/services/class.trim.service.php:65 
    8181msgid "Service is not well configured." 
    8282msgstr "Le service n'est pas correctement configuré." 
    8383 
    84 #: _public.php:139 
     84#: _public.php:157 
    8585msgid "This string is not a valid URL." 
    8686msgstr "Cette chaine n'est pas un lien valide." 
    8787 
    88 #: _public.php:147 
    89 #: inc/index.link.php:47 
     88#: _public.php:165 
     89#: inc/index.link.php:49 
    9090msgid "This link is too short." 
    9191msgstr "Ce lien est trop court." 
    9292 
    93 #: _public.php:155 
    94 #: inc/index.link.php:50 
     93#: _public.php:173 
     94#: inc/index.link.php:52 
    9595msgid "This type of link is not allowed." 
    9696msgstr "Ce type de lien n'est pas autorisé." 
    9797 
    98 #: _public.php:164 
    99 #: inc/index.link.php:53 
     98#: _public.php:182 
     99#: inc/index.link.php:55 
    100100msgid "Short links are limited to this blog URL." 
    101101msgstr "Les liens courts sont limités à l'URL de ce blog." 
    102102 
    103 #: _public.php:172 
    104 #: inc/index.link.php:56 
     103#: _public.php:190 
     104#: inc/index.link.php:58 
    105105msgid "This link is already a short link." 
    106106msgstr "Ce lien est dèjà un lien court." 
    107107 
    108 #: _public.php:185 
    109 #: _public.php:204 
    110 #: inc/index.link.php:67 
    111 #: inc/index.link.php:87 
     108#: _public.php:203 
     109#: _public.php:222 
     110#: inc/index.link.php:69 
     111#: inc/index.link.php:90 
    112112msgid "Short link for %s is %s" 
    113113msgstr "Le lien court pour %s est %s" 
    114114 
    115 #: _public.php:196 
     115#: _public.php:214 
    116116msgid "Failed to create short link." 
    117117msgstr "Impossible de créer le lien court." 
    118118 
    119 #: _public.php:213 
    120 #: _public.php:432 
    121 #: inc/lib.wiki.kutrl.php:78 
     119#: _public.php:231 
     120#: _public.php:310 
     121#: _public.php:532 
     122#: inc/lib.wiki.kutrl.php:90 
    122123msgid "public" 
    123124msgstr "publique" 
    124125 
    125 #: _public.php:314 
    126 #: _widgets.php:105 
     126#: _public.php:403 
     127#: _widgets.php:106 
    127128msgid "Rewrite \"%s\" in next field to show that you are not a robot:" 
    128129msgstr "Recopier \"%s\" dans le champs suivant pour montrer que vous n'êtes pas une machine :" 
     
    186187msgstr "Cacher les liens non suivis" 
    187188 
    188 #: _widgets.php:101 
     189#: _widgets.php:102 
    189190#: default-templates/kutrl.html:55 
    190 #: inc/index.link.php:129 
     191#: inc/index.link.php:134 
    191192msgid "Long link:" 
    192193msgstr "Lien long :" 
    193194 
    194 #: _widgets.php:108 
     195#: _widgets.php:109 
    195196#: default-templates/kutrl.html:62 
    196197msgid "Create" 
    197198msgstr "Créer" 
    198199 
    199 #: inc/index.link.php:35 
     200#: default-templates/kutrl404.html:14 
     201#: default-templates/kutrl404.html:38 
     202msgid "URL not found" 
     203msgstr "URL non trouvée" 
     204 
     205#: default-templates/kutrl404.html:42 
     206msgid "The URL you are looking for does not exist." 
     207msgstr "Le lien que vous recherchez n'existe pas." 
     208 
     209#: default-templates/kutrl404.html:45 
     210msgid "Create your own short URL" 
     211msgstr "Créer votre propre lien court" 
     212 
     213#: inc/index.link.php:37 
    200214msgid "There is nothing to shorten." 
    201215msgstr "I n'y a rien à réduire." 
    202216 
    203 #: inc/index.link.php:41 
     217#: inc/index.link.php:43 
    204218msgid "This service does not allowed custom hash." 
    205219msgstr "Ce service n'accepte pas les liens court personnalisés." 
    206220 
    207 #: inc/index.link.php:44 
     221#: inc/index.link.php:46 
    208222msgid "This link is not a valid URL." 
    209223msgstr "Ce lien n'est pas valide." 
    210224 
    211 #: inc/index.link.php:59 
     225#: inc/index.link.php:61 
    212226msgid "This custom short url is already taken." 
    213227msgstr "Ce lien court personnalisé est déjà pris." 
    214228 
    215 #: inc/index.link.php:79 
     229#: inc/index.link.php:82 
    216230msgid "Failed to create short link. This could be caused by a service failure." 
    217231msgstr "Impossible de créé un lien court. Ceci peut être causé par un problème du service." 
    218232 
    219 #: inc/index.link.php:116 
     233#: inc/index.link.php:121 
    220234#: inc/index.links.php:207 
    221235#: inc/index.service.php:52 
    222 #: inc/index.setting.php:97 
     236#: inc/index.setting.php:103 
    223237msgid "New link" 
    224238msgstr "Nouveau lien" 
    225239 
    226 #: inc/index.link.php:121 
     240#: inc/index.link.php:126 
    227241msgid "You must set an admin service." 
    228242msgstr "Vous devez définir un service admin." 
    229243 
    230 #: inc/index.link.php:128 
     244#: inc/index.link.php:133 
    231245msgid "Shorten link using service \"%s\"" 
    232246msgstr "Raccourcir un lien en utilisant le service \"%s\"" 
    233247 
    234 #: inc/index.link.php:138 
     248#: inc/index.link.php:143 
    235249msgid "Only if you want a custom short link." 
    236250msgstr "Uniquement si vous souhaitez un lien court personnalisé." 
    237251 
    238 #: inc/index.link.php:142 
     252#: inc/index.link.php:148 
    239253msgid "You can use \"bob!!\" if you want a semi-custom link, it starts with \"bob\" and \"!!\" will be replaced by an increment value." 
    240254msgstr "Vous pouvez utiliser \"bob!!\" si vous souhaitez un lien semi-personnalisé, il commencera par \"bob\" et \"!!\" sera remplacé par une valeur incrémentale." 
     
    253267 
    254268#: inc/index.links.php:132 
    255 #: inc/index.setting.php:82 
     269#: inc/index.setting.php:88 
    256270msgid "disabled" 
    257271msgstr "Désactivé" 
     
    286300msgstr "En savoir plus à propos de %s." 
    287301 
    288 #: inc/index.setting.php:96 
     302#: inc/index.setting.php:102 
    289303#: index.php:36 
    290304msgid "Settings" 
    291305msgstr "Paramètres" 
    292306 
    293 #: inc/index.setting.php:101 
     307#: inc/index.setting.php:107 
    294308msgid "Plugin activation" 
    295309msgstr "Activation de l'extension" 
    296310 
    297 #: inc/index.setting.php:104 
     311#: inc/index.setting.php:110 
    298312msgid "Enable plugin" 
    299313msgstr "Activer l'extension" 
    300314 
    301 #: inc/index.setting.php:107 
     315#: inc/index.setting.php:113 
    302316msgid "General rules" 
    303317msgstr "Réglages" 
    304318 
    305 #: inc/index.setting.php:110 
     319#: inc/index.setting.php:116 
    306320msgid "Limit short link to current blog" 
    307321msgstr "Limiter les liens court à ce blog" 
    308322 
    309 #: inc/index.setting.php:111 
     323#: inc/index.setting.php:117 
    310324msgid "Only link started with this blog URL could be shortened." 
    311325msgstr "Uniquement les liens commençant par l'URL de ce blog pourront être réduits." 
    312326 
    313 #: inc/index.setting.php:114 
     327#: inc/index.setting.php:120 
    314328msgid "Passive mode" 
    315329msgstr "Mode passif" 
    316330 
    317 #: inc/index.setting.php:115 
    318 msgid "If this extension is disabled and the passive mode is enabled, \"kutrl\" tags will display long urls instead of nothing on templates." 
    319 msgstr "Si cette extension est désactivée et que le mode passif est activé, les balises \"kutrl\" afficheront les longues URL au lieu de rien." 
    320  
    321 #: inc/index.setting.php:118 
     331#: inc/index.setting.php:121 
     332msgid "If this extension is disabled and the passive mode is enabled, \"kutrl\" tags (like EntryKurl) will display long urls instead of nothing on templates." 
     333msgstr "Si cette extension est désactivée et que le mode passif est activé, les balises \"kutrl\" (comme EntryKutrl) afficheront les liens longs au lieu de rien." 
     334 
     335#: inc/index.setting.php:124 
     336msgid "Active mode" 
     337msgstr "Mode actif" 
     338 
     339#: inc/index.setting.php:125 
     340msgid "If the active mode is enabled, all know default template tags (like EntryURL) will display short urls instead of long ones on templates." 
     341msgstr "Si le mode actif est acitvé, les balises de thème (comme EntryURL) afficheront les liens court au lieu des longs." 
     342 
     343#: inc/index.setting.php:128 
    322344msgid "Create short link for new entries" 
    323345msgstr "Créer un lien court pour les nouveaux billets" 
    324346 
    325 #: inc/index.setting.php:119 
     347#: inc/index.setting.php:129 
    326348msgid "This can be changed on page of creation/edition of an entry." 
    327349msgstr "Ceci peut être changé sur la page d'édition / création d'un billet." 
    328350 
    329 #: inc/index.setting.php:122 
     351#: inc/index.setting.php:132 
    330352msgid "Default services" 
    331353msgstr "Services par défaut" 
    332354 
    333 #: inc/index.setting.php:128 
     355#: inc/index.setting.php:138 
    334356msgid "Administration:" 
    335357msgstr "Administration :" 
    336358 
    337 #: inc/index.setting.php:131 
     359#: inc/index.setting.php:141 
    338360msgid "Service to use in this admin page and on edit page of an entry." 
    339361msgstr "Service à utiliser sur cette page d'administration ou sur la page d'édition d'un billet." 
    340362 
    341 #: inc/index.setting.php:137 
     363#: inc/index.setting.php:147 
    342364msgid "Templates:" 
    343365msgstr "Templates :" 
    344366 
    345 #: inc/index.setting.php:140 
     367#: inc/index.setting.php:150 
    346368msgid "Shorten links automatically when using template value like \"EntryKutrl\"." 
    347369msgstr "Réduit automatiquement les liens des templates utilisant les balises tels que \"EntryKutrl\"." 
    348370 
    349 #: inc/index.setting.php:146 
     371#: inc/index.setting.php:156 
    350372msgid "Contents:" 
    351373msgstr "Contenus :" 
    352374 
    353 #: inc/index.setting.php:149 
     375#: inc/index.setting.php:159 
    354376msgid "Shorten links automatically found in contents using wiki synthax." 
    355377msgstr "Réduit automatiquement les liens des contenus utilisant la syntax wiki." 
    356378 
    357 #: inc/index.setting.php:159 
     379#: inc/index.setting.php:169 
    358380msgid "Use wildcard %L for short URL, %B for blog name, %U for user name." 
    359381msgstr "Utiliser les jokers %L pour le lien court, %B pour le nom du blog, %U pour l'utilisateur." 
    360382 
    361 #: inc/index.setting.php:161 
     383#: inc/index.setting.php:170 
     384msgid "Entry message:" 
     385msgstr "Message d'un billet :" 
     386 
     387#: inc/index.setting.php:173 
     388msgid "This is a special message that can be used on admin enrty page, use wildcard %T for entry title, %L for short URL, %B for blog name, %U for user name." 
     389msgstr "C'est un message spécial qui sera utilisé sur la page d'édition d'un billet, utiliser les jokers %T pour le titre du billet, %L pour le lien court, %B pour le blog, %U pour l'utilisateur." 
     390 
     391#: inc/index.setting.php:175 
    362392msgid "Activation" 
    363393msgstr "Activation" 
    364394 
    365 #: inc/index.setting.php:162 
     395#: inc/index.setting.php:176 
    366396msgid "Send message when short url is created on:" 
    367 msgstr "Envoyer un message lorsqu'un lien court est créé sur :" 
    368  
    369 #: inc/index.setting.php:165 
     397msgstr "Envoyer un message lorsqu'un lien court est créé dans :" 
     398 
     399#: inc/index.setting.php:179 
    370400msgid "administration form" 
    371401msgstr "le formulaire de la page d'administration" 
    372402 
    373 #: inc/index.setting.php:168 
     403#: inc/index.setting.php:182 
    374404msgid "public form" 
    375 msgstr "le forumlaire publique" 
    376  
    377 #: inc/index.setting.php:171 
     405msgstr "le formulaire de la page publique" 
     406 
     407#: inc/index.setting.php:185 
    378408msgid "template" 
    379 msgstr "le thème" 
    380  
    381 #: inc/index.setting.php:174 
     409msgstr "les balises de thème" 
     410 
     411#: inc/index.setting.php:188 
    382412msgid "content" 
    383 msgstr "le contenu" 
     413msgstr "le contenu (wiki)" 
    384414 
    385415#: inc/lib.dc.twitter.php:169 
     
    407437msgstr "Message" 
    408438 
    409 #: inc/lib.dc.twitter.php:301 
     439#: inc/lib.dc.twitter.php:296 
    410440msgid "User is not set." 
    411441msgstr "L'utilisateur est pas renseigné." 
    412442 
    413 #: inc/lib.dc.twitter.php:309 
     443#: inc/lib.dc.twitter.php:304 
    414444msgid "Nothing to send." 
    415445msgstr "Il n'y a rien à envoyer." 
    416446 
    417 #: inc/lib.dc.twitter.php:333 
     447#: inc/lib.dc.twitter.php:328 
    418448msgid "Failed to send message (%s)" 
    419449msgstr "Impossible d'envoyer le message (%s)" 
    420450 
    421 #: inc/lib.dc.twitter.php:393 
     451#: inc/lib.dc.twitter.php:388 
    422452msgid "Failed to get short url (%s)" 
    423453msgstr "Impossible de récupérer le lien court (%s)" 
    424454 
    425 #: inc/lib.dc.twitter.php:399 
     455#: inc/lib.dc.twitter.php:394 
    426456msgid "Failed to get short url" 
    427457msgstr "Impossible de récupérer le lien court" 
     
    443473msgstr "Il n'y a rien à configurer pour ce service." 
    444474 
    445 #: inc/lib.wiki.kutrl.php:73 
     475#: inc/lib.wiki.kutrl.php:84 
    446476msgid "%s (Shorten with %s)" 
    447477msgstr "% (réduit avec %s)" 
     
    501531msgstr "Une erreur est survenu avec le code \"%s\" et le message \"%s\"" 
    502532 
    503 #: inc/services/class.local.service.php:44 
     533#: inc/services/class.local.service.php:46 
     534msgid "Settings:" 
     535msgstr "paramètre :" 
     536 
     537#: inc/services/class.local.service.php:48 
     538msgid "Allowed protocols:" 
     539msgstr "Protocoles autorisés :" 
     540 
     541#: inc/services/class.local.service.php:53 
     542msgid "Use comma seperated list like: \"http:,https:,ftp:\"" 
     543msgstr "Utiliser une virgule pour séparer la liste des protocoles. Ex: \"http:,https:,ftp:\"" 
     544 
     545#: inc/services/class.local.service.php:58 
     546msgid "Enable public page for visitors to shorten links" 
     547msgstr "Activer la page publique pour que les visiteurs puissent réduire des liens" 
     548 
     549#: inc/services/class.local.service.php:61 
     550msgid "CSS:" 
     551msgstr "CSS :" 
     552 
     553#: inc/services/class.local.service.php:64 
     554msgid "You can add here special cascading style sheet. Body of page has class \"dc-kutrl\" and widgets have class \"shortenkutrlwidget\" and \"rankkutrlwidget\"." 
     555msgstr "Vous pouvez ajouter des styles ici. La balise \"body\" a la class \"dc-kutrl\" et les widgets ont les class \"shortenkutrlwidget\" et \"rankkutrlwidget\"." 
     556 
     557#: inc/services/class.local.service.php:68 
     558msgid "Enable special 404 error public page for unknow urls" 
     559msgstr "Activer la page spéciale d'erreur 404 pour les liens inconnus" 
     560 
     561#: inc/services/class.local.service.php:70 
     562msgid "If this is not activated, the default 404 page of the theme will be display." 
     563msgstr "Si cette option est désactivée, la page d'erreur 404 par défaut du thème sera utilisée." 
     564 
     565#: inc/services/class.local.service.php:74 
     566msgid "Note:" 
     567msgstr "Note :" 
     568 
     569#: inc/services/class.local.service.php:76 
    504570msgid "This service use your own Blog to shorten and serve URL." 
    505571msgstr "Ce service utilise votre propre blog pour réduire et servir des liens." 
    506572 
    507 #: inc/services/class.local.service.php:45 
     573#: inc/services/class.local.service.php:77 
    508574msgid "This means that with this service short links start with \"%s\"." 
    509575msgstr "Cela signifie qu'avec ce service vos liens courts commencent par \"%s\"." 
    510576 
    511 #: inc/services/class.local.service.php:48 
     577#: inc/services/class.local.service.php:80 
    512578msgid "You can use Dotclear's plugin called myUrlHandlers to change short links prefix on your blog." 
    513579msgstr "Vous pouvez utiliser l'extension myUrlHandlers pour Dotclear afin de changer le prefix de vos liens courts depuis votre blog." 
    514580 
    515 #: inc/services/class.local.service.php:54 
     581#: inc/services/class.local.service.php:86 
    516582msgid "We recommand that you use a rewrite engine in order to remove 'index.php' from your blog's URL." 
    517583msgstr "Nous vous recommandons d'utiliser la réécriture d'URL pour supprimer 'index.php de l'URL de votre blog." 
    518584 
    519 #: inc/services/class.local.service.php:56 
     585#: inc/services/class.local.service.php:88 
    520586msgid "You can find more about this on the Dotclear's documentation." 
    521587msgstr "Vous trouverez plus d'information à ce sujet dans la documentation Dotclear." 
    522588 
    523 #: inc/services/class.local.service.php:63 
    524 msgid "Allowed protocols:" 
    525 msgstr "Protocoles autorisés :" 
    526  
    527 #: inc/services/class.local.service.php:68 
    528 msgid "Use comma seperated list like: \"http:,https:,ftp:\"" 
    529 msgstr "Utiliser une virgule pour séparer la liste des protocoles. Ex: \"http:,https:,ftp:\"" 
    530  
    531 #: inc/services/class.local.service.php:73 
    532 msgid "Enable public page for visitors to shorten links" 
    533 msgstr "Activer la page publique pour que les visiteurs puissent réduire des liens" 
    534  
    535 #: inc/services/class.local.service.php:76 
    536 msgid "CSS:" 
    537 msgstr "CSS :" 
    538  
    539 #: inc/services/class.local.service.php:79 
    540 msgid "You can add here special cascading style sheet. Body of page has class \"dc-kutrl\" and widgets have class \"shortenkutrlwidget\" and \"rankkutrlwidget\"." 
    541 msgstr "Vous pouvez ajouter des styles ici. La balise \"body\" a la class \"dc-kutrl\" et les widgets ont les class \"shortenkutrlwidget\" et \"rankkutrlwidget\"." 
    542  
    543 #: inc/services/class.local.service.php:120 
     589#: inc/services/class.local.service.php:93 
     590msgid "There are two templates delivered with kUtRL, if you do not use default theme, you may adapt them to yours." 
     591msgstr "Il y a deux templates livrés avec kUtRL, si vous n'utilisez pas le thème par défaut, vous devrez peut-être les adapter au votre." 
     592 
     593#: inc/services/class.local.service.php:94 
     594msgid "Files are in plugin directory /default-templates, just copy them into your theme and edit them." 
     595msgstr "Les fichiers sont dans le répertoire /default-templates du plugin, copiez les dans votre thème et modifiez les." 
     596 
     597#: inc/services/class.local.service.php:137 
    544598msgid "Custom short link is already taken." 
    545599msgstr "Le lien court personnalisé est déjà pris." 
    546600 
    547 #: inc/services/class.local.service.php:130 
     601#: inc/services/class.local.service.php:147 
    548602msgid "Custom short link is not valid." 
    549603msgstr "Le lien court personnalisé n'est pas valide." 
    550604 
    551 #: inc/services/class.local.service.php:141 
     605#: inc/services/class.local.service.php:158 
    552606msgid "Failed to save link." 
    553607msgstr "Impossible d'enregistrer le lien." 
  • plugins/kUtRL/release.txt

    r2274 r2405  
    33 - Added passworded links 
    44 - fixed or removed tweet from comment when it is spam 
     5 
     60.4 20100628 
     7 * Switched to DC 2.2 
     8 * Fixed no short urls on preview mode 
     9 * Fixed lock hash of deleted urls 
     10 * Fixed hide new short url widget on kutrl pages 
     11 * Fixed typo 
     12 * Added active mode that shorten urls on default template values 
     13 * Added special tweeter message for post (can include post title) 
     14 * Added kutrl special 404 page 
    515 
    6160.3.3 20100528 
Note: See TracChangeset for help on using the changeset viewer.

Sites map