Dotclear

Changeset 3247


Ignore:
Timestamp:
11/05/13 08:25:23 (10 years ago)
Author:
JcDenis
Message:

Switch to Dotclear 2.6, Add dashboard icon, Clean up code

Location:
plugins/cinecturlink2
Files:
4 added
5 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • plugins/cinecturlink2/_admin.php

    r2314 r3247  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of cinecturlink2, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    13 if (!defined('DC_CONTEXT_ADMIN')){return;} 
     15if (!defined('DC_CONTEXT_ADMIN')) { 
     16 
     17     return null; 
     18} 
    1419 
    1520require_once dirname(__FILE__).'/_widgets.php'; 
     
    1722# Admin menu 
    1823$_menu['Plugins']->addItem( 
    19      __('Cinecturlink 2'), 
    20      'plugin.php?p=cinecturlink2','index.php?pf=cinecturlink2/icon.png', 
    21      preg_match('/plugin.php\?p=cinecturlink2(&.*)?$/',$_SERVER['REQUEST_URI']), 
    22      $core->auth->check('content',$core->blog->id) 
     24     __('My cinecturlink'), 
     25     'plugin.php?p=cinecturlink2', 
     26     'index.php?pf=cinecturlink2/icon.png', 
     27     preg_match( 
     28          '/plugin.php\?p=cinecturlink2(&.*)?$/', 
     29          $_SERVER['REQUEST_URI']) 
     30     , 
     31     $core->auth->check('contentadmin', $core->blog->id) 
    2332); 
    24 ?> 
     33 
     34$core->addBehavior( 
     35     'adminDashboardFavorites', 
     36     array('cinecturlink2AdminBehaviors', 'adminDashboardFavorites') 
     37); 
     38 
     39class cinecturlink2AdminBehaviors 
     40{ 
     41     public static function adminDashboardFavorites($core, $favs) 
     42     { 
     43          $favs->register('cinecturlink2', array( 
     44               'title'        => __('My cinecturlink'), 
     45               'url'          => 'plugin.php?p=cinecturlink2#links', 
     46               'small-icon'   => 'index.php?pf=cinecturlink2/icon.png', 
     47               'large-icon'   => 'index.php?pf=cinecturlink2/icon-big.png', 
     48               'permissions'  => $core->auth->check( 
     49                    'contentadmin', 
     50                    $core->blog->id 
     51               ), 
     52               'active_cb'    => array( 
     53                    'cinecturlink2AdminBehaviors',  
     54                    'adminDashboardFavoritesActive' 
     55               ) 
     56          )); 
     57     } 
     58 
     59     public static function adminDashboardFavoritesActive($request, $params) 
     60     { 
     61          return $request == 'plugin.php'  
     62               && isset($params['p'])  
     63               && $params['p'] == 'cinecturlink2'; 
     64     } 
     65} 
  • plugins/cinecturlink2/_define.php

    r2751 r3247  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of cinecturlink2, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
     
    1719 */ 
    1820 
    19 if (!defined('DC_RC_PATH')){return;} 
     21if (!defined('DC_RC_PATH')) { 
     22 
     23     return null; 
     24} 
    2025 
    2126$this->registerModule( 
    22      /* Name */               "Cinecturlink 2", 
    23      /* Description*/         "Widgets and pages about books, musics, films, blogs you are interested in", 
    24      /* Author */        "JC Denis", 
    25      /* Version */       '0.6.3', 
    26      /* Permissions */        'content' 
     27     /* Name */ 
     28     "Cinecturlink 2", 
     29     /* Description*/ 
     30     "Widgets and pages about books, musics, films, blogs you are interested in", 
     31     /* Author */ 
     32     "Jean-Christian Denis", 
     33     /* Version */ 
     34     '0.7', 
     35     /* Properties */ 
     36     array( 
     37          'permissions' => 'contentadmin', 
     38          'type' => 'plugin', 
     39          'dc_min' => '2.6', 
     40          'support' => 'http://jcd.lv/q=cinecturlink2', 
     41          'details' => 'http://plugins.dotaddict.org/dc2/details/cinecturlink2' 
     42     ) 
    2743); 
    28      /* date */          #20101112 
    29 ?> 
  • plugins/cinecturlink2/_install.php

    r2751 r3247  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of cinecturlink2, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    13 if (!defined('DC_CONTEXT_ADMIN')){return;} 
     15if (!defined('DC_CONTEXT_ADMIN')) { 
    1416 
    15 $new_version = $core->plugins->moduleInfo('cinecturlink2','version'); 
    16 $old_version = $core->getVersion('cinecturlink2'); 
     17     return null; 
     18} 
    1719 
    18 if (version_compare($old_version,$new_version,'>=')) return; 
     20try { 
     21     # Check module version 
     22     if (version_compare( 
     23          $core->getVersion('cinecturlink2'), 
     24          $core->plugins->moduleInfo('cinecturlink2', 'version'), 
     25          '>=' 
     26     )) { 
    1927 
    20 try 
    21 { 
    22      # Check DC version 
    23      if (version_compare(str_replace("-r","-p",DC_VERSION),'2.2-alpha','<')) 
    24      { 
    25           throw new Exception('cinecturlink2 requires Dotclear 2.2'); 
     28          return null; 
    2629     } 
    27       
     30 
     31     # Check Dotclear version 
     32     if (!method_exists('dcUtils', 'versionsCompare')  
     33      || dcUtils::versionsCompare(DC_VERSION, '2.6', '>', false)) { 
     34          throw new Exception(sprintf( 
     35               '%s requires Dotclear %s', 'cinecturlink2', '2.6' 
     36          )); 
     37     } 
     38 
    2839     # Tables 
    29      $s = new dbStruct($core->con,$core->prefix); 
     40     $s = new dbStruct($core->con, $core->prefix); 
    3041     $s->cinecturlink2 
    31           ->link_id ('bigint',0,false) 
    32           ->blog_id ('varchar',32,false) 
    33           ->cat_id ('bigint',0,true) 
    34           ->user_id ('varchar',32,true) 
    35           ->link_type ('varchar',32,false,"'cinecturlink'") 
    36           ->link_title ('varchar',255,false) 
    37           ->link_desc ('varchar',255,false) 
    38           ->link_author ('varchar',255,false) 
    39           ->link_lang ('varchar',5,false,"'en'") 
    40           ->link_url ('varchar',255,false) 
    41           ->link_img ('varchar',255,false) 
    42           ->link_creadt ('timestamp',0,false,'now()') 
    43           ->link_upddt ('timestamp',0,false,'now()') 
    44           ->link_pos ('smallint',0,false,"'0'") 
    45           ->link_note('smallint',0,false,"'10'") 
    46           ->link_count('bigint',0,false,"'0'") 
    47            
    48           ->primary('pk_cinecturlink2','link_id') 
    49           ->index('idx_cinecturlink2_title','btree','link_title') 
    50           ->index('idx_cinecturlink2_author','btree','link_author') 
    51           ->index('idx_cinecturlink2_blog_id','btree','blog_id') 
    52           ->index('idx_cinecturlink2_cat_id','btree','cat_id') 
    53           ->index('idx_cinecturlink2_user_id','btree','user_id') 
    54           ->index('idx_cinecturlink2_type','btree','link_type'); 
    55       
     42          ->link_id ('bigint', 0, false) 
     43          ->blog_id ('varchar', 32, false) 
     44          ->cat_id ('bigint', 0, true) 
     45          ->user_id ('varchar', 32, true) 
     46          ->link_type ('varchar', 32, false, "'cinecturlink'") 
     47          ->link_title ('varchar', 255, false) 
     48          ->link_desc ('varchar', 255, false) 
     49          ->link_author ('varchar', 255, false) 
     50          ->link_lang ('varchar', 5, false, "'en'") 
     51          ->link_url ('varchar', 255, false) 
     52          ->link_img ('varchar', 255, false) 
     53          ->link_creadt ('timestamp', 0, false, 'now()') 
     54          ->link_upddt ('timestamp', 0, false, 'now()') 
     55          ->link_pos ('smallint', 0, false, "'0'") 
     56          ->link_note('smallint', 0, false, "'10'") 
     57          ->link_count('bigint', 0, false, "'0'") 
     58 
     59          ->primary('pk_cinecturlink2', 'link_id') 
     60          ->index('idx_cinecturlink2_title', 'btree', 'link_title') 
     61          ->index('idx_cinecturlink2_author', 'btree', 'link_author') 
     62          ->index('idx_cinecturlink2_blog_id', 'btree', 'blog_id') 
     63          ->index('idx_cinecturlink2_cat_id', 'btree', 'cat_id') 
     64          ->index('idx_cinecturlink2_user_id', 'btree', 'user_id') 
     65          ->index('idx_cinecturlink2_type', 'btree', 'link_type'); 
     66 
    5667     $s->cinecturlink2_cat 
    57           ->cat_id ('bigint',0,false) 
    58           ->blog_id ('varchar',32,false) 
    59           ->cat_title ('varchar',255,false) 
    60           ->cat_desc ('varchar',255,false) 
    61           ->cat_creadt ('timestamp',0,false,'now()') 
    62           ->cat_upddt ('timestamp',0,false,'now()') 
    63           ->cat_pos ('smallint',0,false,"'0'") 
    64            
    65           ->primary('pk_cinecturlink2_cat','cat_id') 
    66           ->index('idx_cinecturlink2_cat_blog_id','btree','blog_id') 
    67           ->unique('uk_cinecturlink2_cat_title','cat_title','blog_id'); 
    68       
     68          ->cat_id ('bigint', 0, false) 
     69          ->blog_id ('varchar', 32, false) 
     70          ->cat_title ('varchar', 255, false) 
     71          ->cat_desc ('varchar', 255, false) 
     72          ->cat_creadt ('timestamp', 0, false, 'now()') 
     73          ->cat_upddt ('timestamp', 0, false, 'now()') 
     74          ->cat_pos ('smallint', 0, false, "'0'") 
     75 
     76          ->primary('pk_cinecturlink2_cat', 'cat_id') 
     77          ->index('idx_cinecturlink2_cat_blog_id', 'btree', 'blog_id') 
     78          ->unique('uk_cinecturlink2_cat_title', 'cat_title', 'blog_id'); 
     79 
    6980     $si = new dbStruct($core->con,$core->prefix); 
    7081     $changes = $si->synchronize($s); 
    71       
     82 
    7283     # Settings 
    7384     $core->blog->settings->addNamespace('cinecturlink2'); 
    7485     $s = $core->blog->settings->cinecturlink2; 
    75      $s->put('cinecturlink2_active',true,'boolean','Enable cinecturlink2',false,true); 
    76      $s->put('cinecturlink2_widthmax',100,'integer','Maximum width of picture',false,true); 
    77      $s->put('cinecturlink2_folder','cinecturlink','string','Public folder of pictures',false,true); 
    78      $s->put('cinecturlink2_triggeronrandom',false,'boolean','Open link in new window',false,true); 
    79      $s->put('cinecturlink2_public_active',false,'boolean','Enable cinecturlink2',false,true); 
    80      $s->put('cinecturlink2_public_title','','string','Title of public page',false,true); 
    81      $s->put('cinecturlink2_public_description','','string','Description of public page',false,true); 
    82      $s->put('cinecturlink2_public_nbrpp',20,'integer','Number of entries per page on public page',false,true); 
    83      $s->put('cinecturlink2_public_caturl','c2cat','string','Part of URL for a category list',false,true); 
    84       
    85      # Version 
    86      $core->setVersion('cinecturlink2',$new_version); 
     86     $s->put('cinecturlink2_active', true, 'boolean', 'Enable cinecturlink2', false, true); 
     87     $s->put('cinecturlink2_widthmax', 100, 'integer', 'Maximum width of picture', false, true); 
     88     $s->put('cinecturlink2_folder', 'cinecturlink', 'string', 'Public folder of pictures', false, true); 
     89     $s->put('cinecturlink2_triggeronrandom', false, 'boolean', 'Open link in new window', false, true); 
     90     $s->put('cinecturlink2_public_active', false, 'boolean', 'Enable cinecturlink2', false, true); 
     91     $s->put('cinecturlink2_public_title', '', 'string', 'Title of public page', false, true); 
     92     $s->put('cinecturlink2_public_description', '', 'string','Description of public page', false, true); 
     93     $s->put('cinecturlink2_public_nbrpp', 20, 'integer', 'Number of entries per page on public page', false, true); 
     94     $s->put('cinecturlink2_public_caturl', 'c2cat', 'string', 'Part of URL for a category list', false, true); 
     95 
     96 
     97     # Set module version 
     98     $core->setVersion( 
     99          'cinecturlink2', 
     100          $core->plugins->moduleInfo('cinecturlink2', 'version') 
     101     ); 
    87102 
    88103     return true; 
    89104} 
    90 catch (Exception $e) 
    91 { 
     105catch (Exception $e) { 
    92106     $core->error->add($e->getMessage()); 
    93107} 
     108 
    94109return false; 
    95 ?> 
  • plugins/cinecturlink2/_prepend.php

    r2357 r3247  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of cinecturlink2, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    13 if (!defined('DC_RC_PATH')){return;} 
     15if (!defined('DC_RC_PATH')) { 
    1416 
    15 global $__autoload, $core; 
     17     return null; 
     18} 
    1619 
    17 $__autoload['cinecturlink2'] = dirname(__FILE__).'/inc/class.cinecturlink2.php'; 
    18 $__autoload['c2_context'] = dirname(__FILE__).'/inc/lib.cinecturlink2.context.php'; 
     20$d = dirname(__FILE__).'/inc/'; 
    1921 
    20 $core->url->register('cinecturlink2','cinecturlink','^cinecturlink(?:/(.+))?$',array('urlCinecturlink2','c2Page')); 
     22$__autoload['cinecturlink2']            = $d.'class.cinecturlink2.php'; 
     23$__autoload['cinecturlink2Context']     = $d.'lib.cinecturlink2.context.php'; 
     24$__autoload['sitemapsCinecturlink2']    = $d.'lib.sitemaps.cinecturlink2.php'; 
     25 
     26$core->url->register( 
     27     'cinecturlink2', 
     28     'cinecturlink', 
     29     '^cinecturlink(?:/(.+))?$', 
     30     array('urlCinecturlink2', 'c2Page') 
     31); 
    2132 
    2233# Add cinecturlink2 report on plugin activityReport 
    23 if (defined('ACTIVITY_REPORT')) 
    24 { 
    25      require_once dirname(__FILE__).'/inc/lib.cinecturlink2.activityreport.php'; 
     34if (defined('ACTIVITY_REPORT')) { 
     35     require_once $d.'lib.cinecturlink2.activityreport.php'; 
    2636} 
    2737 
    2838# cinecturlink2 libraries for sitemaps 
    29 $__autoload['sitemapsCinecturlink2'] = dirname(__FILE__).'/inc/lib.sitemaps.cinecturlink2.php'; 
    30 $core->addBehavior('sitemapsDefineParts',array('sitemapsCinecturlink2','sitemapsDefineParts')); 
    31 $core->addBehavior('sitemapsURLsCollect',array('sitemapsCinecturlink2','sitemapsURLsCollect')); 
    32 ?> 
     39$core->addBehavior( 
     40     'sitemapsDefineParts', 
     41     array('sitemapsCinecturlink2', 'sitemapsDefineParts') 
     42); 
     43$core->addBehavior( 
     44     'sitemapsURLsCollect', 
     45     array('sitemapsCinecturlink2', 'sitemapsURLsCollect') 
     46); 
  • plugins/cinecturlink2/_public.php

    r2314 r3247  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of cinecturlink2, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    13 if (!defined('DC_RC_PATH')){return;} 
     15if (!defined('DC_RC_PATH')) { 
     16 
     17     return null; 
     18} 
    1419 
    1520require_once dirname(__FILE__).'/_widgets.php'; 
     
    1722$core->blog->settings->addNamespace('cinecturlink2'); 
    1823 
    19 if ($core->blog->settings->cinecturlink2->cinecturlink2_active) 
    20 { 
    21      $core->tpl->addBlock('c2If',array('tplCinecturlink2','c2If')); 
    22  
    23      $core->tpl->addValue('c2PageFeedID',array('tplCinecturlink2','c2PageFeedID')); 
    24      $core->tpl->addValue('c2PageFeedURL',array('tplCinecturlink2','c2PageFeedURL')); 
    25      $core->tpl->addValue('c2PageURL',array('tplCinecturlink2','c2PageURL')); 
    26      $core->tpl->addValue('c2PageTitle',array('tplCinecturlink2','c2PageTitle')); 
    27      $core->tpl->addValue('c2PageDescription',array('tplCinecturlink2','c2PageDescription')); 
    28  
    29      $core->tpl->addBlock('c2Entries',array('tplCinecturlink2','c2Entries')); 
    30      $core->tpl->addBlock('c2EntriesHeader',array('tplCinecturlink2','c2EntriesHeader')); 
    31      $core->tpl->addBlock('c2EntriesFooter',array('tplCinecturlink2','c2EntriesFooter')); 
    32      $core->tpl->addBlock('c2EntryIf',array('tplCinecturlink2','c2EntryIf')); 
    33      $core->tpl->addValue('c2EntryIfOdd',array('tplCinecturlink2','c2EntryIfOdd')); 
    34      $core->tpl->addValue('c2EntryIfFirst',array('tplCinecturlink2','c2EntryIfFirst')); 
    35      $core->tpl->addValue('c2EntryFeedID',array('tplCinecturlink2','c2EntryFeedID')); 
    36      $core->tpl->addValue('c2EntryID',array('tplCinecturlink2','c2EntryID')); 
    37      $core->tpl->addValue('c2EntryTitle',array('tplCinecturlink2','c2EntryTitle')); 
    38      $core->tpl->addValue('c2EntryDescription',array('tplCinecturlink2','c2EntryDescription')); 
    39      $core->tpl->addValue('c2EntryFromAuthor',array('tplCinecturlink2','c2EntryFromAuthor')); 
    40      $core->tpl->addValue('c2EntryAuthorCommonName',array('tplCinecturlink2','c2EntryAuthorCommonName')); 
    41      $core->tpl->addValue('c2EntryAuthorDisplayName',array('tplCinecturlink2','c2EntryAuthorDisplayName')); 
    42      $core->tpl->addValue('c2EntryAuthorEmail',array('tplCinecturlink2','c2EntryAuthorEmail')); 
    43      $core->tpl->addValue('c2EntryAuthorID',array('tplCinecturlink2','c2EntryAuthorID')); 
    44      $core->tpl->addValue('c2EntryAuthorLink',array('tplCinecturlink2','c2EntryAuthorLink')); 
    45      $core->tpl->addValue('c2EntryAuthorURL',array('tplCinecturlink2','c2EntryAuthorURL')); 
    46      $core->tpl->addValue('c2EntryLang',array('tplCinecturlink2','c2EntryLang')); 
    47      $core->tpl->addValue('c2EntryURL',array('tplCinecturlink2','c2EntryURL')); 
    48      $core->tpl->addValue('c2EntryCategory',array('tplCinecturlink2','c2EntryCategory')); 
    49      $core->tpl->addValue('c2EntryCategoryID',array('tplCinecturlink2','c2EntryCategoryID')); 
    50      $core->tpl->addValue('c2EntryCategoryURL',array('tplCinecturlink2','c2EntryCategoryURL')); 
    51      $core->tpl->addValue('c2EntryImg',array('tplCinecturlink2','c2EntryImg')); 
    52      $core->tpl->addValue('c2EntryDate',array('tplCinecturlink2','c2EntryDate')); 
    53      $core->tpl->addValue('c2EntryTime',array('tplCinecturlink2','c2EntryTime')); 
    54  
    55      $core->tpl->addBlock('c2Pagination',array('tplCinecturlink2','c2Pagination')); 
    56      $core->tpl->addValue('c2PaginationCounter',array('tplCinecturlink2','c2PaginationCounter')); 
    57      $core->tpl->addValue('c2PaginationCurrent',array('tplCinecturlink2','c2PaginationCurrent')); 
    58      $core->tpl->addBlock('c2PaginationIf',array('tplCinecturlink2','c2PaginationIf')); 
    59      $core->tpl->addValue('c2PaginationURL',array('tplCinecturlink2','c2PaginationURL')); 
    60  
    61      $core->tpl->addBlock('c2Categories',array('tplCinecturlink2','c2Categories')); 
    62      $core->tpl->addBlock('c2CategoriesHeader',array('tplCinecturlink2','c2CategoriesHeader')); 
    63      $core->tpl->addBlock('c2CategoriesFooter',array('tplCinecturlink2','c2CategoriesFooter')); 
    64      $core->tpl->addBlock('c2CategoryIf',array('tplCinecturlink2','c2CategoryIf')); 
    65      $core->tpl->addValue('c2CategoryFeedID',array('tplCinecturlink2','c2CategoryFeedID')); 
    66      $core->tpl->addValue('c2CategoryFeedURL',array('tplCinecturlink2','c2CategoryFeedURL')); 
    67      $core->tpl->addValue('c2CategoryID',array('tplCinecturlink2','c2CategoryID')); 
    68      $core->tpl->addValue('c2CategoryTitle',array('tplCinecturlink2','c2CategoryTitle')); 
    69      $core->tpl->addValue('c2CategoryDescription',array('tplCinecturlink2','c2CategoryDescription')); 
    70      $core->tpl->addValue('c2CategoryURL',array('tplCinecturlink2','c2CategoryURL')); 
     24$c2_tpl_values = array( 
     25     'c2PageFeedID', 
     26     'c2PageFeedURL', 
     27     'c2PageURL', 
     28     'c2PageTitle', 
     29     'c2PageDescription', 
     30 
     31     'c2EntryIfOdd', 
     32     'c2EntryIfFirst', 
     33     'c2EntryFeedID', 
     34     'c2EntryID', 
     35     'c2EntryTitle', 
     36     'c2EntryDescription', 
     37     'c2EntryFromAuthor', 
     38     'c2EntryAuthorCommonName', 
     39     'c2EntryAuthorDisplayName', 
     40     'c2EntryAuthorEmail', 
     41     'c2EntryAuthorID', 
     42     'c2EntryAuthorLink', 
     43     'c2EntryAuthorURL', 
     44     'c2EntryLang', 
     45     'c2EntryURL', 
     46     'c2EntryCategory', 
     47     'c2EntryCategoryID', 
     48     'c2EntryCategoryURL', 
     49     'c2EntryImg', 
     50     'c2EntryDate', 
     51     'c2EntryTime', 
     52 
     53     'c2PaginationCounter', 
     54     'c2PaginationCurrent', 
     55     'c2PaginationURL', 
     56 
     57     'c2CategoryFeedID', 
     58     'c2CategoryFeedURL', 
     59     'c2CategoryID', 
     60     'c2CategoryTitle', 
     61     'c2CategoryDescription', 
     62     'c2CategoryURL' 
     63); 
     64 
     65$c2_tpl_blocks = array( 
     66     'c2If', 
     67 
     68     'c2Entries', 
     69     'c2EntriesHeader', 
     70     'c2EntriesFooter', 
     71     'c2EntryIf', 
     72 
     73     'c2Pagination', 
     74     'c2PaginationIf', 
     75 
     76     'c2Categories', 
     77     'c2CategoriesHeader', 
     78     'c2CategoriesFooter', 
     79     'c2CategoryIf' 
     80); 
     81 
     82if ($core->blog->settings->cinecturlink2->cinecturlink2_active) { 
     83 
     84     foreach($c2_tpl_blocks as $v) { 
     85          $core->tpl->addBlock($v, array('tplCinecturlink2', $v)); 
     86     } 
     87     foreach($c2_tpl_values as $v) { 
     88          $core->tpl->addValue($v, array('tplCinecturlink2', $v)); 
     89     } 
    7190} 
    72 else 
    73 { 
    74      $core->tpl->addBlock('c2If',array('tplCinecturlink2','disable')); 
    75  
    76      $core->tpl->addValue('c2PageFeedID',array('tplCinecturlink2','disable')); 
    77      $core->tpl->addValue('c2PageFeedURL',array('tplCinecturlink2','disable')); 
    78      $core->tpl->addValue('c2PageURL',array('tplCinecturlink2','disable')); 
    79      $core->tpl->addValue('c2PageTitle',array('tplCinecturlink2','disable')); 
    80      $core->tpl->addValue('c2PageDescription',array('tplCinecturlink2','disable')); 
    81  
    82      $core->tpl->addBlock('c2Entries',array('tplCinecturlink2','disable')); 
    83      $core->tpl->addBlock('c2EntriesHeader',array('tplCinecturlink2','disable')); 
    84      $core->tpl->addBlock('c2EntriesFooter',array('tplCinecturlink2','disable')); 
    85      $core->tpl->addBlock('c2EntryIf',array('tplCinecturlink2','disable')); 
    86  
    87      $core->tpl->addValue('c2EntryIfOdd',array('tplCinecturlink2','disable')); 
    88      $core->tpl->addValue('c2EntryIfFirst',array('tplCinecturlink2','disable')); 
    89      $core->tpl->addValue('c2EntryFeedID',array('tplCinecturlink2','disable')); 
    90      $core->tpl->addValue('c2EntryID',array('tplCinecturlink2','disable')); 
    91      $core->tpl->addValue('c2EntryTitle',array('tplCinecturlink2','disable')); 
    92      $core->tpl->addValue('c2EntryDescription',array('tplCinecturlink2','disable')); 
    93      $core->tpl->addValue('c2EntryFromAuthor',array('tplCinecturlink2','disable')); 
    94      $core->tpl->addValue('c2EntryAuthorCommonName',array('tplCinecturlink2','disable')); 
    95      $core->tpl->addValue('c2EntryAuthorDisplayName',array('tplCinecturlink2','disable')); 
    96      $core->tpl->addValue('c2EntryAuthorEmail',array('tplCinecturlink2','disable')); 
    97      $core->tpl->addValue('c2EntryAuthorID',array('tplCinecturlink2','disable')); 
    98      $core->tpl->addValue('c2EntryAuthorLink',array('tplCinecturlink2','disable')); 
    99      $core->tpl->addValue('c2EntryAuthorURL',array('tplCinecturlink2','disable')); 
    100      $core->tpl->addValue('c2EntryLang',array('tplCinecturlink2','disable')); 
    101      $core->tpl->addValue('c2EntryURL',array('tplCinecturlink2','disable')); 
    102      $core->tpl->addValue('c2EntryCategory',array('tplCinecturlink2','disable')); 
    103      $core->tpl->addValue('c2EntryCategoryID',array('tplCinecturlink2','disable')); 
    104      $core->tpl->addValue('c2EntryCategoryURL',array('tplCinecturlink2','disable')); 
    105      $core->tpl->addValue('c2EntryImg',array('tplCinecturlink2','disable')); 
    106      $core->tpl->addValue('c2EntryDate',array('tplCinecturlink2','disable')); 
    107      $core->tpl->addValue('c2EntryTime',array('tplCinecturlink2','disable')); 
    108  
    109      $core->tpl->addBlock('c2Pagination',array('tplCinecturlink2','disable')); 
    110      $core->tpl->addValue('c2PaginationCounter',array('tplCinecturlink2','disable')); 
    111      $core->tpl->addValue('c2PaginationCurrent',array('tplCinecturlink2','disable')); 
    112      $core->tpl->addBlock('c2PaginationIf',array('tplCinecturlink2','disable')); 
    113      $core->tpl->addValue('c2PaginationURL',array('tplCinecturlink2','disable')); 
    114  
    115      $core->tpl->addBlock('c2Categories',array('tplCinecturlink2','disable')); 
    116      $core->tpl->addBlock('c2CategoriesHeader',array('tplCinecturlink2','disable')); 
    117      $core->tpl->addBlock('c2CategoriesFooter',array('tplCinecturlink2','disable')); 
    118      $core->tpl->addBlock('c2CategoryIf',array('tplCinecturlink2','disable')); 
    119      $core->tpl->addValue('c2CategoryFeedID',array('tplCinecturlink2','disable')); 
    120      $core->tpl->addValue('c2CategoryFeedURL',array('tplCinecturlink2','disable')); 
    121      $core->tpl->addValue('c2CategoryID',array('tplCinecturlink2','disable')); 
    122      $core->tpl->addValue('c2CategoryTitle',array('tplCinecturlink2','disable')); 
    123      $core->tpl->addValue('c2CategoryDescription',array('tplCinecturlink2','disable')); 
    124      $core->tpl->addValue('c2CategoryURL',array('tplCinecturlink2','disable')); 
     91else { 
     92 
     93     foreach(array_merge($c2_tpl_blocks, $c2_tpl_values) as $v) { 
     94          $core->tpl->addBlock($v, array('tplCinecturlink2', 'disable')); 
     95     } 
    12596} 
    12697 
     
    131102          global $core, $_ctx; 
    132103          $core->blog->settings->addNamespace('cinecturlink2'); 
    133            
     104 
    134105          if (!$core->blog->settings->cinecturlink2->cinecturlink2_active  
    135106           || !$core->blog->settings->cinecturlink2->cinecturlink2_public_active) 
    136107          { 
    137108               self::p404(); 
    138                return; 
    139           } 
    140            
    141           $core->tpl->setPath($core->tpl->getPath(), 
     109 
     110               return null; 
     111          } 
     112 
     113          $core->tpl->setPath( 
     114               $core->tpl->getPath(), 
    142115               dirname(__FILE__).'/default-templates/' 
    143116          ); 
    144            
     117 
    145118          $params = array(); 
    146            
    147           $n = self::getPageArgs($args,'c2page'); 
     119 
     120          $n = self::getPageArgs($args, 'c2page'); 
    148121          if ($n) { 
    149122               $GLOBALS['c2_page_number'] = $n; 
    150123          } 
    151            
     124 
    152125          $caturl = $core->blog->settings->cinecturlink2->cinecturlink2_public_caturl; 
    153126          if (!$caturl) $caturl = 'c2cat'; 
    154            
    155           $c = self::getPageArgs($args,$caturl); 
    156           if ($c) 
    157           { 
    158                if (is_numeric($c)) 
    159                { 
     127 
     128          $c = self::getPageArgs($args, $caturl); 
     129          if ($c) { 
     130               if (is_numeric($c)) { 
    160131                    $params['cat_id'] = (integer) $c; 
    161132               } 
    162                else 
    163                { 
     133               else { 
    164134                    $params['cat_title'] = urldecode($c); 
    165135               } 
    166136          } 
    167            
    168           $f = self::getPageArgs($args,'feed'); 
    169           if ($f && in_array($f,array('atom','rss2'))) 
    170           { 
     137 
     138          $f = self::getPageArgs($args, 'feed'); 
     139          if ($f && in_array($f, array('atom', 'rss2'))) { 
    171140               $mime = $f == 'atom' ? 'application/atom+xml' : 'application/xml'; 
    172                 
     141 
    173142               //$_ctx->short_feed_items = $core->blog->settings->system->short_feed_items; 
    174                 
     143 
    175144               $params['limit'] = $core->blog->settings->system->nb_post_per_feed; 
    176145               $_ctx->c2_page_params = $params; 
    177                 
    178                header('X-Robots-Tag: '.context::robotsPolicy($core->blog->settings->system->robots_policy,'')); 
    179                self::serveDocument('cinecturlink2-'.$f.'.xml',$mime); 
    180           } 
    181           else 
    182           { 
    183                $d = self::getPageArgs($args,'c2detail'); 
    184                if ($d) 
    185                { 
    186                     if (is_numeric($d)) 
    187                     { 
     146 
     147               header('X-Robots-Tag: '.context::robotsPolicy($core->blog->settings->system->robots_policy, '')); 
     148               self::serveDocument('cinecturlink2-'.$f.'.xml', $mime); 
     149          } 
     150          else { 
     151               $d = self::getPageArgs($args, 'c2detail'); 
     152               if ($d) { 
     153                    if (is_numeric($d)) { 
    188154                         $params['link_id'] = (integer) $d; 
    189155                    } 
    190                     else 
    191                     { 
     156                    else { 
    192157                         $params['link_title'] = urldecode($d); 
    193158                    } 
    194159               } 
    195                 
     160 
    196161               $params['limit'] = $core->blog->settings->cinecturlink2->cinecturlink2_public_nbrpp; 
    197162               $_ctx->c2_page_params = $params; 
    198                 
    199                self::serveDocument('cinecturlink2.html','text/html'); 
    200           } 
    201           return; 
    202      } 
    203       
    204      protected static function getPageArgs(&$args,$part) 
    205      { 
    206           if (preg_match('#(^|/)'.$part.'/([^/]+)#',$args,$m)) 
    207           { 
    208                $args = preg_replace('#(^|/)'.$part.'/([^/]+)#','',$args); 
     163 
     164               self::serveDocument('cinecturlink2.html', 'text/html'); 
     165          } 
     166 
     167          return null; 
     168     } 
     169 
     170     protected static function getPageArgs(&$args, $part) 
     171     { 
     172          if (preg_match('#(^|/)'.$part.'/([^/]+)#', $args, $m)) { 
     173               $args = preg_replace('#(^|/)'.$part.'/([^/]+)#', '', $args); 
     174 
    209175               return $m[2]; 
    210176          } 
     177 
    211178          return false; 
    212179     } 
    213180} 
    214   
     181 
    215182class tplCinecturlink2 
    216183{ 
    217      public static function disable($a,$c=null) 
     184     public static function disable($a, $c=null) 
    218185     { 
    219186          return ''; 
    220187     } 
    221       
     188 
    222189     public static function c2PageURL($a) 
    223190     { 
    224           return "<?php echo ".sprintf($GLOBALS['core']->tpl->getFilters($a),'$core->blog->url.$core->url->getBase(\'cinecturlink2\')')."; ?>"; 
    225      } 
    226       
     191          return "<?php echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$core->blog->url.$core->url->getBase(\'cinecturlink2\')')."; ?>"; 
     192     } 
     193 
    227194     public static function c2PageTitle($a) 
    228195     { 
    229           return "<?php \$title = (string) \$core->blog->settings->cinecturlink2->cinecturlink2_public_title; if (empty(\$title)) { \$title = __('My cinecturlink'); } echo ".sprintf($GLOBALS['core']->tpl->getFilters($a),'$title')."; ?>"; 
    230      } 
    231       
     196          return "<?php \$title = (string) \$core->blog->settings->cinecturlink2->cinecturlink2_public_title; if (empty(\$title)) { \$title = __('My cinecturlink'); } echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$title')."; ?>"; 
     197     } 
     198 
    232199     public static function c2PageFeedURL($a) 
    233200     { 
    234           return "<?php echo ".sprintf($GLOBALS['core']->tpl->getFilters($a),'$core->blog->url.$core->url->getBase("cinecturlink2")."/feed/'.(!empty($a['type']) && preg_match('#^(rss2|atom)$#',$a['type']) ? $a['type'] : 'atom').'"')."; ?>"; 
    235      } 
    236       
     201          return "<?php echo ".sprintf($GLOBALS['core']->tpl->getFilters($a),'$core->blog->url.$core->url->getBase("cinecturlink2")."/feed/'.(!empty($a['type']) && preg_match('#^(rss2|atom)$#', $a['type']) ? $a['type'] : 'atom').'"')."; ?>"; 
     202     } 
     203 
    237204     public static function c2PageFeedID($a) 
    238205     { 
    239206          return 'urn:md5:<?php echo md5($core->blog->blog_id."cinecturlink2"); ?>'; 
    240207     } 
    241       
     208 
    242209     public static function c2PageDescription($a) 
    243210     { 
    244           return "<?php \$description = (string) \$core->blog->settings->cinecturlink2->cinecturlink2_public_description; echo ".sprintf($GLOBALS['core']->tpl->getFilters($a),'$description')."; ?>"; 
    245      } 
    246       
    247      public static function c2If($a,$c) 
     211          return "<?php \$description = (string) \$core->blog->settings->cinecturlink2->cinecturlink2_public_description; echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$description')."; ?>"; 
     212     } 
     213 
     214     public static function c2If($a ,$c) 
    248215     { 
    249216          $if = array(); 
    250       
     217 
    251218          $operator = isset($a['operator']) ? self::getOperator($a['operator']) : '&&'; 
    252            
    253           if (isset($a['request_link'])) 
    254           { 
     219 
     220          if (isset($a['request_link'])) { 
    255221               $sign = (boolean) $a['request_link'] ? '' : '!'; 
    256222               $if[] = $sign.'(isset($_ctx->c2_page_params["link_id"]) || isset($_ctx->c2_page_params["link_title"]))'; 
    257223          } 
    258            
    259           if (isset($a['request_cat'])) 
    260           { 
     224 
     225          if (isset($a['request_cat'])) { 
    261226               $sign = (boolean) $a['request_cat'] ? '' : '!'; 
    262227               $if[] = $sign.'(isset($_ctx->c2_page_params["cat_id"]) || isset($_ctx->c2_page_params["cat_title"]))'; 
    263228          } 
    264            
    265           if (empty($if)) 
    266           { 
    267                return $c; 
    268           } 
    269           return  
    270           "<?php if(".implode(' '.$operator.' ',$if).") : ?>\n". 
    271           $c. 
    272           "<?php endif; ?>\n"; 
    273      } 
    274       
    275      public static function c2Entries($a,$c) 
     229 
     230          return empty($if) ? $c : "<?php if(".implode(' '.$operator.' ', $if).") : ?>\n".$c."<?php endif; ?>\n"; 
     231     } 
     232 
     233     public static function c2Entries($a, $c) 
    276234     { 
    277235          $lastn = isset($a['lastn']) ? abs((integer) $a['lastn'])+0 : -1; 
    278            
     236 
    279237          $res = 'if (!isset($c2_page_number)) { $c2_page_number = 1; }'."\n"; 
    280            
    281           if ($lastn != 0) 
    282           { 
    283                if ($lastn > 0) 
    284                { 
     238 
     239          if ($lastn != 0) { 
     240               if ($lastn > 0) { 
    285241                    $res .= "\$params['limit'] = ".$lastn.";\n"; 
    286242               } 
    287                else 
    288                { 
     243               else  { 
    289244                    $res .= "if (!isset(\$params['limit']) || \$params['limit'] < 1) { \$params['limit'] = 10; }\n"; 
    290245               } 
    291                if (!isset($a['ignore_pagination']) || $a['ignore_pagination'] == "0") 
    292                { 
     246               if (!isset($a['ignore_pagination']) || $a['ignore_pagination'] == "0") { 
    293247                    $res .= "\$params['limit'] = array(((\$c2_page_number-1)*\$params['limit']),\$params['limit']);\n"; 
    294248               } 
    295                else 
    296                { 
     249               else { 
    297250                    $res .= "\$params['limit'] = array(0, \$params['limit']);\n"; 
    298251               } 
    299252          } 
    300            
    301           if (isset($a['category'])) 
    302           { 
    303                if ($a['category'] == 'null') 
    304                { 
     253 
     254          if (isset($a['category'])) { 
     255               if ($a['category'] == 'null') { 
    305256                    $res .= "\$params['sql'] = ' AND L.cat_id IS NULL ';\n"; 
    306257               } 
    307                elseif (is_numeric($a['category'])) 
    308                { 
     258               elseif (is_numeric($a['category'])) { 
    309259                    $res .= "\$params['cat_id'] = ".(integer) $a['category'].";\n"; 
    310260               } 
    311                else 
    312                { 
     261               else { 
    313262                    $res .= "\$params['cat_title'] = '".$a['category']."';\n"; 
    314263               } 
    315264          } 
    316            
     265 
    317266          $sort = isset($a['sort']) && $a['sort'] == 'asc' ? ' asc' : ' desc'; 
    318267          $sortby = isset($a['order']) && in_array($a['order'],array('link_count','link_upddt','link_creadt','link_note','link_title')) ? $a['order'] : 'link_upddt'; 
    319            
     268 
    320269          $res .=  
    321270          "\$params['order'] = '".$sortby.$sort."';\n"; 
    322            
     271 
    323272          return  
    324273          "<?php \n". 
     
    332281          "?>\n"; 
    333282     } 
    334       
    335      public static function c2EntriesHeader($a,$c) 
     283 
     284     public static function c2EntriesHeader($a, $c) 
    336285     { 
    337286          return "<?php if (\$_ctx->c2_entries->isStart()) : ?>".$c."<?php endif; ?>"; 
    338287     } 
    339       
    340      public static function c2EntriesFooter($a,$c) 
     288 
     289     public static function c2EntriesFooter($a, $c) 
    341290     { 
    342291          return "<?php if (\$_ctx->c2_entries->isEnd()) : ?>".$c."<?php endif; ?>"; 
    343292     } 
    344       
    345      public static function c2EntryIf($a,$c) 
     293 
     294     public static function c2EntryIf($a, $c) 
    346295     { 
    347296          $if = array(); 
    348            
     297 
    349298          $operator = isset($a['operator']) ? self::getOperator($a['operator']) : '&&'; 
    350            
    351           if (isset($a['has_category'])) 
    352           { 
     299 
     300          if (isset($a['has_category'])) { 
    353301               $sign = (boolean) $a['has_category'] ? '!' : '='; 
    354302               $if[] = '($_ctx->exists("c2_entries") && "" '.$sign.'= $_ctx->c2_entries->cat_title)'; 
    355303          } 
    356            
     304 
    357305          return empty($if) ? $c : "<?php if(".implode(' '.$operator.' ',$if).") : ?>\n".$c."<?php endif; ?>\n"; 
    358306     } 
    359       
     307 
    360308     public static function c2EntryIfFirst($a) 
    361309     { 
    362310          return '<?php if ($_ctx->c2_entries->index() == 0) { echo "'.(isset($a['return']) ? addslashes(html::escapeHTML($a['return'])) : 'first').'"; } ?>'; 
    363311     } 
    364       
     312 
    365313     public static function c2EntryIfOdd($a) 
    366314     { 
    367315          return '<?php if (($_ctx->c2_entries->index()+1)%2 == 1) { echo "'.(isset($a['return']) ? addslashes(html::escapeHTML($a['return'])) : 'odd').'"; } ?>'; 
    368316     } 
    369       
    370      public static function c2EntryFeedID($attr) 
     317 
     318     public static function c2EntryFeedID($a) 
    371319     { 
    372320          return 'urn:md5:<?php echo md5($_ctx->c2_entries->blog_id.$_ctx->c2_entries->link_id.$_ctx->c2_entries->link_dt); ?>'; 
    373321     } 
    374       
     322 
    375323     public static function c2EntryID($a) 
    376324     { 
    377           return self::getGenericValue('$_ctx->c2_entries->link_id',$a); 
    378      } 
    379       
     325          return self::getGenericValue('$_ctx->c2_entries->link_id', $a); 
     326     } 
     327 
    380328     public static function c2EntryTitle($a) 
    381329     { 
    382           return self::getGenericValue('$_ctx->c2_entries->link_title',$a); 
    383      } 
    384       
     330          return self::getGenericValue('$_ctx->c2_entries->link_title', $a); 
     331     } 
     332 
    385333     public static function c2EntryDescription($a) 
    386334     { 
    387           return self::getGenericValue('$_ctx->c2_entries->link_desc',$a); 
    388      } 
    389       
     335          return self::getGenericValue('$_ctx->c2_entries->link_desc', $a); 
     336     } 
     337 
    390338     public static function c2EntryAuthorCommonName($a) 
    391339     { 
    392           return self::getGenericValue('dcUtils::getUserCN($_ctx->c2_entries->user_id,$_ctx->c2_entries->user_name,$_ctx->c2_entries->user_firstname,$_ctx->c2_entries->user_displayname)',$a); 
    393      } 
    394       
     340          return self::getGenericValue('dcUtils::getUserCN($_ctx->c2_entries->user_id,$_ctx->c2_entries->user_name,$_ctx->c2_entries->user_firstname,$_ctx->c2_entries->user_displayname)', $a); 
     341     } 
     342 
    395343     public static function c2EntryAuthorDisplayName($a) 
    396344     { 
    397           return self::getGenericValue('$_ctx->c2_entries->user_displayname',$a); 
    398      } 
    399       
     345          return self::getGenericValue('$_ctx->c2_entries->user_displayname', $a); 
     346     } 
     347 
    400348     public static function c2EntryAuthorID($a) 
    401349     { 
    402           return self::getGenericValue('$_ctx->c2_entries->user_id',$a); 
    403      } 
    404       
     350          return self::getGenericValue('$_ctx->c2_entries->user_id', $a); 
     351     } 
     352 
    405353     public static function c2EntryAuthorEmail($a) 
    406354     { 
    407           return self::getGenericValue((isset($a['spam_protected']) && !$a['spam_protected'] ? '$_ctx->c2_entries->user_email' : "strtr(\$_ctx->c2_entries->user_email,array('@'=>'%40','.'=>'%2e'))"),$a); 
    408      } 
    409       
     355          return self::getGenericValue((isset($a['spam_protected']) && !$a['spam_protected'] ? '$_ctx->c2_entries->user_email' : "strtr(\$_ctx->c2_entries->user_email,array('@'=>'%40','.'=>'%2e'))"), $a); 
     356     } 
     357 
    410358     public static function c2EntryAuthorLink($a) 
    411359     { 
    412           return self::getGenericValue('sprintf(($_ctx->c2_entries->user_url ? \'<a href="%2$s">%1$s</a>\' : \'%1$s\'),html::escapeHTML(dcUtils::getUserCN($_ctx->c2_entries->user_id,$_ctx->c2_entries->user_name,$_ctx->c2_entries->user_firstname,$_ctx->c2_entries->user_displayname)),html::escapeHTML($_ctx->c2_entries->user_url))',$a); 
    413      } 
    414       
     360          return self::getGenericValue('sprintf(($_ctx->c2_entries->user_url ? \'<a href="%2$s">%1$s</a>\' : \'%1$s\'),html::escapeHTML(dcUtils::getUserCN($_ctx->c2_entries->user_id,$_ctx->c2_entries->user_name,$_ctx->c2_entries->user_firstname,$_ctx->c2_entries->user_displayname)),html::escapeHTML($_ctx->c2_entries->user_url))', $a); 
     361     } 
     362 
    415363     public static function c2EntryAuthorURL($a) 
    416364     { 
    417           return self::getGenericValue('$_ctx->c2_entries->user_url',$a); 
    418      } 
    419       
     365          return self::getGenericValue('$_ctx->c2_entries->user_url', $a); 
     366     } 
     367 
    420368     public static function c2EntryFromAuthor($a) 
    421369     { 
    422           return self::getGenericValue('$_ctx->c2_entries->link_author',$a); 
    423      } 
    424       
     370          return self::getGenericValue('$_ctx->c2_entries->link_author', $a); 
     371     } 
     372 
    425373     public static function c2EntryLang($a) 
    426374     { 
    427           return self::getGenericValue('$_ctx->c2_entries->link_lang',$a); 
    428      } 
    429       
     375          return self::getGenericValue('$_ctx->c2_entries->link_lang', $a); 
     376     } 
     377 
    430378     public static function c2EntryURL($a) 
    431379     { 
    432           return self::getGenericValue('$_ctx->c2_entries->link_url',$a); 
    433      } 
    434       
     380          return self::getGenericValue('$_ctx->c2_entries->link_url', $a); 
     381     } 
     382 
    435383     public static function c2EntryCategory($a) 
    436384     { 
    437           return self::getGenericValue('$_ctx->c2_entries->cat_title',$a); 
    438      } 
    439       
     385          return self::getGenericValue('$_ctx->c2_entries->cat_title', $a); 
     386     } 
     387 
    440388     public static function c2EntryCategoryID($a) 
    441389     { 
    442           return self::getGenericValue('$_ctx->c2_entries->cat_id',$a); 
    443      } 
    444       
     390          return self::getGenericValue('$_ctx->c2_entries->cat_id', $a); 
     391     } 
     392 
    445393     public static function c2EntryCategoryURL($a) 
    446394     { 
    447           return self::getGenericValue('$core->blog->url.$core->url->getBase("cinecturlink2")."/".$core->blog->settings->cinecturlink2->cinecturlink2_public_caturl."/".urlencode($_ctx->c2_entries->cat_title)',$a); 
    448      } 
    449       
     395          return self::getGenericValue('$core->blog->url.$core->url->getBase("cinecturlink2")."/".$core->blog->settings->cinecturlink2->cinecturlink2_public_caturl."/".urlencode($_ctx->c2_entries->cat_title)', $a); 
     396     } 
     397 
    450398     public static function c2EntryImg($a) 
    451399     { 
     
    453401          $f = $core->tpl->getFilters($a); 
    454402          $style = isset($a['style']) ? html::escapeHTML($a['style']) : ''; 
    455            
     403 
    456404          return  
    457405          "<?php if (\$_ctx->exists('c2_entries')) { ". 
     
    464412          "echo ".sprintf($f,'$img')."; unset(\$img); } ?> \n"; 
    465413     } 
    466       
     414 
    467415     public static function c2EntryDate($a) 
    468416     { 
    469417          $format = !empty($a['format']) ? addslashes($a['format']) : ''; 
    470            
     418 
    471419          if (!empty($a['rfc822'])) 
    472                $p = "dt::rfc822(strtotime(\$_ctx->c2_entries->link_creadt),\$_ctx->posts->post_tz)"; 
     420               $p = "dt::rfc822(strtotime(\$_ctx->c2_entries->link_creadt), \$_ctx->posts->post_tz)"; 
    473421          elseif (!empty($a['iso8601'])) 
    474                $p = "dt::iso8601(strtotime(\$_ctx->c2_entries->link_creadt),\$_ctx->posts->post_tz)"; 
     422               $p = "dt::iso8601(strtotime(\$_ctx->c2_entries->link_creadt), \$_ctx->posts->post_tz)"; 
    475423          elseif ($format) 
    476                $p = "dt::dt2str('".$format."',\$_ctx->c2_entries->link_creadt)"; 
     424               $p = "dt::dt2str('".$format."', \$_ctx->c2_entries->link_creadt)"; 
    477425          else 
    478                $p = "dt::dt2str(\$core->blog->settings->system->date_format,\$_ctx->c2_entries->link_creadt)"; 
    479  
    480           return self::getGenericValue($p,$a); 
    481      } 
    482       
     426               $p = "dt::dt2str(\$core->blog->settings->system->date_format, \$_ctx->c2_entries->link_creadt)"; 
     427 
     428          return self::getGenericValue($p, $a); 
     429     } 
     430 
    483431     public static function c2EntryTime($a) 
    484432     { 
    485           return self::getGenericValue("dt::dt2str(".(!empty($a['format']) ? "'".addslashes($a['format'])."'" : '$core->blog->settings->system->time_format').",\$_ctx->c2_entries->link_creadt)",$a); 
    486      } 
    487       
    488      public static function c2Pagination($a,$c) 
     433          return self::getGenericValue("dt::dt2str(".(!empty($a['format']) ? "'".addslashes($a['format'])."'" : '$core->blog->settings->system->time_format').", \$_ctx->c2_entries->link_creadt)", $a); 
     434     } 
     435 
     436     public static function c2Pagination($a, $c) 
    489437     { 
    490438          $p =  
     
    493441          "\$_ctx->c2_pagination = \$_ctx->cinecturlink->getLinks(\$params,true); unset(\$params);\n". 
    494442          "?>\n"; 
    495            
    496           if (isset($a['no_context'])) return $p.$c; 
    497       
    498           return $p.'<?php if ($_ctx->c2_pagination->f(0) > $_ctx->c2_entries->count()) : ?>'.$c.'<?php endif; ?>'; 
    499      } 
    500       
     443 
     444          return isset($a['no_context']) ? $p.$c : $p.'<?php if ($_ctx->c2_pagination->f(0) > $_ctx->c2_entries->count()) : ?>'.$c.'<?php endif; ?>'; 
     445     } 
     446 
    501447     public static function c2PaginationCounter($a) 
    502448     { 
    503           return self::getGenericValue('c2_context::PaginationNbPages()',$a); 
    504      } 
    505       
     449          return self::getGenericValue('cinecturlink2Context::PaginationNbPages()', $a); 
     450     } 
     451 
    506452     public static function c2PaginationCurrent($a) 
    507453     { 
    508           return self::getGenericValue('c2_context::PaginationPosition('.(isset($a['offset']) ? (integer) $a['offset'] : 0).')',$a); 
    509      } 
    510       
    511      public static function c2PaginationIf($a,$c) 
     454          return self::getGenericValue('cinecturlink2Context::PaginationPosition('.(isset($a['offset']) ? (integer) $a['offset'] : 0).')', $a); 
     455     } 
     456 
     457     public static function c2PaginationIf($a, $c) 
    512458     { 
    513459          $if = array(); 
    514460           
    515           if (isset($a['start'])) 
    516           { 
     461          if (isset($a['start'])) { 
    517462               $sign = (boolean) $a['start'] ? '' : '!'; 
    518                $if[] = $sign.'c2_context::PaginationStart()'; 
    519           } 
    520           if (isset($a['end'])) 
    521           { 
     463               $if[] = $sign.'cinecturlink2Context::PaginationStart()'; 
     464          } 
     465          if (isset($a['end'])) { 
    522466               $sign = (boolean) $a['end'] ? '' : '!'; 
    523                $if[] = $sign.'c2_context::PaginationEnd()'; 
    524           } 
    525           if (!empty($if)) 
    526           { 
    527                return '<?php if('.implode(' && ',$if).') : ?>'.$c.'<?php endif; ?>'; 
    528           } 
    529           else 
    530           { 
    531                return $c; 
    532           } 
     467               $if[] = $sign.'cinecturlink2Context::PaginationEnd()'; 
     468          } 
     469 
     470          return empty($if) ? $c : '<?php if('.implode(' && ', $if).') : ?>'.$c.'<?php endif; ?>'; 
    533471     } 
    534472      
    535473     public static function c2PaginationURL($a) 
    536474     { 
    537           return self::getGenericValue('c2_context::PaginationURL('.(isset($a['offset']) ? (integer) $a['offset'] : 0).')',$a); 
    538      } 
    539       
    540      public static function c2Categories($a,$c) 
     475          return self::getGenericValue('cinecturlink2Context::PaginationURL('.(isset($a['offset']) ? (integer) $a['offset'] : 0).')', $a); 
     476     } 
     477 
     478     public static function c2Categories($a, $c) 
    541479     { 
    542480          return  
     
    548486          "?>\n"; 
    549487     } 
     488 
     489     public static function c2CategoriesHeader($a, $c) 
     490     { 
     491          return "<?php if (\$_ctx->c2_categories->isStart()) : ?>".$c."<?php endif; ?>"; 
     492     } 
     493 
     494     public static function c2CategoriesFooter($a, $c) 
     495     { 
     496          return "<?php if (\$_ctx->c2_categories->isEnd()) : ?>".$c."<?php endif; ?>"; 
     497     } 
     498 
     499     public static function c2CategoryIf($a, $c) 
     500     { 
     501          $if = array(); 
    550502      
    551      public static function c2CategoriesHeader($a,$c) 
    552      { 
    553           return "<?php if (\$_ctx->c2_categories->isStart()) : ?>".$c."<?php endif; ?>"; 
    554      } 
    555       
    556      public static function c2CategoriesFooter($a,$c) 
    557      { 
    558           return "<?php if (\$_ctx->c2_categories->isEnd()) : ?>".$c."<?php endif; ?>"; 
    559      } 
    560       
    561      public static function c2CategoryIf($a,$c) 
    562      { 
    563           $if = array(); 
    564            
    565           if (isset($a['current'])) 
    566           { 
     503          if (isset($a['current'])) { 
    567504               $sign = (boolean) $a['current'] ? '' : '!'; 
    568                $if[] = $sign.'c2_context::CategoryCurrent()'; 
    569           } 
    570           if (isset($a['first'])) 
    571           { 
     505               $if[] = $sign.'cinecturlink2Context::CategoryCurrent()'; 
     506          } 
     507          if (isset($a['first'])) { 
    572508               $sign = (boolean) $a['first'] ? '' : '!'; 
    573509               $if[] = $sign.'$_ctx->c2_categories->isStart()'; 
    574510          } 
    575           if (!empty($if)) 
    576           { 
    577                return '<?php if('.implode(' && ',$if).') : ?>'.$c.'<?php endif; ?>'; 
    578           } 
    579           else 
    580           { 
    581                return $c; 
    582           } 
     511           
     512          return empty($if) ? $c : '<?php if('.implode(' && ', $if).') : ?>'.$c.'<?php endif; ?>'; 
    583513     } 
    584514      
     
    586516     { 
    587517          $p = !empty($a['type']) ? $a['type'] : 'atom'; 
    588            
    589           if (!preg_match('#^(rss2|atom)$#',$p)) 
    590           { 
     518 
     519          if (!preg_match('#^(rss2|atom)$#', $p)) { 
    591520               $p = 'atom'; 
    592521          } 
     
    594523          return "<?php echo ".sprintf($GLOBALS['core']->tpl->getFilters($a),'$core->blog->url.$core->url->getBase("cinecturlink2")."/".$core->blog->settings->cinecturlink2->cinecturlink2_public_caturl."/".urlencode($_ctx->c2_categories->cat_title)."/feed/'.$p.'"')."; ?>"; 
    595524     } 
    596       
     525 
    597526     public static function c2CategoryFeedID($a) 
    598527     { 
    599528          return 'urn:md5:<?php echo md5($core->blog->blog_id."cinecturlink2".$_ctx->c2_categories->cat_id); ?>'; 
    600529     } 
    601       
     530 
    602531     public static function c2CategoryID($a) 
    603532     { 
    604           return "<?php if (\$_ctx->exists('c2_categories')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a),'$_ctx->c2_categories->cat_id')."; } ?>"; 
    605      } 
    606       
     533          return "<?php if (\$_ctx->exists('c2_categories')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$_ctx->c2_categories->cat_id')."; } ?>"; 
     534     } 
     535 
    607536     public static function c2CategoryTitle($a) 
    608537     { 
    609           return "<?php if (\$_ctx->exists('c2_categories')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a),'$_ctx->c2_categories->cat_title')."; } ?>"; 
    610      } 
    611       
     538          return "<?php if (\$_ctx->exists('c2_categories')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$_ctx->c2_categories->cat_title')."; } ?>"; 
     539     } 
     540 
    612541     public static function c2CategoryDescription($a) 
    613542     { 
    614           return "<?php if (\$_ctx->exists('c2_categories')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a),'$_ctx->c2_categories->cat_desc')."; } ?>"; 
    615      } 
    616       
     543          return "<?php if (\$_ctx->exists('c2_categories')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$_ctx->c2_categories->cat_desc')."; } ?>"; 
     544     } 
     545 
    617546     public static function c2CategoryURL($a) 
    618547     { 
    619           return "<?php if (\$_ctx->exists('c2_categories')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a),'$core->blog->url.$core->url->getBase("cinecturlink2")."/".$core->blog->settings->cinecturlink2->cinecturlink2_public_caturl."/".urlencode($_ctx->c2_categories->cat_title)')."; } ?>"; 
    620      } 
    621       
     548          return "<?php if (\$_ctx->exists('c2_categories')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$core->blog->url.$core->url->getBase("cinecturlink2")."/".$core->blog->settings->cinecturlink2->cinecturlink2_public_caturl."/".urlencode($_ctx->c2_categories->cat_title)')."; } ?>"; 
     549     } 
     550 
    622551     protected static function getGenericValue($p,$a) 
    623552     { 
    624           return "<?php if (\$_ctx->exists('c2_entries')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a),"$p")."; } ?>"; 
    625      } 
    626       
     553          return "<?php if (\$_ctx->exists('c2_entries')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), "$p")."; } ?>"; 
     554     } 
     555 
    627556     protected static function getOperator($op) 
    628557     { 
     
    639568     } 
    640569} 
    641 ?> 
  • plugins/cinecturlink2/_uninstall.php

    r2023 r3247  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of cinecturlink2, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    13 if (!defined('DC_CONTEXT_ADMIN')){return;} 
     15if (!defined('DC_CONTEXT_ADMIN')) { 
     16 
     17     return null; 
     18} 
    1419 
    1520$this->addUserAction( 
    16      /* type */ 'settings', 
    17      /* action */ 'delete_all', 
    18      /* ns */ 'cinecturlink2', 
    19      /* description */ __('delete all settings') 
     21     /* type */     'settings', 
     22     /* action */   'delete_all', 
     23     /* ns */       'cinecturlink2', 
     24     /* desc */     __('delete all settings') 
    2025); 
    2126 
    2227$this->addUserAction( 
    23      /* type */ 'tables', 
    24      /* action */ 'delete', 
    25      /* ns */ 'cinecturlink2', 
    26      /* description */ sprintf(__('delete %s table'),'cinecturlink2') 
     28     /* type */     'tables', 
     29     /* action */   'delete', 
     30     /* ns */       'cinecturlink2', 
     31     /* desc */     sprintf(__('delete %s table'), 'cinecturlink2') 
    2732); 
    2833 
    2934$this->addUserAction( 
    30      /* type */ 'tables', 
    31      /* action */ 'delete', 
    32      /* ns */ 'cinecturlink2_cat', 
    33      /* description */ sprintf(__('delete %s table'),'cinecturlink2_cat') 
     35     /* type */     'tables', 
     36     /* action */   'delete', 
     37     /* ns */       'cinecturlink2_cat', 
     38     /* desc */     sprintf(__('delete %s table'), 'cinecturlink2_cat') 
    3439); 
    3540 
    3641$this->addUserAction( 
    37      /* type */ 'versions', 
    38      /* action */ 'delete', 
    39      /* ns */ 'cinecturlink2', 
    40      /* description */ __('delete the version number') 
     42     /* type */     'versions', 
     43     /* action */   'delete', 
     44     /* ns */       'cinecturlink2', 
     45     /* desc */     __('delete the version number') 
    4146); 
    4247 
    4348$this->addUserAction( 
    44      /* type */ 'plugins', 
    45      /* action */ 'delete', 
    46      /* ns */ 'cinecturlink2', 
    47      /* description */ __('delete plugin files') 
     49     /* type */     'plugins', 
     50     /* action */   'delete', 
     51     /* ns */       'cinecturlink2', 
     52     /* desc */     __('delete plugin files') 
    4853); 
    4954 
    5055$this->addDirectAction( 
    51      /* type */ 'settings', 
    52      /* action */ 'delete_all', 
    53      /* ns */ 'cinecturlink2', 
    54      /* description */ sprintf(__('delete all %s settings'),'cinecturlink2') 
     56     /* type */     'settings', 
     57     /* action */   'delete_all', 
     58     /* ns */       'cinecturlink2', 
     59     /* desc */     sprintf(__('delete all %s settings'), 'cinecturlink2') 
    5560); 
    5661 
    5762$this->addDirectAction( 
    58      /* type */ 'tables', 
    59      /* action */ 'delete', 
    60      /* ns */ 'cinecturlink2', 
    61      /* description */ sprintf(__('delete %s table'),'cinecturlink2') 
     63     /* type */     'tables', 
     64     /* action */   'delete', 
     65     /* ns */       'cinecturlink2', 
     66     /* desc */     sprintf(__('delete %s table'), 'cinecturlink2') 
    6267); 
    6368 
    6469$this->addDirectAction( 
    65      /* type */ 'tables', 
    66      /* action */ 'delete', 
    67      /* ns */ 'cinecturlink2_cat', 
    68      /* description */ sprintf(__('delete %s table'),'cinecturlink2_cat') 
     70     /* type */     'tables', 
     71     /* action */   'delete', 
     72     /* ns */       'cinecturlink2_cat', 
     73     /* desc */     sprintf(__('delete %s table'), 'cinecturlink2_cat') 
    6974); 
    7075 
    7176$this->addDirectAction( 
    72      /* type */ 'versions', 
    73      /* action */ 'delete', 
    74      /* ns */ 'cinecturlink2', 
    75      /* description */ sprintf(__('delete %s version number'),'cinecturlink2') 
     77     /* type */     'versions', 
     78     /* action */   'delete', 
     79     /* ns */       'cinecturlink2', 
     80     /* desc */     sprintf(__('delete %s version number'), 'cinecturlink2') 
    7681); 
    7782 
    7883$this->addDirectAction( 
    79      /* type */ 'plugins', 
    80      /* action */ 'delete', 
    81      /* ns */ 'cinecturlink2', 
    82      /* description */ sprintf(__('delete %s plugin files'),'cinecturlink2') 
     84     /* type */          'plugins', 
     85     /* action */        'delete', 
     86     /* ns */            'cinecturlink2', 
     87     /* description */   sprintf(__('delete %s plugin files'), 'cinecturlink2') 
    8388); 
    84 ?> 
  • plugins/cinecturlink2/_widgets.php

    r2357 r3247  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of cinecturlink2, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    13 if (!defined('DC_RC_PATH')){return;} 
    14  
    15 $core->addBehavior('initWidgets',array('cinecturlink2Widget','adminLinks')); 
    16 $core->addBehavior('initWidgets',array('cinecturlink2Widget','adminCats')); 
     15if (!defined('DC_RC_PATH')) { 
     16 
     17     return null; 
     18} 
     19 
     20$core->addBehavior( 
     21     'initWidgets', 
     22     array('cinecturlink2Widget', 'adminLinks') 
     23); 
     24$core->addBehavior( 
     25     'initWidgets', 
     26     array('cinecturlink2Widget', 'adminCats') 
     27); 
    1728 
    1829class cinecturlink2Widget 
     
    2132     { 
    2233          global $core; 
    23            
     34 
    2435          $C2 = new cinecturlink2($core); 
    25            
     36 
    2637          $categories_combo = array('' => '', __('Uncategorized') => 'null'); 
    2738          $categories = $C2->getCategories(); 
    28           while($categories->fetch()) 
    29           { 
     39          while($categories->fetch()) { 
    3040               $cat_title = html::escapeHTML($categories->cat_title); 
    3141               $categories_combo[$cat_title] = $categories->cat_id; 
    3242          } 
    33            
     43 
    3444          $sortby_combo = array( 
    35                __('Update date') => 'link_upddt', 
    36                __('My rating') => 'link_note', 
    37                __('Title') => 'link_title', 
    38                __('Random') => 'RANDOM', 
    39                __('Number of views') => 'COUNTER' 
     45               __('Update date')        => 'link_upddt', 
     46               __('My rating')          => 'link_note', 
     47               __('Title')              => 'link_title', 
     48               __('Random')             => 'RANDOM', 
     49               __('Number of views')    => 'COUNTER' 
    4050          ); 
    4151          $order_combo = array( 
    42                __('Ascending') => 'asc', 
    43                __('Descending') => 'desc' 
    44           ); 
    45            
    46           $w->create('cinecturlink2links', 
    47                __('My cinecturlink'),array('cinecturlink2Widget','publicLinks') 
    48           ); 
    49           $w->cinecturlink2links->setting('title', 
    50                __('Title:'),__('My cinecturlink'),'text' 
    51           ); 
    52           $w->cinecturlink2links->setting('category', 
    53                __('Category:'),'','combo',$categories_combo 
    54           ); 
    55           $w->cinecturlink2links->setting('sortby', 
    56                __('Order by:'),'link_upddt','combo',$sortby_combo 
    57           ); 
    58           $w->cinecturlink2links->setting('sort', 
    59                __('Sort: (only for date, note and title)'),'desc','combo',$order_combo 
    60           ); 
    61           $w->cinecturlink2links->setting('limit', 
    62                __('Limit:'),10,'text' 
    63           ); 
    64           $w->cinecturlink2links->setting('withlink', 
    65                __('Enable link'),1,'check' 
    66           ); 
    67           $w->cinecturlink2links->setting('showauthor', 
    68                __('Show author'),1,'check' 
    69           ); 
    70           $w->cinecturlink2links->setting('shownote', 
    71                __('Show my rating'),0,'check' 
    72           ); 
    73           $w->cinecturlink2links->setting('showdesc', 
    74                __('Show description'),0,'check' 
    75           ); 
    76           $w->cinecturlink2links->setting('showpagelink', 
    77                __('Show a link to cinecturlink page'),0,'check' 
    78           ); 
    79           $w->cinecturlink2links->setting('homeonly', 
    80                __('Home page only'),1,'check' 
     52               __('Ascending')     => 'asc', 
     53               __('Descending')    => 'desc' 
     54          ); 
     55 
     56          $w->create( 
     57               'cinecturlink2links', 
     58               __('My cinecturlink'), 
     59               array('cinecturlink2Widget', 'publicLinks'), 
     60               'null', 
     61               __('Show selection of cinecturlinks') 
     62          ); 
     63          $w->cinecturlink2links->setting( 
     64               'title', 
     65               __('Title:'), 
     66               __('My cinecturlink'), 
     67               'text' 
     68          ); 
     69          $w->cinecturlink2links->setting( 
     70               'category', 
     71               __('Category:'), 
     72               '', 
     73               'combo', 
     74               $categories_combo 
     75          ); 
     76          $w->cinecturlink2links->setting( 
     77               'sortby', 
     78               __('Order by:'), 
     79               'link_upddt', 
     80               'combo', 
     81               $sortby_combo 
     82          ); 
     83          $w->cinecturlink2links->setting( 
     84               'sort', 
     85               __('Sort: (only for date, note and title)'), 
     86               'desc', 
     87               'combo', 
     88               $order_combo 
     89          ); 
     90          $w->cinecturlink2links->setting( 
     91               'limit', 
     92               __('Limit:'), 
     93               10, 
     94               'text' 
     95          ); 
     96          $w->cinecturlink2links->setting( 
     97               'withlink', 
     98               __('Enable link'), 
     99               1, 
     100               'check' 
     101          ); 
     102          $w->cinecturlink2links->setting( 
     103               'showauthor', 
     104               __('Show author'), 
     105               1, 
     106               'check' 
     107          ); 
     108          $w->cinecturlink2links->setting( 
     109               'shownote', 
     110               __('Show my rating'), 
     111               0, 
     112               'check' 
     113          ); 
     114          $w->cinecturlink2links->setting( 
     115               'showdesc', 
     116               __('Show description'), 
     117               0, 
     118               'check' 
     119          ); 
     120          $w->cinecturlink2links->setting( 
     121               'showpagelink', 
     122               __('Show a link to cinecturlink page'), 
     123               0, 
     124               'check' 
     125          ); 
     126          $w->cinecturlink2links->setting( 
     127               'homeonly', 
     128               __('Display on:'), 
     129               1, 
     130               'combo', 
     131               array( 
     132                    __('All pages')               => 0, 
     133                    __('Home page only')          => 1, 
     134                    __('Except on home page')     => 2 
     135               ) 
    81136          ); 
    82137     } 
    83       
     138 
    84139     public static function adminCats($w) 
    85140     { 
    86           $w->create('cinecturlink2cats', 
    87                __('List of categories of cinecturlink'),array('cinecturlink2Widget','publicCats') 
    88           ); 
    89           $w->cinecturlink2cats->setting('title', 
    90                __('Title:'),__('My cinecturlink by categories'),'text' 
    91           ); 
    92           $w->cinecturlink2cats->setting('shownumlink', 
    93                __('Show number of links'),0,'check' 
    94           ); 
    95           $w->cinecturlink2cats->setting('homeonly', 
    96                __('Home page only'),1,'check' 
     141          $w->create( 
     142               'cinecturlink2cats', 
     143               __('List of categories of cinecturlink'), 
     144               array('cinecturlink2Widget', 'publicCats'), 
     145               null, 
     146               __('List of categories of cinecturlink') 
     147          ); 
     148          $w->cinecturlink2cats->setting( 
     149               'title', 
     150               __('Title:'), 
     151               __('My cinecturlink by categories'), 
     152               'text' 
     153          ); 
     154          $w->cinecturlink2cats->setting( 
     155               'shownumlink', 
     156               __('Show number of links'), 
     157               0, 
     158               'check' 
     159          ); 
     160          $w->cinecturlink2cats->setting( 
     161               'homeonly', 
     162               __('Display on:'), 
     163               1, 
     164               'combo', 
     165               array( 
     166                    __('All pages')               => 0, 
     167                    __('Home page only')          => 1, 
     168                    __('Except on home page')     => 2 
     169               ) 
    97170          ); 
    98171     } 
    99       
     172 
    100173     public static function publicLinks($w) 
    101174     { 
    102175          global $core; 
     176 
    103177          $core->blog->settings->addNamespace('cinecturlink2');  
    104            
     178 
    105179          if (!$core->blog->settings->cinecturlink2->cinecturlink2_active  
    106            || $w->homeonly && $core->url->type != 'default') return; 
    107            
     180           || $w->homeonly == 1 && $core->url->type != 'default' 
     181           || $w->homeonly == 2 && $core->url->type == 'default' 
     182          ) { 
     183               return null; 
     184          } 
     185 
    108186          $C2 = new cinecturlink2($core); 
    109            
    110           if ($w->category) 
    111           { 
    112                if ($w->category == 'null') 
    113                { 
     187 
     188          if ($w->category) { 
     189               if ($w->category == 'null') { 
    114190                    $params['sql'] = ' AND L.cat_id IS NULL '; 
    115191               } 
    116                elseif (is_numeric($w->category)) 
    117                { 
     192               elseif (is_numeric($w->category)) { 
    118193                    $params['cat_id'] = (integer) $w->category; 
    119194               } 
    120195          } 
    121            
     196 
    122197          $limit = abs((integer) $w->limit); 
    123            
     198 
    124199          # Tirage aléatoire 
    125200          # Consomme beaucoup de ressources! 
    126           if ($w->sortby == 'RANDOM') 
    127           { 
     201          if ($w->sortby == 'RANDOM') { 
    128202               $big_rs = $C2->getLinks($params); 
    129                 
    130                if ($big_rs->isEmpty()) return; 
    131                 
     203 
     204               if ($big_rs->isEmpty()) { 
     205 
     206                    return null; 
     207               } 
     208 
    132209               $ids= array(); 
    133                while($big_rs->fetch()) 
    134                { 
     210               while($big_rs->fetch()) { 
    135211                    $ids[] = $big_rs->link_id; 
    136212               } 
    137213               shuffle($ids); 
    138                $ids = array_slice($ids,0,$limit); 
    139                 
     214               $ids = array_slice($ids, 0, $limit); 
     215 
    140216               $params['link_id'] = array(); 
    141                foreach($ids as $id) 
    142                { 
     217               foreach($ids as $id) { 
    143218                    $params['link_id'][] = $id; 
    144219               } 
    145220          } 
    146           elseif ($w->sortby == 'COUNTER') 
    147           { 
     221          elseif ($w->sortby == 'COUNTER') { 
    148222               $params['order'] = 'link_count asc'; 
    149223               $params['limit'] = $limit; 
    150224          } 
    151           else 
    152           { 
     225          else { 
    153226               $params['order'] = $w->sortby; 
    154227               $params['order'] .= $w->sort == 'asc' ? ' asc' : ' desc'; 
    155228               $params['limit'] = $limit; 
    156229          } 
    157            
     230 
    158231          $rs = $C2->getLinks($params); 
    159            
    160           if ($rs->isEmpty()) return; 
    161            
     232 
     233          if ($rs->isEmpty()) { 
     234 
     235               return null; 
     236          } 
     237 
    162238          $widthmax = (integer) $core->blog->settings->cinecturlink2->cinecturlink2_widthmax; 
    163239          $style = $widthmax ? ' style="width:'.$widthmax.'px;"' : ''; 
    164            
     240 
    165241          $entries = array(); 
    166           while($rs->fetch()) 
    167           { 
    168                $url = $rs->link_url; 
    169                $img = $rs->link_img; 
    170                $title = html::escapeHTML($rs->link_title); 
    171                $author = html::escapeHTML($rs->link_author); 
    172                $cat = html::escapeHTML($rs->cat_title); 
    173                $note = $w->shownote ? ' <em>('.$rs->link_note.'/20)</em>' : ''; 
    174                $desc = $w->showdesc ? '<br /><em>'.html::escapeHTML($rs->link_desc).'</em>' : ''; 
    175                $lang = $rs->link_lang ? ' hreflang="'.$rs->link_lang.'"' : ''; 
    176                $count = abs((integer) $rs->link_count); 
    177                 
     242          while($rs->fetch()) { 
     243               $url = $rs->link_url; 
     244               $img = $rs->link_img; 
     245               $title    = html::escapeHTML($rs->link_title); 
     246               $author   = html::escapeHTML($rs->link_author); 
     247               $cat      = html::escapeHTML($rs->cat_title); 
     248               $note     = $w->shownote ? ' <em>('.$rs->link_note.'/20)</em>' : ''; 
     249               $desc     = $w->showdesc ? '<br /><em>'.html::escapeHTML($rs->link_desc).'</em>' : ''; 
     250               $lang     = $rs->link_lang ? ' hreflang="'.$rs->link_lang.'"' : ''; 
     251               $count    = abs((integer) $rs->link_count); 
     252 
    178253               # --BEHAVIOR-- cinecturlink2WidgetLinks 
    179                $bhv = $core->callBehavior('cinecturlink2WidgetLinks',$rs->link_id); 
    180                 
     254               $bhv = $core->callBehavior('cinecturlink2WidgetLinks', $rs->link_id); 
     255 
    181256               $entries[] =  
    182257               '<p style="text-align:center;">'. 
     
    188263               ($w->withlink && !empty($url) ? '</a>' : ''). 
    189264               '</p>'.$bhv; 
    190                 
    191                try 
    192                { 
     265 
     266               try { 
    193267                    $cur = $core->con->openCursor($C2->table); 
    194268                    $cur->link_count = ($count + 1); 
    195                     $C2->updLink($rs->link_id,$cur,false); 
    196                } 
    197                catch (Exception $e) {} 
     269                    $C2->updLink($rs->link_id, $cur, false); 
     270               } 
     271               catch (Exception $e) { 
     272 
     273               } 
    198274          } 
    199275          # Tirage aléatoire 
    200           if ($w->sortby == 'RANDOM' || $w->sortby == 'COUNTER') 
    201           { 
     276          if ($w->sortby == 'RANDOM'  
     277           || $w->sortby == 'COUNTER' 
     278          ) { 
    202279               shuffle($entries); 
    203                if ($core->blog->settings->cinecturlink2->cinecturlink2_triggeronrandom) 
    204                { 
     280               if ($core->blog->settings->cinecturlink2->cinecturlink2_triggeronrandom) { 
    205281                    $core->blog->triggerBlog(); 
    206282               } 
    207283          } 
    208            
     284 
    209285          return  
    210286          '<div class="cinecturlink2list">'. 
     
    216292          '</div>'; 
    217293     } 
    218       
     294 
    219295     public static function publicCats($w) 
    220296     { 
    221297          global $core; 
     298 
    222299          $core->blog->settings->addNamespace('cinecturlink2');  
    223            
     300 
    224301          if (!$core->blog->settings->cinecturlink2->cinecturlink2_active  
    225302           || !$core->blog->settings->cinecturlink2->cinecturlink2_public_active  
    226            || $w->homeonly && $core->url->type != 'default') return; 
    227            
     303           || $w->homeonly == 1 && $core->url->type != 'default' 
     304           || $w->homeonly == 2 && $core->url->type == 'default' 
     305          ) { 
     306               return null; 
     307          } 
     308 
    228309          $C2 = new cinecturlink2($core); 
    229            
     310 
    230311          $rs = $C2->getCategories(array()); 
    231            
    232           if ($rs->isEmpty()) return; 
    233            
     312 
     313          if ($rs->isEmpty()) { 
     314 
     315               return null; 
     316          } 
     317 
    234318          $res =  
    235319          '<li><a href="'. 
     
    237321          '" title="'.__('view all links').'">'.__('all links'). 
    238322          '</a>'; 
    239           if ($w->shownumlink) 
    240           { 
    241                $res .= ' ('.($C2->getLinks(array(),true)->f(0)).')'; 
     323          if ($w->shownumlink) { 
     324               $res .= ' ('.($C2->getLinks(array(), true)->f(0)).')'; 
    242325          } 
    243326          $res .= '</li>'; 
    244            
    245           while($rs->fetch()) 
    246           { 
     327 
     328          while($rs->fetch()) { 
    247329               $res .=  
    248330               '<li><a href="'. 
     
    251333               html::escapeHTML($rs->cat_title). 
    252334               '</a>'; 
    253                if ($w->shownumlink) 
    254                { 
    255                     $res .= ' ('.($C2->getLinks(array('cat_id'=>$rs->cat_id),true)->f(0)).')'; 
     335               if ($w->shownumlink) { 
     336                    $res .= ' ('.($C2->getLinks(array('cat_id'=>$rs->cat_id), true)->f(0)).')'; 
    256337               } 
    257338               $res .= '</li>'; 
    258339          } 
    259            
     340 
    260341          return  
    261342          '<div class="cinecturlink2cat">'. 
     
    265346     } 
    266347} 
    267 ?> 
  • plugins/cinecturlink2/inc/class.cinecturlink2.php

    r2314 r3247  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of cinecturlink2, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    13 if (!defined('DC_RC_PATH')){return;} 
    14  
     15if (!defined('DC_RC_PATH')) { 
     16 
     17     return null; 
     18} 
     19 
     20/** 
     21 * @ingroup DC_PLUGIN_CINECTURLINK2 
     22 * @brief Share media you like - main methods. 
     23 * @since 2.6 
     24 */ 
    1525class cinecturlink2 
    1626{ 
     27     /** @var dcCore dcCore instance */ 
    1728     public $core; 
     29     /** @var dbLayer dbLayer instance */ 
    1830     public $con; 
     31     /** @var string Cinecturlink table name */ 
    1932     public $table; 
     33     /** @var string Blog ID */ 
    2034     public $blog; 
    2135 
    22      public function __construct($core) 
    23      { 
     36     /** 
     37      * Contructor 
     38      *  
     39      * @param dcCore $core dcCore instance 
     40      */ 
     41     public function __construct(dcCore $core) 
     42     { 
     43          $core->blog->settings->addNamespace('cinecturlink2'); 
     44 
    2445          $this->core = $core; 
    2546          $this->con = $core->con; 
     
    2849     } 
    2950 
    30      public function getLinks($params=array(),$count_only=false) 
    31      { 
    32           if ($count_only) 
    33           { 
     51     /** 
     52      * Get links 
     53      *  
     54      * @param  array   $params     Query params 
     55      * @param  boolean $count_only Count only result 
     56      * @return record              record instance 
     57      */ 
     58     public function getLinks($params=array(), $count_only=false) 
     59     { 
     60          if ($count_only) { 
    3461               $strReq = 'SELECT count(L.link_id) '; 
    3562          } 
    36           else 
    37           { 
     63          else { 
    3864               $content_req = ''; 
    3965               if (!empty($params['columns']) && is_array($params['columns'])) { 
    40                     $content_req .= implode(', ',$params['columns']).', '; 
     66                    $content_req .= implode(', ', $params['columns']).', '; 
    4167               } 
    4268 
     
    6389          $strReq .= "WHERE L.blog_id = '".$this->blog."' "; 
    6490 
    65           if (isset($params['link_type'])) 
    66           { 
     91          if (isset($params['link_type'])) { 
    6792               if (is_array($params['link_type']) && !empty($params['link_type'])) { 
    6893                    $strReq .= 'AND L.link_type '.$this->con->in($params['link_type']); 
    69                } elseif ($params['link_type'] != '') { 
     94               } 
     95               elseif ($params['link_type'] != '') { 
    7096                    $strReq .= "AND L.link_type = '".$this->con->escape($params['link_type'])."' "; 
    7197               } 
    7298          } 
    73           else 
    74           { 
     99          else { 
    75100               $strReq .= "AND L.link_type = 'cinecturlink' "; 
    76101          } 
     
    78103          if (!empty($params['link_id'])) { 
    79104               if (is_array($params['link_id'])) { 
    80                     array_walk($params['link_id'],create_function('&$v,$k','if($v!==null){$v=(integer)$v;}')); 
    81                } else { 
     105                    array_walk($params['link_id'], create_function('&$v,$k', 'if($v!==null){$v=(integer)$v;}')); 
     106               } 
     107               else { 
    82108                    $params['link_id'] = array((integer) $params['link_id']); 
    83109               } 
     
    87113          if (!empty($params['cat_id'])) { 
    88114               if (is_array($params['cat_id'])) { 
    89                     array_walk($params['cat_id'],create_function('&$v,$k','if($v!==null){$v=(integer)$v;}')); 
    90                } else { 
     115                    array_walk($params['cat_id'], create_function('&$v,$k', 'if($v!==null){$v=(integer)$v;}')); 
     116               } 
     117               else { 
    91118                    $params['cat_id'] = array((integer) $params['cat_id']); 
    92119               } 
     
    109136          } 
    110137 
    111           if (!$count_only) 
    112           { 
     138          if (!$count_only) { 
    113139               if (!empty($params['order'])) { 
    114140                    $strReq .= 'ORDER BY '.$this->con->escape($params['order']).' '; 
    115                } else { 
     141               } 
     142               else { 
    116143                    $strReq .= 'ORDER BY L.link_upddt DESC '; 
    117144               } 
     
    125152     } 
    126153 
    127      public function addLink($cur) 
     154     /** 
     155      * Add link 
     156      *  
     157      * @param cursor $cur cursor instance 
     158      */ 
     159     public function addLink(cursor $cur) 
    128160     { 
    129161          $this->con->writeLock($this->table); 
    130162           
    131           try 
    132           { 
     163          try { 
    133164               if ($cur->link_title == '') { 
    134165                    throw new Exception(__('No link title')); 
     
    154185               $this->con->unlock(); 
    155186          } 
    156           catch (Exception $e) 
    157           { 
     187          catch (Exception $e) { 
    158188               $this->con->unlock(); 
    159189               throw $e; 
     
    162192 
    163193          # --BEHAVIOR-- cinecturlink2AfterAddLink 
    164           $this->core->callBehavior('cinecturlink2AfterAddLink',$cur); 
     194          $this->core->callBehavior('cinecturlink2AfterAddLink', $cur); 
    165195 
    166196          return $cur->link_id; 
    167197     } 
    168       
    169      public function updLink($id,$cur,$behavior=true) 
     198 
     199     /** 
     200      * Update link 
     201      *  
     202      * @param  integer $id       Link ID 
     203      * @param  cursor  $cur      cursor instance 
     204      * @param  boolean $behavior Call related behaviors 
     205      */ 
     206     public function updLink($id, cursor $cur, $behavior=true) 
    170207     { 
    171208          $id = (integer) $id; 
     
    182219          if ($behavior) { 
    183220               # --BEHAVIOR-- cinecturlink2AfterUpdLink 
    184                $this->core->callBehavior('cinecturlink2AfterUpdLink',$cur,$id); 
    185           } 
    186      } 
    187  
     221               $this->core->callBehavior('cinecturlink2AfterUpdLink', $cur, $id); 
     222          } 
     223     } 
     224 
     225     /** 
     226      * Delete link 
     227      *  
     228      * @param  integer $id Link ID 
     229      */ 
    188230     public function delLink($id) 
    189231     { 
     
    195237 
    196238          # --BEHAVIOR-- cinecturlink2BeforeDelLink 
    197           $this->core->callBehavior('cinecturlink2BeforeDelLink',$id); 
     239          $this->core->callBehavior('cinecturlink2BeforeDelLink', $id); 
    198240 
    199241          $this->con->execute( 
     
    206248     } 
    207249 
     250     /** 
     251      * Get next link ID 
     252      *  
     253      * @return integer Next link ID 
     254      */ 
    208255     private function getNextLinkId() 
    209256     { 
     
    213260     } 
    214261 
    215      public function getCategories($params=array(),$count_only=false) 
    216      { 
    217           if ($count_only) 
    218           { 
     262     /** 
     263      * Get categories 
     264      *  
     265      * @param  array   $params     Query params 
     266      * @param  boolean $count_only Count only result 
     267      * @return record              record instance 
     268      */ 
     269     public function getCategories($params=array(), $count_only=false) 
     270     { 
     271          if ($count_only) { 
    219272               $strReq = 'SELECT count(C.cat_id) '; 
    220273          } 
    221           else 
    222           { 
     274          else { 
    223275               $content_req = ''; 
    224276               if (!empty($params['columns']) && is_array($params['columns'])) { 
    225                     $content_req .= implode(', ',$params['columns']).', '; 
     277                    $content_req .= implode(', ', $params['columns']).', '; 
    226278               } 
    227279 
     
    242294          if (!empty($params['cat_id'])) { 
    243295               if (is_array($params['cat_id'])) { 
    244                     array_walk($params['cat_id'],create_function('&$v,$k','if($v!==null){$v=(integer)$v;}')); 
    245                } else { 
     296                    array_walk($params['cat_id'], create_function('&$v,$k', 'if($v!==null){$v=(integer)$v;}')); 
     297               } 
     298               else { 
    246299                    $params['cat_id'] = array((integer) $params['cat_id']); 
    247300               } 
    248301               $strReq .= 'AND C.cat_id '.$this->con->in($params['cat_id']); 
    249302          } 
    250            
     303 
    251304          if (!empty($params['cat_title'])) { 
    252305               $strReq .= "AND C.cat_title = '".$this->con->escape($params['cat_title'])."' "; 
     
    257310          } 
    258311 
    259           if (!$count_only) 
    260           { 
     312          if (!$count_only) { 
    261313               if (!empty($params['order'])) { 
    262314                    $strReq .= 'ORDER BY '.$this->con->escape($params['order']).' '; 
    263                } else { 
     315               } 
     316               else { 
    264317                    $strReq .= 'ORDER BY cat_pos ASC '; 
    265318               } 
     
    273326     } 
    274327 
    275      public function addCategory($cur) 
     328     /** 
     329      * Add category 
     330      *  
     331      * @param  cursor  $cur cursor instance 
     332      * @return integer      New category ID 
     333      */ 
     334     public function addCategory(cursor $cur) 
    276335     { 
    277336          $this->con->writeLock($this->table.'_cat'); 
    278337           
    279           try 
    280           { 
     338          try { 
    281339               if ($cur->cat_title == '') { 
    282340                    throw new Exception(__('No category title')); 
     
    294352               $this->con->unlock(); 
    295353          } 
    296           catch (Exception $e) 
    297           { 
     354          catch (Exception $e) { 
    298355               $this->con->unlock(); 
    299356               throw $e; 
    300357          } 
    301358          $this->trigger(); 
     359 
    302360          return $cur->cat_id; 
    303361     } 
    304       
    305      public function updCategory($id,$cur) 
     362 
     363     /** 
     364      * Update category 
     365      *  
     366      * @param  integer $id  Category ID 
     367      * @param  cursor  $cur cursor instance 
     368      */ 
     369     public function updCategory($id, cursor $cur) 
    306370     { 
    307371          $id = (integer) $id; 
     
    317381     } 
    318382 
     383     /** 
     384      * Delete category 
     385      *  
     386      * @param  integer $id Category ID 
     387      */ 
    319388     public function delCategory($id) 
    320389     { 
     
    339408          $this->trigger(); 
    340409     } 
    341       
     410 
     411     /** 
     412      * Get next category ID 
     413      *  
     414      * @return integer Next category ID 
     415      */ 
    342416     private function getNextCatId() 
    343417     { 
     
    346420          )->f(0) + 1; 
    347421     } 
    348       
     422 
     423     /** 
     424      * Get next category position 
     425      *  
     426      * @return integer Next category position 
     427      */ 
    349428     private function getNextCatPos() 
    350429     { 
     
    355434     } 
    356435 
     436     /** 
     437      * Trigger event 
     438      */ 
    357439     private function trigger() 
    358440     { 
    359441          $this->core->blog->triggerBlog(); 
    360442     } 
    361       
    362      public static function test_folder($root,$folder,$throw=false) 
    363      { 
    364           if (!is_dir($root.'/'.$folder)) 
    365           { 
    366                if (!is_dir($root) || !is_writable($root) || !mkdir($root.'/'.$folder)) 
    367                { 
    368                     if ($throw) 
    369                     { 
     443 
     444     /** 
     445      * Check if a directory exists and is writable 
     446      *  
     447      * @param  string  $root   Root 
     448      * @param  string  $folder Folder to create into root folder 
     449      * @param  boolean $throw  Throw exception or not 
     450      * @return boolean         True if exists and writable 
     451      */ 
     452     public static function test_folder($root, $folder, $throw=false) 
     453     { 
     454          if (!is_dir($root.'/'.$folder)) { 
     455               if (!is_dir($root) || !is_writable($root) || !mkdir($root.'/'.$folder)) { 
     456                    if ($throw) { 
    370457                         throw new Exception(__('Failed to create public folder for images.')); 
    371458                    } 
     459 
    372460                    return false; 
    373461               } 
    374462          } 
     463 
    375464          return true; 
    376465     } 
    377466} 
    378 ?> 
  • plugins/cinecturlink2/inc/lib.cinecturlink2.activityreport.php

    r2023 r3247  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of cinecturlink2, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    13 if (!defined('DC_RC_PATH')){return;} 
     15if (!defined('DC_RC_PATH')) { 
     16 
     17     return null; 
     18} 
    1419 
    1520# This file is used with plugin activityReport 
    16 $core->activityReport->addGroup('cinecturlink2',__('Plugin cinecturlink2')); 
     21$core->activityReport->addGroup('cinecturlink2', __('Plugin cinecturlink2')); 
    1722 
    1823# from BEHAVIOR cinecturlink2AfterAddLink in cinecturlink2/inc/class.cinecturlink2.php 
     
    2328     __('A new cineturlink named "%s" was added by "%s"'), 
    2429     'cinecturlink2AfterAddLink', 
    25      array('cinecturlink2ActivityReportBehaviors','addLink') 
     30     array('cinecturlink2ActivityReportBehaviors', 'addLink') 
    2631); 
    2732# from BEHAVIOR cinecturlink2AfterUpdLink in cinecturlink2/inc/class.cinecturlink2.php 
     
    3237     __('Cinecturlink named "%s" has been updated by "%s"'), 
    3338     'cinecturlink2AfterUpdLink', 
    34      array('cinecturlink2ActivityReportBehaviors','updLink') 
     39     array('cinecturlink2ActivityReportBehaviors', 'updLink') 
    3540); 
    3641# from BEHAVIOR cinecturlink2BeforeDelLink in cinecturlink2/inc/class.cinecturlink2.php 
     
    4146     __('Cinecturlink named "%s" has been deleted by "%s"'), 
    4247     'cinecturlink2BeforeDelLink', 
    43      array('cinecturlink2ActivityReportBehaviors','delLink') 
     48     array('cinecturlink2ActivityReportBehaviors', 'delLink') 
    4449); 
    4550 
     
    5560          ); 
    5661 
    57           $core->activityReport->addLog('cinecturlink2','create',$logs); 
     62          $core->activityReport->addLog('cinecturlink2', 'create', $logs); 
    5863     } 
    59      public static function updLink($cur,$id) 
     64 
     65     public static function updLink($cur, $id) 
    6066     { 
    6167          global $core; 
     
    6874          ); 
    6975 
    70           $core->activityReport->addLog('cinecturlink2','update',$logs); 
     76          $core->activityReport->addLog('cinecturlink2', 'update', $logs); 
    7177     } 
     78 
    7279     public static function delLink($id) 
    7380     { 
     
    8188          ); 
    8289 
    83           $core->activityReport->addLog('cinecturlink2','delete',$logs); 
     90          $core->activityReport->addLog('cinecturlink2', 'delete', $logs); 
    8491     } 
    8592} 
    86 ?> 
  • plugins/cinecturlink2/inc/lib.cinecturlink2.context.php

    r2314 r3247  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of cinecturlink2, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    13 class c2_context 
     15class cinecturlink2Context 
    1416{ 
    1517     public static function PaginationNbPages() 
    1618     { 
    1719          global $_ctx; 
    18            
     20 
    1921          if ($_ctx->c2_pagination === null) { 
     22 
    2023               return false; 
    2124          } 
    22            
     25 
    2326          $nb_posts = $_ctx->c2_pagination->f(0); 
    2427          $nb_per_page = $_ctx->c2_params['limit'][1]; 
    25            
     28 
    2629          $nb_pages = ceil($nb_posts/$nb_per_page); 
    27            
     30 
    2831          return $nb_pages; 
    2932     } 
    30       
     33 
    3134     public static function PaginationPosition($offset=0) 
    3235     { 
    3336          if (isset($GLOBALS['c2_page_number'])) { 
    3437               $p = $GLOBALS['c2_page_number']; 
    35           } else { 
     38          } 
     39          else { 
    3640               $p = 1; 
    3741          } 
    38            
     42 
    3943          $p = $p+$offset; 
    40            
     44 
    4145          $n = self::PaginationNbPages(); 
    4246          if (!$n) { 
     47 
    4348               return $p; 
    4449          } 
    45            
    46           if ($p > $n || $p <= 0) { 
    47                return 1; 
    48           } else { 
    49                return $p; 
    50           } 
     50 
     51          return $p > $n || $p <= 0 ? 1 : $p; 
    5152     } 
    52       
     53 
    5354     public static function PaginationStart() 
    5455     { 
    5556          if (isset($GLOBALS['c2_page_number'])) { 
     57 
    5658               return self::PaginationPosition() == 1; 
    5759          } 
    58            
     60 
    5961          return true; 
    6062     } 
     
    6365     {     
    6466          if (isset($GLOBALS['c2_page_number'])) { 
     67 
    6568               return self::PaginationPosition() == self::PaginationNbPages(); 
    6669          } 
    67            
     70 
    6871          return false; 
    6972     } 
     
    7275     { 
    7376          $args = $_SERVER['URL_REQUEST_PART']; 
    74            
     77 
    7578          $n = self::PaginationPosition($offset); 
    76            
    77           $args = preg_replace('#(^|/)c2page/([0-9]+)$#','',$args); 
    78            
     79 
     80          $args = preg_replace('#(^|/)c2page/([0-9]+)$#', '', $args); 
     81 
    7982          $url = $GLOBALS['core']->blog->url.$args; 
    80            
     83 
    8184          if ($n > 1) { 
    8285               $url = preg_replace('#/$#','',$url); 
    8386               $url .= '/c2page/'.$n; 
    8487          } 
    85            
     88 
    8689          # If search param 
    8790          if (!empty($_GET['q'])) { 
     
    8992               $url .= $s.'q='.rawurlencode($_GET['q']); 
    9093          } 
     94 
    9195          return $url; 
    9296     } 
    93       
     97 
    9498     public static function categoryCurrent() 
    9599     { 
    96100          global $_ctx; 
    97            
    98           if (!isset($_ctx->c2_page_params['cat_id']) && !isset($_ctx->c2_page_params['cat_title'])) 
    99           { 
     101 
     102          if (!isset($_ctx->c2_page_params['cat_id']) && !isset($_ctx->c2_page_params['cat_title'])) { 
     103 
    100104               return false; 
    101105          } 
    102           if (isset($_ctx->c2_page_params['cat_id']) && $_ctx->c2_page_params['cat_id'] == $_ctx->c2_categories->cat_id) 
    103           { 
     106          if (isset($_ctx->c2_page_params['cat_id']) && $_ctx->c2_page_params['cat_id'] == $_ctx->c2_categories->cat_id) { 
     107 
    104108               return true; 
    105109          } 
    106           if (isset($_ctx->c2_page_params['cat_title']) && $_ctx->c2_page_params['cat_title'] == $_ctx->c2_categories->cat_title) 
    107           { 
     110          if (isset($_ctx->c2_page_params['cat_title']) && $_ctx->c2_page_params['cat_title'] == $_ctx->c2_categories->cat_title) { 
     111 
    108112               return true; 
    109113          } 
     114 
    110115          return false; 
    111116     } 
    112117} 
    113 ?> 
  • plugins/cinecturlink2/inc/lib.cinecturlink2.list.php

    r2314 r3247  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of cinecturlink2, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    13 if (!defined('DC_CONTEXT_ADMIN')){return;} 
     15if (!defined('DC_CONTEXT_ADMIN')) { 
     16 
     17     return null; 
     18} 
    1419 
    1520class adminlistCinecturlink2 extends adminGenericList 
    1621{ 
    17      public function display($page,$nb_per_page,$url) 
     22     public function display($page, $nb_per_page, $url) 
    1823     { 
    19           if ($this->rs->isEmpty()) 
    20           { 
     24          if ($this->rs->isEmpty()) { 
    2125               echo '<p><strong>'.__('There is no link').'</strong></p>'; 
    2226          } 
    23           else 
    24           { 
    25                $pager = new pager($page,$this->rs_count,$nb_per_page,10); 
    26                 
     27          else { 
     28               $pager = new pager($page, $this->rs_count, $nb_per_page,10); 
     29 
    2730               $pager->base_url = $url; 
    28                 
     31 
    2932               $html_block = 
    3033               '<table class="clear">'. 
     
    3740               '<th class="nowrap">'.__('Category').'</th>'. 
    3841               '<th class="nowrap">'.__('My rating').'</th>'. 
    39                '<th class="nowrap" colspan="2">'.__('Date').'</th>'. 
     42               '<th class="nowrap">'.__('Date').'</th>'. 
    4043               '</tr>'. 
    4144               '</thead>'. 
    4245               '<tbody>%s</tbody>'. 
    4346               '</table>'; 
    44                 
     47 
    4548               echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 
    4649               $blocks = explode('%s',$html_block); 
    4750               echo $blocks[0]; 
    48                 
     51 
    4952               $this->rs->index(((integer)$page - 1) * $nb_per_page); 
    5053               $iter = 0; 
    51                while ($iter < $nb_per_page) 
    52                { 
     54               while ($iter < $nb_per_page) { 
    5355                    echo $this->linkLine($url,$iter); 
    5456 
     
    6466          } 
    6567     } 
    66       
    67      private function linkLine($url,$loop) 
     68 
     69     private function linkLine($url, $loop) 
    6870     { 
    6971          return 
    7072          '<tr class="line">'."\n". 
    7173          '<td class="nowrap">'. 
    72                form::checkbox(array('links[]'),$this->rs->link_id,0). 
     74               form::checkbox(array('links[]'), $this->rs->link_id, 0). 
    7375          '</td>'. 
    7476          '<td class="nowrap">'. 
     77          '<a href="plugin.php?p=cinecturlink2&amp;link_id='.$this->rs->link_id.'#newlink" title="'.__('Edit').'">'. 
    7578          html::escapeHTML($this->rs->link_title). 
     79          '</a>'. 
    7680          "</td>\n". 
    7781          '<td class="nowrap">'. 
     
    9498          dt::dt2str($GLOBALS['core']->blog->settings->system->date_format.', '.$GLOBALS['core']->blog->settings->system->time_format,$this->rs->link_upddt,$GLOBALS['core']->auth->getInfo('user_tz')). 
    9599          "</td>\n". 
    96           '<td class="nowrap">'. 
    97           '<a href="plugin.php?p=cinecturlink2&amp;part=main&amp;tab=newlink&amp;link_id='.$this->rs->link_id.'" title="'.__('Edit').'"><img src="index.php?pf=cinecturlink2/inc/img/icon-edit.png" alt="'.__('Edit').'" /></a>'. 
    98           "</td>\n". 
    99100          '</tr>'."\n"; 
    100101     } 
    101102} 
    102 ?> 
  • plugins/cinecturlink2/inc/lib.sitemaps.cinecturlink2.php

    r2314 r3247  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of cinecturlink2, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
     
    1517     public static function sitemapsDefineParts($map_parts) 
    1618     { 
    17           $map_parts->offsetSet(__('Cineturlink'),'cinecturlink2'); 
     19          $map_parts->offsetSet(__('Cinecturlink'), 'cinecturlink2'); 
    1820     } 
    19       
     21 
    2022     public static function sitemapsURLsCollect($sitemaps) 
    2123     { 
     
    2426           
    2527          if ($core->plugins->moduleExists('cinecturlink2')  
    26            && $core->blog->settings->sitemaps->sitemaps_cinecturlink2_url) 
    27           { 
     28           && $core->blog->settings->sitemaps->sitemaps_cinecturlink2_url) { 
     29 
    2830               $freq = $sitemaps->getFrequency($core->blog->settings->sitemaps->sitemaps_cinecturlink2_fq); 
    2931               $prio = $sitemaps->getPriority($core->blog->settings->sitemaps->sitemaps_cinecturlink2_pr); 
    3032               $base = $core->blog->url.$core->url->getBase('cinecturlink2'); 
    3133 
    32                $sitemaps->addEntry($base,$prio,$freq); 
     34               $sitemaps->addEntry($base, $prio, $freq); 
    3335                
    3436               $core->blog->settings->addNamespace('cinecturlink2'); 
    3537               $C2 = new cinecturlink2($core); 
    3638               $cats = $C2->getCategories(); 
    37                while ($cats->fetch()) 
    38                { 
    39                     $sitemaps->addEntry($base."/".$core->blog->settings->cinecturlink2->cinecturlink2_public_caturl.'/'.urlencode($cats->cat_title),$prio,$freq); 
     39               while ($cats->fetch()) { 
     40                    $sitemaps->addEntry($base."/".$core->blog->settings->cinecturlink2->cinecturlink2_public_caturl.'/'.urlencode($cats->cat_title), $prio, $freq); 
    4041               } 
    4142          } 
    4243     } 
    4344} 
    44 ?> 
  • plugins/cinecturlink2/index.php

    r2314 r3247  
    11<?php 
    22# -- BEGIN LICENSE BLOCK ---------------------------------- 
     3# 
    34# This file is part of cinecturlink2, a plugin for Dotclear 2. 
    45#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
    6 # jcdenis@gdwd.com 
     6# Copyright (c) 2009-2013 Jean-Christian Denis and contributors 
     7# contact@jcdenis.fr http://jcd.lv 
    78#  
    89# Licensed under the GPL version 2.0 license. 
    910# A copy of this license is available in LICENSE file or at 
    1011# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     12# 
    1113# -- END LICENSE BLOCK ------------------------------------ 
    1214 
    13 if (!defined('DC_CONTEXT_ADMIN')){return;} 
    14  
    15 dcPage::check('content'); 
    16  
    17 # Init 
    18 $core->blog->settings->addNamespace('cinecturlink2'); 
     15if (!defined('DC_CONTEXT_ADMIN')) { 
     16 
     17     return null; 
     18} 
     19 
     20dcPage::check('contentadmin'); 
     21 
     22# Class 
    1923$C2 = new cinecturlink2($core); 
    20 $root = DC_ROOT.'/'.$core->blog->settings->system->public_path; 
    21 $message = '<p class="message">%s</p>'; 
    22  
    23 # Request values 
    24 $msg = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : ''; 
    25 $start_part = $core->blog->settings->cinecturlink2->cinecturlink2_active ? 'main' : 'setting'; 
    26 $default_part = isset($_REQUEST['part']) ? $_REQUEST['part'] : $start_part; 
    27 $default_tab = isset($_REQUEST['tab']) ? $_REQUEST['tab'] : 'links'; 
    28 $section = isset($_REQUEST['section']) ? $_REQUEST['section'] : ''; 
    29 $action = isset($_POST['action']) ? $_POST['action'] : ''; 
    30  
    31 # Common page menu 
    32 $menu =  
    33 '<h2>'.html::escapeHTML($core->blog->name). 
    34 ' &rsaquo; <a href="'.$p_url.'&amp;part=main">'.__('Cinecturlink 2').'</a>'. 
    35 '</h2><hr class="clear" />'; 
    36  
    37 # Common page footer 
    38 $footer = '<hr class="clear"/><p class="right"> 
    39 <a class="button" href="'.$p_url.'&amp;part=setting">'.__('Settings').'</a> -  
    40 cinecturlink2 - '.$core->plugins->moduleInfo('cinecturlink2','version').'&nbsp; 
     24require dirname(__FILE__).'/inc/lib.cinecturlink2.list.php'; 
     25 
     26# Queries 
     27$upd_link_id   = isset($_REQUEST['link_id']) ? $_REQUEST['link_id'] : null; 
     28$new_title     = isset($_POST['new_title']) ? $_POST['new_title'] : ''; 
     29$new_desc      = isset($_POST['new_desc']) ? $_POST['new_desc'] : ''; 
     30$new_author    = isset($_POST['new_author']) ? $_POST['new_author'] : ''; 
     31$new_url       = isset($_POST['new_url']) ? $_POST['new_url'] : ''; 
     32$new_category  = isset($_POST['new_category']) ? $_POST['new_category'] : ''; 
     33$new_lang      = isset($_POST['new_lang']) ? $_POST['new_lang'] : $core->auth->getInfo('user_lang'); 
     34$new_image     = isset($_POST['new_image']) ? $_POST['new_image'] : ''; 
     35$new_note      = isset($_POST['new_note']) ? $_POST['new_note'] : 10; 
     36$new_cattitle  = isset($_POST['new_cattitle']) ? $_POST['new_cattitle'] : ''; 
     37$new_catdesc   = isset($_POST['new_catdesc']) ? $_POST['new_catdesc'] : ''; 
     38$action        = isset($_POST['action']) ? $_POST['action'] : ''; 
     39 
     40# Actions 
     41try { 
     42 
     43     # Update categories 
     44     if ($action == 'update_categories') { 
     45 
     46          # Reorder categories 
     47          if (empty($_POST['cats_order'])  
     48           && !empty($_POST['catpos']) 
     49          ) { 
     50               $order = $_POST['catpos']; 
     51               asort($order); 
     52               $order = array_keys($order); 
     53          } 
     54          elseif (!empty($_POST['cats_order'])) { 
     55               $order = explode(',', $_POST['cats_order']); 
     56          } 
     57 
     58          if (!empty($order)) { 
     59 
     60               foreach ($order as $pos => $id) { 
     61 
     62                    $pos = ((integer) $pos)+1; 
     63                    if (empty($pos) || empty($id)) { 
     64                         continue; 
     65                    } 
     66 
     67                    $cur = $core->con->openCursor($C2->table.'_cat'); 
     68                    $cur->cat_pos = $pos; 
     69                    $C2->updCategory($id, $cur); 
     70               } 
     71 
     72               dcPage::addSuccessNotice( 
     73                    __('Categories successfully reordered.') 
     74               ); 
     75          } 
     76 
     77          # Delete categories 
     78          if (!empty($_POST['delcat'])) { 
     79 
     80               foreach($_POST['delcat'] as $cat_id) { 
     81                    $C2->delCategory($cat_id); 
     82               } 
     83 
     84               dcPage::addSuccessNotice( 
     85                    __('Categories successfully deleted.') 
     86               ); 
     87          } 
     88 
     89          http::redirect(empty($_POST['redir']) ?  
     90               $p_url.'#cats' : $_POST['redir'] 
     91          ); 
     92     } 
     93 
     94     # Create new category 
     95     if ($action == 'create_category') { 
     96 
     97          if (empty($new_cattitle)) { 
     98               throw new Exception(__('You must provide a title.')); 
     99          } 
     100 
     101          $exists = $C2->getCategories(array('cat_title' => $new_cattitle), true)->f(0); 
     102          if ($exists) { 
     103               throw new Exception(__('Category with same name already exists.')); 
     104          } 
     105 
     106          $cur = $core->con->openCursor($C2->table.'_cat'); 
     107          $cur->cat_title = $new_cattitle; 
     108          $cur->cat_desc = $new_catdesc; 
     109           
     110          $C2->addCategory($cur); 
     111 
     112          dcPage::addSuccessNotice( 
     113               __('Category successfully created.') 
     114          ); 
     115          http::redirect(empty($_POST['redir']) ?  
     116               $p_url.'#cats' : $_POST['redir'] 
     117          ); 
     118     } 
     119 
     120     # Delete links 
     121     if (!empty($_POST['links']) && $action == 'delete_links') { 
     122 
     123          foreach($_POST['links'] as $link_id) { 
     124               $C2->delLink($link_id); 
     125          } 
     126 
     127          dcPage::addSuccessNotice( 
     128               __('Links successfully deleted.') 
     129          ); 
     130          http::redirect(empty($_POST['redir']) ?  
     131               $p_url.'#links' : $_POST['redir'] 
     132          ); 
     133     } 
     134 
     135     # Move to right tab 
     136     if (!empty($_POST['links']) && $action == 'moveto_change_links_category') { 
     137          // Nothing to do: show links action page 
     138     } 
     139 
     140     # Update category for a group of links 
     141     if (!empty($_POST['links']) && $action == 'change_links_category') { 
     142 
     143          foreach($_POST['links'] as $link_id) { 
     144               $cur = $core->con->openCursor($C2->table); 
     145               $cur->cat_id = abs((integer) $_POST['upd_category']); 
     146               $C2->updLink($link_id,$cur); 
     147          } 
     148 
     149          dcPage::addSuccessNotice( 
     150               __('Links successfully updated.') 
     151          ); 
     152          http::redirect(empty($_POST['redir']) ?  
     153               $p_url.'#links' : $_POST['redir'] 
     154          ); 
     155     } 
     156 
     157     # Move to right tab 
     158     if (!empty($_POST['links']) && $_POST['action'] == 'moveto_change_links_note') { 
     159          // Nothing to do: show links action page 
     160     } 
     161 
     162     # Update note for a group of links 
     163     if (!empty($_POST['links']) && $action == 'change_links_note') { 
     164 
     165          foreach($_POST['links'] as $link_id) { 
     166               $cur = $core->con->openCursor($C2->table); 
     167               $cur->link_note = abs((integer) $_POST['upd_note']); 
     168               $C2->updLink($link_id,$cur); 
     169          } 
     170 
     171          dcPage::addSuccessNotice( 
     172               __('Links successfully updated.') 
     173          ); 
     174          http::redirect(empty($_POST['redir']) ?  
     175               $p_url.'#links' : $_POST['redir'] 
     176          ); 
     177     } 
     178 
     179     # Create or update link 
     180     if (!empty($_POST['newlink'])) { 
     181 
     182          cinecturlink2::test_folder( 
     183               DC_ROOT.'/'.$core->blog->settings->system->public_path, 
     184               $core->blog->settings->cinecturlink2->cinecturlink2_folder 
     185          ); 
     186 
     187          if (empty($new_title)) { 
     188               throw new Exception(__('You must provide a title.')); 
     189          } 
     190          if (empty($new_author)) { 
     191               throw new Exception(__('You must provide an author.')); 
     192          } 
     193          if (!preg_match('/http:\/\/.+/',$new_image)) { 
     194               throw new Exception(__('You must provide a link to an image.')); 
     195          } 
     196 
     197          $cur = $core->con->openCursor($C2->table); 
     198          $cur->link_title = $new_title; 
     199          $cur->link_desc = $new_desc; 
     200          $cur->link_author = $new_author; 
     201          $cur->link_url = $new_url; 
     202          $cur->cat_id = $new_category == '' ? null : $new_category; 
     203          $cur->link_lang = $new_lang; 
     204          $cur->link_img = $new_image; 
     205          $cur->link_note = $new_note; 
     206 
     207          # Create link 
     208          if (empty($upd_link_id)) { 
     209 
     210               $exists = $C2->getLinks(array('link_title'=>$new_title),true)->f(0); 
     211               if ($exists) { 
     212                    throw new Exception(__('Link with same name already exists.')); 
     213               } 
     214 
     215               $C2->addLink($cur); 
     216 
     217               dcPage::addSuccessNotice( 
     218                    __('Link successfully created.') 
     219               ); 
     220          } 
     221 
     222          # Update link 
     223          else { 
     224 
     225               $exists = $C2->getLinks(array('link_id'=>$upd_link_id),true)->f(0); 
     226               if (!$exists) { 
     227                    throw new Exception(__('Unknown link.')); 
     228               } 
     229 
     230               $C2->updLink($upd_link_id,$cur); 
     231 
     232               dcPage::addSuccessNotice( 
     233                    __('Link successfully updated.') 
     234               ); 
     235          } 
     236 
     237          http::redirect(empty($_POST['redir']) ?  
     238               $p_url.'#links' : $_POST['redir'] 
     239          ); 
     240     } 
     241} 
     242catch(Exception $e) { 
     243     $core->error->add($e->getMessage()); 
     244} 
     245 
     246# Construct lists 
     247$show_filters = false; 
     248$sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'link_upddt'; 
     249$order = !empty($_GET['order']) ? $_GET['order'] : 'desc'; 
     250$page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1; 
     251$nb_per_page =  30; 
     252if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) { 
     253     if ($nb_per_page != $_GET['nb']) $show_filters = true; 
     254     $nb_per_page = (integer) $_GET['nb']; 
     255} 
     256 
     257$sortby_combo = array( 
     258     __('Date')          => 'link_upddt', 
     259     __('Title')         => 'link_title', 
     260     __('Category')      => 'cat_title', 
     261     __('My rating')     => 'link_note', 
     262); 
     263 
     264$order_combo = array( 
     265     __('Descending')    => 'desc', 
     266     __('Ascending')     => 'asc' 
     267); 
     268 
     269$params = array(); 
     270$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page); 
     271 
     272if ($sortby != '' && in_array($sortby,$sortby_combo)) { 
     273     if ($order != '' && in_array($order,$order_combo)) { 
     274          $params['order'] = $sortby.' '.$order; 
     275     } 
     276     if ($sortby != 'link_upddt' || $order != 'desc') { 
     277          $show_filters = true; 
     278     } 
     279} 
     280 
     281$categories = $C2->getCategories(); 
     282 
     283$categories_combo = array('-'=> ''); 
     284while($categories->fetch()) { 
     285     $cat_title = html::escapeHTML($categories->cat_title); 
     286     $categories_combo[$cat_title] = $categories->cat_id; 
     287} 
     288 
     289$medias_combo = $tmp_medias_combo = $dir = null; 
     290try { 
     291     $allowed_medias = array('png','jpg','gif','bmp','jpeg'); 
     292     $core->media = new dcMedia($core); 
     293     $core->media->chdir($core->blog->settings->cinecturlink2->cinecturlink2_folder); 
     294     $core->media->getDir(); 
     295     $dir =& $core->media->dir; 
     296      
     297     foreach($dir['files'] as $file) { 
     298          if (!in_array(files::getExtension($file->relname),$allowed_medias)) continue; 
     299          $tmp_medias_combo[$file->media_title] = $file->file_url; 
     300     } 
     301     if (!empty($tmp_medias_combo)) { 
     302          $medias_combo = array_merge(array('-'=>''),$tmp_medias_combo); 
     303     } 
     304} 
     305catch (Exception $e) { 
     306     //$core->error->add($e->getMessage()); 
     307} 
     308 
     309$langs_combo = l10n::getISOcodes(true); 
     310$links_action_combo = array( 
     311     __('delete')             => 'delete_links', 
     312     __('change category')    => 'moveto_change_links_category', 
     313     __('change my rating')   => 'moveto_change_links_note' 
     314); 
     315$notes_combo = array(); 
     316for ($i=0;$i<21;$i++) { 
     317     $notes_combo[$i.'/20'] = $i; 
     318} 
     319 
     320$pager_base_url = $p_url. 
     321     '&amp;sortby='.$sortby. 
     322     '&amp;order='.$order. 
     323     '&amp;nb='.$nb_per_page. 
     324     '&amp;page=%s'; 
     325 
     326try { 
     327     $links = $C2->getLinks($params); 
     328     $links_counter = $C2->getLinks($params,true)->f(0); 
     329     $links_list = new adminListCinecturlink2($core,$links,$links_counter,$pager_base_url); 
     330} 
     331catch (Exception $e) { 
     332     $core->error->add($e->getMessage()); 
     333} 
     334 
     335# Page headers 
     336echo  
     337'<html><head>'. 
     338'<title>'.__('Cinecturlink 2').'</title>'. 
     339dcPage::jsToolBar(). 
     340dcPage::jsToolMan(). 
     341dcPage::jsLoad('js/_posts_list.js'). 
     342dcPage::jsLoad('index.php?pf=cinecturlink2/js/cinecturlink2.js'). 
     343dcPage::jsPageTabs(). 
     344"<script type=\"text/javascript\">  
     345//<![CDATA[\n". 
     346dcPage::jsVar('dotclear.msg.show_filters', $show_filters ? 'true':'false')."\n". 
     347dcPage::jsVar('dotclear.msg.filter_posts_list', __('Show filters and display options'))."\n". 
     348dcPage::jsVar('dotclear.msg.cancel_the_filter', __('Cancel filters and display options'))."\n". 
     349" 
     350\$(function(){if(!document.getElementById){return;}  
     351 \$('#newlinksearch').openGoogle('".$core->auth->getInfo('user_lang')."','#new_title');  
     352 \$('#newimagesearch').openAmazon('".$core->auth->getInfo('user_lang')."','#new_title');  
     353 \$('#newimageselect').fillLink('#new_image');  
     354}); 
     355//]]>\n". 
     356"</script>\n". 
     357'</head>'. 
     358'<body>'; 
     359 
     360# Change category for links 
     361if (!empty($_POST['links']) && $action == 'moveto_change_links_category') { 
     362 
     363     echo 
     364     dcPage::breadcrumb( 
     365          array( 
     366               html::escapeHTML($core->blog->name) => '', 
     367               __('Cinecturlink 2') => $p_url.'&amp;move=1#links', 
     368               __('Change category of links') => '' 
     369          ) 
     370     ). 
     371     dcPage::notices(); 
     372      
     373     echo ' 
     374     <p class="nav_prevnext"> 
     375     <a title="'.__('Go back to links list').'" href="'.$p_url.'&amp;move=1#links">«&nbsp;'.__('Back').'</a> 
     376     </p> 
     377 
     378     <div id="changecatlinks"> 
     379     <form method="post" action="'.$p_url.'#links"> 
     380     <p>'.__('Change category for this selection :').'</p>'; 
     381 
     382     foreach($_POST['links'] as $k => $link) { 
     383          echo 
     384          '<p><label class="classic" for="links'.$k.'">'. 
     385          form::checkbox(array('links[]', 'links'.$k), $link, 1).' '. 
     386          $C2->getLinks(array('link_id' => $link))->f('link_title'). 
     387          '</label></p>'; 
     388     } 
     389 
     390     echo ' 
     391     <p><label for="upd_category">'.__('Select a category:').' '. 
     392     form::combo('upd_category', $categories_combo, '', 'maximal').' 
     393     </label></p><p> 
     394     <input type="submit" name="updlinkcat" value="ok" />'. 
     395     form::hidden(array('action'), 'change_links_category'). 
     396     $core->formNonce().' 
     397     </p> 
     398     </form> 
     399     </div>'; 
     400} 
     401 
     402# Change note for links 
     403elseif (!empty($_POST['links']) && $action == 'moveto_change_links_note') 
     404{ 
     405     echo dcPage::breadcrumb( 
     406          array( 
     407               html::escapeHTML($core->blog->name) => '', 
     408               __('Cinecturlink 2') => $p_url.'&amp;move=1#links', 
     409               __('Change note of links') => '' 
     410          ) 
     411     ). 
     412     dcPage::notices(); 
     413 
     414     echo ' 
     415     <p class="nav_prevnext"> 
     416     <a title="'.__('Go back to links list').'" href="'.$p_url.'&amp;move=1#links">«&nbsp;'.__('Back').'</a> 
     417     </p> 
     418 
     419     <div id="changenotelinks"> 
     420     <form method="post" action="'.$p_url.'#links"> 
     421     <p>'.__('Change note for this selection :').'</p>'; 
     422 
     423     foreach($_POST['links'] as $k => $link) { 
     424          echo 
     425          '<p><label class="classic" for="links'.$k.'">'. 
     426          form::checkbox(array('links[]', 'links'.$k), $link, 1).' '. 
     427          $C2->getLinks(array('link_id'=>$link))->f('link_title'). 
     428          '</label></p>'; 
     429     } 
     430 
     431     echo ' 
     432     <p><label for="upd_note">'.__('Select a rating:').' '. 
     433     form::combo('upd_note',$notes_combo, 10, 'maximal').' 
     434     </label></p><p> 
     435     <input type="submit" name="updlinknote" value="ok" />'. 
     436     form::hidden(array('action'), 'change_links_note'). 
     437     $core->formNonce().' 
     438     </p> 
     439     </form> 
     440     </div>'; 
     441} 
     442 
     443# All other tabs 
     444else { 
     445 
     446     echo dcPage::breadcrumb( 
     447          array( 
     448               html::escapeHTML($core->blog->name) => '', 
     449               __('Cinecturlink 2') => '' 
     450          ) 
     451     ). 
     452     dcPage::notices(); 
     453 
     454     # List links 
     455     echo ' 
     456     <div class="multi-part" id="links" title="'.__('Links').'">'; 
     457 
     458     if ($links->isEmpty()) { 
     459          echo '<p>'.__('There is no link').'</p>'; 
     460     } 
     461     else { 
     462          echo ' 
     463          <form action="'.$p_url.'#links" method="get" id="filters-form"> 
     464          <h3 class="out-of-screen-if-js">'.__('Show filters and display options').'</h3> 
     465 
     466          <div class="table">'. 
     467 
     468          '<div class="cell">'. 
     469          '<p><label for="sortby" class="ib">'.__('Order by:').'</label> '. 
     470          form::combo('sortby',$sortby_combo,$sortby).'</p>'. 
     471          '</div><div class="cell">'. 
     472          '<p><label for="order" class="ib">'.__('Sort:').'</label> '. 
     473          form::combo('order',$order_combo,$order).'</p>'. 
     474          '</div><div class="cell">'. 
     475          '<p><span class="label ib">'.__('Show').'</span> <label for="nb" class="classic">'. 
     476          form::field('nb',3,3,$nb_per_page).' '. 
     477          __('entries per page').'</label></p>'. 
     478          '</div>'. 
     479          '</div>'. 
     480 
     481          '<p><input type="submit" value="'.__('Apply filters and display options').'" />'. 
     482          form::hidden(array('p'), 'cinecturlink2'). 
     483          '<br class="clear" /></p>'. //Opera sucks 
     484 
     485          '</form> 
     486 
     487          <form action="'.$p_url.'#links" method="post" id="form-actions">'; 
     488           
     489          $links_list->display($page,$nb_per_page,$pager_base_url); 
     490 
     491          echo ' 
     492          <div class="two-cols"> 
     493          <p class="col checkboxes-helpers"></p> 
     494          <p class="col right">'.__('Selected links action:').' '. 
     495          form::combo(array('action'),$links_action_combo).' 
     496          <input type="submit" value="'.__('ok').'" />'. 
     497          form::hidden(array('sortby'),$sortby). 
     498          form::hidden(array('order'),$order). 
     499          form::hidden(array('page'),$page). 
     500          form::hidden(array('nb'),$nb_per_page). 
     501          $core->formNonce().' 
     502          </p> 
     503          </div> 
     504          </form>'; 
     505     } 
     506     echo '     
     507     </div>'; 
     508 
     509     # Create/edit link 
     510     $title = __('New link'); 
     511 
     512     if (null !== $upd_link_id) { 
     513 
     514          $upd_rs = $C2->getLinks(array('link_id' => $upd_link_id)); 
     515          $upd_link_id = null; 
     516          if (!$upd_rs->isEmpty()) { 
     517               $new_title     = $upd_rs->link_title; 
     518               $new_desc      = $upd_rs->link_desc; 
     519               $new_author    = $upd_rs->link_author; 
     520               $new_url       = $upd_rs->link_url; 
     521               $new_category  = $upd_rs->cat_id; 
     522               $new_lang      = $upd_rs->link_lang; 
     523               $new_image     = $upd_rs->link_img; 
     524               $new_note      = $upd_rs->link_note; 
     525               $upd_link_id   = $upd_rs->link_id; 
     526               $title         = __('Edit link'); 
     527          } 
     528     } 
     529 
     530     echo ' 
     531     <div class="multi-part" id="newlink" title="'.$title.'"> 
     532     <form id="newlinkform" method="post" action="'.$p_url.'#newlink"> 
     533 
     534     <div class="two-cols clearfix"> 
     535     <div class="col70"> 
     536 
     537     <p><label for="new_title">'.__('Title:').' '. 
     538     form::field('new_title', 60, 255, $new_title, 'maximal'). 
     539     '</label></p> 
     540 
     541     <p><label for="new_desc">'.__('Description:').' '. 
     542     form::field('new_desc', 60, 255, $new_desc, 'maximal'). 
     543     '</label></p> 
     544 
     545     <p><label for="new_author">'.__('Author:').' '. 
     546     form::field('new_author', 60, 255, $new_author, 'maximal'). 
     547     '</label></p> 
     548 
     549     <p><label for="new_url">'.__('Details URL:').' '. 
     550     form::field('new_url', 60, 255, $new_url, 'maximal').'</label>'. 
     551     '<a class="modal" href="http://google.com" id="newlinksearch">'. 
     552     __('Search with Google').'</a>'. 
     553     '</p> 
     554 
     555     <p><label for="new_image">'.__('Image URL:').' '. 
     556     form::field('new_image', 60, 255, $new_image, 'maximal').'</label>'. 
     557     '<a class="modal" href="http://amazon.com" id="newimagesearch">'. 
     558     __('Search with Amazon').'</a>'. 
     559     '</p>'; 
     560 
     561     if (empty($medias_combo)) { 
     562          echo 
     563          '<p class="form-note">'.__('There is no image in cinecturlink media path.').'</p>'; 
     564     } 
     565     else { 
     566          echo ' 
     567          <p><label for="newimageselect">'.__('or select from repository:').' '. 
     568          form::combo('newimageselect', $medias_combo, '', 'maximal'). 
     569          '</label></p>'. 
     570          '<p class="form-note">'.__('Go to media manager to add image to cinecturlink path.').'</p>'; 
     571     } 
     572 
     573     echo ' 
     574 
     575     </div> 
     576     <div class="col30"> 
     577 
     578     <p><label for="new_category">'.__('Category:').' '. 
     579     form::combo('new_category', $categories_combo, $new_category, 'maximal'). 
     580     '</label></p> 
     581 
     582     <p><label for="new_lang">'.__('Lang:').' '. 
     583     form::combo('new_lang', $langs_combo, $new_lang, 'maximal'). 
     584     '</label></p> 
     585 
     586     <p><label for="new_note">'.__('My rating:').' '. 
     587     form::combo('new_note', $notes_combo, $new_note, 'maximal'). 
     588     '</label></p> 
     589 
     590     </div></div> 
     591 
     592     <p>'. 
     593     form::hidden(array('link_id'),$upd_link_id). 
     594     form::hidden(array('action'),'create_link'). 
     595     $core->formNonce().' 
     596     <input type="submit" name="newlink" value="'.($upd_link_id ? __('update link') : __('create link')).'" /> 
     597     </p> 
     598     </form> 
     599     </div>'; 
     600 
     601     # List categories 
     602     echo '<div class="multi-part" id="cats" title="'.__('Categories').'">'; 
     603 
     604     if ($categories->isEmpty()) { 
     605          echo '<p>'.__('There is no category').'</p>'; 
     606     } 
     607     else { 
     608          echo ' 
     609          <form method="post" action="'.$p_url.'#cats"> 
     610          <table class="maximal dragable"> 
     611          <thead><tr><th colspan="2">#</th><th>'.__('name').'</th><th>'.__('description').'</th></tr></thead> 
     612          <tbody id="links-list-cat">'; 
     613 
     614          $i = 0; 
     615          while($categories->fetch()) { 
     616               $i++; 
     617               $id = $categories->cat_id; 
     618               $title = html::escapeHTML($categories->cat_title); 
     619               $desc = html::escapeHTML($categories->cat_desc); 
     620 
     621               echo ' 
     622               <tr class="line" id="l_'.$id.'"> 
     623               <td class="minimal handle">'.form::field(array('catpos['.$id.']'),2,5,$i).'</td> 
     624               <td class="minimal">'.form::checkbox(array('delcat[]'),$id).'</td> 
     625               <td class="nowrap">'.$title.'</td> 
     626               <td class="maximal">'.$desc.'</td> 
     627               </tr>'; 
     628          } 
     629 
     630          echo ' 
     631          </tbody> 
     632          </table> 
     633          <p class="form-note">'.__('Check to delete').'</p> 
     634          <p>'. 
     635          form::hidden('cats_order', ''). 
     636          form::hidden(array('action'), 'update_categories'). 
     637          $core->formNonce().' 
     638          <input type="submit" name="updcats" value="'.__('update categories').'" /> 
     639          </p> 
     640          </form>'; 
     641     } 
     642 
     643     echo ' 
     644     </div>'; 
     645 
     646     # Create category 
     647     echo ' 
     648     <div class="multi-part" id="newcat" title="'.__('New category').'"> 
     649     <form method="post" action="'.$p_url.'#newcat"> 
     650 
     651     <p><label for="new_cattitle">'.__('Title:').' '. 
     652     form::field('new_cattitle', 60, 64, $new_cattitle, 'maximal'). 
     653     '</label></p> 
     654 
     655     <p><label for="new_catdesc">'.__('Description:').' '. 
     656     form::field('new_catdesc', 60, 64, $new_catdesc, 'maximal'). 
     657     '</label></p> 
     658 
     659     <p>'. 
     660     form::hidden(array('action'), 'create_category'). 
     661     $core->formNonce().' 
     662     <input type="submit" name="newcat" value="'.__('save').'" /> 
     663     </p> 
     664     </form> 
     665     </div>'; 
     666} 
     667 
     668dcPage::helpBlock('cinecturlink2'); 
     669 
     670# Page footer 
     671echo  
     672'<hr class="clear"/><p class="right modules"> 
     673<a class="module-config" '. 
     674'href="plugins.php?module=cinecturlink2&amp;conf=1&amp;redir='. 
     675urlencode('plugin.php?p=cinecturlink2').'">'.__('Configuration').'</a> -  
     676cinecturlink2 - '.$core->plugins->moduleInfo('cinecturlink2', 'version').'&nbsp; 
    41677<img alt="'.__('cinecturlink2').'" src="index.php?pf=cinecturlink2/icon.png" /> 
    42 </p>'; 
    43  
    44 # Errors messages 
    45 $messages_errors = array( 
    46      'save_setting' => __('Failed to update settings: %s'), 
    47      'update_categories' => __('Failed to update categories: %s'), 
    48      'order_categories' => __('Failed to reorder categories: %s'), 
    49      'delete_categories' => __('Failed to delete categories: %s'), 
    50      'delete_links' => __('Failed to delete links: %s'), 
    51      'change_links_category' => __('Failed to change links category: %s'), 
    52      'change_links_note' => __('Failed to change links note: %s'), 
    53      'create_link' => __('Failed to create link: %s'), 
    54      'update_link' => __('Failed to update link: %s') 
    55 ); 
    56  
    57 # Pages 
    58 if (!file_exists(dirname(__FILE__).'/inc/index.'.$default_part.'.php')) 
    59 { 
    60      $default_part = $start_part; 
    61 } 
    62 define('DC_CONTEXT_CINECTURLINK',$default_part); 
    63 include dirname(__FILE__).'/inc/index.'.$default_part.'.php'; 
    64 ?> 
     678</p> 
     679</body></html>'; 
  • plugins/cinecturlink2/js/cinecturlink2.js

    r2023 r3247  
    4444     } 
    4545})(jQuery); 
     46 
     47var dragsort = ToolMan.dragsort(); 
     48$(function(){ 
     49 dragsort.makeTableSortable($('#links-list-cat').get(0), 
     50 dotclear.sortable.setHandle,dotclear.sortable.saveOrder); 
     51}); 
     52dotclear.sortable = { 
     53  setHandle: function(item) { 
     54     var handle = $(item).find('td.handle').get(0); 
     55     while (handle.firstChild) { 
     56          handle.removeChild(handle.firstChild); 
     57     } 
     58     item.toolManDragGroup.setHandle(handle); 
     59     handle.className = handle.className+' handler'; 
     60  }, 
     61  saveOrder: function(item) { 
     62     var group = item.toolManDragGroup; 
     63     var order = document.getElementById('cats_order'); 
     64     group.register('dragend', function() { 
     65          order.value = ''; 
     66          items = item.parentNode.getElementsByTagName('tr'); 
     67          for (var i=0; i<items.length; i++) { 
     68               order.value += items[i].id.substr(2)+','; 
     69          } 
     70     }); 
     71  } 
     72}; 
     73$(function() { 
     74      
     75     $filtersform = $('#filters-form'); 
     76     $filtersform.before('<p><a id="filter-control" class="form-control" href="plugin.php?p=cinecturlink2" style="display:inline">'+dotclear.msg.filter_posts_list+'</a></p>') 
     77      
     78     if( dotclear.msg.show_filters == 'false' ) { 
     79          $filtersform.hide(); 
     80     } else { 
     81          $('#filter-control') 
     82               .addClass('open') 
     83               .text(dotclear.msg.cancel_the_filter); 
     84     } 
     85      
     86     $('#filter-control').click(function() { 
     87          if( $(this).hasClass('open') ) { 
     88               if( dotclear.msg.show_filters == 'true' ) { 
     89                    return true; 
     90               } else { 
     91                    $filtersform.hide(); 
     92                    $(this).removeClass('open') 
     93                            .text(dotclear.msg.filter_posts_list); 
     94               } 
     95          } else { 
     96               $filtersform.show(); 
     97               $(this).addClass('open') 
     98                       .text(dotclear.msg.cancel_the_filter); 
     99          } 
     100          return false; 
     101     }); 
     102}); 
  • plugins/cinecturlink2/locales/fr/main.lang.php

    r2357 r3247  
    11<?php 
    22// Language: Français  
    3 // Module: cinecturlink2 - 0.6.1 
    4 // Date: 2010-06-13 13:05:48  
    5 // Translated with dcTranslater - 1.4  
    6  
    7 #_public.php:229 
    8 #_widgets.php:47 
    9 #_widgets.php:50 
     3// Module: cinecturlink2 - 0.7 
     4// Date: 2013-11-04 19:43:17  
     5// Translated with dcTranslater - 2013.05.11  
     6 
     7#_admin.php:24 
     8#_admin.php:44 
     9#_public.php:195 
     10#_widgets.php:58 
     11#_widgets.php:66 
    1012$GLOBALS['__l10n']['My cinecturlink'] = 'Mes cinecturlink'; 
    1113 
    12 #_widgets.php:35 
     14#_config.php:55 
     15$GLOBALS['__l10n']['You must provide a specific folder for images.'] = 'Vous devez fournir un dossier spécifique pour les images.'; 
     16 
     17#_config.php:73 
     18$GLOBALS['__l10n']['Configuration has been successfully updated.'] = 'La configuration a été mise à jour avec succés.'; 
     19 
     20#_config.php:93 
     21$GLOBALS['__l10n']['Enable extension'] = 'Activer l\'extension'; 
     22 
     23#_config.php:95 
     24$GLOBALS['__l10n']['Maximum width of images (in pixel):'] = 'Largeur maximum des images (en pixels) :'; 
     25 
     26#_config.php:98 
     27$GLOBALS['__l10n']['Public folder of images (under public folder of blog):'] = 'Dossier publique des images (dans le répertoire "public" du blog) :'; 
     28 
     29#_config.php:108 
     30$GLOBALS['__l10n']['Update cache when use "Random" or "Number of view" order on widget (Need reload of widgets on change)'] = 'Mettre à jour le cache lors de l\'utilisation de l\'ordre  "Aléatoire" ou "Nombre d\'affichages" dans le widget (Nécessite le rechargement du widget)'; 
     31 
     32#_config.php:109 
     33$GLOBALS['__l10n']['This increases the random effect, but updates the cache of the blog whenever the widget is displayed, which reduces the perfomances of your blog.'] = 'Ceci augmente l\'effet aléatoire, mais met à jour le cache à chaque affichage du widget, ce qui diminue les performances du blog.'; 
     34 
     35#_config.php:114 
     36$GLOBALS['__l10n']['Public page'] = 'Page publique'; 
     37 
     38#_config.php:118 
     39$GLOBALS['__l10n']['Enable public page'] = 'Activer la page publique'; 
     40 
     41#_config.php:119 
     42$GLOBALS['__l10n']['Public page has url: %s'] = 'La page publique à l\'URL: %s'; 
     43 
     44#_config.php:121 
     45$GLOBALS['__l10n']['Title of the public page:'] = 'Titre de la page publique :'; 
     46 
     47#_config.php:124 
     48$GLOBALS['__l10n']['Description of the public page:'] = 'Description de la page publique :'; 
     49 
     50#_config.php:127 
     51$GLOBALS['__l10n']['Limit number of entries per page on pulic page to:'] = 'Limiter le nombre d\'entrée par page sur la page public à :'; 
     52 
     53#_config.php:133 
     54$GLOBALS['__l10n']['Informations'] = 'Informations'; 
     55 
     56#_config.php:136 
     57$GLOBALS['__l10n']['Once the extension has been configured and your links have been created, you can place one of the cinecturlink widgets in the sidebar.'] = 'Une fois l\'extension configurée et vos liens créés, vous pouvez placer un des widgets cinecturlink dans la barre latérale.'; 
     58 
     59#_config.php:137 
     60$GLOBALS['__l10n']['In order to open links in new window you can use plugin %s.'] = 'Afin d\'ouvrir les liens dans une nouvelle page vous pouvez utiliser l\'extension %s.'; 
     61 
     62#_config.php:138 
     63$GLOBALS['__l10n']['In order to change URL of public page you can use plugin %s.'] = 'Afin de changer l\'URL de la page publique vous pouvez utiliser l\'extension %s.'; 
     64 
     65#_config.php:139 
     66$GLOBALS['__l10n']['You can add public pages of cinecturlink to the plugin %s.'] = 'Vous pouvez ajouter les pages publiques de cinecturlink à l\'extension %s.'; 
     67 
     68#_config.php:140 
     69#_config.php:141 
     70$GLOBALS['__l10n']['The plugin Cinecturlink2 is compatible with plugin %s.'] = 'L\'extension Cinecturlink2 est compatible avec l\'extension %s.'; 
     71 
     72#_widgets.php:45 
    1373$GLOBALS['__l10n']['Update date'] = 'Date de mise à jour'; 
    1474 
    15 #_widgets.php:36 
    16 #inc/index.main.php:246 
    17 #inc/lib.cinecturlink2.list.php:38 
     75#_widgets.php:46 
     76#inc/lib.cinecturlink2.list.php:41 
     77#index.php:261 
    1878$GLOBALS['__l10n']['My rating'] = 'Mon évaluation'; 
    1979 
    20 #_widgets.php:38 
     80#_widgets.php:48 
    2181$GLOBALS['__l10n']['Random'] = 'Aléatoire'; 
    2282 
    23 #_widgets.php:39 
     83#_widgets.php:49 
    2484$GLOBALS['__l10n']['Number of views'] = 'Nombre d\'affichages'; 
    2585 
    26 #_widgets.php:59 
     86#_widgets.php:61 
     87$GLOBALS['__l10n']['Show selection of cinecturlinks'] = 'Afficher une selection de cinecturlink'; 
     88 
     89#_widgets.php:85 
    2790$GLOBALS['__l10n']['Sort: (only for date, note and title)'] = 'Ordre: (seulement pour date, note et titre)'; 
    2891 
    29 #_widgets.php:62 
     92#_widgets.php:92 
    3093$GLOBALS['__l10n']['Limit:'] = 'Limite :'; 
    3194 
    32 #_widgets.php:65 
     95#_widgets.php:98 
    3396$GLOBALS['__l10n']['Enable link'] = 'Autoriser les liens'; 
    3497 
    35 #_widgets.php:68 
     98#_widgets.php:104 
    3699$GLOBALS['__l10n']['Show author'] = 'Afficher l\'auteur'; 
    37100 
    38 #_widgets.php:71 
     101#_widgets.php:110 
    39102$GLOBALS['__l10n']['Show my rating'] = 'Afficher mon évaluation'; 
    40103 
    41 #_widgets.php:74 
     104#_widgets.php:116 
    42105$GLOBALS['__l10n']['Show description'] = 'Afficher la description'; 
    43106 
    44 #_widgets.php:77 
     107#_widgets.php:122 
    45108$GLOBALS['__l10n']['Show a link to cinecturlink page'] = 'Afficher un lien vers la page publique'; 
    46109 
    47 #_widgets.php:87 
     110#_widgets.php:143 
     111#_widgets.php:146 
    48112$GLOBALS['__l10n']['List of categories of cinecturlink'] = 'Liste des catégories de cinecturlink'; 
    49113 
    50 #_widgets.php:90 
     114#_widgets.php:151 
    51115$GLOBALS['__l10n']['My cinecturlink by categories'] = 'Mes cinecturlink par catégories'; 
    52116 
    53 #_widgets.php:93 
     117#_widgets.php:156 
    54118$GLOBALS['__l10n']['Show number of links'] = 'Afficher le nombre de liens'; 
    55119 
    56 #_widgets.php:214 
    57 #_widgets.php:237 
     120#_widgets.php:290 
     121#_widgets.php:321 
    58122#default-templates/cinecturlink2.html:56 
    59123#default-templates/cinecturlink2.html:56 
    60124$GLOBALS['__l10n']['view all links'] = 'voir tous les liens'; 
    61125 
    62 #_widgets.php:214 
     126#_widgets.php:290 
    63127$GLOBALS['__l10n']['More links'] = 'Plus de liens'; 
    64128 
    65 #_widgets.php:237 
     129#_widgets.php:321 
    66130$GLOBALS['__l10n']['all links'] = 'tous les liens'; 
    67131 
    68 #_widgets.php:250 
     132#_widgets.php:332 
    69133$GLOBALS['__l10n']['view links of this category'] = 'voir les liens de cette catégorie'; 
    70134 
     
    90154$GLOBALS['__l10n']['category'] = 'catégorie'; 
    91155 
    92 #inc/class.cinecturlink2.php:134 
     156#inc/class.cinecturlink2.php:139 
    93157$GLOBALS['__l10n']['No link title'] = 'Pas de titre de lien'; 
    94158 
    95 #inc/class.cinecturlink2.php:137 
     159#inc/class.cinecturlink2.php:142 
    96160$GLOBALS['__l10n']['No link description'] = 'Pas de description de lien'; 
    97161 
    98 #inc/class.cinecturlink2.php:174 
    99 #inc/class.cinecturlink2.php:193 
     162#inc/class.cinecturlink2.php:178 
     163#inc/class.cinecturlink2.php:197 
    100164$GLOBALS['__l10n']['No such link ID'] = 'ID de lien inconnu'; 
    101165 
    102 #inc/class.cinecturlink2.php:282 
     166#inc/class.cinecturlink2.php:284 
    103167$GLOBALS['__l10n']['No category title'] = 'Pas de titre de catégorie'; 
    104168 
    105 #inc/class.cinecturlink2.php:285 
     169#inc/class.cinecturlink2.php:287 
    106170$GLOBALS['__l10n']['No category description'] = 'Pas de description de catégorie'; 
    107171 
    108 #inc/class.cinecturlink2.php:310 
    109 #inc/class.cinecturlink2.php:324 
     172#inc/class.cinecturlink2.php:312 
     173#inc/class.cinecturlink2.php:326 
    110174$GLOBALS['__l10n']['No such category ID'] = 'ID de catégorie inconnu'; 
    111175 
    112 #inc/class.cinecturlink2.php:370 
     176#inc/class.cinecturlink2.php:369 
    113177$GLOBALS['__l10n']['Failed to create public folder for images.'] = 'Impossible de créer le repertoire publique pour les images.'; 
    114178 
    115 #inc/index.main.php:88 
    116 #inc/index.main.php:180 
     179#inc/lib.cinecturlink2.activityreport.php:21 
     180$GLOBALS['__l10n']['Plugin cinecturlink2'] = 'Extension cinecturlink 2'; 
     181 
     182#inc/lib.cinecturlink2.activityreport.php:27 
     183$GLOBALS['__l10n']['link creation'] = 'Création de lien'; 
     184 
     185#inc/lib.cinecturlink2.activityreport.php:28 
     186$GLOBALS['__l10n']['A new cineturlink named "%s" was added by "%s"'] = 'Un nouveau cinecturlink nommé "%s" a été ajouté par "%s"'; 
     187 
     188#inc/lib.cinecturlink2.activityreport.php:36 
     189$GLOBALS['__l10n']['updating link'] = 'Mise à jour de lien'; 
     190 
     191#inc/lib.cinecturlink2.activityreport.php:37 
     192$GLOBALS['__l10n']['Cinecturlink named "%s" has been updated by "%s"'] = 'Le cinecturlink nommé "%s" a été mis à jour par "%s"'; 
     193 
     194#inc/lib.cinecturlink2.activityreport.php:45 
     195$GLOBALS['__l10n']['link deletion'] = 'Suppression de lien'; 
     196 
     197#inc/lib.cinecturlink2.activityreport.php:46 
     198$GLOBALS['__l10n']['Cinecturlink named "%s" has been deleted by "%s"'] = 'Le cinecturlink nommé "%s" a été effacé par "%s"'; 
     199 
     200#inc/lib.cinecturlink2.list.php:25 
     201#index.php:459 
     202$GLOBALS['__l10n']['There is no link'] = 'Il n\'y a pas de lien'; 
     203 
     204#inc/lib.cinecturlink2.list.php:89 
     205$GLOBALS['__l10n']['image'] = 'image'; 
     206 
     207#index.php:73 
     208$GLOBALS['__l10n']['Categories successfully reordered.'] = 'Catégories réordonnées.'; 
     209 
     210#index.php:85 
     211$GLOBALS['__l10n']['Categories successfully deleted.'] = 'Catégories effacées.'; 
     212 
     213#index.php:98 
     214#index.php:188 
    117215$GLOBALS['__l10n']['You must provide a title.'] = 'Vous devez fournir un titre.'; 
    118216 
    119 #inc/index.main.php:93 
     217#index.php:103 
    120218$GLOBALS['__l10n']['Category with same name already exists.'] = 'Une catégorie portant le même nom existe déjà.'; 
    121219 
    122 #inc/index.main.php:184 
     220#index.php:113 
     221$GLOBALS['__l10n']['Category successfully created.'] = 'Catégory créée.'; 
     222 
     223#index.php:128 
     224$GLOBALS['__l10n']['Links successfully deleted.'] = 'Liens effacés.'; 
     225 
     226#index.php:150 
     227#index.php:172 
     228$GLOBALS['__l10n']['Links successfully updated.'] = 'Liens mis à jour.'; 
     229 
     230#index.php:191 
    123231$GLOBALS['__l10n']['You must provide an author.'] = 'Vous devez spécifier un auteur'; 
    124232 
    125 #inc/index.main.php:188 
     233#index.php:194 
    126234$GLOBALS['__l10n']['You must provide a link to an image.'] = 'Vous devez fournir un lien vers une image.'; 
    127235 
    128 #inc/index.main.php:207 
     236#index.php:212 
    129237$GLOBALS['__l10n']['Link with same name already exists.'] = 'Un lien avec le même titre existe déjà.'; 
    130238 
    131 #inc/index.main.php:218 
    132 $GLOBALS['__l10n']['Unknown link.'] = 'Lien inconnu'; 
    133  
    134 #inc/index.main.php:294 
     239#index.php:218 
     240$GLOBALS['__l10n']['Link successfully created.'] = 'Lien crée.'; 
     241 
     242#index.php:227 
     243$GLOBALS['__l10n']['Unknown link.'] = 'Lien inconnu.'; 
     244 
     245#index.php:233 
     246$GLOBALS['__l10n']['Link successfully updated.'] = 'Lien mis à jour.'; 
     247 
     248#index.php:312 
     249$GLOBALS['__l10n']['change category'] = 'lodifier la catégorie'; 
     250 
     251#index.php:313 
    135252$GLOBALS['__l10n']['change my rating'] = 'Modifier mon évaluation'; 
    136253 
    137 #inc/index.main.php:373 
    138 $GLOBALS['__l10n']['Category successfully created'] = 'Catégorie mise à jour avec succès'; 
    139  
    140 #inc/index.main.php:377 
    141 $GLOBALS['__l10n']['Categories successfully deleted'] = 'Catégories supprimées avec succès'; 
    142  
    143 #inc/index.main.php:381 
    144 $GLOBALS['__l10n']['Categories successfully reordered'] = 'Catégories réordonnées avec succès'; 
    145  
    146 #inc/index.main.php:385 
     254#index.php:368 
     255$GLOBALS['__l10n']['Change category of links'] = 'Changer la catégorie des liens'; 
     256 
     257#index.php:375 
     258#index.php:416 
     259$GLOBALS['__l10n']['Go back to links list'] = 'Retourner à la liste des liens'; 
     260 
     261#index.php:380 
     262$GLOBALS['__l10n']['Change category for this selection :'] = 'Changer de catégorie pour la sélection :'; 
     263 
     264#index.php:391 
     265$GLOBALS['__l10n']['Select a category:'] = 'Selectionner une catégorie :'; 
     266 
     267#index.php:409 
     268$GLOBALS['__l10n']['Change note of links'] = 'Changer la note des liens'; 
     269 
     270#index.php:421 
     271$GLOBALS['__l10n']['Change note for this selection :'] = 'Changer de note pour la sélection :'; 
     272 
     273#index.php:432 
     274$GLOBALS['__l10n']['Select a rating:'] = 'Selectionner une note :'; 
     275 
     276#index.php:494 
     277$GLOBALS['__l10n']['Selected links action:'] = 'Action sur les liens selectionnés :'; 
     278 
     279#index.php:510 
     280$GLOBALS['__l10n']['New link'] = 'Nouveau lien'; 
     281 
     282#index.php:549 
     283$GLOBALS['__l10n']['Details URL:'] = 'Liens vers les détails :'; 
     284 
     285#index.php:552 
     286$GLOBALS['__l10n']['Search with Google'] = 'Rechercher avec Google'; 
     287 
     288#index.php:555 
     289$GLOBALS['__l10n']['Image URL:'] = 'Lien vers l\'image :'; 
     290 
     291#index.php:558 
     292$GLOBALS['__l10n']['Search with Amazon'] = 'Rechercher avec Amazon'; 
     293 
     294#index.php:563 
     295$GLOBALS['__l10n']['There is no image in cinecturlink media path.'] = 'Il n\'y a pas d\'image dans le chemin des média cinecturlink.'; 
     296 
     297#index.php:567 
     298$GLOBALS['__l10n']['or select from repository:'] = 'ou selectionner depuis le dépôt :'; 
     299 
     300#index.php:570 
     301$GLOBALS['__l10n']['Go to media manager to add image to cinecturlink path.'] = 'Aller dans le gestionnaire de média pour ajouter des images au chemin des cinecturlink.'; 
     302 
     303#index.php:586 
     304$GLOBALS['__l10n']['My rating:'] = 'Mon évaluation :'; 
     305 
     306#index.php:596 
     307$GLOBALS['__l10n']['update link'] = 'mettre à jour ce lien'; 
     308 
     309#index.php:596 
     310$GLOBALS['__l10n']['create link'] = 'créer ce lien'; 
     311 
     312#index.php:605 
    147313$GLOBALS['__l10n']['There is no category'] = 'Il n\'y a pas de catégorie'; 
    148314 
    149 #inc/index.main.php:392 
     315#index.php:611 
    150316$GLOBALS['__l10n']['name'] = 'nom'; 
    151317 
    152 #inc/index.main.php:392 
     318#index.php:611 
    153319$GLOBALS['__l10n']['description'] = 'description'; 
    154320 
    155 #inc/index.main.php:413 
     321#index.php:633 
    156322$GLOBALS['__l10n']['Check to delete'] = 'Cocher pour supprimer'; 
    157323 
    158 #inc/index.main.php:421 
     324#index.php:638 
    159325$GLOBALS['__l10n']['update categories'] = 'mettre à jour les catégories'; 
    160326 
    161 #inc/index.main.php:453 
    162 $GLOBALS['__l10n']['Link successfully created'] = 'Lien créé avec succès'; 
    163  
    164 #inc/index.main.php:457 
    165 $GLOBALS['__l10n']['Links successfully deleted'] = 'Liens supprimés avec succès'; 
    166  
    167 #inc/index.main.php:461 
    168 $GLOBALS['__l10n']['Links successfully updated'] = 'Liens mis à jour avec succès'; 
    169  
    170 #inc/index.main.php:465 
    171 #inc/lib.cinecturlink2.list.php:21 
    172 $GLOBALS['__l10n']['There is no link'] = 'Il n\'y a pas de lien'; 
    173  
    174 #inc/index.main.php:507 
    175 $GLOBALS['__l10n']['Selected links action:'] = 'Action sur les liens selectionnés :'; 
    176  
    177 #inc/index.main.php:529 
    178 #inc/index.main.php:560 
    179 $GLOBALS['__l10n']['Edit links'] = 'Modifier les liens'; 
    180  
    181 #inc/index.main.php:531 
    182 $GLOBALS['__l10n']['This changes category for all selected links.'] = 'Ceci change la catégorie des liens selectionnés.'; 
    183  
    184 #inc/index.main.php:543 
    185 $GLOBALS['__l10n']['Select a category:'] = 'Selectionner une catégorie :'; 
    186  
    187 #inc/index.main.php:562 
    188 $GLOBALS['__l10n']['This changes my rating for all selected links.'] = 'Ceci change mon évaluation des liens selectionnés.'; 
    189  
    190 #inc/index.main.php:574 
    191 $GLOBALS['__l10n']['Select a rating:'] = 'Selectionner une note :'; 
    192  
    193 #inc/index.main.php:588 
    194 $GLOBALS['__l10n']['New link'] = 'Nouveau lien'; 
    195  
    196 #inc/index.main.php:616 
    197 $GLOBALS['__l10n']['Search with Google'] = 'Rechercher avec Google'; 
    198  
    199 #inc/index.main.php:619 
    200 $GLOBALS['__l10n']['Image URL:'] = 'Lien vers l\'image :'; 
    201  
    202 #inc/index.main.php:619 
    203 $GLOBALS['__l10n']['Search with Amazon'] = 'Rechercher avec Amazon'; 
    204  
    205 #inc/index.main.php:620 
    206 $GLOBALS['__l10n']['or select from repository:'] = 'ou selectionner depuis le dépôt :'; 
    207  
    208 #inc/index.main.php:621 
    209 $GLOBALS['__l10n']['My rating:'] = 'Mon évaluation :'; 
    210  
    211 #inc/index.main.php:631 
    212 $GLOBALS['__l10n']['update link'] = 'mettre à jour ce lien'; 
    213  
    214 #inc/index.main.php:631 
    215 $GLOBALS['__l10n']['create link'] = 'créer ce lien'; 
    216  
    217 #inc/index.setting.php:44 
    218 $GLOBALS['__l10n']['You must provide a specific folder for images.'] = 'Vous devez fournir un dossier spécifique pour les images.'; 
    219  
    220 #inc/index.setting.php:70 
    221 #inc/index.setting.php:77 
    222 #index.php:39 
    223 $GLOBALS['__l10n']['Settings'] = 'Paramètres'; 
    224  
    225 #inc/index.setting.php:73 
    226 $GLOBALS['__l10n']['Please wait'] = 'Veuillez patienter'; 
    227  
    228 #inc/index.setting.php:91 
    229 $GLOBALS['__l10n']['Enable plugin'] = 'Activer l\'extension'; 
    230  
    231 #inc/index.setting.php:92 
    232 $GLOBALS['__l10n']['Maximum width of images (in pixel):'] = 'Largeur maximum des images (en pixels) :'; 
    233  
    234 #inc/index.setting.php:94 
    235 $GLOBALS['__l10n']['Public folder of images (under public folder of blog):'] = 'Dossier publique des images (dans le répertoire "public" du blog) :'; 
    236  
    237 #inc/index.setting.php:101 
    238 $GLOBALS['__l10n']['Update cache when use "Random" or "Number of view" order on widget (Need reload of widgets on change)'] = 'Mettre à jour le cache lors de l\'utilisation de l\'ordre  "Aléatoire" ou "Nombre d\'affichages" dans le widget (Nécessite le rechargement du widget)'; 
    239  
    240 #inc/index.setting.php:102 
    241 $GLOBALS['__l10n']['This increases the random effect, but updates the cache of the blog whenever the widget is displayed, which reduces the perfomances of your blog.'] = 'Ceci augmente l\'effet aléatoire, mais met à jour le cache à chaque affichage du widget, ce qui diminue les performances du blog.'; 
    242  
    243 #inc/index.setting.php:105 
    244 $GLOBALS['__l10n']['Public page'] = 'Page publique'; 
    245  
    246 #inc/index.setting.php:108 
    247 $GLOBALS['__l10n']['Enable public page'] = 'Activer la page publique'; 
    248  
    249 #inc/index.setting.php:109 
    250 $GLOBALS['__l10n']['Public page has url: %s'] = 'La page publique à l\'URL: %s'; 
    251  
    252 #inc/index.setting.php:110 
    253 $GLOBALS['__l10n']['Title of the public page:'] = 'Titre de la page publique :'; 
    254  
    255 #inc/index.setting.php:112 
    256 $GLOBALS['__l10n']['Description of the public page:'] = 'Description de la page publique :'; 
    257  
    258 #inc/index.setting.php:114 
    259 $GLOBALS['__l10n']['Limit to %s entries per page on pulic page.'] = 'Limiter à %s liens par page sur la page publique.'; 
    260  
    261 #inc/index.setting.php:119 
    262 $GLOBALS['__l10n']['Once the extension has been configured and your links have been created, you can place one of the cinecturlink widgets in the sidebar.'] = 'Une fois l\'extension configurée et vos liens créés, vous pouvez placer un des widgets cinecturlink dans la barre latérale.'; 
    263  
    264 #inc/index.setting.php:120 
    265 $GLOBALS['__l10n']['In order to open links in new window you can use plugin %s.'] = 'Afin d\'ouvrir les liens dans une nouvelle page vous pouvez utiliser l\'extension %s.'; 
    266  
    267 #inc/index.setting.php:121 
    268 $GLOBALS['__l10n']['In order to change URL of public page you can use plugin %s.'] = 'Afin de changer l\'URL de la page publique vous pouvez utiliser l\'extension %s.'; 
    269  
    270 #inc/index.setting.php:122 
    271 $GLOBALS['__l10n']['You can add public pages of cinecturlink to the plugin %s.'] = 'Vous pouvez ajouter les pages publiques de cinecturlink à l\'extension %s.'; 
    272  
    273 #inc/index.setting.php:123 
    274 #inc/index.setting.php:124 
    275 $GLOBALS['__l10n']['The plugin Cinecturlink2 is compatible with plugin %s.'] = 'L\'extension Cinecturlink2 est compatible avec l\'extension %s.'; 
    276  
    277 #inc/lib.cinecturlink2.activityreport.php:16 
    278 $GLOBALS['__l10n']['Plugin cinecturlink2'] = 'Extension cinecturlink 2'; 
    279  
    280 #inc/lib.cinecturlink2.activityreport.php:22 
    281 $GLOBALS['__l10n']['link creation'] = 'Création de lien'; 
    282  
    283 #inc/lib.cinecturlink2.activityreport.php:23 
    284 $GLOBALS['__l10n']['A new cineturlink named "%s" was added by "%s"'] = 'Un nouveau cinecturlink nommé "%s" a été ajouté par "%s"'; 
    285  
    286 #inc/lib.cinecturlink2.activityreport.php:31 
    287 $GLOBALS['__l10n']['updating link'] = 'Mise à jour de lien'; 
    288  
    289 #inc/lib.cinecturlink2.activityreport.php:32 
    290 $GLOBALS['__l10n']['Cinecturlink named "%s" has been updated by "%s"'] = 'Le cinecturlink nommé "%s" a été mis à jour par "%s"'; 
    291  
    292 #inc/lib.cinecturlink2.activityreport.php:40 
    293 $GLOBALS['__l10n']['link deletion'] = 'Suppression de lien'; 
    294  
    295 #inc/lib.cinecturlink2.activityreport.php:41 
    296 $GLOBALS['__l10n']['Cinecturlink named "%s" has been deleted by "%s"'] = 'Le cinecturlink nommé "%s" a été effacé par "%s"'; 
    297  
    298 #inc/lib.cinecturlink2.list.php:85 
    299 $GLOBALS['__l10n']['image'] = 'image'; 
    300  
    301 #inc/lib.cinecturlink2.list.php:97 
    302 #inc/lib.cinecturlink2.list.php:97 
    303 $GLOBALS['__l10n']['Edit'] = 'Modifier'; 
    304  
    305327?> 
  • plugins/cinecturlink2/locales/fr/main.po

    r2357 r3247  
    11# Language: Français 
    2 # Module: cinecturlink2 - 0.6.1 
    3 # Date: 2010-06-13 13:05:49 
    4 # Translated with translater 1.4 
     2# Module: cinecturlink2 - 0.7 
     3# Date: 2013-11-04 19:43:18 
     4# Translated with translater 2013.05.11 
    55 
    66msgid "" 
    77msgstr "" 
    88"Content-Type: text/plain; charset=UTF-8\n" 
    9 "Project-Id-Version: cinecturlink2 0.6.1\n" 
     9"Project-Id-Version: cinecturlink2 0.7\n" 
    1010"POT-Creation-Date: \n" 
    11 "PO-Revision-Date: 2010-06-13T13:05:49+00:00\n" 
    12 "Last-Translator: JC Denis\n" 
     11"PO-Revision-Date: 2013-11-04T19:43:18+00:00\n" 
     12"Last-Translator: Jean-Christian Denis\n" 
    1313"Language-Team: \n" 
    1414"MIME-Version: 1.0\n" 
    1515"Content-Transfer-Encoding: 8bit\n" 
    1616 
    17 #: _public.php:229 
    18 #: _widgets.php:47 
    19 #: _widgets.php:50 
     17#: _admin.php:24 
     18#: _admin.php:44 
     19#: _public.php:195 
     20#: _widgets.php:58 
     21#: _widgets.php:66 
    2022msgid "My cinecturlink" 
    2123msgstr "Mes cinecturlink" 
    2224 
    23 #: _widgets.php:35 
     25#: _config.php:55 
     26msgid "You must provide a specific folder for images." 
     27msgstr "Vous devez fournir un dossier spécifique pour les images." 
     28 
     29#: _config.php:73 
     30msgid "Configuration has been successfully updated." 
     31msgstr "La configuration a été mise à jour avec succés." 
     32 
     33#: _config.php:93 
     34msgid "Enable extension" 
     35msgstr "Activer l'extension" 
     36 
     37#: _config.php:95 
     38msgid "Maximum width of images (in pixel):" 
     39msgstr "Largeur maximum des images (en pixels) :" 
     40 
     41#: _config.php:98 
     42msgid "Public folder of images (under public folder of blog):" 
     43msgstr "Dossier publique des images (dans le répertoire \"public\" du blog) :" 
     44 
     45#: _config.php:108 
     46msgid "Update cache when use \"Random\" or \"Number of view\" order on widget (Need reload of widgets on change)" 
     47msgstr "Mettre à jour le cache lors de l'utilisation de l'ordre  \"Aléatoire\" ou \"Nombre d'affichages\" dans le widget (Nécessite le rechargement du widget)" 
     48 
     49#: _config.php:109 
     50msgid "This increases the random effect, but updates the cache of the blog whenever the widget is displayed, which reduces the perfomances of your blog." 
     51msgstr "Ceci augmente l'effet aléatoire, mais met à jour le cache à chaque affichage du widget, ce qui diminue les performances du blog." 
     52 
     53#: _config.php:114 
     54msgid "Public page" 
     55msgstr "Page publique" 
     56 
     57#: _config.php:118 
     58msgid "Enable public page" 
     59msgstr "Activer la page publique" 
     60 
     61#: _config.php:119 
     62msgid "Public page has url: %s" 
     63msgstr "La page publique à l'URL: %s" 
     64 
     65#: _config.php:121 
     66msgid "Title of the public page:" 
     67msgstr "Titre de la page publique :" 
     68 
     69#: _config.php:124 
     70msgid "Description of the public page:" 
     71msgstr "Description de la page publique :" 
     72 
     73#: _config.php:127 
     74msgid "Limit number of entries per page on pulic page to:" 
     75msgstr "Limiter le nombre d'entrée par page sur la page public à :" 
     76 
     77#: _config.php:133 
     78msgid "Informations" 
     79msgstr "Informations" 
     80 
     81#: _config.php:136 
     82msgid "Once the extension has been configured and your links have been created, you can place one of the cinecturlink widgets in the sidebar." 
     83msgstr "Une fois l'extension configurée et vos liens créés, vous pouvez placer un des widgets cinecturlink dans la barre latérale." 
     84 
     85#: _config.php:137 
     86msgid "In order to open links in new window you can use plugin %s." 
     87msgstr "Afin d'ouvrir les liens dans une nouvelle page vous pouvez utiliser l'extension %s." 
     88 
     89#: _config.php:138 
     90msgid "In order to change URL of public page you can use plugin %s." 
     91msgstr "Afin de changer l'URL de la page publique vous pouvez utiliser l'extension %s." 
     92 
     93#: _config.php:139 
     94msgid "You can add public pages of cinecturlink to the plugin %s." 
     95msgstr "Vous pouvez ajouter les pages publiques de cinecturlink à l'extension %s." 
     96 
     97#: _config.php:140 
     98#: _config.php:141 
     99msgid "The plugin Cinecturlink2 is compatible with plugin %s." 
     100msgstr "L'extension Cinecturlink2 est compatible avec l'extension %s." 
     101 
     102#: _widgets.php:45 
    24103msgid "Update date" 
    25104msgstr "Date de mise à jour" 
    26105 
    27 #: _widgets.php:36 
    28 #: inc/index.main.php:246 
    29 #: inc/lib.cinecturlink2.list.php:38 
     106#: _widgets.php:46 
     107#: inc/lib.cinecturlink2.list.php:41 
     108#: index.php:261 
    30109msgid "My rating" 
    31110msgstr "Mon évaluation" 
    32111 
    33 #: _widgets.php:38 
     112#: _widgets.php:48 
    34113msgid "Random" 
    35114msgstr "Aléatoire" 
    36115 
    37 #: _widgets.php:39 
     116#: _widgets.php:49 
    38117msgid "Number of views" 
    39118msgstr "Nombre d'affichages" 
    40119 
    41 #: _widgets.php:59 
     120#: _widgets.php:61 
     121msgid "Show selection of cinecturlinks" 
     122msgstr "Afficher une selection de cinecturlink" 
     123 
     124#: _widgets.php:85 
    42125msgid "Sort: (only for date, note and title)" 
    43126msgstr "Ordre: (seulement pour date, note et titre)" 
    44127 
    45 #: _widgets.php:62 
     128#: _widgets.php:92 
    46129msgid "Limit:" 
    47130msgstr "Limite :" 
    48131 
    49 #: _widgets.php:65 
     132#: _widgets.php:98 
    50133msgid "Enable link" 
    51134msgstr "Autoriser les liens" 
    52135 
    53 #: _widgets.php:68 
     136#: _widgets.php:104 
    54137msgid "Show author" 
    55138msgstr "Afficher l'auteur" 
    56139 
    57 #: _widgets.php:71 
     140#: _widgets.php:110 
    58141msgid "Show my rating" 
    59142msgstr "Afficher mon évaluation" 
    60143 
    61 #: _widgets.php:74 
     144#: _widgets.php:116 
    62145msgid "Show description" 
    63146msgstr "Afficher la description" 
    64147 
    65 #: _widgets.php:77 
     148#: _widgets.php:122 
    66149msgid "Show a link to cinecturlink page" 
    67150msgstr "Afficher un lien vers la page publique" 
    68151 
    69 #: _widgets.php:87 
     152#: _widgets.php:143 
     153#: _widgets.php:146 
    70154msgid "List of categories of cinecturlink" 
    71155msgstr "Liste des catégories de cinecturlink" 
    72156 
    73 #: _widgets.php:90 
     157#: _widgets.php:151 
    74158msgid "My cinecturlink by categories" 
    75159msgstr "Mes cinecturlink par catégories" 
    76160 
    77 #: _widgets.php:93 
     161#: _widgets.php:156 
    78162msgid "Show number of links" 
    79163msgstr "Afficher le nombre de liens" 
    80164 
    81 #: _widgets.php:214 
    82 #: _widgets.php:237 
     165#: _widgets.php:290 
     166#: _widgets.php:321 
    83167#: default-templates/cinecturlink2.html:56 
    84168#: default-templates/cinecturlink2.html:56 
     
    86170msgstr "voir tous les liens" 
    87171 
    88 #: _widgets.php:214 
     172#: _widgets.php:290 
    89173msgid "More links" 
    90174msgstr "Plus de liens" 
    91175 
    92 #: _widgets.php:237 
     176#: _widgets.php:321 
    93177msgid "all links" 
    94178msgstr "tous les liens" 
    95179 
    96 #: _widgets.php:250 
     180#: _widgets.php:332 
    97181msgid "view links of this category" 
    98182msgstr "voir les liens de cette catégorie" 
     
    125209msgstr "catégorie" 
    126210 
    127 #: inc/class.cinecturlink2.php:134 
     211#: inc/class.cinecturlink2.php:139 
    128212msgid "No link title" 
    129213msgstr "Pas de titre de lien" 
    130214 
    131 #: inc/class.cinecturlink2.php:137 
     215#: inc/class.cinecturlink2.php:142 
    132216msgid "No link description" 
    133217msgstr "Pas de description de lien" 
    134218 
    135 #: inc/class.cinecturlink2.php:174 
    136 #: inc/class.cinecturlink2.php:193 
     219#: inc/class.cinecturlink2.php:178 
     220#: inc/class.cinecturlink2.php:197 
    137221msgid "No such link ID" 
    138222msgstr "ID de lien inconnu" 
    139223 
    140 #: inc/class.cinecturlink2.php:282 
     224#: inc/class.cinecturlink2.php:284 
    141225msgid "No category title" 
    142226msgstr "Pas de titre de catégorie" 
    143227 
    144 #: inc/class.cinecturlink2.php:285 
     228#: inc/class.cinecturlink2.php:287 
    145229msgid "No category description" 
    146230msgstr "Pas de description de catégorie" 
    147231 
    148 #: inc/class.cinecturlink2.php:310 
    149 #: inc/class.cinecturlink2.php:324 
     232#: inc/class.cinecturlink2.php:312 
     233#: inc/class.cinecturlink2.php:326 
    150234msgid "No such category ID" 
    151235msgstr "ID de catégorie inconnu" 
    152236 
    153 #: inc/class.cinecturlink2.php:370 
     237#: inc/class.cinecturlink2.php:369 
    154238msgid "Failed to create public folder for images." 
    155239msgstr "Impossible de créer le repertoire publique pour les images." 
    156240 
    157 #: inc/index.main.php:88 
    158 #: inc/index.main.php:180 
     241#: inc/lib.cinecturlink2.activityreport.php:21 
     242msgid "Plugin cinecturlink2" 
     243msgstr "Extension cinecturlink 2" 
     244 
     245#: inc/lib.cinecturlink2.activityreport.php:27 
     246msgid "link creation" 
     247msgstr "Création de lien" 
     248 
     249#: inc/lib.cinecturlink2.activityreport.php:28 
     250msgid "A new cineturlink named \"%s\" was added by \"%s\"" 
     251msgstr "Un nouveau cinecturlink nommé \"%s\" a été ajouté par \"%s\"" 
     252 
     253#: inc/lib.cinecturlink2.activityreport.php:36 
     254msgid "updating link" 
     255msgstr "Mise à jour de lien" 
     256 
     257#: inc/lib.cinecturlink2.activityreport.php:37 
     258msgid "Cinecturlink named \"%s\" has been updated by \"%s\"" 
     259msgstr "Le cinecturlink nommé \"%s\" a été mis à jour par \"%s\"" 
     260 
     261#: inc/lib.cinecturlink2.activityreport.php:45 
     262msgid "link deletion" 
     263msgstr "Suppression de lien" 
     264 
     265#: inc/lib.cinecturlink2.activityreport.php:46 
     266msgid "Cinecturlink named \"%s\" has been deleted by \"%s\"" 
     267msgstr "Le cinecturlink nommé \"%s\" a été effacé par \"%s\"" 
     268 
     269#: inc/lib.cinecturlink2.list.php:25 
     270#: index.php:459 
     271msgid "There is no link" 
     272msgstr "Il n'y a pas de lien" 
     273 
     274#: inc/lib.cinecturlink2.list.php:89 
     275msgid "image" 
     276msgstr "image" 
     277 
     278#: index.php:73 
     279msgid "Categories successfully reordered." 
     280msgstr "Catégories réordonnées." 
     281 
     282#: index.php:85 
     283msgid "Categories successfully deleted." 
     284msgstr "Catégories effacées." 
     285 
     286#: index.php:98 
     287#: index.php:188 
    159288msgid "You must provide a title." 
    160289msgstr "Vous devez fournir un titre." 
    161290 
    162 #: inc/index.main.php:93 
     291#: index.php:103 
    163292msgid "Category with same name already exists." 
    164293msgstr "Une catégorie portant le même nom existe déjà." 
    165294 
    166 #: inc/index.main.php:184 
     295#: index.php:113 
     296msgid "Category successfully created." 
     297msgstr "Catégory créée." 
     298 
     299#: index.php:128 
     300msgid "Links successfully deleted." 
     301msgstr "Liens effacés." 
     302 
     303#: index.php:150 
     304#: index.php:172 
     305msgid "Links successfully updated." 
     306msgstr "Liens mis à jour." 
     307 
     308#: index.php:191 
    167309msgid "You must provide an author." 
    168310msgstr "Vous devez spécifier un auteur" 
    169311 
    170 #: inc/index.main.php:188 
     312#: index.php:194 
    171313msgid "You must provide a link to an image." 
    172314msgstr "Vous devez fournir un lien vers une image." 
    173315 
    174 #: inc/index.main.php:207 
     316#: index.php:212 
    175317msgid "Link with same name already exists." 
    176318msgstr "Un lien avec le même titre existe déjà." 
    177319 
    178 #: inc/index.main.php:218 
     320#: index.php:218 
     321msgid "Link successfully created." 
     322msgstr "Lien crée." 
     323 
     324#: index.php:227 
    179325msgid "Unknown link." 
    180 msgstr "Lien inconnu" 
    181  
    182 #: inc/index.main.php:294 
     326msgstr "Lien inconnu." 
     327 
     328#: index.php:233 
     329msgid "Link successfully updated." 
     330msgstr "Lien mis à jour." 
     331 
     332#: index.php:312 
     333msgid "change category" 
     334msgstr "lodifier la catégorie" 
     335 
     336#: index.php:313 
    183337msgid "change my rating" 
    184338msgstr "Modifier mon évaluation" 
    185339 
    186 #: inc/index.main.php:373 
    187 msgid "Category successfully created" 
    188 msgstr "Catégorie mise à jour avec succès" 
    189  
    190 #: inc/index.main.php:377 
    191 msgid "Categories successfully deleted" 
    192 msgstr "Catégories supprimées avec succès" 
    193  
    194 #: inc/index.main.php:381 
    195 msgid "Categories successfully reordered" 
    196 msgstr "Catégories réordonnées avec succès" 
    197  
    198 #: inc/index.main.php:385 
     340#: index.php:368 
     341msgid "Change category of links" 
     342msgstr "Changer la catégorie des liens" 
     343 
     344#: index.php:375 
     345#: index.php:416 
     346msgid "Go back to links list" 
     347msgstr "Retourner à la liste des liens" 
     348 
     349#: index.php:380 
     350msgid "Change category for this selection :" 
     351msgstr "Changer de catégorie pour la sélection :" 
     352 
     353#: index.php:391 
     354msgid "Select a category:" 
     355msgstr "Selectionner une catégorie :" 
     356 
     357#: index.php:409 
     358msgid "Change note of links" 
     359msgstr "Changer la note des liens" 
     360 
     361#: index.php:421 
     362msgid "Change note for this selection :" 
     363msgstr "Changer de note pour la sélection :" 
     364 
     365#: index.php:432 
     366msgid "Select a rating:" 
     367msgstr "Selectionner une note :" 
     368 
     369#: index.php:494 
     370msgid "Selected links action:" 
     371msgstr "Action sur les liens selectionnés :" 
     372 
     373#: index.php:510 
     374msgid "New link" 
     375msgstr "Nouveau lien" 
     376 
     377#: index.php:549 
     378msgid "Details URL:" 
     379msgstr "Liens vers les détails :" 
     380 
     381#: index.php:552 
     382msgid "Search with Google" 
     383msgstr "Rechercher avec Google" 
     384 
     385#: index.php:555 
     386msgid "Image URL:" 
     387msgstr "Lien vers l'image :" 
     388 
     389#: index.php:558 
     390msgid "Search with Amazon" 
     391msgstr "Rechercher avec Amazon" 
     392 
     393#: index.php:563 
     394msgid "There is no image in cinecturlink media path." 
     395msgstr "Il n'y a pas d'image dans le chemin des média cinecturlink." 
     396 
     397#: index.php:567 
     398msgid "or select from repository:" 
     399msgstr "ou selectionner depuis le dépôt :" 
     400 
     401#: index.php:570 
     402msgid "Go to media manager to add image to cinecturlink path." 
     403msgstr "Aller dans le gestionnaire de média pour ajouter des images au chemin des cinecturlink." 
     404 
     405#: index.php:586 
     406msgid "My rating:" 
     407msgstr "Mon évaluation :" 
     408 
     409#: index.php:596 
     410msgid "update link" 
     411msgstr "mettre à jour ce lien" 
     412 
     413#: index.php:596 
     414msgid "create link" 
     415msgstr "créer ce lien" 
     416 
     417#: index.php:605 
    199418msgid "There is no category" 
    200419msgstr "Il n'y a pas de catégorie" 
    201420 
    202 #: inc/index.main.php:392 
     421#: index.php:611 
    203422msgid "name" 
    204423msgstr "nom" 
    205424 
    206 #: inc/index.main.php:392 
     425#: index.php:611 
    207426msgid "description" 
    208427msgstr "description" 
    209428 
    210 #: inc/index.main.php:413 
     429#: index.php:633 
    211430msgid "Check to delete" 
    212431msgstr "Cocher pour supprimer" 
    213432 
    214 #: inc/index.main.php:421 
     433#: index.php:638 
    215434msgid "update categories" 
    216435msgstr "mettre à jour les catégories" 
    217436 
    218 #: inc/index.main.php:453 
    219 msgid "Link successfully created" 
    220 msgstr "Lien créé avec succès" 
    221  
    222 #: inc/index.main.php:457 
    223 msgid "Links successfully deleted" 
    224 msgstr "Liens supprimés avec succès" 
    225  
    226 #: inc/index.main.php:461 
    227 msgid "Links successfully updated" 
    228 msgstr "Liens mis à jour avec succès" 
    229  
    230 #: inc/index.main.php:465 
    231 #: inc/lib.cinecturlink2.list.php:21 
    232 msgid "There is no link" 
    233 msgstr "Il n'y a pas de lien" 
    234  
    235 #: inc/index.main.php:507 
    236 msgid "Selected links action:" 
    237 msgstr "Action sur les liens selectionnés :" 
    238  
    239 #: inc/index.main.php:529 
    240 #: inc/index.main.php:560 
    241 msgid "Edit links" 
    242 msgstr "Modifier les liens" 
    243  
    244 #: inc/index.main.php:531 
    245 msgid "This changes category for all selected links." 
    246 msgstr "Ceci change la catégorie des liens selectionnés." 
    247  
    248 #: inc/index.main.php:543 
    249 msgid "Select a category:" 
    250 msgstr "Selectionner une catégorie :" 
    251  
    252 #: inc/index.main.php:562 
    253 msgid "This changes my rating for all selected links." 
    254 msgstr "Ceci change mon évaluation des liens selectionnés." 
    255  
    256 #: inc/index.main.php:574 
    257 msgid "Select a rating:" 
    258 msgstr "Selectionner une note :" 
    259  
    260 #: inc/index.main.php:588 
    261 msgid "New link" 
    262 msgstr "Nouveau lien" 
    263  
    264 #: inc/index.main.php:616 
    265 msgid "Search with Google" 
    266 msgstr "Rechercher avec Google" 
    267  
    268 #: inc/index.main.php:619 
    269 msgid "Image URL:" 
    270 msgstr "Lien vers l'image :" 
    271  
    272 #: inc/index.main.php:619 
    273 msgid "Search with Amazon" 
    274 msgstr "Rechercher avec Amazon" 
    275  
    276 #: inc/index.main.php:620 
    277 msgid "or select from repository:" 
    278 msgstr "ou selectionner depuis le dépôt :" 
    279  
    280 #: inc/index.main.php:621 
    281 msgid "My rating:" 
    282 msgstr "Mon évaluation :" 
    283  
    284 #: inc/index.main.php:631 
    285 msgid "update link" 
    286 msgstr "mettre à jour ce lien" 
    287  
    288 #: inc/index.main.php:631 
    289 msgid "create link" 
    290 msgstr "créer ce lien" 
    291  
    292 #: inc/index.setting.php:44 
    293 msgid "You must provide a specific folder for images." 
    294 msgstr "Vous devez fournir un dossier spécifique pour les images." 
    295  
    296 #: inc/index.setting.php:70 
    297 #: inc/index.setting.php:77 
    298 #: index.php:39 
    299 msgid "Settings" 
    300 msgstr "Paramètres" 
    301  
    302 #: inc/index.setting.php:73 
    303 msgid "Please wait" 
    304 msgstr "Veuillez patienter" 
    305  
    306 #: inc/index.setting.php:91 
    307 msgid "Enable plugin" 
    308 msgstr "Activer l'extension" 
    309  
    310 #: inc/index.setting.php:92 
    311 msgid "Maximum width of images (in pixel):" 
    312 msgstr "Largeur maximum des images (en pixels) :" 
    313  
    314 #: inc/index.setting.php:94 
    315 msgid "Public folder of images (under public folder of blog):" 
    316 msgstr "Dossier publique des images (dans le répertoire \"public\" du blog) :" 
    317  
    318 #: inc/index.setting.php:101 
    319 msgid "Update cache when use \"Random\" or \"Number of view\" order on widget (Need reload of widgets on change)" 
    320 msgstr "Mettre à jour le cache lors de l'utilisation de l'ordre  \"Aléatoire\" ou \"Nombre d'affichages\" dans le widget (Nécessite le rechargement du widget)" 
    321  
    322 #: inc/index.setting.php:102 
    323 msgid "This increases the random effect, but updates the cache of the blog whenever the widget is displayed, which reduces the perfomances of your blog." 
    324 msgstr "Ceci augmente l'effet aléatoire, mais met à jour le cache à chaque affichage du widget, ce qui diminue les performances du blog." 
    325  
    326 #: inc/index.setting.php:105 
    327 msgid "Public page" 
    328 msgstr "Page publique" 
    329  
    330 #: inc/index.setting.php:108 
    331 msgid "Enable public page" 
    332 msgstr "Activer la page publique" 
    333  
    334 #: inc/index.setting.php:109 
    335 msgid "Public page has url: %s" 
    336 msgstr "La page publique à l'URL: %s" 
    337  
    338 #: inc/index.setting.php:110 
    339 msgid "Title of the public page:" 
    340 msgstr "Titre de la page publique :" 
    341  
    342 #: inc/index.setting.php:112 
    343 msgid "Description of the public page:" 
    344 msgstr "Description de la page publique :" 
    345  
    346 #: inc/index.setting.php:114 
    347 msgid "Limit to %s entries per page on pulic page." 
    348 msgstr "Limiter à %s liens par page sur la page publique." 
    349  
    350 #: inc/index.setting.php:119 
    351 msgid "Once the extension has been configured and your links have been created, you can place one of the cinecturlink widgets in the sidebar." 
    352 msgstr "Une fois l'extension configurée et vos liens créés, vous pouvez placer un des widgets cinecturlink dans la barre latérale." 
    353  
    354 #: inc/index.setting.php:120 
    355 msgid "In order to open links in new window you can use plugin %s." 
    356 msgstr "Afin d'ouvrir les liens dans une nouvelle page vous pouvez utiliser l'extension %s." 
    357  
    358 #: inc/index.setting.php:121 
    359 msgid "In order to change URL of public page you can use plugin %s." 
    360 msgstr "Afin de changer l'URL de la page publique vous pouvez utiliser l'extension %s." 
    361  
    362 #: inc/index.setting.php:122 
    363 msgid "You can add public pages of cinecturlink to the plugin %s." 
    364 msgstr "Vous pouvez ajouter les pages publiques de cinecturlink à l'extension %s." 
    365  
    366 #: inc/index.setting.php:123 
    367 #: inc/index.setting.php:124 
    368 msgid "The plugin Cinecturlink2 is compatible with plugin %s." 
    369 msgstr "L'extension Cinecturlink2 est compatible avec l'extension %s." 
    370  
    371 #: inc/lib.cinecturlink2.activityreport.php:16 
    372 msgid "Plugin cinecturlink2" 
    373 msgstr "Extension cinecturlink 2" 
    374  
    375 #: inc/lib.cinecturlink2.activityreport.php:22 
    376 msgid "link creation" 
    377 msgstr "Création de lien" 
    378  
    379 #: inc/lib.cinecturlink2.activityreport.php:23 
    380 msgid "A new cineturlink named \"%s\" was added by \"%s\"" 
    381 msgstr "Un nouveau cinecturlink nommé \"%s\" a été ajouté par \"%s\"" 
    382  
    383 #: inc/lib.cinecturlink2.activityreport.php:31 
    384 msgid "updating link" 
    385 msgstr "Mise à jour de lien" 
    386  
    387 #: inc/lib.cinecturlink2.activityreport.php:32 
    388 msgid "Cinecturlink named \"%s\" has been updated by \"%s\"" 
    389 msgstr "Le cinecturlink nommé \"%s\" a été mis à jour par \"%s\"" 
    390  
    391 #: inc/lib.cinecturlink2.activityreport.php:40 
    392 msgid "link deletion" 
    393 msgstr "Suppression de lien" 
    394  
    395 #: inc/lib.cinecturlink2.activityreport.php:41 
    396 msgid "Cinecturlink named \"%s\" has been deleted by \"%s\"" 
    397 msgstr "Le cinecturlink nommé \"%s\" a été effacé par \"%s\"" 
    398  
    399 #: inc/lib.cinecturlink2.list.php:85 
    400 msgid "image" 
    401 msgstr "image" 
    402  
    403 #: inc/lib.cinecturlink2.list.php:97 
    404 #: inc/lib.cinecturlink2.list.php:97 
    405 msgid "Edit" 
    406 msgstr "Modifier" 
    407  
Note: See TracChangeset for help on using the changeset viewer.

Sites map