Changeset 3247
- Timestamp:
- 11/05/13 08:25:23 (10 years ago)
- Location:
- plugins/cinecturlink2
- Files:
-
- 4 added
- 5 deleted
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/cinecturlink2/_admin.php
r2314 r3247 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # 3 4 # This file is part of cinecturlink2, a plugin for Dotclear 2. 4 5 # 5 # Copyright (c) 2009-201 0 JCDenis and contributors6 # jcdenis@gdwd.com6 # Copyright (c) 2009-2013 Jean-Christian Denis and contributors 7 # contact@jcdenis.fr http://jcd.lv 7 8 # 8 9 # Licensed under the GPL version 2.0 license. 9 10 # A copy of this license is available in LICENSE file or at 10 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 # 11 13 # -- END LICENSE BLOCK ------------------------------------ 12 14 13 if (!defined('DC_CONTEXT_ADMIN')){return;} 15 if (!defined('DC_CONTEXT_ADMIN')) { 16 17 return null; 18 } 14 19 15 20 require_once dirname(__FILE__).'/_widgets.php'; … … 17 22 # Admin menu 18 23 $_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) 23 32 ); 24 ?> 33 34 $core->addBehavior( 35 'adminDashboardFavorites', 36 array('cinecturlink2AdminBehaviors', 'adminDashboardFavorites') 37 ); 38 39 class 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 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # 3 4 # This file is part of cinecturlink2, a plugin for Dotclear 2. 4 5 # 5 # Copyright (c) 2009-201 0 JCDenis and contributors6 # jcdenis@gdwd.com6 # Copyright (c) 2009-2013 Jean-Christian Denis and contributors 7 # contact@jcdenis.fr http://jcd.lv 7 8 # 8 9 # Licensed under the GPL version 2.0 license. 9 10 # A copy of this license is available in LICENSE file or at 10 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 # 11 13 # -- END LICENSE BLOCK ------------------------------------ 12 14 … … 17 19 */ 18 20 19 if (!defined('DC_RC_PATH')){return;} 21 if (!defined('DC_RC_PATH')) { 22 23 return null; 24 } 20 25 21 26 $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 ) 27 43 ); 28 /* date */ #2010111229 ?> -
plugins/cinecturlink2/_install.php
r2751 r3247 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # 3 4 # This file is part of cinecturlink2, a plugin for Dotclear 2. 4 5 # 5 # Copyright (c) 2009-201 0 JCDenis and contributors6 # jcdenis@gdwd.com6 # Copyright (c) 2009-2013 Jean-Christian Denis and contributors 7 # contact@jcdenis.fr http://jcd.lv 7 8 # 8 9 # Licensed under the GPL version 2.0 license. 9 10 # A copy of this license is available in LICENSE file or at 10 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 # 11 13 # -- END LICENSE BLOCK ------------------------------------ 12 14 13 if (!defined('DC_CONTEXT_ADMIN')) {return;}15 if (!defined('DC_CONTEXT_ADMIN')) { 14 16 15 $new_version = $core->plugins->moduleInfo('cinecturlink2','version');16 $old_version = $core->getVersion('cinecturlink2'); 17 return null; 18 } 17 19 18 if (version_compare($old_version,$new_version,'>=')) return; 20 try { 21 # Check module version 22 if (version_compare( 23 $core->getVersion('cinecturlink2'), 24 $core->plugins->moduleInfo('cinecturlink2', 'version'), 25 '>=' 26 )) { 19 27 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; 26 29 } 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 28 39 # Tables 29 $s = new dbStruct($core->con, $core->prefix);40 $s = new dbStruct($core->con, $core->prefix); 30 41 $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 56 67 $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 69 80 $si = new dbStruct($core->con,$core->prefix); 70 81 $changes = $si->synchronize($s); 71 82 72 83 # Settings 73 84 $core->blog->settings->addNamespace('cinecturlink2'); 74 85 $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 ); 87 102 88 103 return true; 89 104 } 90 catch (Exception $e) 91 { 105 catch (Exception $e) { 92 106 $core->error->add($e->getMessage()); 93 107 } 108 94 109 return false; 95 ?> -
plugins/cinecturlink2/_prepend.php
r2357 r3247 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # 3 4 # This file is part of cinecturlink2, a plugin for Dotclear 2. 4 5 # 5 # Copyright (c) 2009-201 0 JCDenis and contributors6 # jcdenis@gdwd.com6 # Copyright (c) 2009-2013 Jean-Christian Denis and contributors 7 # contact@jcdenis.fr http://jcd.lv 7 8 # 8 9 # Licensed under the GPL version 2.0 license. 9 10 # A copy of this license is available in LICENSE file or at 10 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 # 11 13 # -- END LICENSE BLOCK ------------------------------------ 12 14 13 if (!defined('DC_RC_PATH')) {return;}15 if (!defined('DC_RC_PATH')) { 14 16 15 global $__autoload, $core; 17 return null; 18 } 16 19 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/'; 19 21 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 ); 21 32 22 33 # Add cinecturlink2 report on plugin activityReport 23 if (defined('ACTIVITY_REPORT')) 24 { 25 require_once dirname(__FILE__).'/inc/lib.cinecturlink2.activityreport.php'; 34 if (defined('ACTIVITY_REPORT')) { 35 require_once $d.'lib.cinecturlink2.activityreport.php'; 26 36 } 27 37 28 38 # 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 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # 3 4 # This file is part of cinecturlink2, a plugin for Dotclear 2. 4 5 # 5 # Copyright (c) 2009-201 0 JCDenis and contributors6 # jcdenis@gdwd.com6 # Copyright (c) 2009-2013 Jean-Christian Denis and contributors 7 # contact@jcdenis.fr http://jcd.lv 7 8 # 8 9 # Licensed under the GPL version 2.0 license. 9 10 # A copy of this license is available in LICENSE file or at 10 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 # 11 13 # -- END LICENSE BLOCK ------------------------------------ 12 14 13 if (!defined('DC_RC_PATH')){return;} 15 if (!defined('DC_RC_PATH')) { 16 17 return null; 18 } 14 19 15 20 require_once dirname(__FILE__).'/_widgets.php'; … … 17 22 $core->blog->settings->addNamespace('cinecturlink2'); 18 23 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 82 if ($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 } 71 90 } 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')); 91 else { 92 93 foreach(array_merge($c2_tpl_blocks, $c2_tpl_values) as $v) { 94 $core->tpl->addBlock($v, array('tplCinecturlink2', 'disable')); 95 } 125 96 } 126 97 … … 131 102 global $core, $_ctx; 132 103 $core->blog->settings->addNamespace('cinecturlink2'); 133 104 134 105 if (!$core->blog->settings->cinecturlink2->cinecturlink2_active 135 106 || !$core->blog->settings->cinecturlink2->cinecturlink2_public_active) 136 107 { 137 108 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(), 142 115 dirname(__FILE__).'/default-templates/' 143 116 ); 144 117 145 118 $params = array(); 146 147 $n = self::getPageArgs($args, 'c2page');119 120 $n = self::getPageArgs($args, 'c2page'); 148 121 if ($n) { 149 122 $GLOBALS['c2_page_number'] = $n; 150 123 } 151 124 152 125 $caturl = $core->blog->settings->cinecturlink2->cinecturlink2_public_caturl; 153 126 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)) { 160 131 $params['cat_id'] = (integer) $c; 161 132 } 162 else 163 { 133 else { 164 134 $params['cat_title'] = urldecode($c); 165 135 } 166 136 } 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'))) { 171 140 $mime = $f == 'atom' ? 'application/atom+xml' : 'application/xml'; 172 141 173 142 //$_ctx->short_feed_items = $core->blog->settings->system->short_feed_items; 174 143 175 144 $params['limit'] = $core->blog->settings->system->nb_post_per_feed; 176 145 $_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)) { 188 154 $params['link_id'] = (integer) $d; 189 155 } 190 else 191 { 156 else { 192 157 $params['link_title'] = urldecode($d); 193 158 } 194 159 } 195 160 196 161 $params['limit'] = $core->blog->settings->cinecturlink2->cinecturlink2_public_nbrpp; 197 162 $_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 209 175 return $m[2]; 210 176 } 177 211 178 return false; 212 179 } 213 180 } 214 181 215 182 class tplCinecturlink2 216 183 { 217 public static function disable($a, $c=null)184 public static function disable($a, $c=null) 218 185 { 219 186 return ''; 220 187 } 221 188 222 189 public static function c2PageURL($a) 223 190 { 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 227 194 public static function c2PageTitle($a) 228 195 { 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 232 199 public static function c2PageFeedURL($a) 233 200 { 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 237 204 public static function c2PageFeedID($a) 238 205 { 239 206 return 'urn:md5:<?php echo md5($core->blog->blog_id."cinecturlink2"); ?>'; 240 207 } 241 208 242 209 public static function c2PageDescription($a) 243 210 { 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) 248 215 { 249 216 $if = array(); 250 217 251 218 $operator = isset($a['operator']) ? self::getOperator($a['operator']) : '&&'; 252 253 if (isset($a['request_link'])) 254 { 219 220 if (isset($a['request_link'])) { 255 221 $sign = (boolean) $a['request_link'] ? '' : '!'; 256 222 $if[] = $sign.'(isset($_ctx->c2_page_params["link_id"]) || isset($_ctx->c2_page_params["link_title"]))'; 257 223 } 258 259 if (isset($a['request_cat'])) 260 { 224 225 if (isset($a['request_cat'])) { 261 226 $sign = (boolean) $a['request_cat'] ? '' : '!'; 262 227 $if[] = $sign.'(isset($_ctx->c2_page_params["cat_id"]) || isset($_ctx->c2_page_params["cat_title"]))'; 263 228 } 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) 276 234 { 277 235 $lastn = isset($a['lastn']) ? abs((integer) $a['lastn'])+0 : -1; 278 236 279 237 $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) { 285 241 $res .= "\$params['limit'] = ".$lastn.";\n"; 286 242 } 287 else 288 { 243 else { 289 244 $res .= "if (!isset(\$params['limit']) || \$params['limit'] < 1) { \$params['limit'] = 10; }\n"; 290 245 } 291 if (!isset($a['ignore_pagination']) || $a['ignore_pagination'] == "0") 292 { 246 if (!isset($a['ignore_pagination']) || $a['ignore_pagination'] == "0") { 293 247 $res .= "\$params['limit'] = array(((\$c2_page_number-1)*\$params['limit']),\$params['limit']);\n"; 294 248 } 295 else 296 { 249 else { 297 250 $res .= "\$params['limit'] = array(0, \$params['limit']);\n"; 298 251 } 299 252 } 300 301 if (isset($a['category'])) 302 { 303 if ($a['category'] == 'null') 304 { 253 254 if (isset($a['category'])) { 255 if ($a['category'] == 'null') { 305 256 $res .= "\$params['sql'] = ' AND L.cat_id IS NULL ';\n"; 306 257 } 307 elseif (is_numeric($a['category'])) 308 { 258 elseif (is_numeric($a['category'])) { 309 259 $res .= "\$params['cat_id'] = ".(integer) $a['category'].";\n"; 310 260 } 311 else 312 { 261 else { 313 262 $res .= "\$params['cat_title'] = '".$a['category']."';\n"; 314 263 } 315 264 } 316 265 317 266 $sort = isset($a['sort']) && $a['sort'] == 'asc' ? ' asc' : ' desc'; 318 267 $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 320 269 $res .= 321 270 "\$params['order'] = '".$sortby.$sort."';\n"; 322 271 323 272 return 324 273 "<?php \n". … … 332 281 "?>\n"; 333 282 } 334 335 public static function c2EntriesHeader($a, $c)283 284 public static function c2EntriesHeader($a, $c) 336 285 { 337 286 return "<?php if (\$_ctx->c2_entries->isStart()) : ?>".$c."<?php endif; ?>"; 338 287 } 339 340 public static function c2EntriesFooter($a, $c)288 289 public static function c2EntriesFooter($a, $c) 341 290 { 342 291 return "<?php if (\$_ctx->c2_entries->isEnd()) : ?>".$c."<?php endif; ?>"; 343 292 } 344 345 public static function c2EntryIf($a, $c)293 294 public static function c2EntryIf($a, $c) 346 295 { 347 296 $if = array(); 348 297 349 298 $operator = isset($a['operator']) ? self::getOperator($a['operator']) : '&&'; 350 351 if (isset($a['has_category'])) 352 { 299 300 if (isset($a['has_category'])) { 353 301 $sign = (boolean) $a['has_category'] ? '!' : '='; 354 302 $if[] = '($_ctx->exists("c2_entries") && "" '.$sign.'= $_ctx->c2_entries->cat_title)'; 355 303 } 356 304 357 305 return empty($if) ? $c : "<?php if(".implode(' '.$operator.' ',$if).") : ?>\n".$c."<?php endif; ?>\n"; 358 306 } 359 307 360 308 public static function c2EntryIfFirst($a) 361 309 { 362 310 return '<?php if ($_ctx->c2_entries->index() == 0) { echo "'.(isset($a['return']) ? addslashes(html::escapeHTML($a['return'])) : 'first').'"; } ?>'; 363 311 } 364 312 365 313 public static function c2EntryIfOdd($a) 366 314 { 367 315 return '<?php if (($_ctx->c2_entries->index()+1)%2 == 1) { echo "'.(isset($a['return']) ? addslashes(html::escapeHTML($a['return'])) : 'odd').'"; } ?>'; 368 316 } 369 370 public static function c2EntryFeedID($a ttr)317 318 public static function c2EntryFeedID($a) 371 319 { 372 320 return 'urn:md5:<?php echo md5($_ctx->c2_entries->blog_id.$_ctx->c2_entries->link_id.$_ctx->c2_entries->link_dt); ?>'; 373 321 } 374 322 375 323 public static function c2EntryID($a) 376 324 { 377 return self::getGenericValue('$_ctx->c2_entries->link_id', $a);378 } 379 325 return self::getGenericValue('$_ctx->c2_entries->link_id', $a); 326 } 327 380 328 public static function c2EntryTitle($a) 381 329 { 382 return self::getGenericValue('$_ctx->c2_entries->link_title', $a);383 } 384 330 return self::getGenericValue('$_ctx->c2_entries->link_title', $a); 331 } 332 385 333 public static function c2EntryDescription($a) 386 334 { 387 return self::getGenericValue('$_ctx->c2_entries->link_desc', $a);388 } 389 335 return self::getGenericValue('$_ctx->c2_entries->link_desc', $a); 336 } 337 390 338 public static function c2EntryAuthorCommonName($a) 391 339 { 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 395 343 public static function c2EntryAuthorDisplayName($a) 396 344 { 397 return self::getGenericValue('$_ctx->c2_entries->user_displayname', $a);398 } 399 345 return self::getGenericValue('$_ctx->c2_entries->user_displayname', $a); 346 } 347 400 348 public static function c2EntryAuthorID($a) 401 349 { 402 return self::getGenericValue('$_ctx->c2_entries->user_id', $a);403 } 404 350 return self::getGenericValue('$_ctx->c2_entries->user_id', $a); 351 } 352 405 353 public static function c2EntryAuthorEmail($a) 406 354 { 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 410 358 public static function c2EntryAuthorLink($a) 411 359 { 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 415 363 public static function c2EntryAuthorURL($a) 416 364 { 417 return self::getGenericValue('$_ctx->c2_entries->user_url', $a);418 } 419 365 return self::getGenericValue('$_ctx->c2_entries->user_url', $a); 366 } 367 420 368 public static function c2EntryFromAuthor($a) 421 369 { 422 return self::getGenericValue('$_ctx->c2_entries->link_author', $a);423 } 424 370 return self::getGenericValue('$_ctx->c2_entries->link_author', $a); 371 } 372 425 373 public static function c2EntryLang($a) 426 374 { 427 return self::getGenericValue('$_ctx->c2_entries->link_lang', $a);428 } 429 375 return self::getGenericValue('$_ctx->c2_entries->link_lang', $a); 376 } 377 430 378 public static function c2EntryURL($a) 431 379 { 432 return self::getGenericValue('$_ctx->c2_entries->link_url', $a);433 } 434 380 return self::getGenericValue('$_ctx->c2_entries->link_url', $a); 381 } 382 435 383 public static function c2EntryCategory($a) 436 384 { 437 return self::getGenericValue('$_ctx->c2_entries->cat_title', $a);438 } 439 385 return self::getGenericValue('$_ctx->c2_entries->cat_title', $a); 386 } 387 440 388 public static function c2EntryCategoryID($a) 441 389 { 442 return self::getGenericValue('$_ctx->c2_entries->cat_id', $a);443 } 444 390 return self::getGenericValue('$_ctx->c2_entries->cat_id', $a); 391 } 392 445 393 public static function c2EntryCategoryURL($a) 446 394 { 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 450 398 public static function c2EntryImg($a) 451 399 { … … 453 401 $f = $core->tpl->getFilters($a); 454 402 $style = isset($a['style']) ? html::escapeHTML($a['style']) : ''; 455 403 456 404 return 457 405 "<?php if (\$_ctx->exists('c2_entries')) { ". … … 464 412 "echo ".sprintf($f,'$img')."; unset(\$img); } ?> \n"; 465 413 } 466 414 467 415 public static function c2EntryDate($a) 468 416 { 469 417 $format = !empty($a['format']) ? addslashes($a['format']) : ''; 470 418 471 419 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)"; 473 421 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)"; 475 423 elseif ($format) 476 $p = "dt::dt2str('".$format."', \$_ctx->c2_entries->link_creadt)";424 $p = "dt::dt2str('".$format."', \$_ctx->c2_entries->link_creadt)"; 477 425 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 483 431 public static function c2EntryTime($a) 484 432 { 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) 489 437 { 490 438 $p = … … 493 441 "\$_ctx->c2_pagination = \$_ctx->cinecturlink->getLinks(\$params,true); unset(\$params);\n". 494 442 "?>\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 501 447 public static function c2PaginationCounter($a) 502 448 { 503 return self::getGenericValue('c 2_context::PaginationNbPages()',$a);504 } 505 449 return self::getGenericValue('cinecturlink2Context::PaginationNbPages()', $a); 450 } 451 506 452 public static function c2PaginationCurrent($a) 507 453 { 508 return self::getGenericValue('c 2_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) 512 458 { 513 459 $if = array(); 514 460 515 if (isset($a['start'])) 516 { 461 if (isset($a['start'])) { 517 462 $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'])) { 522 466 $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; ?>'; 533 471 } 534 472 535 473 public static function c2PaginationURL($a) 536 474 { 537 return self::getGenericValue('c 2_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) 541 479 { 542 480 return … … 548 486 "?>\n"; 549 487 } 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(); 550 502 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'])) { 567 504 $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'])) { 572 508 $sign = (boolean) $a['first'] ? '' : '!'; 573 509 $if[] = $sign.'$_ctx->c2_categories->isStart()'; 574 510 } 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; ?>'; 583 513 } 584 514 … … 586 516 { 587 517 $p = !empty($a['type']) ? $a['type'] : 'atom'; 588 589 if (!preg_match('#^(rss2|atom)$#',$p)) 590 { 518 519 if (!preg_match('#^(rss2|atom)$#', $p)) { 591 520 $p = 'atom'; 592 521 } … … 594 523 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.'"')."; ?>"; 595 524 } 596 525 597 526 public static function c2CategoryFeedID($a) 598 527 { 599 528 return 'urn:md5:<?php echo md5($core->blog->blog_id."cinecturlink2".$_ctx->c2_categories->cat_id); ?>'; 600 529 } 601 530 602 531 public static function c2CategoryID($a) 603 532 { 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 607 536 public static function c2CategoryTitle($a) 608 537 { 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 612 541 public static function c2CategoryDescription($a) 613 542 { 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 617 546 public static function c2CategoryURL($a) 618 547 { 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 622 551 protected static function getGenericValue($p,$a) 623 552 { 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 627 556 protected static function getOperator($op) 628 557 { … … 639 568 } 640 569 } 641 ?> -
plugins/cinecturlink2/_uninstall.php
r2023 r3247 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # 3 4 # This file is part of cinecturlink2, a plugin for Dotclear 2. 4 5 # 5 # Copyright (c) 2009-201 0 JCDenis and contributors6 # jcdenis@gdwd.com6 # Copyright (c) 2009-2013 Jean-Christian Denis and contributors 7 # contact@jcdenis.fr http://jcd.lv 7 8 # 8 9 # Licensed under the GPL version 2.0 license. 9 10 # A copy of this license is available in LICENSE file or at 10 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 # 11 13 # -- END LICENSE BLOCK ------------------------------------ 12 14 13 if (!defined('DC_CONTEXT_ADMIN')){return;} 15 if (!defined('DC_CONTEXT_ADMIN')) { 16 17 return null; 18 } 14 19 15 20 $this->addUserAction( 16 /* type */ 17 /* action */ 18 /* ns */ 19 /* desc ription */__('delete all settings')21 /* type */ 'settings', 22 /* action */ 'delete_all', 23 /* ns */ 'cinecturlink2', 24 /* desc */ __('delete all settings') 20 25 ); 21 26 22 27 $this->addUserAction( 23 /* type */ 24 /* action */ 25 /* ns */ 26 /* desc ription */ sprintf(__('delete %s table'),'cinecturlink2')28 /* type */ 'tables', 29 /* action */ 'delete', 30 /* ns */ 'cinecturlink2', 31 /* desc */ sprintf(__('delete %s table'), 'cinecturlink2') 27 32 ); 28 33 29 34 $this->addUserAction( 30 /* type */ 31 /* action */ 32 /* ns */ 33 /* desc ription */ sprintf(__('delete %s table'),'cinecturlink2_cat')35 /* type */ 'tables', 36 /* action */ 'delete', 37 /* ns */ 'cinecturlink2_cat', 38 /* desc */ sprintf(__('delete %s table'), 'cinecturlink2_cat') 34 39 ); 35 40 36 41 $this->addUserAction( 37 /* type */ 38 /* action */ 39 /* ns */ 40 /* desc ription */__('delete the version number')42 /* type */ 'versions', 43 /* action */ 'delete', 44 /* ns */ 'cinecturlink2', 45 /* desc */ __('delete the version number') 41 46 ); 42 47 43 48 $this->addUserAction( 44 /* type */ 45 /* action */ 46 /* ns */ 47 /* desc ription */__('delete plugin files')49 /* type */ 'plugins', 50 /* action */ 'delete', 51 /* ns */ 'cinecturlink2', 52 /* desc */ __('delete plugin files') 48 53 ); 49 54 50 55 $this->addDirectAction( 51 /* type */ 52 /* action */ 53 /* ns */ 54 /* desc ription */ sprintf(__('delete all %s settings'),'cinecturlink2')56 /* type */ 'settings', 57 /* action */ 'delete_all', 58 /* ns */ 'cinecturlink2', 59 /* desc */ sprintf(__('delete all %s settings'), 'cinecturlink2') 55 60 ); 56 61 57 62 $this->addDirectAction( 58 /* type */ 59 /* action */ 60 /* ns */ 61 /* desc ription */ sprintf(__('delete %s table'),'cinecturlink2')63 /* type */ 'tables', 64 /* action */ 'delete', 65 /* ns */ 'cinecturlink2', 66 /* desc */ sprintf(__('delete %s table'), 'cinecturlink2') 62 67 ); 63 68 64 69 $this->addDirectAction( 65 /* type */ 66 /* action */ 67 /* ns */ 68 /* desc ription */ sprintf(__('delete %s table'),'cinecturlink2_cat')70 /* type */ 'tables', 71 /* action */ 'delete', 72 /* ns */ 'cinecturlink2_cat', 73 /* desc */ sprintf(__('delete %s table'), 'cinecturlink2_cat') 69 74 ); 70 75 71 76 $this->addDirectAction( 72 /* type */ 73 /* action */ 74 /* ns */ 75 /* desc ription */ sprintf(__('delete %s version number'),'cinecturlink2')77 /* type */ 'versions', 78 /* action */ 'delete', 79 /* ns */ 'cinecturlink2', 80 /* desc */ sprintf(__('delete %s version number'), 'cinecturlink2') 76 81 ); 77 82 78 83 $this->addDirectAction( 79 /* type */ 80 /* action */ 81 /* ns */ 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') 83 88 ); 84 ?> -
plugins/cinecturlink2/_widgets.php
r2357 r3247 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # 3 4 # This file is part of cinecturlink2, a plugin for Dotclear 2. 4 5 # 5 # Copyright (c) 2009-201 0 JCDenis and contributors6 # jcdenis@gdwd.com6 # Copyright (c) 2009-2013 Jean-Christian Denis and contributors 7 # contact@jcdenis.fr http://jcd.lv 7 8 # 8 9 # Licensed under the GPL version 2.0 license. 9 10 # A copy of this license is available in LICENSE file or at 10 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 # 11 13 # -- END LICENSE BLOCK ------------------------------------ 12 14 13 if (!defined('DC_RC_PATH')){return;} 14 15 $core->addBehavior('initWidgets',array('cinecturlink2Widget','adminLinks')); 16 $core->addBehavior('initWidgets',array('cinecturlink2Widget','adminCats')); 15 if (!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 ); 17 28 18 29 class cinecturlink2Widget … … 21 32 { 22 33 global $core; 23 34 24 35 $C2 = new cinecturlink2($core); 25 36 26 37 $categories_combo = array('' => '', __('Uncategorized') => 'null'); 27 38 $categories = $C2->getCategories(); 28 while($categories->fetch()) 29 { 39 while($categories->fetch()) { 30 40 $cat_title = html::escapeHTML($categories->cat_title); 31 41 $categories_combo[$cat_title] = $categories->cat_id; 32 42 } 33 43 34 44 $sortby_combo = array( 35 __('Update date') 36 __('My rating') 37 __('Title') 38 __('Random') 39 __('Number of views') 45 __('Update date') => 'link_upddt', 46 __('My rating') => 'link_note', 47 __('Title') => 'link_title', 48 __('Random') => 'RANDOM', 49 __('Number of views') => 'COUNTER' 40 50 ); 41 51 $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 ) 81 136 ); 82 137 } 83 138 84 139 public static function adminCats($w) 85 140 { 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 ) 97 170 ); 98 171 } 99 172 100 173 public static function publicLinks($w) 101 174 { 102 175 global $core; 176 103 177 $core->blog->settings->addNamespace('cinecturlink2'); 104 178 105 179 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 108 186 $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') { 114 190 $params['sql'] = ' AND L.cat_id IS NULL '; 115 191 } 116 elseif (is_numeric($w->category)) 117 { 192 elseif (is_numeric($w->category)) { 118 193 $params['cat_id'] = (integer) $w->category; 119 194 } 120 195 } 121 196 122 197 $limit = abs((integer) $w->limit); 123 198 124 199 # Tirage aléatoire 125 200 # Consomme beaucoup de ressources! 126 if ($w->sortby == 'RANDOM') 127 { 201 if ($w->sortby == 'RANDOM') { 128 202 $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 132 209 $ids= array(); 133 while($big_rs->fetch()) 134 { 210 while($big_rs->fetch()) { 135 211 $ids[] = $big_rs->link_id; 136 212 } 137 213 shuffle($ids); 138 $ids = array_slice($ids, 0,$limit);139 214 $ids = array_slice($ids, 0, $limit); 215 140 216 $params['link_id'] = array(); 141 foreach($ids as $id) 142 { 217 foreach($ids as $id) { 143 218 $params['link_id'][] = $id; 144 219 } 145 220 } 146 elseif ($w->sortby == 'COUNTER') 147 { 221 elseif ($w->sortby == 'COUNTER') { 148 222 $params['order'] = 'link_count asc'; 149 223 $params['limit'] = $limit; 150 224 } 151 else 152 { 225 else { 153 226 $params['order'] = $w->sortby; 154 227 $params['order'] .= $w->sort == 'asc' ? ' asc' : ' desc'; 155 228 $params['limit'] = $limit; 156 229 } 157 230 158 231 $rs = $C2->getLinks($params); 159 160 if ($rs->isEmpty()) return; 161 232 233 if ($rs->isEmpty()) { 234 235 return null; 236 } 237 162 238 $widthmax = (integer) $core->blog->settings->cinecturlink2->cinecturlink2_widthmax; 163 239 $style = $widthmax ? ' style="width:'.$widthmax.'px;"' : ''; 164 240 165 241 $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 178 253 # --BEHAVIOR-- cinecturlink2WidgetLinks 179 $bhv = $core->callBehavior('cinecturlink2WidgetLinks', $rs->link_id);180 254 $bhv = $core->callBehavior('cinecturlink2WidgetLinks', $rs->link_id); 255 181 256 $entries[] = 182 257 '<p style="text-align:center;">'. … … 188 263 ($w->withlink && !empty($url) ? '</a>' : ''). 189 264 '</p>'.$bhv; 190 191 try 192 { 265 266 try { 193 267 $cur = $core->con->openCursor($C2->table); 194 268 $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 } 198 274 } 199 275 # Tirage aléatoire 200 if ($w->sortby == 'RANDOM' || $w->sortby == 'COUNTER') 201 { 276 if ($w->sortby == 'RANDOM' 277 || $w->sortby == 'COUNTER' 278 ) { 202 279 shuffle($entries); 203 if ($core->blog->settings->cinecturlink2->cinecturlink2_triggeronrandom) 204 { 280 if ($core->blog->settings->cinecturlink2->cinecturlink2_triggeronrandom) { 205 281 $core->blog->triggerBlog(); 206 282 } 207 283 } 208 284 209 285 return 210 286 '<div class="cinecturlink2list">'. … … 216 292 '</div>'; 217 293 } 218 294 219 295 public static function publicCats($w) 220 296 { 221 297 global $core; 298 222 299 $core->blog->settings->addNamespace('cinecturlink2'); 223 300 224 301 if (!$core->blog->settings->cinecturlink2->cinecturlink2_active 225 302 || !$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 228 309 $C2 = new cinecturlink2($core); 229 310 230 311 $rs = $C2->getCategories(array()); 231 232 if ($rs->isEmpty()) return; 233 312 313 if ($rs->isEmpty()) { 314 315 return null; 316 } 317 234 318 $res = 235 319 '<li><a href="'. … … 237 321 '" title="'.__('view all links').'">'.__('all links'). 238 322 '</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)).')'; 242 325 } 243 326 $res .= '</li>'; 244 245 while($rs->fetch()) 246 { 327 328 while($rs->fetch()) { 247 329 $res .= 248 330 '<li><a href="'. … … 251 333 html::escapeHTML($rs->cat_title). 252 334 '</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)).')'; 256 337 } 257 338 $res .= '</li>'; 258 339 } 259 340 260 341 return 261 342 '<div class="cinecturlink2cat">'. … … 265 346 } 266 347 } 267 ?> -
plugins/cinecturlink2/inc/class.cinecturlink2.php
r2314 r3247 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # 3 4 # This file is part of cinecturlink2, a plugin for Dotclear 2. 4 5 # 5 # Copyright (c) 2009-201 0 JCDenis and contributors6 # jcdenis@gdwd.com6 # Copyright (c) 2009-2013 Jean-Christian Denis and contributors 7 # contact@jcdenis.fr http://jcd.lv 7 8 # 8 9 # Licensed under the GPL version 2.0 license. 9 10 # A copy of this license is available in LICENSE file or at 10 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 # 11 13 # -- END LICENSE BLOCK ------------------------------------ 12 14 13 if (!defined('DC_RC_PATH')){return;} 14 15 if (!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 */ 15 25 class cinecturlink2 16 26 { 27 /** @var dcCore dcCore instance */ 17 28 public $core; 29 /** @var dbLayer dbLayer instance */ 18 30 public $con; 31 /** @var string Cinecturlink table name */ 19 32 public $table; 33 /** @var string Blog ID */ 20 34 public $blog; 21 35 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 24 45 $this->core = $core; 25 46 $this->con = $core->con; … … 28 49 } 29 50 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) { 34 61 $strReq = 'SELECT count(L.link_id) '; 35 62 } 36 else 37 { 63 else { 38 64 $content_req = ''; 39 65 if (!empty($params['columns']) && is_array($params['columns'])) { 40 $content_req .= implode(', ', $params['columns']).', ';66 $content_req .= implode(', ', $params['columns']).', '; 41 67 } 42 68 … … 63 89 $strReq .= "WHERE L.blog_id = '".$this->blog."' "; 64 90 65 if (isset($params['link_type'])) 66 { 91 if (isset($params['link_type'])) { 67 92 if (is_array($params['link_type']) && !empty($params['link_type'])) { 68 93 $strReq .= 'AND L.link_type '.$this->con->in($params['link_type']); 69 } elseif ($params['link_type'] != '') { 94 } 95 elseif ($params['link_type'] != '') { 70 96 $strReq .= "AND L.link_type = '".$this->con->escape($params['link_type'])."' "; 71 97 } 72 98 } 73 else 74 { 99 else { 75 100 $strReq .= "AND L.link_type = 'cinecturlink' "; 76 101 } … … 78 103 if (!empty($params['link_id'])) { 79 104 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 { 82 108 $params['link_id'] = array((integer) $params['link_id']); 83 109 } … … 87 113 if (!empty($params['cat_id'])) { 88 114 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 { 91 118 $params['cat_id'] = array((integer) $params['cat_id']); 92 119 } … … 109 136 } 110 137 111 if (!$count_only) 112 { 138 if (!$count_only) { 113 139 if (!empty($params['order'])) { 114 140 $strReq .= 'ORDER BY '.$this->con->escape($params['order']).' '; 115 } else { 141 } 142 else { 116 143 $strReq .= 'ORDER BY L.link_upddt DESC '; 117 144 } … … 125 152 } 126 153 127 public function addLink($cur) 154 /** 155 * Add link 156 * 157 * @param cursor $cur cursor instance 158 */ 159 public function addLink(cursor $cur) 128 160 { 129 161 $this->con->writeLock($this->table); 130 162 131 try 132 { 163 try { 133 164 if ($cur->link_title == '') { 134 165 throw new Exception(__('No link title')); … … 154 185 $this->con->unlock(); 155 186 } 156 catch (Exception $e) 157 { 187 catch (Exception $e) { 158 188 $this->con->unlock(); 159 189 throw $e; … … 162 192 163 193 # --BEHAVIOR-- cinecturlink2AfterAddLink 164 $this->core->callBehavior('cinecturlink2AfterAddLink', $cur);194 $this->core->callBehavior('cinecturlink2AfterAddLink', $cur); 165 195 166 196 return $cur->link_id; 167 197 } 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) 170 207 { 171 208 $id = (integer) $id; … … 182 219 if ($behavior) { 183 220 # --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 */ 188 230 public function delLink($id) 189 231 { … … 195 237 196 238 # --BEHAVIOR-- cinecturlink2BeforeDelLink 197 $this->core->callBehavior('cinecturlink2BeforeDelLink', $id);239 $this->core->callBehavior('cinecturlink2BeforeDelLink', $id); 198 240 199 241 $this->con->execute( … … 206 248 } 207 249 250 /** 251 * Get next link ID 252 * 253 * @return integer Next link ID 254 */ 208 255 private function getNextLinkId() 209 256 { … … 213 260 } 214 261 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) { 219 272 $strReq = 'SELECT count(C.cat_id) '; 220 273 } 221 else 222 { 274 else { 223 275 $content_req = ''; 224 276 if (!empty($params['columns']) && is_array($params['columns'])) { 225 $content_req .= implode(', ', $params['columns']).', ';277 $content_req .= implode(', ', $params['columns']).', '; 226 278 } 227 279 … … 242 294 if (!empty($params['cat_id'])) { 243 295 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 { 246 299 $params['cat_id'] = array((integer) $params['cat_id']); 247 300 } 248 301 $strReq .= 'AND C.cat_id '.$this->con->in($params['cat_id']); 249 302 } 250 303 251 304 if (!empty($params['cat_title'])) { 252 305 $strReq .= "AND C.cat_title = '".$this->con->escape($params['cat_title'])."' "; … … 257 310 } 258 311 259 if (!$count_only) 260 { 312 if (!$count_only) { 261 313 if (!empty($params['order'])) { 262 314 $strReq .= 'ORDER BY '.$this->con->escape($params['order']).' '; 263 } else { 315 } 316 else { 264 317 $strReq .= 'ORDER BY cat_pos ASC '; 265 318 } … … 273 326 } 274 327 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) 276 335 { 277 336 $this->con->writeLock($this->table.'_cat'); 278 337 279 try 280 { 338 try { 281 339 if ($cur->cat_title == '') { 282 340 throw new Exception(__('No category title')); … … 294 352 $this->con->unlock(); 295 353 } 296 catch (Exception $e) 297 { 354 catch (Exception $e) { 298 355 $this->con->unlock(); 299 356 throw $e; 300 357 } 301 358 $this->trigger(); 359 302 360 return $cur->cat_id; 303 361 } 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) 306 370 { 307 371 $id = (integer) $id; … … 317 381 } 318 382 383 /** 384 * Delete category 385 * 386 * @param integer $id Category ID 387 */ 319 388 public function delCategory($id) 320 389 { … … 339 408 $this->trigger(); 340 409 } 341 410 411 /** 412 * Get next category ID 413 * 414 * @return integer Next category ID 415 */ 342 416 private function getNextCatId() 343 417 { … … 346 420 )->f(0) + 1; 347 421 } 348 422 423 /** 424 * Get next category position 425 * 426 * @return integer Next category position 427 */ 349 428 private function getNextCatPos() 350 429 { … … 355 434 } 356 435 436 /** 437 * Trigger event 438 */ 357 439 private function trigger() 358 440 { 359 441 $this->core->blog->triggerBlog(); 360 442 } 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) { 370 457 throw new Exception(__('Failed to create public folder for images.')); 371 458 } 459 372 460 return false; 373 461 } 374 462 } 463 375 464 return true; 376 465 } 377 466 } 378 ?> -
plugins/cinecturlink2/inc/lib.cinecturlink2.activityreport.php
r2023 r3247 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # 3 4 # This file is part of cinecturlink2, a plugin for Dotclear 2. 4 5 # 5 # Copyright (c) 2009-201 0 JCDenis and contributors6 # jcdenis@gdwd.com6 # Copyright (c) 2009-2013 Jean-Christian Denis and contributors 7 # contact@jcdenis.fr http://jcd.lv 7 8 # 8 9 # Licensed under the GPL version 2.0 license. 9 10 # A copy of this license is available in LICENSE file or at 10 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 # 11 13 # -- END LICENSE BLOCK ------------------------------------ 12 14 13 if (!defined('DC_RC_PATH')){return;} 15 if (!defined('DC_RC_PATH')) { 16 17 return null; 18 } 14 19 15 20 # This file is used with plugin activityReport 16 $core->activityReport->addGroup('cinecturlink2', __('Plugin cinecturlink2'));21 $core->activityReport->addGroup('cinecturlink2', __('Plugin cinecturlink2')); 17 22 18 23 # from BEHAVIOR cinecturlink2AfterAddLink in cinecturlink2/inc/class.cinecturlink2.php … … 23 28 __('A new cineturlink named "%s" was added by "%s"'), 24 29 'cinecturlink2AfterAddLink', 25 array('cinecturlink2ActivityReportBehaviors', 'addLink')30 array('cinecturlink2ActivityReportBehaviors', 'addLink') 26 31 ); 27 32 # from BEHAVIOR cinecturlink2AfterUpdLink in cinecturlink2/inc/class.cinecturlink2.php … … 32 37 __('Cinecturlink named "%s" has been updated by "%s"'), 33 38 'cinecturlink2AfterUpdLink', 34 array('cinecturlink2ActivityReportBehaviors', 'updLink')39 array('cinecturlink2ActivityReportBehaviors', 'updLink') 35 40 ); 36 41 # from BEHAVIOR cinecturlink2BeforeDelLink in cinecturlink2/inc/class.cinecturlink2.php … … 41 46 __('Cinecturlink named "%s" has been deleted by "%s"'), 42 47 'cinecturlink2BeforeDelLink', 43 array('cinecturlink2ActivityReportBehaviors', 'delLink')48 array('cinecturlink2ActivityReportBehaviors', 'delLink') 44 49 ); 45 50 … … 55 60 ); 56 61 57 $core->activityReport->addLog('cinecturlink2', 'create',$logs);62 $core->activityReport->addLog('cinecturlink2', 'create', $logs); 58 63 } 59 public static function updLink($cur,$id) 64 65 public static function updLink($cur, $id) 60 66 { 61 67 global $core; … … 68 74 ); 69 75 70 $core->activityReport->addLog('cinecturlink2', 'update',$logs);76 $core->activityReport->addLog('cinecturlink2', 'update', $logs); 71 77 } 78 72 79 public static function delLink($id) 73 80 { … … 81 88 ); 82 89 83 $core->activityReport->addLog('cinecturlink2', 'delete',$logs);90 $core->activityReport->addLog('cinecturlink2', 'delete', $logs); 84 91 } 85 92 } 86 ?> -
plugins/cinecturlink2/inc/lib.cinecturlink2.context.php
r2314 r3247 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # 3 4 # This file is part of cinecturlink2, a plugin for Dotclear 2. 4 5 # 5 # Copyright (c) 2009-201 0 JCDenis and contributors6 # jcdenis@gdwd.com6 # Copyright (c) 2009-2013 Jean-Christian Denis and contributors 7 # contact@jcdenis.fr http://jcd.lv 7 8 # 8 9 # Licensed under the GPL version 2.0 license. 9 10 # A copy of this license is available in LICENSE file or at 10 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 # 11 13 # -- END LICENSE BLOCK ------------------------------------ 12 14 13 class c 2_context15 class cinecturlink2Context 14 16 { 15 17 public static function PaginationNbPages() 16 18 { 17 19 global $_ctx; 18 20 19 21 if ($_ctx->c2_pagination === null) { 22 20 23 return false; 21 24 } 22 25 23 26 $nb_posts = $_ctx->c2_pagination->f(0); 24 27 $nb_per_page = $_ctx->c2_params['limit'][1]; 25 28 26 29 $nb_pages = ceil($nb_posts/$nb_per_page); 27 30 28 31 return $nb_pages; 29 32 } 30 33 31 34 public static function PaginationPosition($offset=0) 32 35 { 33 36 if (isset($GLOBALS['c2_page_number'])) { 34 37 $p = $GLOBALS['c2_page_number']; 35 } else { 38 } 39 else { 36 40 $p = 1; 37 41 } 38 42 39 43 $p = $p+$offset; 40 44 41 45 $n = self::PaginationNbPages(); 42 46 if (!$n) { 47 43 48 return $p; 44 49 } 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; 51 52 } 52 53 53 54 public static function PaginationStart() 54 55 { 55 56 if (isset($GLOBALS['c2_page_number'])) { 57 56 58 return self::PaginationPosition() == 1; 57 59 } 58 60 59 61 return true; 60 62 } … … 63 65 { 64 66 if (isset($GLOBALS['c2_page_number'])) { 67 65 68 return self::PaginationPosition() == self::PaginationNbPages(); 66 69 } 67 70 68 71 return false; 69 72 } … … 72 75 { 73 76 $args = $_SERVER['URL_REQUEST_PART']; 74 77 75 78 $n = self::PaginationPosition($offset); 76 77 $args = preg_replace('#(^|/)c2page/([0-9]+)$#', '',$args);78 79 80 $args = preg_replace('#(^|/)c2page/([0-9]+)$#', '', $args); 81 79 82 $url = $GLOBALS['core']->blog->url.$args; 80 83 81 84 if ($n > 1) { 82 85 $url = preg_replace('#/$#','',$url); 83 86 $url .= '/c2page/'.$n; 84 87 } 85 88 86 89 # If search param 87 90 if (!empty($_GET['q'])) { … … 89 92 $url .= $s.'q='.rawurlencode($_GET['q']); 90 93 } 94 91 95 return $url; 92 96 } 93 97 94 98 public static function categoryCurrent() 95 99 { 96 100 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 100 104 return false; 101 105 } 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 104 108 return true; 105 109 } 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 108 112 return true; 109 113 } 114 110 115 return false; 111 116 } 112 117 } 113 ?> -
plugins/cinecturlink2/inc/lib.cinecturlink2.list.php
r2314 r3247 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # 3 4 # This file is part of cinecturlink2, a plugin for Dotclear 2. 4 5 # 5 # Copyright (c) 2009-201 0 JCDenis and contributors6 # jcdenis@gdwd.com6 # Copyright (c) 2009-2013 Jean-Christian Denis and contributors 7 # contact@jcdenis.fr http://jcd.lv 7 8 # 8 9 # Licensed under the GPL version 2.0 license. 9 10 # A copy of this license is available in LICENSE file or at 10 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 # 11 13 # -- END LICENSE BLOCK ------------------------------------ 12 14 13 if (!defined('DC_CONTEXT_ADMIN')){return;} 15 if (!defined('DC_CONTEXT_ADMIN')) { 16 17 return null; 18 } 14 19 15 20 class adminlistCinecturlink2 extends adminGenericList 16 21 { 17 public function display($page, $nb_per_page,$url)22 public function display($page, $nb_per_page, $url) 18 23 { 19 if ($this->rs->isEmpty()) 20 { 24 if ($this->rs->isEmpty()) { 21 25 echo '<p><strong>'.__('There is no link').'</strong></p>'; 22 26 } 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 27 30 $pager->base_url = $url; 28 31 29 32 $html_block = 30 33 '<table class="clear">'. … … 37 40 '<th class="nowrap">'.__('Category').'</th>'. 38 41 '<th class="nowrap">'.__('My rating').'</th>'. 39 '<th class="nowrap" colspan="2">'.__('Date').'</th>'.42 '<th class="nowrap">'.__('Date').'</th>'. 40 43 '</tr>'. 41 44 '</thead>'. 42 45 '<tbody>%s</tbody>'. 43 46 '</table>'; 44 47 45 48 echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 46 49 $blocks = explode('%s',$html_block); 47 50 echo $blocks[0]; 48 51 49 52 $this->rs->index(((integer)$page - 1) * $nb_per_page); 50 53 $iter = 0; 51 while ($iter < $nb_per_page) 52 { 54 while ($iter < $nb_per_page) { 53 55 echo $this->linkLine($url,$iter); 54 56 … … 64 66 } 65 67 } 66 67 private function linkLine($url, $loop)68 69 private function linkLine($url, $loop) 68 70 { 69 71 return 70 72 '<tr class="line">'."\n". 71 73 '<td class="nowrap">'. 72 form::checkbox(array('links[]'), $this->rs->link_id,0).74 form::checkbox(array('links[]'), $this->rs->link_id, 0). 73 75 '</td>'. 74 76 '<td class="nowrap">'. 77 '<a href="plugin.php?p=cinecturlink2&link_id='.$this->rs->link_id.'#newlink" title="'.__('Edit').'">'. 75 78 html::escapeHTML($this->rs->link_title). 79 '</a>'. 76 80 "</td>\n". 77 81 '<td class="nowrap">'. … … 94 98 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')). 95 99 "</td>\n". 96 '<td class="nowrap">'.97 '<a href="plugin.php?p=cinecturlink2&part=main&tab=newlink&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".99 100 '</tr>'."\n"; 100 101 } 101 102 } 102 ?> -
plugins/cinecturlink2/inc/lib.sitemaps.cinecturlink2.php
r2314 r3247 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # 3 4 # This file is part of cinecturlink2, a plugin for Dotclear 2. 4 5 # 5 # Copyright (c) 2009-201 0 JCDenis and contributors6 # jcdenis@gdwd.com6 # Copyright (c) 2009-2013 Jean-Christian Denis and contributors 7 # contact@jcdenis.fr http://jcd.lv 7 8 # 8 9 # Licensed under the GPL version 2.0 license. 9 10 # A copy of this license is available in LICENSE file or at 10 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 # 11 13 # -- END LICENSE BLOCK ------------------------------------ 12 14 … … 15 17 public static function sitemapsDefineParts($map_parts) 16 18 { 17 $map_parts->offsetSet(__('Cine turlink'),'cinecturlink2');19 $map_parts->offsetSet(__('Cinecturlink'), 'cinecturlink2'); 18 20 } 19 21 20 22 public static function sitemapsURLsCollect($sitemaps) 21 23 { … … 24 26 25 27 if ($core->plugins->moduleExists('cinecturlink2') 26 && $core->blog->settings->sitemaps->sitemaps_cinecturlink2_url) 27 { 28 && $core->blog->settings->sitemaps->sitemaps_cinecturlink2_url) { 29 28 30 $freq = $sitemaps->getFrequency($core->blog->settings->sitemaps->sitemaps_cinecturlink2_fq); 29 31 $prio = $sitemaps->getPriority($core->blog->settings->sitemaps->sitemaps_cinecturlink2_pr); 30 32 $base = $core->blog->url.$core->url->getBase('cinecturlink2'); 31 33 32 $sitemaps->addEntry($base, $prio,$freq);34 $sitemaps->addEntry($base, $prio, $freq); 33 35 34 36 $core->blog->settings->addNamespace('cinecturlink2'); 35 37 $C2 = new cinecturlink2($core); 36 38 $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); 40 41 } 41 42 } 42 43 } 43 44 } 44 ?> -
plugins/cinecturlink2/index.php
r2314 r3247 1 1 <?php 2 2 # -- BEGIN LICENSE BLOCK ---------------------------------- 3 # 3 4 # This file is part of cinecturlink2, a plugin for Dotclear 2. 4 5 # 5 # Copyright (c) 2009-201 0 JCDenis and contributors6 # jcdenis@gdwd.com6 # Copyright (c) 2009-2013 Jean-Christian Denis and contributors 7 # contact@jcdenis.fr http://jcd.lv 7 8 # 8 9 # Licensed under the GPL version 2.0 license. 9 10 # A copy of this license is available in LICENSE file or at 10 11 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 # 11 13 # -- END LICENSE BLOCK ------------------------------------ 12 14 13 if (!defined('DC_CONTEXT_ADMIN')){return;} 14 15 dcPage::check('content'); 16 17 # Init 18 $core->blog->settings->addNamespace('cinecturlink2'); 15 if (!defined('DC_CONTEXT_ADMIN')) { 16 17 return null; 18 } 19 20 dcPage::check('contentadmin'); 21 22 # Class 19 23 $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 ' › <a href="'.$p_url.'&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.'&part=setting">'.__('Settings').'</a> - 40 cinecturlink2 - '.$core->plugins->moduleInfo('cinecturlink2','version').' 24 require 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 41 try { 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 } 242 catch(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; 252 if (!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 272 if ($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('-'=> ''); 284 while($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; 290 try { 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 } 305 catch (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(); 316 for ($i=0;$i<21;$i++) { 317 $notes_combo[$i.'/20'] = $i; 318 } 319 320 $pager_base_url = $p_url. 321 '&sortby='.$sortby. 322 '&order='.$order. 323 '&nb='.$nb_per_page. 324 '&page=%s'; 325 326 try { 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 } 331 catch (Exception $e) { 332 $core->error->add($e->getMessage()); 333 } 334 335 # Page headers 336 echo 337 '<html><head>'. 338 '<title>'.__('Cinecturlink 2').'</title>'. 339 dcPage::jsToolBar(). 340 dcPage::jsToolMan(). 341 dcPage::jsLoad('js/_posts_list.js'). 342 dcPage::jsLoad('index.php?pf=cinecturlink2/js/cinecturlink2.js'). 343 dcPage::jsPageTabs(). 344 "<script type=\"text/javascript\"> 345 //<![CDATA[\n". 346 dcPage::jsVar('dotclear.msg.show_filters', $show_filters ? 'true':'false')."\n". 347 dcPage::jsVar('dotclear.msg.filter_posts_list', __('Show filters and display options'))."\n". 348 dcPage::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 361 if (!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.'&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.'&move=1#links">« '.__('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 403 elseif (!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.'&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.'&move=1#links">« '.__('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 444 else { 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 668 dcPage::helpBlock('cinecturlink2'); 669 670 # Page footer 671 echo 672 '<hr class="clear"/><p class="right modules"> 673 <a class="module-config" '. 674 'href="plugins.php?module=cinecturlink2&conf=1&redir='. 675 urlencode('plugin.php?p=cinecturlink2').'">'.__('Configuration').'</a> - 676 cinecturlink2 - '.$core->plugins->moduleInfo('cinecturlink2', 'version').' 41 677 <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 44 44 } 45 45 })(jQuery); 46 47 var dragsort = ToolMan.dragsort(); 48 $(function(){ 49 dragsort.makeTableSortable($('#links-list-cat').get(0), 50 dotclear.sortable.setHandle,dotclear.sortable.saveOrder); 51 }); 52 dotclear.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 1 1 <?php 2 2 // 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 10 12 $GLOBALS['__l10n']['My cinecturlink'] = 'Mes cinecturlink'; 11 13 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 13 73 $GLOBALS['__l10n']['Update date'] = 'Date de mise à jour'; 14 74 15 #_widgets.php: 3616 #inc/ index.main.php:24617 #in c/lib.cinecturlink2.list.php:3875 #_widgets.php:46 76 #inc/lib.cinecturlink2.list.php:41 77 #index.php:261 18 78 $GLOBALS['__l10n']['My rating'] = 'Mon évaluation'; 19 79 20 #_widgets.php: 3880 #_widgets.php:48 21 81 $GLOBALS['__l10n']['Random'] = 'Aléatoire'; 22 82 23 #_widgets.php: 3983 #_widgets.php:49 24 84 $GLOBALS['__l10n']['Number of views'] = 'Nombre d\'affichages'; 25 85 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 27 90 $GLOBALS['__l10n']['Sort: (only for date, note and title)'] = 'Ordre: (seulement pour date, note et titre)'; 28 91 29 #_widgets.php: 6292 #_widgets.php:92 30 93 $GLOBALS['__l10n']['Limit:'] = 'Limite :'; 31 94 32 #_widgets.php: 6595 #_widgets.php:98 33 96 $GLOBALS['__l10n']['Enable link'] = 'Autoriser les liens'; 34 97 35 #_widgets.php: 6898 #_widgets.php:104 36 99 $GLOBALS['__l10n']['Show author'] = 'Afficher l\'auteur'; 37 100 38 #_widgets.php: 71101 #_widgets.php:110 39 102 $GLOBALS['__l10n']['Show my rating'] = 'Afficher mon évaluation'; 40 103 41 #_widgets.php: 74104 #_widgets.php:116 42 105 $GLOBALS['__l10n']['Show description'] = 'Afficher la description'; 43 106 44 #_widgets.php: 77107 #_widgets.php:122 45 108 $GLOBALS['__l10n']['Show a link to cinecturlink page'] = 'Afficher un lien vers la page publique'; 46 109 47 #_widgets.php:87 110 #_widgets.php:143 111 #_widgets.php:146 48 112 $GLOBALS['__l10n']['List of categories of cinecturlink'] = 'Liste des catégories de cinecturlink'; 49 113 50 #_widgets.php: 90114 #_widgets.php:151 51 115 $GLOBALS['__l10n']['My cinecturlink by categories'] = 'Mes cinecturlink par catégories'; 52 116 53 #_widgets.php: 93117 #_widgets.php:156 54 118 $GLOBALS['__l10n']['Show number of links'] = 'Afficher le nombre de liens'; 55 119 56 #_widgets.php:2 1457 #_widgets.php: 237120 #_widgets.php:290 121 #_widgets.php:321 58 122 #default-templates/cinecturlink2.html:56 59 123 #default-templates/cinecturlink2.html:56 60 124 $GLOBALS['__l10n']['view all links'] = 'voir tous les liens'; 61 125 62 #_widgets.php:2 14126 #_widgets.php:290 63 127 $GLOBALS['__l10n']['More links'] = 'Plus de liens'; 64 128 65 #_widgets.php: 237129 #_widgets.php:321 66 130 $GLOBALS['__l10n']['all links'] = 'tous les liens'; 67 131 68 #_widgets.php: 250132 #_widgets.php:332 69 133 $GLOBALS['__l10n']['view links of this category'] = 'voir les liens de cette catégorie'; 70 134 … … 90 154 $GLOBALS['__l10n']['category'] = 'catégorie'; 91 155 92 #inc/class.cinecturlink2.php:13 4156 #inc/class.cinecturlink2.php:139 93 157 $GLOBALS['__l10n']['No link title'] = 'Pas de titre de lien'; 94 158 95 #inc/class.cinecturlink2.php:1 37159 #inc/class.cinecturlink2.php:142 96 160 $GLOBALS['__l10n']['No link description'] = 'Pas de description de lien'; 97 161 98 #inc/class.cinecturlink2.php:17 499 #inc/class.cinecturlink2.php:19 3162 #inc/class.cinecturlink2.php:178 163 #inc/class.cinecturlink2.php:197 100 164 $GLOBALS['__l10n']['No such link ID'] = 'ID de lien inconnu'; 101 165 102 #inc/class.cinecturlink2.php:28 2166 #inc/class.cinecturlink2.php:284 103 167 $GLOBALS['__l10n']['No category title'] = 'Pas de titre de catégorie'; 104 168 105 #inc/class.cinecturlink2.php:28 5169 #inc/class.cinecturlink2.php:287 106 170 $GLOBALS['__l10n']['No category description'] = 'Pas de description de catégorie'; 107 171 108 #inc/class.cinecturlink2.php:31 0109 #inc/class.cinecturlink2.php:32 4172 #inc/class.cinecturlink2.php:312 173 #inc/class.cinecturlink2.php:326 110 174 $GLOBALS['__l10n']['No such category ID'] = 'ID de catégorie inconnu'; 111 175 112 #inc/class.cinecturlink2.php:3 70176 #inc/class.cinecturlink2.php:369 113 177 $GLOBALS['__l10n']['Failed to create public folder for images.'] = 'Impossible de créer le repertoire publique pour les images.'; 114 178 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 117 215 $GLOBALS['__l10n']['You must provide a title.'] = 'Vous devez fournir un titre.'; 118 216 119 #in c/index.main.php:93217 #index.php:103 120 218 $GLOBALS['__l10n']['Category with same name already exists.'] = 'Une catégorie portant le même nom existe déjà.'; 121 219 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 123 231 $GLOBALS['__l10n']['You must provide an author.'] = 'Vous devez spécifier un auteur'; 124 232 125 #in c/index.main.php:188233 #index.php:194 126 234 $GLOBALS['__l10n']['You must provide a link to an image.'] = 'Vous devez fournir un lien vers une image.'; 127 235 128 #in c/index.main.php:207236 #index.php:212 129 237 $GLOBALS['__l10n']['Link with same name already exists.'] = 'Un lien avec le même titre existe déjà.'; 130 238 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 135 252 $GLOBALS['__l10n']['change my rating'] = 'Modifier mon évaluation'; 136 253 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 147 313 $GLOBALS['__l10n']['There is no category'] = 'Il n\'y a pas de catégorie'; 148 314 149 #in c/index.main.php:392315 #index.php:611 150 316 $GLOBALS['__l10n']['name'] = 'nom'; 151 317 152 #in c/index.main.php:392318 #index.php:611 153 319 $GLOBALS['__l10n']['description'] = 'description'; 154 320 155 #in c/index.main.php:413321 #index.php:633 156 322 $GLOBALS['__l10n']['Check to delete'] = 'Cocher pour supprimer'; 157 323 158 #in c/index.main.php:421324 #index.php:638 159 325 $GLOBALS['__l10n']['update categories'] = 'mettre à jour les catégories'; 160 326 161 #inc/index.main.php:453162 $GLOBALS['__l10n']['Link successfully created'] = 'Lien créé avec succès';163 164 #inc/index.main.php:457165 $GLOBALS['__l10n']['Links successfully deleted'] = 'Liens supprimés avec succès';166 167 #inc/index.main.php:461168 $GLOBALS['__l10n']['Links successfully updated'] = 'Liens mis à jour avec succès';169 170 #inc/index.main.php:465171 #inc/lib.cinecturlink2.list.php:21172 $GLOBALS['__l10n']['There is no link'] = 'Il n\'y a pas de lien';173 174 #inc/index.main.php:507175 $GLOBALS['__l10n']['Selected links action:'] = 'Action sur les liens selectionnés :';176 177 #inc/index.main.php:529178 #inc/index.main.php:560179 $GLOBALS['__l10n']['Edit links'] = 'Modifier les liens';180 181 #inc/index.main.php:531182 $GLOBALS['__l10n']['This changes category for all selected links.'] = 'Ceci change la catégorie des liens selectionnés.';183 184 #inc/index.main.php:543185 $GLOBALS['__l10n']['Select a category:'] = 'Selectionner une catégorie :';186 187 #inc/index.main.php:562188 $GLOBALS['__l10n']['This changes my rating for all selected links.'] = 'Ceci change mon évaluation des liens selectionnés.';189 190 #inc/index.main.php:574191 $GLOBALS['__l10n']['Select a rating:'] = 'Selectionner une note :';192 193 #inc/index.main.php:588194 $GLOBALS['__l10n']['New link'] = 'Nouveau lien';195 196 #inc/index.main.php:616197 $GLOBALS['__l10n']['Search with Google'] = 'Rechercher avec Google';198 199 #inc/index.main.php:619200 $GLOBALS['__l10n']['Image URL:'] = 'Lien vers l\'image :';201 202 #inc/index.main.php:619203 $GLOBALS['__l10n']['Search with Amazon'] = 'Rechercher avec Amazon';204 205 #inc/index.main.php:620206 $GLOBALS['__l10n']['or select from repository:'] = 'ou selectionner depuis le dépôt :';207 208 #inc/index.main.php:621209 $GLOBALS['__l10n']['My rating:'] = 'Mon évaluation :';210 211 #inc/index.main.php:631212 $GLOBALS['__l10n']['update link'] = 'mettre à jour ce lien';213 214 #inc/index.main.php:631215 $GLOBALS['__l10n']['create link'] = 'créer ce lien';216 217 #inc/index.setting.php:44218 $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:70221 #inc/index.setting.php:77222 #index.php:39223 $GLOBALS['__l10n']['Settings'] = 'Paramètres';224 225 #inc/index.setting.php:73226 $GLOBALS['__l10n']['Please wait'] = 'Veuillez patienter';227 228 #inc/index.setting.php:91229 $GLOBALS['__l10n']['Enable plugin'] = 'Activer l\'extension';230 231 #inc/index.setting.php:92232 $GLOBALS['__l10n']['Maximum width of images (in pixel):'] = 'Largeur maximum des images (en pixels) :';233 234 #inc/index.setting.php:94235 $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:101238 $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:102241 $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:105244 $GLOBALS['__l10n']['Public page'] = 'Page publique';245 246 #inc/index.setting.php:108247 $GLOBALS['__l10n']['Enable public page'] = 'Activer la page publique';248 249 #inc/index.setting.php:109250 $GLOBALS['__l10n']['Public page has url: %s'] = 'La page publique à l\'URL: %s';251 252 #inc/index.setting.php:110253 $GLOBALS['__l10n']['Title of the public page:'] = 'Titre de la page publique :';254 255 #inc/index.setting.php:112256 $GLOBALS['__l10n']['Description of the public page:'] = 'Description de la page publique :';257 258 #inc/index.setting.php:114259 $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:119262 $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:120265 $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:121268 $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:122271 $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:123274 #inc/index.setting.php:124275 $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:16278 $GLOBALS['__l10n']['Plugin cinecturlink2'] = 'Extension cinecturlink 2';279 280 #inc/lib.cinecturlink2.activityreport.php:22281 $GLOBALS['__l10n']['link creation'] = 'Création de lien';282 283 #inc/lib.cinecturlink2.activityreport.php:23284 $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:31287 $GLOBALS['__l10n']['updating link'] = 'Mise à jour de lien';288 289 #inc/lib.cinecturlink2.activityreport.php:32290 $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:40293 $GLOBALS['__l10n']['link deletion'] = 'Suppression de lien';294 295 #inc/lib.cinecturlink2.activityreport.php:41296 $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:85299 $GLOBALS['__l10n']['image'] = 'image';300 301 #inc/lib.cinecturlink2.list.php:97302 #inc/lib.cinecturlink2.list.php:97303 $GLOBALS['__l10n']['Edit'] = 'Modifier';304 305 327 ?> -
plugins/cinecturlink2/locales/fr/main.po
r2357 r3247 1 1 # Language: Français 2 # Module: cinecturlink2 - 0. 6.13 # Date: 201 0-06-13 13:05:494 # Translated with translater 1.42 # Module: cinecturlink2 - 0.7 3 # Date: 2013-11-04 19:43:18 4 # Translated with translater 2013.05.11 5 5 6 6 msgid "" 7 7 msgstr "" 8 8 "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" 10 10 "POT-Creation-Date: \n" 11 "PO-Revision-Date: 201 0-06-13T13:05:49+00:00\n"12 "Last-Translator: J CDenis\n"11 "PO-Revision-Date: 2013-11-04T19:43:18+00:00\n" 12 "Last-Translator: Jean-Christian Denis\n" 13 13 "Language-Team: \n" 14 14 "MIME-Version: 1.0\n" 15 15 "Content-Transfer-Encoding: 8bit\n" 16 16 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 20 22 msgid "My cinecturlink" 21 23 msgstr "Mes cinecturlink" 22 24 23 #: _widgets.php:35 25 #: _config.php:55 26 msgid "You must provide a specific folder for images." 27 msgstr "Vous devez fournir un dossier spécifique pour les images." 28 29 #: _config.php:73 30 msgid "Configuration has been successfully updated." 31 msgstr "La configuration a été mise à jour avec succés." 32 33 #: _config.php:93 34 msgid "Enable extension" 35 msgstr "Activer l'extension" 36 37 #: _config.php:95 38 msgid "Maximum width of images (in pixel):" 39 msgstr "Largeur maximum des images (en pixels) :" 40 41 #: _config.php:98 42 msgid "Public folder of images (under public folder of blog):" 43 msgstr "Dossier publique des images (dans le répertoire \"public\" du blog) :" 44 45 #: _config.php:108 46 msgid "Update cache when use \"Random\" or \"Number of view\" order on widget (Need reload of widgets on change)" 47 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)" 48 49 #: _config.php:109 50 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." 51 msgstr "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 54 msgid "Public page" 55 msgstr "Page publique" 56 57 #: _config.php:118 58 msgid "Enable public page" 59 msgstr "Activer la page publique" 60 61 #: _config.php:119 62 msgid "Public page has url: %s" 63 msgstr "La page publique à l'URL: %s" 64 65 #: _config.php:121 66 msgid "Title of the public page:" 67 msgstr "Titre de la page publique :" 68 69 #: _config.php:124 70 msgid "Description of the public page:" 71 msgstr "Description de la page publique :" 72 73 #: _config.php:127 74 msgid "Limit number of entries per page on pulic page to:" 75 msgstr "Limiter le nombre d'entrée par page sur la page public à :" 76 77 #: _config.php:133 78 msgid "Informations" 79 msgstr "Informations" 80 81 #: _config.php:136 82 msgid "Once the extension has been configured and your links have been created, you can place one of the cinecturlink widgets in the sidebar." 83 msgstr "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 86 msgid "In order to open links in new window you can use plugin %s." 87 msgstr "Afin d'ouvrir les liens dans une nouvelle page vous pouvez utiliser l'extension %s." 88 89 #: _config.php:138 90 msgid "In order to change URL of public page you can use plugin %s." 91 msgstr "Afin de changer l'URL de la page publique vous pouvez utiliser l'extension %s." 92 93 #: _config.php:139 94 msgid "You can add public pages of cinecturlink to the plugin %s." 95 msgstr "Vous pouvez ajouter les pages publiques de cinecturlink à l'extension %s." 96 97 #: _config.php:140 98 #: _config.php:141 99 msgid "The plugin Cinecturlink2 is compatible with plugin %s." 100 msgstr "L'extension Cinecturlink2 est compatible avec l'extension %s." 101 102 #: _widgets.php:45 24 103 msgid "Update date" 25 104 msgstr "Date de mise à jour" 26 105 27 #: _widgets.php: 3628 #: inc/ index.main.php:24629 #: in c/lib.cinecturlink2.list.php:38106 #: _widgets.php:46 107 #: inc/lib.cinecturlink2.list.php:41 108 #: index.php:261 30 109 msgid "My rating" 31 110 msgstr "Mon évaluation" 32 111 33 #: _widgets.php: 38112 #: _widgets.php:48 34 113 msgid "Random" 35 114 msgstr "Aléatoire" 36 115 37 #: _widgets.php: 39116 #: _widgets.php:49 38 117 msgid "Number of views" 39 118 msgstr "Nombre d'affichages" 40 119 41 #: _widgets.php:59 120 #: _widgets.php:61 121 msgid "Show selection of cinecturlinks" 122 msgstr "Afficher une selection de cinecturlink" 123 124 #: _widgets.php:85 42 125 msgid "Sort: (only for date, note and title)" 43 126 msgstr "Ordre: (seulement pour date, note et titre)" 44 127 45 #: _widgets.php: 62128 #: _widgets.php:92 46 129 msgid "Limit:" 47 130 msgstr "Limite :" 48 131 49 #: _widgets.php: 65132 #: _widgets.php:98 50 133 msgid "Enable link" 51 134 msgstr "Autoriser les liens" 52 135 53 #: _widgets.php: 68136 #: _widgets.php:104 54 137 msgid "Show author" 55 138 msgstr "Afficher l'auteur" 56 139 57 #: _widgets.php: 71140 #: _widgets.php:110 58 141 msgid "Show my rating" 59 142 msgstr "Afficher mon évaluation" 60 143 61 #: _widgets.php: 74144 #: _widgets.php:116 62 145 msgid "Show description" 63 146 msgstr "Afficher la description" 64 147 65 #: _widgets.php: 77148 #: _widgets.php:122 66 149 msgid "Show a link to cinecturlink page" 67 150 msgstr "Afficher un lien vers la page publique" 68 151 69 #: _widgets.php:87 152 #: _widgets.php:143 153 #: _widgets.php:146 70 154 msgid "List of categories of cinecturlink" 71 155 msgstr "Liste des catégories de cinecturlink" 72 156 73 #: _widgets.php: 90157 #: _widgets.php:151 74 158 msgid "My cinecturlink by categories" 75 159 msgstr "Mes cinecturlink par catégories" 76 160 77 #: _widgets.php: 93161 #: _widgets.php:156 78 162 msgid "Show number of links" 79 163 msgstr "Afficher le nombre de liens" 80 164 81 #: _widgets.php:2 1482 #: _widgets.php: 237165 #: _widgets.php:290 166 #: _widgets.php:321 83 167 #: default-templates/cinecturlink2.html:56 84 168 #: default-templates/cinecturlink2.html:56 … … 86 170 msgstr "voir tous les liens" 87 171 88 #: _widgets.php:2 14172 #: _widgets.php:290 89 173 msgid "More links" 90 174 msgstr "Plus de liens" 91 175 92 #: _widgets.php: 237176 #: _widgets.php:321 93 177 msgid "all links" 94 178 msgstr "tous les liens" 95 179 96 #: _widgets.php: 250180 #: _widgets.php:332 97 181 msgid "view links of this category" 98 182 msgstr "voir les liens de cette catégorie" … … 125 209 msgstr "catégorie" 126 210 127 #: inc/class.cinecturlink2.php:13 4211 #: inc/class.cinecturlink2.php:139 128 212 msgid "No link title" 129 213 msgstr "Pas de titre de lien" 130 214 131 #: inc/class.cinecturlink2.php:1 37215 #: inc/class.cinecturlink2.php:142 132 216 msgid "No link description" 133 217 msgstr "Pas de description de lien" 134 218 135 #: inc/class.cinecturlink2.php:17 4136 #: inc/class.cinecturlink2.php:19 3219 #: inc/class.cinecturlink2.php:178 220 #: inc/class.cinecturlink2.php:197 137 221 msgid "No such link ID" 138 222 msgstr "ID de lien inconnu" 139 223 140 #: inc/class.cinecturlink2.php:28 2224 #: inc/class.cinecturlink2.php:284 141 225 msgid "No category title" 142 226 msgstr "Pas de titre de catégorie" 143 227 144 #: inc/class.cinecturlink2.php:28 5228 #: inc/class.cinecturlink2.php:287 145 229 msgid "No category description" 146 230 msgstr "Pas de description de catégorie" 147 231 148 #: inc/class.cinecturlink2.php:31 0149 #: inc/class.cinecturlink2.php:32 4232 #: inc/class.cinecturlink2.php:312 233 #: inc/class.cinecturlink2.php:326 150 234 msgid "No such category ID" 151 235 msgstr "ID de catégorie inconnu" 152 236 153 #: inc/class.cinecturlink2.php:3 70237 #: inc/class.cinecturlink2.php:369 154 238 msgid "Failed to create public folder for images." 155 239 msgstr "Impossible de créer le repertoire publique pour les images." 156 240 157 #: inc/index.main.php:88 158 #: inc/index.main.php:180 241 #: inc/lib.cinecturlink2.activityreport.php:21 242 msgid "Plugin cinecturlink2" 243 msgstr "Extension cinecturlink 2" 244 245 #: inc/lib.cinecturlink2.activityreport.php:27 246 msgid "link creation" 247 msgstr "Création de lien" 248 249 #: inc/lib.cinecturlink2.activityreport.php:28 250 msgid "A new cineturlink named \"%s\" was added by \"%s\"" 251 msgstr "Un nouveau cinecturlink nommé \"%s\" a été ajouté par \"%s\"" 252 253 #: inc/lib.cinecturlink2.activityreport.php:36 254 msgid "updating link" 255 msgstr "Mise à jour de lien" 256 257 #: inc/lib.cinecturlink2.activityreport.php:37 258 msgid "Cinecturlink named \"%s\" has been updated by \"%s\"" 259 msgstr "Le cinecturlink nommé \"%s\" a été mis à jour par \"%s\"" 260 261 #: inc/lib.cinecturlink2.activityreport.php:45 262 msgid "link deletion" 263 msgstr "Suppression de lien" 264 265 #: inc/lib.cinecturlink2.activityreport.php:46 266 msgid "Cinecturlink named \"%s\" has been deleted by \"%s\"" 267 msgstr "Le cinecturlink nommé \"%s\" a été effacé par \"%s\"" 268 269 #: inc/lib.cinecturlink2.list.php:25 270 #: index.php:459 271 msgid "There is no link" 272 msgstr "Il n'y a pas de lien" 273 274 #: inc/lib.cinecturlink2.list.php:89 275 msgid "image" 276 msgstr "image" 277 278 #: index.php:73 279 msgid "Categories successfully reordered." 280 msgstr "Catégories réordonnées." 281 282 #: index.php:85 283 msgid "Categories successfully deleted." 284 msgstr "Catégories effacées." 285 286 #: index.php:98 287 #: index.php:188 159 288 msgid "You must provide a title." 160 289 msgstr "Vous devez fournir un titre." 161 290 162 #: in c/index.main.php:93291 #: index.php:103 163 292 msgid "Category with same name already exists." 164 293 msgstr "Une catégorie portant le même nom existe déjà." 165 294 166 #: inc/index.main.php:184 295 #: index.php:113 296 msgid "Category successfully created." 297 msgstr "Catégory créée." 298 299 #: index.php:128 300 msgid "Links successfully deleted." 301 msgstr "Liens effacés." 302 303 #: index.php:150 304 #: index.php:172 305 msgid "Links successfully updated." 306 msgstr "Liens mis à jour." 307 308 #: index.php:191 167 309 msgid "You must provide an author." 168 310 msgstr "Vous devez spécifier un auteur" 169 311 170 #: in c/index.main.php:188312 #: index.php:194 171 313 msgid "You must provide a link to an image." 172 314 msgstr "Vous devez fournir un lien vers une image." 173 315 174 #: in c/index.main.php:207316 #: index.php:212 175 317 msgid "Link with same name already exists." 176 318 msgstr "Un lien avec le même titre existe déjà." 177 319 178 #: inc/index.main.php:218 320 #: index.php:218 321 msgid "Link successfully created." 322 msgstr "Lien crée." 323 324 #: index.php:227 179 325 msgid "Unknown link." 180 msgstr "Lien inconnu" 181 182 #: inc/index.main.php:294 326 msgstr "Lien inconnu." 327 328 #: index.php:233 329 msgid "Link successfully updated." 330 msgstr "Lien mis à jour." 331 332 #: index.php:312 333 msgid "change category" 334 msgstr "lodifier la catégorie" 335 336 #: index.php:313 183 337 msgid "change my rating" 184 338 msgstr "Modifier mon évaluation" 185 339 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 341 msgid "Change category of links" 342 msgstr "Changer la catégorie des liens" 343 344 #: index.php:375 345 #: index.php:416 346 msgid "Go back to links list" 347 msgstr "Retourner à la liste des liens" 348 349 #: index.php:380 350 msgid "Change category for this selection :" 351 msgstr "Changer de catégorie pour la sélection :" 352 353 #: index.php:391 354 msgid "Select a category:" 355 msgstr "Selectionner une catégorie :" 356 357 #: index.php:409 358 msgid "Change note of links" 359 msgstr "Changer la note des liens" 360 361 #: index.php:421 362 msgid "Change note for this selection :" 363 msgstr "Changer de note pour la sélection :" 364 365 #: index.php:432 366 msgid "Select a rating:" 367 msgstr "Selectionner une note :" 368 369 #: index.php:494 370 msgid "Selected links action:" 371 msgstr "Action sur les liens selectionnés :" 372 373 #: index.php:510 374 msgid "New link" 375 msgstr "Nouveau lien" 376 377 #: index.php:549 378 msgid "Details URL:" 379 msgstr "Liens vers les détails :" 380 381 #: index.php:552 382 msgid "Search with Google" 383 msgstr "Rechercher avec Google" 384 385 #: index.php:555 386 msgid "Image URL:" 387 msgstr "Lien vers l'image :" 388 389 #: index.php:558 390 msgid "Search with Amazon" 391 msgstr "Rechercher avec Amazon" 392 393 #: index.php:563 394 msgid "There is no image in cinecturlink media path." 395 msgstr "Il n'y a pas d'image dans le chemin des média cinecturlink." 396 397 #: index.php:567 398 msgid "or select from repository:" 399 msgstr "ou selectionner depuis le dépôt :" 400 401 #: index.php:570 402 msgid "Go to media manager to add image to cinecturlink path." 403 msgstr "Aller dans le gestionnaire de média pour ajouter des images au chemin des cinecturlink." 404 405 #: index.php:586 406 msgid "My rating:" 407 msgstr "Mon évaluation :" 408 409 #: index.php:596 410 msgid "update link" 411 msgstr "mettre à jour ce lien" 412 413 #: index.php:596 414 msgid "create link" 415 msgstr "créer ce lien" 416 417 #: index.php:605 199 418 msgid "There is no category" 200 419 msgstr "Il n'y a pas de catégorie" 201 420 202 #: in c/index.main.php:392421 #: index.php:611 203 422 msgid "name" 204 423 msgstr "nom" 205 424 206 #: in c/index.main.php:392425 #: index.php:611 207 426 msgid "description" 208 427 msgstr "description" 209 428 210 #: in c/index.main.php:413429 #: index.php:633 211 430 msgid "Check to delete" 212 431 msgstr "Cocher pour supprimer" 213 432 214 #: in c/index.main.php:421433 #: index.php:638 215 434 msgid "update categories" 216 435 msgstr "mettre à jour les catégories" 217 436 218 #: inc/index.main.php:453219 msgid "Link successfully created"220 msgstr "Lien créé avec succès"221 222 #: inc/index.main.php:457223 msgid "Links successfully deleted"224 msgstr "Liens supprimés avec succès"225 226 #: inc/index.main.php:461227 msgid "Links successfully updated"228 msgstr "Liens mis à jour avec succès"229 230 #: inc/index.main.php:465231 #: inc/lib.cinecturlink2.list.php:21232 msgid "There is no link"233 msgstr "Il n'y a pas de lien"234 235 #: inc/index.main.php:507236 msgid "Selected links action:"237 msgstr "Action sur les liens selectionnés :"238 239 #: inc/index.main.php:529240 #: inc/index.main.php:560241 msgid "Edit links"242 msgstr "Modifier les liens"243 244 #: inc/index.main.php:531245 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:543249 msgid "Select a category:"250 msgstr "Selectionner une catégorie :"251 252 #: inc/index.main.php:562253 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:574257 msgid "Select a rating:"258 msgstr "Selectionner une note :"259 260 #: inc/index.main.php:588261 msgid "New link"262 msgstr "Nouveau lien"263 264 #: inc/index.main.php:616265 msgid "Search with Google"266 msgstr "Rechercher avec Google"267 268 #: inc/index.main.php:619269 msgid "Image URL:"270 msgstr "Lien vers l'image :"271 272 #: inc/index.main.php:619273 msgid "Search with Amazon"274 msgstr "Rechercher avec Amazon"275 276 #: inc/index.main.php:620277 msgid "or select from repository:"278 msgstr "ou selectionner depuis le dépôt :"279 280 #: inc/index.main.php:621281 msgid "My rating:"282 msgstr "Mon évaluation :"283 284 #: inc/index.main.php:631285 msgid "update link"286 msgstr "mettre à jour ce lien"287 288 #: inc/index.main.php:631289 msgid "create link"290 msgstr "créer ce lien"291 292 #: inc/index.setting.php:44293 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:70297 #: inc/index.setting.php:77298 #: index.php:39299 msgid "Settings"300 msgstr "Paramètres"301 302 #: inc/index.setting.php:73303 msgid "Please wait"304 msgstr "Veuillez patienter"305 306 #: inc/index.setting.php:91307 msgid "Enable plugin"308 msgstr "Activer l'extension"309 310 #: inc/index.setting.php:92311 msgid "Maximum width of images (in pixel):"312 msgstr "Largeur maximum des images (en pixels) :"313 314 #: inc/index.setting.php:94315 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:101319 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:102323 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:105327 msgid "Public page"328 msgstr "Page publique"329 330 #: inc/index.setting.php:108331 msgid "Enable public page"332 msgstr "Activer la page publique"333 334 #: inc/index.setting.php:109335 msgid "Public page has url: %s"336 msgstr "La page publique à l'URL: %s"337 338 #: inc/index.setting.php:110339 msgid "Title of the public page:"340 msgstr "Titre de la page publique :"341 342 #: inc/index.setting.php:112343 msgid "Description of the public page:"344 msgstr "Description de la page publique :"345 346 #: inc/index.setting.php:114347 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:119351 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:120355 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:121359 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:122363 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:123367 #: inc/index.setting.php:124368 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:16372 msgid "Plugin cinecturlink2"373 msgstr "Extension cinecturlink 2"374 375 #: inc/lib.cinecturlink2.activityreport.php:22376 msgid "link creation"377 msgstr "Création de lien"378 379 #: inc/lib.cinecturlink2.activityreport.php:23380 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:31384 msgid "updating link"385 msgstr "Mise à jour de lien"386 387 #: inc/lib.cinecturlink2.activityreport.php:32388 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:40392 msgid "link deletion"393 msgstr "Suppression de lien"394 395 #: inc/lib.cinecturlink2.activityreport.php:41396 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:85400 msgid "image"401 msgstr "image"402 403 #: inc/lib.cinecturlink2.list.php:97404 #: inc/lib.cinecturlink2.list.php:97405 msgid "Edit"406 msgstr "Modifier"407
Note: See TracChangeset
for help on using the changeset viewer.