Changeset 2405
- Timestamp:
- 06/28/10 12:46:50 (13 years ago)
- Location:
- plugins/kUtRL
- Files:
-
- 3 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/kUtRL/_admin.php
r2274 r2405 23 23 ); 24 24 25 $s = kutrlSettings($core);26 27 25 # Admin behaviors 28 if ($ s->kutrl_active)26 if ($core->blog->settings->kUtRL->kutrl_active) 29 27 { 30 28 $core->addBehavior('adminPostHeaders',array('adminKutrl','adminPostHeaders')); … … 39 37 40 38 # Import/export 41 if ($ s->kutrl_extend_importexport)39 if ($core->blog->settings->kUtRL->kutrl_extend_importexport) 42 40 { 43 41 $core->addBehavior('exportFull',array('backupKutrl','exportFull')); … … 55 53 return dcPage::jsLoad('index.php?pf=kUtRL/js/admin.js'); 56 54 } 57 55 58 56 public static function adminPostFormSidebar($post) 59 57 { 60 58 global $core; 61 $s = kutrlSettings($core);62 59 $s = $core->blog->settings->kUtRL; 60 63 61 if (!$s->kutrl_active || !$s->kutrl_admin_service 64 62 || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 65 66 try { 67 $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 68 } 69 catch (Exception $e) { 70 return; 71 } 72 63 64 try 65 { 66 $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 67 } 68 catch (Exception $e) 69 { 70 return; 71 } 72 73 73 if ($post) 74 74 { … … 81 81 $rs = false; 82 82 } 83 83 84 84 echo 85 85 '<h3 id="kutrl-form-title" class="clear">'.__('Short link').'</h3>'. 86 86 '<div id="kutrl-form-content">'. 87 87 form::hidden(array('kutrl_old_post_url'),$post_url); 88 88 89 89 if (!$rs) 90 90 { … … 131 131 } 132 132 $href = $kut->url_base.$rs->hash; 133 133 134 134 echo 135 135 '<p><label class="classic">'. … … 140 140 echo '</div>'; 141 141 } 142 142 143 143 public static function adminAfterPostUpdate($cur,$post_id) 144 144 { 145 145 global $core; 146 $s = kutrlSettings($core);147 146 $s = $core->blog->settings->kUtRL; 147 148 148 # Create: see adminAfterPostCreate 149 149 if (!empty($_POST['kutrl_create']) 150 150 || !$s->kutrl_active || !$s->kutrl_admin_service 151 151 || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 152 153 try { 154 $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 155 } 156 catch (Exception $e) { 157 return; 158 } 159 152 153 try 154 { 155 $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 156 } 157 catch (Exception $e) 158 { 159 return; 160 } 161 160 162 if (empty($_POST['kutrl_old_post_url'])) return; 161 163 162 164 $old_post_url = $_POST['kutrl_old_post_url']; 163 165 164 166 if (!($rs = $kut->isKnowUrl($old_post_url))) return; 165 167 166 168 $rs = $core->blog->getPosts(array('post_id'=>$post_id)); 167 169 168 170 if ($rs->isEmpty()) return; 169 171 170 172 $new_post_url = $rs->getURL(); 171 173 172 174 # Delete 173 175 if (!empty($_POST['kutrl_delete'])) … … 179 181 { 180 182 if ($old_post_url == $new_post_url) return; 181 183 182 184 $kut->remove($old_post_url); 183 185 184 186 $rs = $kut->hash($new_post_url,$custom); // better to update (not yet implemented) 185 187 $url = $kut->url_base.$rs->hash; 186 188 187 189 # Send new url by libDcTwitter 188 if (!empty($rs) && !empty($_POST['kutrl_twit_send'])) { 190 if (!empty($rs) && !empty($_POST['kutrl_twit_send'])) 191 { 192 $twit = $core->blog->settings->kUtRL->kutrl_twit_post_msg; 193 if (!$twit) 194 { 195 $twit = kutrlLibDcTwitter::getMessage('kUtRL'); 196 } 197 if ($twit) 198 { 199 $twit = str_replace( 200 array('%L','%B','%U'), 201 array($url,$core->blog->name,$core->auth->getInfo('user_cn')) 202 ,$twit 203 ); 204 kutrlLibDcTwitter::sendMessage('kUtRL',$twit); 205 } 206 } 207 } 208 } 209 210 public static function adminAfterPostCreate($cur,$post_id) 211 { 212 global $core; 213 $s = $core->blog->settings->kUtRL; 214 215 if (empty($_POST['kutrl_create']) 216 || !$s->kutrl_active || !$s->kutrl_admin_service 217 || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 218 219 try 220 { 221 $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 222 } 223 catch (Exception $e) 224 { 225 return; 226 } 227 228 $rs = $core->blog->getPosts(array('post_id'=>$post_id)); 229 230 if ($rs->isEmpty()) return; 231 232 $custom = !empty($_POST['kutrl_create_custom']) && $kut->allow_customized_hash ? 233 $_POST['kutrl_create_custom'] : null; 234 235 $rs = $kut->hash($rs->getURL(),$custom); 236 $kut->url_base.$rs->hash; 237 238 # Send new url by libDcTwitter 239 if (!empty($rs) && !empty($_POST['kutrl_twit_send'])) 240 { 241 $twit = $core->blog->settings->kUtRL->kutrl_twit_post_msg; 242 if (!$twit) 243 { 189 244 $twit = kutrlLibDcTwitter::getMessage('kUtRL'); 245 } 246 if ($twit) 247 { 190 248 $twit = str_replace( 191 249 array('%L','%B','%U'), … … 197 255 } 198 256 } 199 200 public static function adminAfterPostCreate($cur,$post_id) 201 { 202 global $core; 203 $s = kutrlSettings($core); 204 205 if (empty($_POST['kutrl_create']) 206 || !$s->kutrl_active || !$s->kutrl_admin_service 207 || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 208 209 try { 210 $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 211 } 212 catch (Exception $e) { 213 return; 214 } 215 257 258 public static function adminBeforePostDelete($post_id) 259 { 260 global $core; 261 $s = $core->blog->settings->kUtRL; 262 263 if (!$s->kutrl_active || !$s->kutrl_admin_service 264 || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 265 266 try 267 { 268 $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 269 } 270 catch (Exception $e) 271 { 272 return; 273 } 274 216 275 $rs = $core->blog->getPosts(array('post_id'=>$post_id)); 217 276 218 277 if ($rs->isEmpty()) return; 219 220 $custom = !empty($_POST['kutrl_create_custom']) && $kut->allow_customized_hash ? 221 $_POST['kutrl_create_custom'] : null; 222 223 $rs = $kut->hash($rs->getURL(),$custom); 224 $kut->url_base.$rs->hash; 225 226 # Send new url by libDcTwitter 227 if (!empty($rs) && !empty($_POST['kutrl_twit_send'])) { 228 $twit = kutrlLibDcTwitter::getMessage('kUtRL'); 229 $twit = str_replace( 230 array('%L','%B','%U'), 231 array($url,$core->blog->name,$core->auth->getInfo('user_cn')) 232 ,$twit 233 ); 234 kutrlLibDcTwitter::sendMessage('kUtRL',$twit); 235 } 236 } 237 238 public static function adminBeforePostDelete($post_id) 239 { 240 global $core; 241 $s = kutrlSettings($core); 242 243 if (!$s->kutrl_active || !$s->kutrl_admin_service 244 || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 245 246 try { 247 $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 248 } 249 catch (Exception $e) { 250 return; 251 } 252 253 $rs = $core->blog->getPosts(array('post_id'=>$post_id)); 254 255 if ($rs->isEmpty()) return; 256 278 257 279 $kut->remove($rs->getURL()); 258 280 } 259 281 260 282 public static function adminPostsActionsCombo($args) 261 283 { 262 284 global $core; 263 $s = kutrlSettings($core);264 285 $s = $core->blog->settings->kUtRL; 286 265 287 if (!$s->kutrl_active || !$s->kutrl_admin_service 266 288 || !$core->auth->check('admin',$core->blog->id) 267 289 || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 268 290 269 291 $args[0][__('kUtRL')][__('create short link')] = 'kutrl_create'; 270 292 $args[0][__('kUtRL')][__('delete short link')] = 'kutrl_delete'; … … 275 297 if ($action != 'kutrl_create' 276 298 && $action != 'kutrl_delete') return; 277 278 $s = kutrlSettings($core);279 299 300 $s = $core->blog->settings->kUtRL; 301 280 302 if (!$s->kutrl_active || !$s->kutrl_admin_service 281 303 || !isset($core->kutrlServices[$s->kutrl_admin_service])) return; 282 283 try { 284 $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 285 } 286 catch (Exception $e) { 287 return; 288 } 289 304 305 try 306 { 307 $kut = new $core->kutrlServices[$s->kutrl_admin_service]($core,$s->kutrl_limit_to_blog); 308 } 309 catch (Exception $e) 310 { 311 return; 312 } 313 290 314 while ($posts->fetch()) 291 315 { 292 316 $url = $posts->getURL(); 293 317 294 318 if ($action == 'kutrl_create') 295 319 { 296 320 $kut->hash($url); 297 321 } 298 322 299 323 if ($action == 'kutrl_delete') 300 324 { … … 319 343 ); 320 344 } 321 345 322 346 public static function exportFull($core,$exp) 323 347 { 324 348 $exp->exportTable('kutrl'); 325 349 } 326 350 327 351 public static function importInit($bk,$core) 328 352 { … … 330 354 $bk->kutrl = new kutrlLog($core); 331 355 } 332 356 333 357 public static function importSingle($line,$bk,$core) 334 358 { … … 342 366 } 343 367 } 344 368 345 369 public static function importFull($line,$bk,$core) 346 370 { … … 348 372 { 349 373 $bk->cur_kutrl->clean(); 350 374 351 375 $bk->cur_kutrl->kut_id = (integer) $line->kut_id; 352 376 $bk->cur_kutrl->blog_id = (string) $line->blog_id; … … 358 382 $bk->cur_kutrl->kut_counter = (integer) $line->kut_counter; 359 383 $bk->cur_kutrl->kut_password = (string) $line->kut_password; 360 384 361 385 $bk->cur_kutrl->insert(); 362 386 } -
plugins/kUtRL/_define.php
r2274 r2405 17 17 /* Description*/ "Use, create and serve short url on your blog", 18 18 /* Author */ "JC Denis", 19 /* Version */ '0. 3.3',19 /* Version */ '0.4', 20 20 /* Permissions */ 'admin' 21 21 ); 22 /* date */ #20100 52822 /* date */ #20100628 23 23 ?> -
plugins/kUtRL/_install.php
r2190 r2405 23 23 try 24 24 { 25 # Check DC version (dev on) 26 if (!version_compare(DC_VERSION,'2.1.6','>=')) 25 if (version_compare(DC_VERSION,'2.2-alpha','<')) 27 26 { 28 throw new Exception('Plugin called kUtRL requires Dotclear 2. 1.6or higher.');27 throw new Exception('Plugin called kUtRL requires Dotclear 2.2 or higher.'); 29 28 } 30 29 31 30 # Table 32 31 $t = new dbStruct($core->con,$core->prefix); … … 41 40 ->kut_password('varchar',32,true) 42 41 ->kut_counter('bigint',0,false,0) 43 42 44 43 ->primary('pk_kutrl','kut_id') 45 44 ->index('idx_kut_blog_id','btree','blog_id') … … 47 46 ->index('idx_kut_service','btree','kut_service') 48 47 ->index('idx_kut_type','btree','kut_type'); 49 48 50 49 $ti = new dbStruct($core->con,$core->prefix); 51 50 $changes = $ti->synchronize($t); 52 51 53 52 # Settings 54 $s = kutrlSettings($core); 53 $core->blog->settings->addNamespace('kUtRL'); 54 $s = $core->blog->settings->kUtRL; 55 55 $s->put('kutrl_active',false,'boolean','Enabled kutrl plugin',false,true); 56 56 $s->put('kutrl_admin_service','local','string','Service to use to shorten links on admin',false,true); … … 58 58 $s->put('kutrl_wiki_service','local','string','Service to use to shorten links on contents',false,true); 59 59 $s->put('kutrl_limit_to_blog',false,'boolean','Limited short url to current blog\'s url',false,true); 60 $s->put('kutrl_tpl_passive',true,'boolean','Template return long url if kutrl is unactivate',false,true); 60 $s->put('kutrl_tpl_passive',true,'boolean','Return long url on kutrl tags if kutrl is unactivate',false,true); 61 $s->put('kutrl_tpl_active',false,'boolean','Return short url on dotclear tags if kutrl is active',false,true); 61 62 $s->put('kutrl_admin_entry_default',true,'boolean','Create short link an new entry by default',false,true); 62 63 # Settings for features related to others plugins … … 71 72 $s->put('kutrl_srv_local_public',false,'boolean','Enabled local service public page',false,true); 72 73 $s->put('kutrl_srv_local_css',$local_css,'string','Special CSS for kutrl local service',false,true); 74 $s->put('kutrl_srv_local_404_active',false,'boolean','Use special 404 page on unknow urls',false,true); 73 75 # Settings for "bilbolinks" service 74 76 $s->put('kutrl_srv_bilbolinks_base','http://tux-pla.net/','string','URL of bilbolinks service',false,true); 75 77 # Twitter settings 76 $s->put('kutrl_twit_msg','%B : %U (from kUtRL)','string','Twit message to post',false,true); 77 $s->put('kutrl_twit_onadmin',true,'boolean','Post twit on new link on administration form',false,true); 78 $s->put('kutrl_twit_onpublic',false,'boolean','Post twit on new link on public form',false,true); 79 $s->put('kutrl_twit_ontpl',false,'boolean','Post twit on new link on templates',false,true); 80 $s->put('kutrl_twit_onwiki',false,'boolean','Post twit on new link on wiki synthax',false,true); 78 $s->put('kutrl_twit_msg','%L by %U on %B','string','Tweet message to send',false,true); 79 $s->put('kutrl_twit_onadmin',true,'boolean','Send tweet on new link on administration form',false,true); 80 $s->put('kutrl_twit_onpublic',false,'boolean','Send tweet on new link on public form',false,true); 81 $s->put('kutrl_twit_ontpl',false,'boolean','Send tweet on new link on templates',false,true); 82 $s->put('kutrl_twit_onwiki',false,'boolean','Send tweet on new link on wiki synthax',false,true); 83 $s->put('kutrl_twit_post_msg','%T on %L','string','Special tweet message to send on admin edit entry page',false,true); 81 84 82 83 85 # Version 84 86 $core->setVersion('kUtRL',$new_version); 85 87 86 88 # Get dcMiniUrl records as this plugin do the same 87 89 if ($core->plugins->moduleExists('dcMiniUrl')) -
plugins/kUtRL/_prepend.php
r2274 r2405 12 12 13 13 if (!defined('DC_RC_PATH')) return; 14 if (version_compare(DC_VERSION,'2.2-alpha','<')){return;} 14 15 15 16 global $__autoload, $core; 17 18 # Namespace for settings 19 $core->blog->settings->addNamespace('kUtRL'); 16 20 17 21 # Main class … … 23 27 24 28 $__autoload['localKutrlService'] = dirname(__FILE__).'/inc/services/class.local.service.php'; 29 $__autoload['isgdKutrlService'] = dirname(__FILE__).'/inc/services/class.isgd.service.php'; 30 $__autoload['shorttoKutrlService'] = dirname(__FILE__).'/inc/services/class.shortto.service.php'; 31 $__autoload['trimKutrlService'] = dirname(__FILE__).'/inc/services/class.trim.service.php'; 32 $__autoload['bitlyKutrlService'] = dirname(__FILE__).'/inc/services/class.bitly.service.php'; 33 $__autoload['bilbolinksKutrlService'] = dirname(__FILE__).'/inc/services/class.bilbolinks.service.php'; 34 25 35 $core->kutrlServices['local'] = 'localKutrlService'; 26 27 $__autoload['isgdKutrlService'] = dirname(__FILE__).'/inc/services/class.isgd.service.php';28 36 $core->kutrlServices['isgd'] = 'isgdKutrlService'; 29 30 $__autoload['shorttoKutrlService'] = dirname(__FILE__).'/inc/services/class.shortto.service.php';31 37 $core->kutrlServices['shortto'] = 'shorttoKutrlService'; 32 33 $__autoload['trimKutrlService'] = dirname(__FILE__).'/inc/services/class.trim.service.php';34 38 $core->kutrlServices['trim'] = 'trimKutrlService'; 35 36 $__autoload['bitlyKutrlService'] = dirname(__FILE__).'/inc/services/class.bitly.service.php';37 39 $core->kutrlServices['bitly'] = 'bitlyKutrlService'; 38 39 $__autoload['bilbolinksKutrlService'] = dirname(__FILE__).'/inc/services/class.bilbolinks.service.php';40 40 $core->kutrlServices['bilbolinks'] = 'bilbolinksKutrlService'; 41 41 … … 52 52 $__autoload['kutrlLibDcTwitter'] = dirname(__FILE__).'/inc/lib.dc.twitter.php'; 53 53 54 # DC 2.1.6 vs 2.2 settings55 function kutrlSettings($core,$namespace='kUtRL')56 {57 if (version_compare(DC_VERSION,'2.2-alpha','>=')) {58 $core->blog->settings->addNamespace($namespace);59 return $core->blog->settings->{$namespace};60 } else {61 $core->blog->settings->setNamespace($namespace);62 return $core->blog->settings;63 }64 }65 66 54 # Add kUtRL events on plugin activityReport 67 if ( kutrlSettings($core)->kutrl_extend_activityreport && defined('ACTIVITY_REPORT'))55 if ($core->blog->settings->kUtRL->kutrl_extend_activityreport && defined('ACTIVITY_REPORT')) 68 56 { 69 57 require_once dirname(__FILE__).'/inc/lib.kutrl.activityreport.php'; -
plugins/kUtRL/_public.php
r2274 r2405 15 15 require_once dirname(__FILE__).'/_widgets.php'; 16 16 17 $core->addBehavior('publicBeforeDocument',array('urlKutrl','publicBeforeDocument')); 18 $core->addBehavior('publicHeadContent',array('urlKutrl','publicHeadContent')); 17 $core->tpl->setPath($core->tpl->getPath(),dirname(__FILE__).'/default-templates'); 18 19 $core->addBehavior('publicBeforeDocument',array('pubKutrl','publicBeforeDocument')); 20 $core->addBehavior('publicHeadContent',array('pubKutrl','publicHeadContent')); 21 $core->addBehavior('publicBeforeContentFilter',array('pubKutrl','publicBeforeContentFilter')); 19 22 20 23 $core->tpl->addBlock('kutrlPageIf',array('tplKutrl','pageIf')); … … 45 48 { 46 49 global $core, $_ctx; 47 $s = kutrlSettings($core); 48 50 $s = $core->blog->settings->kUtRL; 51 52 # Not active, go to default 404 49 53 if (!$s->kutrl_active) 50 54 { … … 52 56 return; 53 57 } 54 58 # Not a valid url, go to kutrl 404 55 59 if (!preg_match('#^(|(/(.*?)))$#',$args,$m)) 56 60 { 57 self:: p404();58 return; 59 } 60 61 self::kutrl404(); 62 return; 63 } 64 61 65 $args = isset($m[3]) ? $m[3] : ''; 62 66 $_ctx->kutrl_msg = ''; 63 67 $_ctx->kutrl_hmf = hmfKutrl::create(); 64 68 $_ctx->kutrl_hmfp = hmfKutrl::protect($_ctx->kutrl_hmf); 65 69 66 70 $kut = new $core->kutrlServices['local']($core,$s->kutrl_limit_to_blog); 67 71 72 # Nothing on url 68 73 if ($m[1] == '/') 69 74 { 70 75 $_ctx->kutrl_msg = 'No link given.'; 71 76 } 72 73 // find suffix on redirect url 77 # find suffix on redirect url 74 78 $suffix = ''; 75 79 if (preg_match('@^([^?/#]+)(.*?)$@',$args,$more)) … … 78 82 $suffix = $more[2]; 79 83 } 80 84 # No arg, go to kurtl page 81 85 if ($args == '') 82 86 { … … 84 88 return; 85 89 } 86 90 # Not find, go to kutrl 404 87 91 if (false === ($url = $kut->getUrl($args))) 88 92 { 89 $_ctx->kutrl_msg = 'Failed to find short link.'; 90 self::pageKutrl($kut); 91 return; 92 } 93 93 //$_ctx->kutrl_msg = 'Failed to find short link.'; 94 //self::pageKutrl($kut); 95 96 self::kutrl404(); 97 return; 98 } 99 # Removed (empty url), go to kutrl 404 100 if (!$url) 101 { 102 self::kutrl404(); 103 return; 104 } 105 94 106 $core->blog->triggerBlog(); 95 107 http::redirect($url.$suffix); 96 108 return; 97 109 } 98 110 99 111 private static function pageKutrl($kut) 100 112 { 101 113 global $core, $_ctx; 102 $s = kutrlSettings($core); 103 104 if (!$s->kutrl_active || !$s->kutrl_srv_local_public) 114 $s = $core->blog->settings->kUtRL; 115 116 # Not active, go to default 404 117 if (!$s->kutrl_active) 105 118 { 106 119 self::p404(); 107 120 return; 108 121 } 109 110 # Valid form 122 # Public page not active, go to kutrl 404 123 if (!$s->kutrl_srv_local_public) 124 { 125 self::kutrl404(); 126 return; 127 } 128 # Validation form 111 129 $url = !empty($_POST['longurl']) ? trim($core->con->escape($_POST['longurl'])) : ''; 112 130 if (!empty($url)) … … 114 132 $hmf = !empty($_POST['hmf']) ? $_POST['hmf'] : '!'; 115 133 $hmfu = !empty($_POST['hmfp']) ? hmfKutrl::unprotect($_POST['hmfp']) : '?'; 116 134 117 135 $err = false; 118 136 if (!$err) … … 217 235 } 218 236 } 219 237 220 238 $core->tpl->setPath($core->tpl->getPath(),dirname(__FILE__).'/default-templates'); 221 239 self::serveDocument('kutrl.html'); 222 240 return; 223 241 } 224 242 243 protected static function kutrl404() 244 { 245 global $core; 246 247 if (!$core->blog->settings->kUtRL->kutrl_srv_local_404_active) 248 { 249 self::p404(); 250 return; 251 } 252 253 $core->tpl->setPath($core->tpl->getPath(),dirname(__FILE__).'/default-templates'); 254 $_ctx =& $GLOBALS['_ctx']; 255 $core = $GLOBALS['core']; 256 257 header('Content-Type: text/html; charset=UTF-8'); 258 http::head(404,'Not Found'); 259 $core->url->type = '404'; 260 $_ctx->current_tpl = 'kutrl404.html'; 261 $_ctx->content_type = 'text/html'; 262 263 echo $core->tpl->getData($_ctx->current_tpl); 264 265 # --BEHAVIOR-- publicAfterDocument 266 $core->callBehavior('publicAfterDocument',$core); 267 exit; 268 } 269 } 270 271 class pubKutrl 272 { 273 # Replace long urls on the fly for default tags 274 public static function publicBeforeContentFilter($core,$tag,$args) 275 { 276 if (!$core->blog->settings->kUtRL->kutrl_active 277 || !$core->blog->settings->kUtRL->kutrl_tpl_active) return; 278 279 $know_tags = array( 280 'AttachmentURL', 281 'MediaURL', 282 'EntryAuthorURL', 283 'EntryURL', 284 'CommentAuthorURL', 285 'CommentPostURL' 286 ); 287 288 # Unknow tag 289 if (!in_array($tag,$know_tags)) return; 290 291 global $_ctx; 292 293 # Oups 294 if (!$_ctx->exists('kutrl')) return; 295 296 # Existing 297 if (false !== ($kutrl_rs = $_ctx->kutrl->isKnowUrl($args[0]))) 298 { 299 $args[0] = $_ctx->kutrl->url_base.$kutrl_rs->hash; 300 } 301 # New 302 elseif (false !== ($kutrl_rs = $_ctx->kutrl->hash($args[0]))) 303 { 304 $args[0] = $_ctx->kutrl->url_base.$kutrl_rs->hash; 305 306 # Send new url by libDcTwitter 307 if ($_ctx->kutrl_twit_ontpl) 308 { 309 $twit = kutrlLibDcTwitter::getMessage('kUtRL'); 310 $twit = str_replace(array('%L','%B','%U'),array($_ctx->kutrl->url_base.$kutrl_rs->hash,$core->blog->name,__('public')),$twit); 311 kutrlLibDcTwitter::sendMessage('kUtRL',$twit); 312 } 313 } 314 } 315 225 316 public static function publicBeforeDocument($core) 226 317 { 227 318 global $_ctx; 228 $s = kutrlSettings($core);319 $s = $core->blog->settings->kUtRL; 229 320 230 321 # Passive : all kutrl tag return long url … … 232 323 # Twitter feature when auto create short link on template 233 324 $_ctx->kutrl_twit_ontpl = (boolean) $s->kutrl_twit_ontpl; 234 325 235 326 if (!$s->kutrl_active || !$s->kutrl_tpl_service 236 327 || !isset($core->kutrlServices[$s->kutrl_tpl_service])) return; 237 328 238 329 $_ctx->kutrl = new $core->kutrlServices[$s->kutrl_tpl_service]($core,$s->kutrl_limit_to_blog); 239 330 } 240 331 241 332 public static function publicHeadContent($core) 242 333 { 243 $s = kutrlSettings($core); 244 $css = $s->kutrl_srv_local_css; 334 $css = $core->blog->settings->kUtRL->kutrl_srv_local_css; 245 335 if ($css) 246 336 { … … 261 351 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("kutrl")').'; ?>'; 262 352 } 263 353 264 354 public static function pageIf($attr,$content) 265 355 { 266 356 $operator = isset($attr['operator']) ? self::getOperator($attr['operator']) : '&&'; 267 357 268 358 if (isset($attr['is_active'])) 269 359 { 270 360 $sign = (boolean) $attr['is_active'] ? '' : '!'; 271 $if[] = $sign.'$ s->kutrl_srv_local_public';272 } 273 361 $if[] = $sign.'$core->blog->settings->kUtRL->kutrl_srv_local_public'; 362 } 363 274 364 if (empty($if)) 275 365 { 276 366 return $content; 277 367 } 278 368 279 369 return 280 "<?php \$s = kutrlSettings(\$core); ". 281 "if(".implode(' '.$operator.' ',$if).") : ?>\n". 370 "<?php if(".implode(' '.$operator.' ',$if).") : ?>\n". 282 371 $content. 283 372 "<?php endif; unset(\$s);?>\n"; 284 373 } 285 374 286 375 public static function pageMsgIf($attr,$content) 287 376 { 288 377 $operator = isset($attr['operator']) ? self::getOperator($attr['operator']) : '&&'; 289 378 290 379 if (isset($attr['has_message'])) 291 380 { … … 293 382 $if[] = '"" '.$sign.'= $_ctx->kutrl_msg'; 294 383 } 295 384 296 385 if (empty($if)) 297 386 { 298 387 return $content; 299 388 } 300 389 301 390 return 302 391 "<?php if(".implode(' '.$operator.' ',$if).") : ?>\n". … … 304 393 "<?php endif; ?>\n"; 305 394 } 306 395 307 396 public static function pageMsg($attr) 308 397 { 309 398 return '<?php echo $_ctx->kutrl_msg; ?>'; 310 399 } 311 400 312 401 public static function humanField($attr) 313 402 { 314 403 return "<?php echo sprintf(__('Rewrite \"%s\" in next field to show that you are not a robot:'),\$_ctx->kutrl_hmf); ?>"; 315 404 } 316 405 317 406 public static function humanFieldProtect($attr) 318 407 { … … 321 410 "<?php echo \$core->formNonce(); ?>"; 322 411 } 323 412 324 413 public static function AttachmentKutrlIf($attr,$content) 325 414 { 326 415 return self::genericKutrlIf('$attach_f->file_url',$attr,$content); 327 416 } 328 417 329 418 public static function AttachmentKutrl($attr) 330 419 { 331 420 return self::genericKutrl('$attach_f->file_url',$attr); 332 421 } 333 422 334 423 public static function MediaKutrlIf($attr,$content) 335 424 { 336 425 return self::genericKutrlIf('$_ctx->file_url',$attr,$content); 337 426 } 338 427 339 428 public static function MediaKutrl($attr) 340 429 { 341 430 return self::genericKutrl('$_ctx->file_url',$attr); 342 431 } 343 432 344 433 public static function EntryAuthorKutrlIf($attr,$content) 345 434 { 346 435 return self::genericKutrlIf('$_ctx->posts->user_url',$attr,$content); 347 436 } 348 437 349 438 public static function EntryAuthorKutrl($attr) 350 439 { 351 440 return self::genericKutrl('$_ctx->posts->user_url',$attr); 352 441 } 353 442 354 443 public static function EntryKutrlIf($attr,$content) 355 444 { 356 445 return self::genericKutrlIf('$_ctx->posts->getURL()',$attr,$content); 357 446 } 358 447 359 448 public static function EntryKutrl($attr) 360 449 { 361 450 return self::genericKutrl('$_ctx->posts->getURL()',$attr); 362 451 } 363 452 364 453 public static function CommentAuthorKutrlIf($attr,$content) 365 454 { 366 455 return self::genericKutrlIf('$_ctx->comments->getAuthorURL()',$attr,$content); 367 456 } 368 457 369 458 public static function CommentAuthorKutrl($attr) 370 459 { 371 460 return self::genericKutrl('$_ctx->comments->getAuthorURL()',$attr); 372 461 } 373 462 374 463 public static function CommentPostKutrlIf($attr,$content) 375 464 { 376 465 return self::genericKutrlIf('$_ctx->comments->getPostURL()',$attr,$content); 377 466 } 378 467 379 468 public static function CommentPostKutrl($attr) 380 469 { 381 470 return self::genericKutrl('$_ctx->comments->getPostURL()',$attr); 382 471 } 383 472 384 473 protected static function genericKutrlIf($str,$attr,$content) 385 474 { 386 475 $operator = isset($attr['operator']) ? self::getOperator($attr['operator']) : '&&'; 387 476 388 477 if (isset($attr['is_active'])) 389 478 { … … 391 480 $if[] = $sign.'$_ctx->exists("kutrl")'; 392 481 } 393 482 394 483 if (isset($attr['passive_mode'])) 395 484 { … … 397 486 $if[] = $sign.'$_ctx->kutrl_passive'; 398 487 } 399 488 400 489 if (isset($attr['has_kutrl'])) 401 490 { … … 403 492 $if[] = '($_ctx->exists("kutrl") && false '.$sign.'== $_ctx->kutrl->select('.$str.',null,null,"kutrl"))'; 404 493 } 405 494 406 495 if (empty($if)) 407 496 { … … 413 502 "<?php endif; ?>\n"; 414 503 } 415 504 416 505 protected static function genericKutrl($str,$attr) 417 506 { … … 419 508 return 420 509 "<?php \n". 510 # Preview 511 "if (\$_ctx->preview) { \n". 512 " echo ".sprintf($f,$str)."; ". 513 "} else { \n". 514 # Disable 421 515 "if (!\$_ctx->exists('kutrl')) { \n". 516 # Passive mode 422 517 " if (\$_ctx->kutrl_passive) { ". 423 518 " echo ".sprintf($f,$str)."; ". … … 436 531 "\$twit = kutrlLibDcTwitter::getMessage('kUtRL'); ". 437 532 "\$twit = str_replace(array('%L','%B','%U'),array(\$_ctx->kutrl->url_base.\$kutrl_rs->hash,\$core->blog->name,__('public')),\$twit); ". 438 "kutrlLibDcTwitter::sendMessage('kUtRL',\$twit); " ;533 "kutrlLibDcTwitter::sendMessage('kUtRL',\$twit); ". 439 534 " unset(\$twit); ". 440 535 "} \n". 441 536 442 537 " } \n". 443 538 " unset(\$kutrl_rs); \n". … … 445 540 "?>\n"; 446 541 } 447 542 448 543 protected static function getOperator($op) 449 544 { … … 464 559 { 465 560 public static $chars = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'; 466 561 467 562 public static function create($len=6) 468 563 { … … 470 565 $chars = self::$chars; 471 566 472 for($i = 0;$i < $len; $i++) { 567 for($i = 0;$i < $len; $i++) 568 { 473 569 $res .= $chars[rand(0,strlen($chars)-1)]; 474 570 } 475 571 476 572 return $res; 477 573 } 478 574 479 575 public static function protect($str) 480 576 { … … 482 578 $chars = self::$chars; 483 579 484 for($i = 0; $i < strlen($str);$i++) { 580 for($i = 0; $i < strlen($str);$i++) 581 { 485 582 $res .= $chars[rand(0,strlen($chars)-1)].$str[$i]; 486 583 } 487 584 488 585 return $res; 489 586 } 490 587 491 588 public static function unprotect($str) 492 589 { 493 590 $res = ''; 494 591 495 for($i = 0; $i < strlen($str);$i++) { 592 for($i = 0; $i < strlen($str);$i++) 593 { 496 594 $i++; 497 595 $res .= $str[$i]; 498 596 } 499 597 500 598 return $res; 501 599 } -
plugins/kUtRL/_widgets.php
r2259 r2405 30 30 ); 31 31 } 32 32 33 33 public static function adminRank($w) 34 34 { … … 80 80 ); 81 81 } 82 82 83 83 public static function publicShorten($w) 84 84 { 85 85 global $core; 86 $s = kutrlSettings($core);87 86 $s = $core->blog->settings->kUtRL; 87 88 88 if (!$s->kutrl_active 89 89 || !$s->kutrl_srv_local_public 90 || !$w->homeonly && $core->url->type != 'default') return; 91 90 || $w->homeonly && $core->url->type != 'default' 91 || $core->url->type == 'kutrl') return; 92 92 93 $hmf = hmfKutrl::create(); 93 94 $hmfp = hmfKutrl::protect($hmf); 94 95 95 96 return 96 97 '<div class="shortenkutrlwidget">'. … … 113 114 '</div>'; 114 115 } 115 116 116 117 public static function publicRank($w) 117 118 { 118 119 global $core; 119 $s = kutrlSettings($core);120 120 $s = $core->blog->settings->kUtRL; 121 121 122 if (!$s->kutrl_active 122 123 || $w->homeonly && $core->url->type != 'default') return; 123 124 124 125 $type = in_array($w->type,array('localnormal','localmix','localcustom')) ? 125 126 "AND kut_type ='".$w->type."' " : 126 127 "AND kut_type ".$core->con->in(array('localnormal','localmix','localcustom'))." "; 127 128 128 129 $hide = (boolean) $w->hideempty ? 'AND kut_counter > 0 ' : ''; 129 130 130 131 $more = ''; 131 if ($w->type == 'localmix' && '' != $w->mixprefix) { 132 if ($w->type == 'localmix' && '' != $w->mixprefix) 133 { 132 134 $more = "AND kut_hash LIKE '".$core->con->escape($w->mixprefix)."%' "; 133 135 } 134 136 135 137 $order = ($w->sortby && in_array($w->sortby,array('kut_dt','kut_counter','kut_hash'))) ? 136 138 $w->sortby.' ' : 'kut_dt '; 137 139 138 140 $order .= $w->sort == 'desc' ? 'DESC' : 'ASC'; 139 141 140 142 $limit = $core->con->limit(abs((integer) $w->limit)); 141 143 142 144 $rs = $core->con->select( 143 145 'SELECT kut_counter, kut_hash '. … … 147 149 $type.$hide.$more.'ORDER BY '.$order.$limit 148 150 ); 149 151 150 152 if ($rs->isEmpty()) return; 151 153 152 154 $content = ''; 153 155 $i = 0; 154 156 155 157 while($rs->fetch()) 156 158 { 157 159 $i++; 158 160 $rank = '<span class="rankkutrl-rank">'.$i.'</span>'; 159 161 160 162 $hash = $rs->kut_hash; 161 163 $url = $core->blog->url.$core->url->getBase('kutrl').'/'.$hash; 162 164 $cut_len = - abs((integer) $w->urllen); 163 165 164 166 if (strlen($url) > $cut_len) 167 { 165 168 $url = '...'.substr($url,$cut_len); 169 } 166 170 /* 167 171 if (strlen($hash) > $cut_len) 172 { 168 173 $url = '...'.substr($hash,$cut_len); 169 */ 174 } 175 //*/ 170 176 if ($rs->kut_counter == 0) 177 { 171 178 $counttext = __('never followed'); 179 } 172 180 elseif ($rs->kut_counter == 1) 181 { 173 182 $counttext = __('followed one time'); 183 } 174 184 else 185 { 175 186 $counttext = sprintf(__('followed %s times'),$rs->kut_counter); 176 187 } 188 177 189 $content .= 178 190 '<li><a href="'. … … 187 199 188 200 } 189 201 190 202 if (!$content) return; 191 203 192 204 return 193 205 '<div class="rankkutrlwidget">'. -
plugins/kUtRL/default-templates/kutrl.html
r1949 r2405 50 50 <p><strong>{{tpl:kutrlMsg}}</strong></p> 51 51 </tpl:kutrlMsgIf> 52 52 53 53 <tpl:kutrlPageIf is_active="1"> 54 54 <form name="dokutrl" method="post" action="{{tpl:kutrlPageURL}}"> … … 64 64 </p> 65 65 </form> 66 < tpl:kutrlPageIf>66 </tpl:kutrlPageIf> 67 67 </div> 68 68 -
plugins/kUtRL/inc/index.link.php
r2274 r2405 18 18 $s_limit_to_blog = (boolean) $s->kutrl_limit_to_blog; 19 19 20 if (isset($core->kutrlServices[$s_admin_service])) { 20 if (isset($core->kutrlServices[$s_admin_service])) 21 { 21 22 $kut = new $core->kutrlServices[$s_admin_service]($core,$s_limit_to_blog); 22 23 } … … 25 26 if ($action == 'createlink') { 26 27 27 try { 28 try 29 { 28 30 if (!isset($core->kutrlServices[$s_admin_service])) 29 31 throw new Exception('Unknow service'); 30 32 31 33 $url = trim($core->con->escape($_POST['str'])); 32 34 $hash = empty($_POST['custom']) ? null : $_POST['custom']; 33 35 34 36 if (empty($url)) 35 37 throw new Exception(__('There is nothing to shorten.')); 36 38 37 39 if (!$kut->testService()) 38 40 throw new Exception(__('Service is not well configured.')); 39 41 40 42 if (null !== $hash && !$kut->allow_customized_hash) 41 43 throw new Exception(__('This service does not allowed custom hash.')); 42 44 43 45 if (!$kut->isValidUrl($url)) 44 46 throw new Exception(__('This link is not a valid URL.')); 45 47 46 48 if (!$kut->isLongerUrl($url)) 47 49 throw new Exception(__('This link is too short.')); 48 50 49 51 if (!$kut->isProtocolUrl($url)) 50 52 throw new Exception(__('This type of link is not allowed.')); 51 53 52 54 if ($s_limit_to_blog && !$kut->isBlogUrl($url)) 53 55 throw new Exception(__('Short links are limited to this blog URL.')); 54 56 55 57 if ($kut->isServiceUrl($url)) 56 58 throw new Exception(__('This link is already a short link.')); 57 59 58 60 if (null !== $hash && false !== ($rs = $kut->isKnowHash($hash))) 59 61 throw new Exception(__('This custom short url is already taken.')); 60 62 61 63 if (false !== ($rs = $kut->isKnowUrl($url))) 62 64 { … … 74 76 if (false === ($rs = $kut->hash($url,$hash))) 75 77 { 76 if ($kut->error->flag()) { 78 if ($kut->error->flag()) 79 { 77 80 throw new Exception($kut->error->toHTML()); 78 81 } … … 91 94 92 95 # Send new url by libDcTwitter 93 if ($s->kutrl_twit_onadmin) { 96 if ($s->kutrl_twit_onadmin) 97 { 94 98 $twit = kutrlLibDcTwitter::getMessage('kUtRL'); 95 99 $twit = str_replace( … … 103 107 } 104 108 } 105 catch (Exception $e) { 109 catch (Exception $e) 110 { 106 111 $core->error->add($e->getMessage()); 107 112 } … … 117 122 '</h2>'.$msg; 118 123 119 if (!isset($core->kutrlServices[$s_admin_service])) {120 124 if (!isset($core->kutrlServices[$s_admin_service])) 125 { 121 126 echo '<p>'.__('You must set an admin service.').'</p>'; 122 127 } … … 125 130 echo ' 126 131 <form id="create-link" method="post" action="'.$p_url.'"> 127 132 128 133 <h3>'.sprintf(__('Shorten link using service "%s"'),$kut->name).'</h3> 129 134 <p class="classic"><label for="str">'.__('Long link:'). 130 135 form::field('str',100,255,'').'</label></p>'; 131 132 if ($kut->allow_customized_hash) {133 136 137 if ($kut->allow_customized_hash) 138 { 134 139 echo 135 140 '<p class="classic"><label for="custom">'. … … 137 142 form::field('custom',50,32,'').'</label></p>'. 138 143 '<p class="form-note">'.__('Only if you want a custom short link.').'</p>'; 139 140 if ($s_admin_service == 'local') { 144 145 if ($s_admin_service == 'local') 146 { 141 147 echo '<p class="form-note">'. 142 148 __('You can use "bob!!" if you want a semi-custom link, it starts with "bob" and "!!" will be replaced by an increment value.'). … … 144 150 } 145 151 } 146 152 147 153 echo ' 148 154 <div class="clear"> -
plugins/kUtRL/inc/index.setting.php
r2274 r2405 21 21 $s_limit_to_blog = (boolean) $s->kutrl_limit_to_blog; 22 22 $s_tpl_passive = (boolean) $s->kutrl_tpl_passive; 23 $s_tpl_active = (boolean) $s->kutrl_tpl_active; 23 24 $s_admin_entry_default = (string) $s->kutrl_admin_entry_default; 24 25 … … 27 28 $s_twit_ontpl = (boolean) $s->kutrl_twit_ontpl; 28 29 $s_twit_onwiki = (boolean) $s->kutrl_twit_onwiki; 30 $s_twit_post_msg = (string) $s->kutrl_twit_post_msg; 29 31 30 32 $section = isset($_REQUEST['section']) ? $_REQUEST['section'] : ''; … … 42 44 $s_limit_to_blog = isset($_POST['s_limit_to_blog']); 43 45 $s_tpl_passive = isset($_POST['s_tpl_passive']); 46 $s_tpl_active = isset($_POST['s_tpl_active']); 44 47 $s_admin_entry_default = isset($_POST['s_admin_entry_default']); 45 48 … … 48 51 $s_twit_ontpl = isset($_POST['s_twit_ontpl']); 49 52 $s_twit_onwiki = isset($_POST['s_twit_onwiki']); 53 $s_twit_post_msg = $_POST['s_twit_post_msg']; 50 54 51 55 $s->put('kutrl_active',$s_active); … … 55 59 $s->put('kutrl_limit_to_blog',$s_limit_to_blog); 56 60 $s->put('kutrl_tpl_passive',$s_tpl_passive); 61 $s->put('kutrl_tpl_active',$s_tpl_active); 57 62 $s->put('kutrl_admin_entry_default',$s_admin_entry_default); 58 63 … … 61 66 $s->put('kutrl_twit_ontpl',$s_twit_ontpl); 62 67 $s->put('kutrl_twit_onwiki',$s_twit_onwiki); 68 $s->put('kutrl_twit_post_msg',$s_twit_post_msg); 63 69 64 70 # Save libDcTwitter settings … … 100 106 101 107 <fieldset id="setting-plugin"><legend>'. __('Plugin activation').'</legend> 102 <p class="field"><label>'.108 <p><label class="classic">'. 103 109 form::checkbox(array('s_active'),'1',$s_active). 104 110 __('Enable plugin').'</label></p> … … 106 112 107 113 <fieldset id="setting-option"><legend>'. __('General rules').'</legend> 108 <p class="field"><label>'.114 <p><label class="classic">'. 109 115 form::checkbox(array('s_limit_to_blog'),'1',$s_limit_to_blog). 110 116 __('Limit short link to current blog').'</label></p> 111 117 <p class="form-note">'.__('Only link started with this blog URL could be shortened.').'</p> 112 <p class="field"><label>'.118 <p><label class="classic">'. 113 119 form::checkbox(array('s_tpl_passive'),'1',$s_tpl_passive). 114 120 __('Passive mode').'</label></p> 115 <p class="form-note">'.__('If this extension is disabled and the passive mode is enabled, "kutrl" tags will display long urls instead of nothing on templates.').'</p> 116 <p class="field"><label>'. 121 <p class="form-note">'.__('If this extension is disabled and the passive mode is enabled, "kutrl" tags (like EntryKurl) will display long urls instead of nothing on templates.').'</p> 122 <p><label class="classic">'. 123 form::checkbox(array('s_tpl_active'),'1',$s_tpl_active). 124 __('Active mode').'</label></p> 125 <p class="form-note">'.__('If the active mode is enabled, all know default template tags (like EntryURL) will display short urls instead of long ones on templates.').'</p> 126 <p><label class="classic">'. 117 127 form::checkbox(array('s_admin_entry_default'),'1',$s_admin_entry_default). 118 128 __('Create short link for new entries').'</label></p> … … 121 131 122 132 <fieldset id="setting-service"><legend>'. __('Default services').'</legend> 123 <p class="field"><label>';133 <p><label>'; 124 134 if (!empty($msg) && isset($core->kutrlServices[$s_admin_service])) { 125 135 $o = new $core->kutrlServices[$s_admin_service]($core); 126 136 echo $o->testService() ? $img_green : $img_red; 127 137 } 128 echo ' '.__('Administration:'). 138 echo ' '.__('Administration:').'<br />'. 129 139 form::combo(array('s_admin_service'),$services_combo,$s_admin_service).' 130 140 </label></p> 131 141 <p class="form-note">'.__('Service to use in this admin page and on edit page of an entry.').'</p> 132 <p class="field"><label>';142 <p><label>'; 133 143 if (!empty($msg) && isset($core->kutrlServices[$s_tpl_service])) { 134 144 $o = new $core->kutrlServices[$s_tpl_service]($core); 135 145 echo $o->testService() ? $img_green : $img_red; 136 146 } 137 echo ' '.__('Templates:'). 147 echo ' '.__('Templates:').'<br />'. 138 148 form::combo(array('s_tpl_service'),$ext_services_combo,$s_tpl_service).' 139 149 </label></p> 140 150 <p class="form-note">'.__('Shorten links automatically when using template value like "EntryKutrl".').'</p> 141 <p class="field"><label>';151 <p><label>'; 142 152 if (!empty($msg) && isset($core->kutrlServices[$s_wiki_service])) { 143 153 $o = new $core->kutrlServices[$s_wiki_service]($core); 144 154 echo $o->testService() ? $img_green : $img_red; 145 155 } 146 echo ' '.__('Contents:'). 156 echo ' '.__('Contents:').'<br />'. 147 157 form::combo(array('s_wiki_service'),$ext_services_combo,$s_wiki_service).' 148 158 </label></p> … … 158 168 echo ' 159 169 <p class="form-note">'.__('Use wildcard %L for short URL, %B for blog name, %U for user name.').'</p> 170 <p><label class="classic">'.__('Entry message:').'<br />'. 171 form::field('s_twit_post_msg',50,255,$s_twit_post_msg,'',2).' 172 </label></p> 173 <p class="form-note">'.__('This is a special message that can be used on admin enrty page, use wildcard %T for entry title, %L for short URL, %B for blog name, %U for user name.').'</p> 160 174 </div><div class="col"> 161 175 <h3>'.__('Activation').'</h3> 162 176 <p>'.__('Send message when short url is created on:').'</p> 163 <p class="field"><label>'.177 <p><label class="classic">'. 164 178 form::checkbox(array('s_twit_onadmin'),'1',$s_twit_onadmin). 165 179 __('administration form').'</label></p> 166 <p class="field"><label>'.180 <p><label class="classic">'. 167 181 form::checkbox(array('s_twit_onpublic'),'1',$s_twit_onpublic). 168 182 __('public form').'</label></p> 169 <p class="field"><label>'.183 <p><label class="classic">'. 170 184 form::checkbox(array('s_twit_ontpl'),'1',$s_twit_ontpl). 171 185 __('template').'</label></p> 172 <p class="field"><label>'.186 <p><label class="classic">'. 173 187 form::checkbox(array('s_twit_onwiki'),'1',$s_twit_onwiki). 174 188 __('content').'</label></p> -
plugins/kUtRL/inc/lib.kutrl.log.php
r2190 r2405 103 103 return $rs->isEmpty() ? false : $rs; 104 104 } 105 106 public function clear($id) 107 { 108 $id = (integer) $id; 109 110 $cur = $this->con->openCursor($this->table); 111 $this->con->writeLock($this->table); 112 113 try 114 { 115 $cur->kut_url = ''; 116 $cur->kut_dt = date('Y-m-d H:i:s'); 117 $cur->kut_counter = 0; 118 119 $cur->update( 120 "WHERE blog_id='".$this->blog."' ". 121 "AND kut_id='".$id."' " 122 ); 123 $this->con->unlock(); 124 125 return true; 126 } 127 catch (Exception $e) 128 { 129 $this->con->unlock(); 130 throw $e; 131 } 132 return false; 133 } 105 134 106 135 public function delete($id) -
plugins/kUtRL/inc/lib.kutrl.srv.php
r2190 r2405 32 32 { 33 33 $this->core = $core; 34 $this->s = kutrlSettings($core);34 $this->s = $core->blog->settings->kUtRL; 35 35 $this->log = new kutrlLog($core); 36 36 $this->limit_to_blog = (boolean) $limit_to_blog; … … 173 173 } 174 174 175 # Delete url on service 176 public function deleteUrl($url )175 # Delete url on service (second argument really delete urls) 176 public function deleteUrl($url,$delete=false) 177 177 { 178 178 return null; -
plugins/kUtRL/inc/lib.wiki.kutrl.php
r2274 r2405 20 20 { 21 21 global $core; 22 $s = kutrlSettings($core);22 $s = $core->blog->settings->kUtRL; 23 23 24 24 # Do nothing on comment preview and post preview 25 25 if (!empty($_POST['preview']) 26 || !empty($GLOBALS[' c_ctx']) && $GLOBALS['c_ctx']->preview) return;27 26 || !empty($GLOBALS['_ctx']) && $GLOBALS['_ctx']->preview) return; 27 28 28 if (!$s->kutrl_active || !$s->kutrl_wiki_service 29 29 || !isset($core->kutrlServices[$s->kutrl_wiki_service])) return; 30 31 try { 30 31 try 32 { 32 33 $kut = new $core->kutrlServices[$s->kutrl_wiki_service]($core,$s->kutrl_limit_to_blog); 33 34 } 34 catch (Exception $e) { 35 catch (Exception $e) 36 { 35 37 return; 36 38 } 37 39 38 40 foreach($kut->allowed_protocols as $protocol) 39 41 { … … 44 46 } 45 47 } 46 48 47 49 public static function transform($url,$content) 48 50 { 49 51 global $core; 50 $s = kutrlSettings($core);51 52 $s = $core->blog->settings->kUtRL; 53 52 54 if (!$s->kutrl_active || !$s->kutrl_wiki_service 53 55 || !isset($core->kutrlServices[$s->kutrl_wiki_service])) return; 54 55 try { 56 57 try 58 { 56 59 $kut = new $core->kutrlServices[$s->kutrl_wiki_service]($core,$s->kutrl_limit_to_blog); 57 60 } 58 catch (Exception $e) { 61 catch (Exception $e) 62 { 59 63 return array(); 60 64 } 61 65 62 66 # Test if long url exists 63 67 $is_new = false; 64 68 $rs = $kut->isKnowUrl($url); 65 if (!$rs) { 69 if (!$rs) 70 { 66 71 $is_new = true; 67 72 $rs = $kut->hash($url); … … 79 84 $res['title'] = sprintf(__('%s (Shorten with %s)'),$rs->url,__($kut->name)); 80 85 if ($testurl == $content) $res['content'] = $res['url']; 81 86 82 87 # Send new url by libDcTwitter 83 if ($s->kutrl_twit_onwiki && $is_new) { 88 if ($s->kutrl_twit_onwiki && $is_new) 89 { 84 90 $user = !defined('DC_CONTEXT_ADMIN') ? __('public') : $core->auth->getInfo('user_cn'); 85 91 $twit = kutrlLibDcTwitter::getMessage('kUtRL'); … … 87 93 kutrlLibDcTwitter::sendMessage('kUtRL',$twit); 88 94 } 89 95 90 96 return $res; 91 97 } -
plugins/kUtRL/inc/services/class.local.service.php
r2190 r2405 33 33 public function saveSettings() 34 34 { 35 $this->s->put('kutrl_srv_local_protocols',$_POST['kutrl_srv_local_protocols']); 36 $this->s->put('kutrl_srv_local_public',isset($_POST['kutrl_srv_local_public'])); 37 $this->s->put('kutrl_srv_local_css',$_POST['kutrl_srv_local_css']); 35 $this->s->put('kutrl_srv_local_protocols',$_POST['kutrl_srv_local_protocols'],'string'); 36 $this->s->put('kutrl_srv_local_public',isset($_POST['kutrl_srv_local_public']),'boolean'); 37 $this->s->put('kutrl_srv_local_css',$_POST['kutrl_srv_local_css'],'string'); 38 $this->s->put('kutrl_srv_local_404_active',isset($_POST['kutrl_srv_local_404_active']),'boolean'); 38 39 } 39 40 … … 41 42 { 42 43 echo 44 '<div class="two-cols"><div class="col">'. 45 46 '<p><strong>'.__('Settings:').'</strong></p>'. 47 '<p><label class="classic">'. 48 __('Allowed protocols:').'<br />'. 49 form::field(array('kutrl_srv_local_protocols'),50,255,$this->s->kutrl_srv_local_protocols). 50 '</label></p>'. 51 52 '<p class="form-note">'. 53 __('Use comma seperated list like: "http:,https:,ftp:"'). 54 '</p>'. 55 56 '<p><label class="classic">'. 57 form::checkbox(array('kutrl_srv_local_public'),'1',$this->s->kutrl_srv_local_public).' '. 58 __('Enable public page for visitors to shorten links'). 59 '</label></p>'. 60 61 '<p class="area" id="style-area"><label for="_style">'.__('CSS:').'</label>'. 62 form::textarea('kutrl_srv_local_css',50,3,html::escapeHTML($this->s->kutrl_srv_local_css),'',2). 63 '</p>'. 64 '<p class="form-note">'.__('You can add here special cascading style sheet. Body of page has class "dc-kutrl" and widgets have class "shortenkutrlwidget" and "rankkutrlwidget".').'</p>'. 65 66 '<p><label class="classic">'. 67 form::checkbox(array('kutrl_srv_local_404_active'),'1',$this->s->kutrl_srv_local_404_active).' '. 68 __('Enable special 404 error public page for unknow urls'). 69 '</label></p>'. 70 '<p class="form-note">'.__('If this is not activated, the default 404 page of the theme will be display.').'</p>'. 71 72 '</div><div class="col">'. 73 74 '<p><strong>'.__('Note:').'</strong></p>'. 43 75 '<p>'. 44 76 __('This service use your own Blog to shorten and serve URL.').'<br />'. … … 59 91 echo 60 92 '</p>'. 61 62 '<p><label class="classic">'. 63 __('Allowed protocols:').'<br />'. 64 form::field(array('kutrl_srv_local_protocols'),50,255,$this->s->kutrl_srv_local_protocols). 65 '</label></p>'. 66 67 '<p class="form-note">'. 68 __('Use comma seperated list like: "http:,https:,ftp:"'). 69 '</p>'. 70 71 '<p><label class="classic">'. 72 form::checkbox(array('kutrl_srv_local_public'),'1',$this->s->kutrl_srv_local_public).' '. 73 __('Enable public page for visitors to shorten links'). 74 '</label></p>'. 75 76 '<p class="area" id="style-area"><label for="_style">'.__('CSS:').'</label>'. 77 form::textarea('kutrl_srv_local_css',50,3,html::escapeHTML($this->s->kutrl_srv_local_css),'',2). 78 '</p>'. 79 '<p class="form-note">'.__('You can add here special cascading style sheet. Body of page has class "dc-kutrl" and widgets have class "shortenkutrlwidget" and "rankkutrlwidget".').'</p>'; 93 '<p>'.__('There are two templates delivered with kUtRL, if you do not use default theme, you may adapt them to yours.').'<br />'. 94 __('Files are in plugin directory /default-templates, just copy them into your theme and edit them.').'</p>'. 95 96 '</div></div>'; 80 97 } 81 98 … … 223 240 return false; 224 241 } 242 if (!$rs->url) //previously removed url 243 { 244 return false; 245 } 246 225 247 $this->log->counter($rs->id,'up'); 226 248 return $rs->url; 227 249 } 228 250 229 public function deleteUrl($url )251 public function deleteUrl($url,$delete=false) 230 252 { 231 253 if (false === ($rs = $this->log->select($url,null,null,'local'))) … … 233 255 return false; 234 256 } 235 $this->log->delete($rs->id); 257 if ($delete) 258 { 259 $this->log->delete($rs->id); 260 } 261 else 262 { 263 $this->log->clear($rs->id,''); 264 } 236 265 return true; 237 266 } -
plugins/kUtRL/index.php
r2190 r2405 17 17 18 18 # Settings 19 $s = kutrlSettings($core);19 $s = $core->blog->settings->kUtRL; 20 20 21 21 # Default values … … 66 66 67 67 ?> 68 ?> -
plugins/kUtRL/locales/fr/main.lang.php
r2190 r2405 1 1 <?php 2 // Language: français3 // Module: kUtRL - 0. 34 // Date: 2010-0 4-14 22:23:455 // Translated with dcTranslater - 1. 32 // Language: Français 3 // Module: kUtRL - 0.4 4 // Date: 2010-06-28 10:43:43 5 // Translated with dcTranslater - 1.4.1 6 6 7 7 #_admin.php:19 8 8 #_widgets.php:22 9 9 #default-templates/kutrl.html:48 10 #inc/index.link.php:11 210 #inc/index.link.php:117 11 11 #inc/index.links.php:203 12 12 #inc/index.service.php:42 13 #inc/index.setting.php: 8713 #inc/index.setting.php:93 14 14 #index.php:41 15 15 #index.php:42 … … 24 24 25 25 #_admin.php:108 26 #inc/index.link.php:1 3626 #inc/index.link.php:141 27 27 $GLOBALS['__l10n']['Custom short link:'] = 'Lien court personnalisé :'; 28 28 … … 31 31 32 32 #_admin.php:122 33 #_widgets.php:17 133 #_widgets.php:178 34 34 $GLOBALS['__l10n']['never followed'] = 'jamais suivi'; 35 35 36 36 #_admin.php:126 37 #_widgets.php:1 7337 #_widgets.php:182 38 38 $GLOBALS['__l10n']['followed one time'] = 'suivi une fois'; 39 39 40 40 #_admin.php:130 41 #_widgets.php:1 7541 #_widgets.php:186 42 42 $GLOBALS['__l10n']['followed %s times'] = 'suivi %s fois'; 43 43 44 44 #_admin.php:137 45 #_admin.php:2 6845 #_admin.php:292 46 46 $GLOBALS['__l10n']['delete short link'] = 'effacer un lien court'; 47 47 48 #_admin.php:2 6748 #_admin.php:291 49 49 $GLOBALS['__l10n']['create short link'] = 'créer un lien court'; 50 50 51 #_public.php:1 2351 #_public.php:141 52 52 $GLOBALS['__l10n']['Failed to verify protected field.'] = 'Impossible de vérifier le champs de protection.'; 53 53 54 #_public.php:1 3155 #inc/index.link.php: 3854 #_public.php:149 55 #inc/index.link.php:40 56 56 #inc/services/class.bilbolinks.service.php:64 57 57 #inc/services/class.bitly.service.php:76 58 #inc/services/class.local.service.php: 8958 #inc/services/class.local.service.php:106 59 59 #inc/services/class.trim.service.php:65 60 60 $GLOBALS['__l10n']['Service is not well configured.'] = 'Le service n\'est pas correctement configuré.'; 61 61 62 #_public.php:1 3962 #_public.php:157 63 63 $GLOBALS['__l10n']['This string is not a valid URL.'] = 'Cette chaine n\'est pas un lien valide.'; 64 64 65 #_public.php:1 4766 #inc/index.link.php:4 765 #_public.php:165 66 #inc/index.link.php:49 67 67 $GLOBALS['__l10n']['This link is too short.'] = 'Ce lien est trop court.'; 68 68 69 #_public.php:1 5570 #inc/index.link.php:5 069 #_public.php:173 70 #inc/index.link.php:52 71 71 $GLOBALS['__l10n']['This type of link is not allowed.'] = 'Ce type de lien n\'est pas autorisé.'; 72 72 73 #_public.php:1 6474 #inc/index.link.php:5 373 #_public.php:182 74 #inc/index.link.php:55 75 75 $GLOBALS['__l10n']['Short links are limited to this blog URL.'] = 'Les liens courts sont limités à l\'URL de ce blog.'; 76 76 77 #_public.php:1 7278 #inc/index.link.php:5 677 #_public.php:190 78 #inc/index.link.php:58 79 79 $GLOBALS['__l10n']['This link is already a short link.'] = 'Ce lien est dèjà un lien court.'; 80 80 81 #_public.php: 18582 #_public.php:2 0483 #inc/index.link.php:6 784 #inc/index.link.php: 8781 #_public.php:203 82 #_public.php:222 83 #inc/index.link.php:69 84 #inc/index.link.php:90 85 85 $GLOBALS['__l10n']['Short link for %s is %s'] = 'Le lien court pour %s est %s'; 86 86 87 #_public.php: 19687 #_public.php:214 88 88 $GLOBALS['__l10n']['Failed to create short link.'] = 'Impossible de créer le lien court.'; 89 89 90 #_public.php:213 91 #_public.php:432 92 #inc/lib.wiki.kutrl.php:78 90 #_public.php:231 91 #_public.php:310 92 #_public.php:532 93 #inc/lib.wiki.kutrl.php:90 93 94 $GLOBALS['__l10n']['public'] = 'publique'; 94 95 95 #_public.php: 31496 #_widgets.php:10 596 #_public.php:403 97 #_widgets.php:106 97 98 $GLOBALS['__l10n']['Rewrite "%s" in next field to show that you are not a robot:'] = 'Recopier "%s" dans le champs suivant pour montrer que vous n\'êtes pas une machine :'; 98 99 … … 141 142 $GLOBALS['__l10n']['Hide no followed links'] = 'Cacher les liens non suivis'; 142 143 143 #_widgets.php:10 1144 #_widgets.php:102 144 145 #default-templates/kutrl.html:55 145 #inc/index.link.php:1 29146 #inc/index.link.php:134 146 147 $GLOBALS['__l10n']['Long link:'] = 'Lien long :'; 147 148 148 #_widgets.php:10 8149 #_widgets.php:109 149 150 #default-templates/kutrl.html:62 150 151 $GLOBALS['__l10n']['Create'] = 'Créer'; 151 152 152 #inc/index.link.php:35 153 #default-templates/kutrl404.html:14 154 #default-templates/kutrl404.html:38 155 $GLOBALS['__l10n']['URL not found'] = 'URL non trouvée'; 156 157 #default-templates/kutrl404.html:42 158 $GLOBALS['__l10n']['The URL you are looking for does not exist.'] = 'Le lien que vous recherchez n\'existe pas.'; 159 160 #default-templates/kutrl404.html:45 161 $GLOBALS['__l10n']['Create your own short URL'] = 'Créer votre propre lien court'; 162 163 #inc/index.link.php:37 153 164 $GLOBALS['__l10n']['There is nothing to shorten.'] = 'I n\'y a rien à réduire.'; 154 165 155 #inc/index.link.php:4 1166 #inc/index.link.php:43 156 167 $GLOBALS['__l10n']['This service does not allowed custom hash.'] = 'Ce service n\'accepte pas les liens court personnalisés.'; 157 168 158 #inc/index.link.php:4 4169 #inc/index.link.php:46 159 170 $GLOBALS['__l10n']['This link is not a valid URL.'] = 'Ce lien n\'est pas valide.'; 160 171 161 #inc/index.link.php: 59172 #inc/index.link.php:61 162 173 $GLOBALS['__l10n']['This custom short url is already taken.'] = 'Ce lien court personnalisé est déjà pris.'; 163 174 164 #inc/index.link.php: 79175 #inc/index.link.php:82 165 176 $GLOBALS['__l10n']['Failed to create short link. This could be caused by a service failure.'] = 'Impossible de créé un lien court. Ceci peut être causé par un problème du service.'; 166 177 167 #inc/index.link.php:1 16178 #inc/index.link.php:121 168 179 #inc/index.links.php:207 169 180 #inc/index.service.php:52 170 #inc/index.setting.php: 97181 #inc/index.setting.php:103 171 182 $GLOBALS['__l10n']['New link'] = 'Nouveau lien'; 172 183 173 #inc/index.link.php:12 1184 #inc/index.link.php:126 174 185 $GLOBALS['__l10n']['You must set an admin service.'] = 'Vous devez définir un service admin.'; 175 186 176 #inc/index.link.php:1 28187 #inc/index.link.php:133 177 188 $GLOBALS['__l10n']['Shorten link using service "%s"'] = 'Raccourcir un lien en utilisant le service "%s"'; 178 189 179 #inc/index.link.php:1 38190 #inc/index.link.php:143 180 191 $GLOBALS['__l10n']['Only if you want a custom short link.'] = 'Uniquement si vous souhaitez un lien court personnalisé.'; 181 192 182 #inc/index.link.php:14 2193 #inc/index.link.php:148 183 194 $GLOBALS['__l10n']['You can use "bob!!" if you want a semi-custom link, it starts with "bob" and "!!" will be replaced by an increment value.'] = 'Vous pouvez utiliser "bob!!" si vous souhaitez un lien semi-personnalisé, il commencera par "bob" et "!!" sera remplacé par une valeur incrémentale.'; 184 195 … … 193 204 194 205 #inc/index.links.php:132 195 #inc/index.setting.php:8 2206 #inc/index.setting.php:88 196 207 $GLOBALS['__l10n']['disabled'] = 'Désactivé'; 197 208 … … 218 229 $GLOBALS['__l10n']['Learn more about %s.'] = 'En savoir plus à propos de %s.'; 219 230 220 #inc/index.setting.php: 96231 #inc/index.setting.php:102 221 232 #index.php:36 222 233 $GLOBALS['__l10n']['Settings'] = 'Paramètres'; 223 234 224 #inc/index.setting.php:10 1235 #inc/index.setting.php:107 225 236 $GLOBALS['__l10n']['Plugin activation'] = 'Activation de l\'extension'; 226 237 227 #inc/index.setting.php:1 04238 #inc/index.setting.php:110 228 239 $GLOBALS['__l10n']['Enable plugin'] = 'Activer l\'extension'; 229 240 230 #inc/index.setting.php:1 07241 #inc/index.setting.php:113 231 242 $GLOBALS['__l10n']['General rules'] = 'Réglages'; 232 243 233 #inc/index.setting.php:11 0244 #inc/index.setting.php:116 234 245 $GLOBALS['__l10n']['Limit short link to current blog'] = 'Limiter les liens court à ce blog'; 235 246 236 #inc/index.setting.php:11 1247 #inc/index.setting.php:117 237 248 $GLOBALS['__l10n']['Only link started with this blog URL could be shortened.'] = 'Uniquement les liens commençant par l\'URL de ce blog pourront être réduits.'; 238 249 239 #inc/index.setting.php:1 14250 #inc/index.setting.php:120 240 251 $GLOBALS['__l10n']['Passive mode'] = 'Mode passif'; 241 252 242 #inc/index.setting.php:115 243 $GLOBALS['__l10n']['If this extension is disabled and the passive mode is enabled, "kutrl" tags will display long urls instead of nothing on templates.'] = 'Si cette extension est désactivée et que le mode passif est activé, les balises "kutrl" afficheront les longues URL au lieu de rien.'; 244 245 #inc/index.setting.php:118 253 #inc/index.setting.php:121 254 $GLOBALS['__l10n']['If this extension is disabled and the passive mode is enabled, "kutrl" tags (like EntryKurl) will display long urls instead of nothing on templates.'] = 'Si cette extension est désactivée et que le mode passif est activé, les balises "kutrl" (comme EntryKutrl) afficheront les liens longs au lieu de rien.'; 255 256 #inc/index.setting.php:124 257 $GLOBALS['__l10n']['Active mode'] = 'Mode actif'; 258 259 #inc/index.setting.php:125 260 $GLOBALS['__l10n']['If the active mode is enabled, all know default template tags (like EntryURL) will display short urls instead of long ones on templates.'] = 'Si le mode actif est acitvé, les balises de thème (comme EntryURL) afficheront les liens court au lieu des longs.'; 261 262 #inc/index.setting.php:128 246 263 $GLOBALS['__l10n']['Create short link for new entries'] = 'Créer un lien court pour les nouveaux billets'; 247 264 248 #inc/index.setting.php:1 19265 #inc/index.setting.php:129 249 266 $GLOBALS['__l10n']['This can be changed on page of creation/edition of an entry.'] = 'Ceci peut être changé sur la page d\'édition / création d\'un billet.'; 250 267 251 #inc/index.setting.php:1 22268 #inc/index.setting.php:132 252 269 $GLOBALS['__l10n']['Default services'] = 'Services par défaut'; 253 270 254 #inc/index.setting.php:1 28271 #inc/index.setting.php:138 255 272 $GLOBALS['__l10n']['Administration:'] = 'Administration :'; 256 273 257 #inc/index.setting.php:1 31274 #inc/index.setting.php:141 258 275 $GLOBALS['__l10n']['Service to use in this admin page and on edit page of an entry.'] = 'Service à utiliser sur cette page d\'administration ou sur la page d\'édition d\'un billet.'; 259 276 260 #inc/index.setting.php:1 37277 #inc/index.setting.php:147 261 278 $GLOBALS['__l10n']['Templates:'] = 'Templates :'; 262 279 263 #inc/index.setting.php:1 40280 #inc/index.setting.php:150 264 281 $GLOBALS['__l10n']['Shorten links automatically when using template value like "EntryKutrl".'] = 'Réduit automatiquement les liens des templates utilisant les balises tels que "EntryKutrl".'; 265 282 266 #inc/index.setting.php:1 46283 #inc/index.setting.php:156 267 284 $GLOBALS['__l10n']['Contents:'] = 'Contenus :'; 268 285 269 #inc/index.setting.php:1 49286 #inc/index.setting.php:159 270 287 $GLOBALS['__l10n']['Shorten links automatically found in contents using wiki synthax.'] = 'Réduit automatiquement les liens des contenus utilisant la syntax wiki.'; 271 288 272 #inc/index.setting.php:1 59289 #inc/index.setting.php:169 273 290 $GLOBALS['__l10n']['Use wildcard %L for short URL, %B for blog name, %U for user name.'] = 'Utiliser les jokers %L pour le lien court, %B pour le nom du blog, %U pour l\'utilisateur.'; 274 291 275 #inc/index.setting.php:161 292 #inc/index.setting.php:170 293 $GLOBALS['__l10n']['Entry message:'] = 'Message d\'un billet :'; 294 295 #inc/index.setting.php:173 296 $GLOBALS['__l10n']['This is a special message that can be used on admin enrty page, use wildcard %T for entry title, %L for short URL, %B for blog name, %U for user name.'] = 'C\'est un message spécial qui sera utilisé sur la page d\'édition d\'un billet, utiliser les jokers %T pour le titre du billet, %L pour le lien court, %B pour le blog, %U pour l\'utilisateur.'; 297 298 #inc/index.setting.php:175 276 299 $GLOBALS['__l10n']['Activation'] = 'Activation'; 277 300 278 #inc/index.setting.php:1 62279 $GLOBALS['__l10n']['Send message when short url is created on:'] = 'Envoyer un message lorsqu\'un lien court est créé sur:';280 281 #inc/index.setting.php:1 65301 #inc/index.setting.php:176 302 $GLOBALS['__l10n']['Send message when short url is created on:'] = 'Envoyer un message lorsqu\'un lien court est créé dans :'; 303 304 #inc/index.setting.php:179 282 305 $GLOBALS['__l10n']['administration form'] = 'le formulaire de la page d\'administration'; 283 306 284 #inc/index.setting.php:1 68285 $GLOBALS['__l10n']['public form'] = 'le for umlaire publique';286 287 #inc/index.setting.php:1 71288 $GLOBALS['__l10n']['template'] = 'le thème';289 290 #inc/index.setting.php:1 74291 $GLOBALS['__l10n']['content'] = 'le contenu ';307 #inc/index.setting.php:182 308 $GLOBALS['__l10n']['public form'] = 'le formulaire de la page publique'; 309 310 #inc/index.setting.php:185 311 $GLOBALS['__l10n']['template'] = 'les balises de thème'; 312 313 #inc/index.setting.php:188 314 $GLOBALS['__l10n']['content'] = 'le contenu (wiki)'; 292 315 293 316 #inc/lib.dc.twitter.php:169 … … 310 333 $GLOBALS['__l10n']['Message'] = 'Message'; 311 334 312 #inc/lib.dc.twitter.php: 301335 #inc/lib.dc.twitter.php:296 313 336 $GLOBALS['__l10n']['User is not set.'] = 'L\'utilisateur est pas renseigné.'; 314 337 315 #inc/lib.dc.twitter.php:30 9338 #inc/lib.dc.twitter.php:304 316 339 $GLOBALS['__l10n']['Nothing to send.'] = 'Il n\'y a rien à envoyer.'; 317 340 318 #inc/lib.dc.twitter.php:3 33341 #inc/lib.dc.twitter.php:328 319 342 $GLOBALS['__l10n']['Failed to send message (%s)'] = 'Impossible d\'envoyer le message (%s)'; 320 343 321 #inc/lib.dc.twitter.php:3 93344 #inc/lib.dc.twitter.php:388 322 345 $GLOBALS['__l10n']['Failed to get short url (%s)'] = 'Impossible de récupérer le lien court (%s)'; 323 346 324 #inc/lib.dc.twitter.php:39 9347 #inc/lib.dc.twitter.php:394 325 348 $GLOBALS['__l10n']['Failed to get short url'] = 'Impossible de récupérer le lien court'; 326 349 … … 337 360 $GLOBALS['__l10n']['There is nothing to configure for this service.'] = 'Il n\'y a rien à configurer pour ce service.'; 338 361 339 #inc/lib.wiki.kutrl.php: 73362 #inc/lib.wiki.kutrl.php:84 340 363 $GLOBALS['__l10n']['%s (Shorten with %s)'] = '% (réduit avec %s)'; 341 364 … … 383 406 $GLOBALS['__l10n']['An error occured with code %s and message "%s"'] = 'Une erreur est survenu avec le code "%s" et le message "%s"'; 384 407 385 #inc/services/class.local.service.php:44 408 #inc/services/class.local.service.php:46 409 $GLOBALS['__l10n']['Settings:'] = 'paramètre :'; 410 411 #inc/services/class.local.service.php:48 412 $GLOBALS['__l10n']['Allowed protocols:'] = 'Protocoles autorisés :'; 413 414 #inc/services/class.local.service.php:53 415 $GLOBALS['__l10n']['Use comma seperated list like: "http:,https:,ftp:"'] = 'Utiliser une virgule pour séparer la liste des protocoles. Ex: "http:,https:,ftp:"'; 416 417 #inc/services/class.local.service.php:58 418 $GLOBALS['__l10n']['Enable public page for visitors to shorten links'] = 'Activer la page publique pour que les visiteurs puissent réduire des liens'; 419 420 #inc/services/class.local.service.php:61 421 $GLOBALS['__l10n']['CSS:'] = 'CSS :'; 422 423 #inc/services/class.local.service.php:64 424 $GLOBALS['__l10n']['You can add here special cascading style sheet. Body of page has class "dc-kutrl" and widgets have class "shortenkutrlwidget" and "rankkutrlwidget".'] = 'Vous pouvez ajouter des styles ici. La balise "body" a la class "dc-kutrl" et les widgets ont les class "shortenkutrlwidget" et "rankkutrlwidget".'; 425 426 #inc/services/class.local.service.php:68 427 $GLOBALS['__l10n']['Enable special 404 error public page for unknow urls'] = 'Activer la page spéciale d\'erreur 404 pour les liens inconnus'; 428 429 #inc/services/class.local.service.php:70 430 $GLOBALS['__l10n']['If this is not activated, the default 404 page of the theme will be display.'] = 'Si cette option est désactivée, la page d\'erreur 404 par défaut du thème sera utilisée.'; 431 432 #inc/services/class.local.service.php:74 433 $GLOBALS['__l10n']['Note:'] = 'Note :'; 434 435 #inc/services/class.local.service.php:76 386 436 $GLOBALS['__l10n']['This service use your own Blog to shorten and serve URL.'] = 'Ce service utilise votre propre blog pour réduire et servir des liens.'; 387 437 388 #inc/services/class.local.service.php: 45438 #inc/services/class.local.service.php:77 389 439 $GLOBALS['__l10n']['This means that with this service short links start with "%s".'] = 'Cela signifie qu\'avec ce service vos liens courts commencent par "%s".'; 390 440 391 #inc/services/class.local.service.php: 48441 #inc/services/class.local.service.php:80 392 442 $GLOBALS['__l10n']['You can use Dotclear\'s plugin called myUrlHandlers to change short links prefix on your blog.'] = 'Vous pouvez utiliser l\'extension myUrlHandlers pour Dotclear afin de changer le prefix de vos liens courts depuis votre blog.'; 393 443 394 #inc/services/class.local.service.php: 54444 #inc/services/class.local.service.php:86 395 445 $GLOBALS['__l10n']['We recommand that you use a rewrite engine in order to remove \'index.php\' from your blog\'s URL.'] = 'Nous vous recommandons d\'utiliser la réécriture d\'URL pour supprimer \'index.php de l\'URL de votre blog.'; 396 446 397 #inc/services/class.local.service.php: 56447 #inc/services/class.local.service.php:88 398 448 $GLOBALS['__l10n']['You can find more about this on the Dotclear\'s documentation.'] = 'Vous trouverez plus d\'information à ce sujet dans la documentation Dotclear.'; 399 449 400 #inc/services/class.local.service.php:63 401 $GLOBALS['__l10n']['Allowed protocols:'] = 'Protocoles autorisés :'; 402 403 #inc/services/class.local.service.php:68 404 $GLOBALS['__l10n']['Use comma seperated list like: "http:,https:,ftp:"'] = 'Utiliser une virgule pour séparer la liste des protocoles. Ex: "http:,https:,ftp:"'; 405 406 #inc/services/class.local.service.php:73 407 $GLOBALS['__l10n']['Enable public page for visitors to shorten links'] = 'Activer la page publique pour que les visiteurs puissent réduire des liens'; 408 409 #inc/services/class.local.service.php:76 410 $GLOBALS['__l10n']['CSS:'] = 'CSS :'; 411 412 #inc/services/class.local.service.php:79 413 $GLOBALS['__l10n']['You can add here special cascading style sheet. Body of page has class "dc-kutrl" and widgets have class "shortenkutrlwidget" and "rankkutrlwidget".'] = 'Vous pouvez ajouter des styles ici. La balise "body" a la class "dc-kutrl" et les widgets ont les class "shortenkutrlwidget" et "rankkutrlwidget".'; 414 415 #inc/services/class.local.service.php:120 450 #inc/services/class.local.service.php:93 451 $GLOBALS['__l10n']['There are two templates delivered with kUtRL, if you do not use default theme, you may adapt them to yours.'] = 'Il y a deux templates livrés avec kUtRL, si vous n\'utilisez pas le thème par défaut, vous devrez peut-être les adapter au votre.'; 452 453 #inc/services/class.local.service.php:94 454 $GLOBALS['__l10n']['Files are in plugin directory /default-templates, just copy them into your theme and edit them.'] = 'Les fichiers sont dans le répertoire /default-templates du plugin, copiez les dans votre thème et modifiez les.'; 455 456 #inc/services/class.local.service.php:137 416 457 $GLOBALS['__l10n']['Custom short link is already taken.'] = 'Le lien court personnalisé est déjà pris.'; 417 458 418 #inc/services/class.local.service.php:1 30459 #inc/services/class.local.service.php:147 419 460 $GLOBALS['__l10n']['Custom short link is not valid.'] = 'Le lien court personnalisé n\'est pas valide.'; 420 461 421 #inc/services/class.local.service.php:1 41462 #inc/services/class.local.service.php:158 422 463 $GLOBALS['__l10n']['Failed to save link.'] = 'Impossible d\'enregistrer le lien.'; 423 464 -
plugins/kUtRL/locales/fr/main.po
r2190 r2405 1 # Language: français2 # Module: kUtRL - 0. 33 # Date: 2010-0 4-14 22:23:464 # Translated with translater 1. 31 # Language: Français 2 # Module: kUtRL - 0.4 3 # Date: 2010-06-28 10:43:43 4 # Translated with translater 1.4.1 5 5 6 6 msgid "" 7 7 msgstr "" 8 8 "Content-Type: text/plain; charset=UTF-8\n" 9 "Project-Id-Version: kUtRL 0. 3\n"9 "Project-Id-Version: kUtRL 0.4\n" 10 10 "POT-Creation-Date: \n" 11 "PO-Revision-Date: 2010-0 4-14T22:23:46+00:00\n"11 "PO-Revision-Date: 2010-06-28T10:43:43+00:00\n" 12 12 "Last-Translator: JC Denis\n" 13 13 "Language-Team: \n" … … 18 18 #: _widgets.php:22 19 19 #: default-templates/kutrl.html:48 20 #: inc/index.link.php:11 220 #: inc/index.link.php:117 21 21 #: inc/index.links.php:203 22 22 #: inc/index.service.php:42 23 #: inc/index.setting.php: 8723 #: inc/index.setting.php:93 24 24 #: index.php:41 25 25 #: index.php:42 … … 37 37 38 38 #: _admin.php:108 39 #: inc/index.link.php:1 3639 #: inc/index.link.php:141 40 40 msgid "Custom short link:" 41 41 msgstr "Lien court personnalisé :" … … 46 46 47 47 #: _admin.php:122 48 #: _widgets.php:17 148 #: _widgets.php:178 49 49 msgid "never followed" 50 50 msgstr "jamais suivi" 51 51 52 52 #: _admin.php:126 53 #: _widgets.php:1 7353 #: _widgets.php:182 54 54 msgid "followed one time" 55 55 msgstr "suivi une fois" 56 56 57 57 #: _admin.php:130 58 #: _widgets.php:1 7558 #: _widgets.php:186 59 59 msgid "followed %s times" 60 60 msgstr "suivi %s fois" 61 61 62 62 #: _admin.php:137 63 #: _admin.php:2 6863 #: _admin.php:292 64 64 msgid "delete short link" 65 65 msgstr "effacer un lien court" 66 66 67 #: _admin.php:2 6767 #: _admin.php:291 68 68 msgid "create short link" 69 69 msgstr "créer un lien court" 70 70 71 #: _public.php:1 2371 #: _public.php:141 72 72 msgid "Failed to verify protected field." 73 73 msgstr "Impossible de vérifier le champs de protection." 74 74 75 #: _public.php:1 3176 #: inc/index.link.php: 3875 #: _public.php:149 76 #: inc/index.link.php:40 77 77 #: inc/services/class.bilbolinks.service.php:64 78 78 #: inc/services/class.bitly.service.php:76 79 #: inc/services/class.local.service.php: 8979 #: inc/services/class.local.service.php:106 80 80 #: inc/services/class.trim.service.php:65 81 81 msgid "Service is not well configured." 82 82 msgstr "Le service n'est pas correctement configuré." 83 83 84 #: _public.php:1 3984 #: _public.php:157 85 85 msgid "This string is not a valid URL." 86 86 msgstr "Cette chaine n'est pas un lien valide." 87 87 88 #: _public.php:1 4789 #: inc/index.link.php:4 788 #: _public.php:165 89 #: inc/index.link.php:49 90 90 msgid "This link is too short." 91 91 msgstr "Ce lien est trop court." 92 92 93 #: _public.php:1 5594 #: inc/index.link.php:5 093 #: _public.php:173 94 #: inc/index.link.php:52 95 95 msgid "This type of link is not allowed." 96 96 msgstr "Ce type de lien n'est pas autorisé." 97 97 98 #: _public.php:1 6499 #: inc/index.link.php:5 398 #: _public.php:182 99 #: inc/index.link.php:55 100 100 msgid "Short links are limited to this blog URL." 101 101 msgstr "Les liens courts sont limités à l'URL de ce blog." 102 102 103 #: _public.php:1 72104 #: inc/index.link.php:5 6103 #: _public.php:190 104 #: inc/index.link.php:58 105 105 msgid "This link is already a short link." 106 106 msgstr "Ce lien est dèjà un lien court." 107 107 108 #: _public.php: 185109 #: _public.php:2 04110 #: inc/index.link.php:6 7111 #: inc/index.link.php: 87108 #: _public.php:203 109 #: _public.php:222 110 #: inc/index.link.php:69 111 #: inc/index.link.php:90 112 112 msgid "Short link for %s is %s" 113 113 msgstr "Le lien court pour %s est %s" 114 114 115 #: _public.php: 196115 #: _public.php:214 116 116 msgid "Failed to create short link." 117 117 msgstr "Impossible de créer le lien court." 118 118 119 #: _public.php:213 120 #: _public.php:432 121 #: inc/lib.wiki.kutrl.php:78 119 #: _public.php:231 120 #: _public.php:310 121 #: _public.php:532 122 #: inc/lib.wiki.kutrl.php:90 122 123 msgid "public" 123 124 msgstr "publique" 124 125 125 #: _public.php: 314126 #: _widgets.php:10 5126 #: _public.php:403 127 #: _widgets.php:106 127 128 msgid "Rewrite \"%s\" in next field to show that you are not a robot:" 128 129 msgstr "Recopier \"%s\" dans le champs suivant pour montrer que vous n'êtes pas une machine :" … … 186 187 msgstr "Cacher les liens non suivis" 187 188 188 #: _widgets.php:10 1189 #: _widgets.php:102 189 190 #: default-templates/kutrl.html:55 190 #: inc/index.link.php:1 29191 #: inc/index.link.php:134 191 192 msgid "Long link:" 192 193 msgstr "Lien long :" 193 194 194 #: _widgets.php:10 8195 #: _widgets.php:109 195 196 #: default-templates/kutrl.html:62 196 197 msgid "Create" 197 198 msgstr "Créer" 198 199 199 #: inc/index.link.php:35 200 #: default-templates/kutrl404.html:14 201 #: default-templates/kutrl404.html:38 202 msgid "URL not found" 203 msgstr "URL non trouvée" 204 205 #: default-templates/kutrl404.html:42 206 msgid "The URL you are looking for does not exist." 207 msgstr "Le lien que vous recherchez n'existe pas." 208 209 #: default-templates/kutrl404.html:45 210 msgid "Create your own short URL" 211 msgstr "Créer votre propre lien court" 212 213 #: inc/index.link.php:37 200 214 msgid "There is nothing to shorten." 201 215 msgstr "I n'y a rien à réduire." 202 216 203 #: inc/index.link.php:4 1217 #: inc/index.link.php:43 204 218 msgid "This service does not allowed custom hash." 205 219 msgstr "Ce service n'accepte pas les liens court personnalisés." 206 220 207 #: inc/index.link.php:4 4221 #: inc/index.link.php:46 208 222 msgid "This link is not a valid URL." 209 223 msgstr "Ce lien n'est pas valide." 210 224 211 #: inc/index.link.php: 59225 #: inc/index.link.php:61 212 226 msgid "This custom short url is already taken." 213 227 msgstr "Ce lien court personnalisé est déjà pris." 214 228 215 #: inc/index.link.php: 79229 #: inc/index.link.php:82 216 230 msgid "Failed to create short link. This could be caused by a service failure." 217 231 msgstr "Impossible de créé un lien court. Ceci peut être causé par un problème du service." 218 232 219 #: inc/index.link.php:1 16233 #: inc/index.link.php:121 220 234 #: inc/index.links.php:207 221 235 #: inc/index.service.php:52 222 #: inc/index.setting.php: 97236 #: inc/index.setting.php:103 223 237 msgid "New link" 224 238 msgstr "Nouveau lien" 225 239 226 #: inc/index.link.php:12 1240 #: inc/index.link.php:126 227 241 msgid "You must set an admin service." 228 242 msgstr "Vous devez définir un service admin." 229 243 230 #: inc/index.link.php:1 28244 #: inc/index.link.php:133 231 245 msgid "Shorten link using service \"%s\"" 232 246 msgstr "Raccourcir un lien en utilisant le service \"%s\"" 233 247 234 #: inc/index.link.php:1 38248 #: inc/index.link.php:143 235 249 msgid "Only if you want a custom short link." 236 250 msgstr "Uniquement si vous souhaitez un lien court personnalisé." 237 251 238 #: inc/index.link.php:14 2252 #: inc/index.link.php:148 239 253 msgid "You can use \"bob!!\" if you want a semi-custom link, it starts with \"bob\" and \"!!\" will be replaced by an increment value." 240 254 msgstr "Vous pouvez utiliser \"bob!!\" si vous souhaitez un lien semi-personnalisé, il commencera par \"bob\" et \"!!\" sera remplacé par une valeur incrémentale." … … 253 267 254 268 #: inc/index.links.php:132 255 #: inc/index.setting.php:8 2269 #: inc/index.setting.php:88 256 270 msgid "disabled" 257 271 msgstr "Désactivé" … … 286 300 msgstr "En savoir plus à propos de %s." 287 301 288 #: inc/index.setting.php: 96302 #: inc/index.setting.php:102 289 303 #: index.php:36 290 304 msgid "Settings" 291 305 msgstr "Paramètres" 292 306 293 #: inc/index.setting.php:10 1307 #: inc/index.setting.php:107 294 308 msgid "Plugin activation" 295 309 msgstr "Activation de l'extension" 296 310 297 #: inc/index.setting.php:1 04311 #: inc/index.setting.php:110 298 312 msgid "Enable plugin" 299 313 msgstr "Activer l'extension" 300 314 301 #: inc/index.setting.php:1 07315 #: inc/index.setting.php:113 302 316 msgid "General rules" 303 317 msgstr "Réglages" 304 318 305 #: inc/index.setting.php:11 0319 #: inc/index.setting.php:116 306 320 msgid "Limit short link to current blog" 307 321 msgstr "Limiter les liens court à ce blog" 308 322 309 #: inc/index.setting.php:11 1323 #: inc/index.setting.php:117 310 324 msgid "Only link started with this blog URL could be shortened." 311 325 msgstr "Uniquement les liens commençant par l'URL de ce blog pourront être réduits." 312 326 313 #: inc/index.setting.php:1 14327 #: inc/index.setting.php:120 314 328 msgid "Passive mode" 315 329 msgstr "Mode passif" 316 330 317 #: inc/index.setting.php:115 318 msgid "If this extension is disabled and the passive mode is enabled, \"kutrl\" tags will display long urls instead of nothing on templates." 319 msgstr "Si cette extension est désactivée et que le mode passif est activé, les balises \"kutrl\" afficheront les longues URL au lieu de rien." 320 321 #: inc/index.setting.php:118 331 #: inc/index.setting.php:121 332 msgid "If this extension is disabled and the passive mode is enabled, \"kutrl\" tags (like EntryKurl) will display long urls instead of nothing on templates." 333 msgstr "Si cette extension est désactivée et que le mode passif est activé, les balises \"kutrl\" (comme EntryKutrl) afficheront les liens longs au lieu de rien." 334 335 #: inc/index.setting.php:124 336 msgid "Active mode" 337 msgstr "Mode actif" 338 339 #: inc/index.setting.php:125 340 msgid "If the active mode is enabled, all know default template tags (like EntryURL) will display short urls instead of long ones on templates." 341 msgstr "Si le mode actif est acitvé, les balises de thème (comme EntryURL) afficheront les liens court au lieu des longs." 342 343 #: inc/index.setting.php:128 322 344 msgid "Create short link for new entries" 323 345 msgstr "Créer un lien court pour les nouveaux billets" 324 346 325 #: inc/index.setting.php:1 19347 #: inc/index.setting.php:129 326 348 msgid "This can be changed on page of creation/edition of an entry." 327 349 msgstr "Ceci peut être changé sur la page d'édition / création d'un billet." 328 350 329 #: inc/index.setting.php:1 22351 #: inc/index.setting.php:132 330 352 msgid "Default services" 331 353 msgstr "Services par défaut" 332 354 333 #: inc/index.setting.php:1 28355 #: inc/index.setting.php:138 334 356 msgid "Administration:" 335 357 msgstr "Administration :" 336 358 337 #: inc/index.setting.php:1 31359 #: inc/index.setting.php:141 338 360 msgid "Service to use in this admin page and on edit page of an entry." 339 361 msgstr "Service à utiliser sur cette page d'administration ou sur la page d'édition d'un billet." 340 362 341 #: inc/index.setting.php:1 37363 #: inc/index.setting.php:147 342 364 msgid "Templates:" 343 365 msgstr "Templates :" 344 366 345 #: inc/index.setting.php:1 40367 #: inc/index.setting.php:150 346 368 msgid "Shorten links automatically when using template value like \"EntryKutrl\"." 347 369 msgstr "Réduit automatiquement les liens des templates utilisant les balises tels que \"EntryKutrl\"." 348 370 349 #: inc/index.setting.php:1 46371 #: inc/index.setting.php:156 350 372 msgid "Contents:" 351 373 msgstr "Contenus :" 352 374 353 #: inc/index.setting.php:1 49375 #: inc/index.setting.php:159 354 376 msgid "Shorten links automatically found in contents using wiki synthax." 355 377 msgstr "Réduit automatiquement les liens des contenus utilisant la syntax wiki." 356 378 357 #: inc/index.setting.php:1 59379 #: inc/index.setting.php:169 358 380 msgid "Use wildcard %L for short URL, %B for blog name, %U for user name." 359 381 msgstr "Utiliser les jokers %L pour le lien court, %B pour le nom du blog, %U pour l'utilisateur." 360 382 361 #: inc/index.setting.php:161 383 #: inc/index.setting.php:170 384 msgid "Entry message:" 385 msgstr "Message d'un billet :" 386 387 #: inc/index.setting.php:173 388 msgid "This is a special message that can be used on admin enrty page, use wildcard %T for entry title, %L for short URL, %B for blog name, %U for user name." 389 msgstr "C'est un message spécial qui sera utilisé sur la page d'édition d'un billet, utiliser les jokers %T pour le titre du billet, %L pour le lien court, %B pour le blog, %U pour l'utilisateur." 390 391 #: inc/index.setting.php:175 362 392 msgid "Activation" 363 393 msgstr "Activation" 364 394 365 #: inc/index.setting.php:1 62395 #: inc/index.setting.php:176 366 396 msgid "Send message when short url is created on:" 367 msgstr "Envoyer un message lorsqu'un lien court est créé sur:"368 369 #: inc/index.setting.php:1 65397 msgstr "Envoyer un message lorsqu'un lien court est créé dans :" 398 399 #: inc/index.setting.php:179 370 400 msgid "administration form" 371 401 msgstr "le formulaire de la page d'administration" 372 402 373 #: inc/index.setting.php:1 68403 #: inc/index.setting.php:182 374 404 msgid "public form" 375 msgstr "le for umlaire publique"376 377 #: inc/index.setting.php:1 71405 msgstr "le formulaire de la page publique" 406 407 #: inc/index.setting.php:185 378 408 msgid "template" 379 msgstr "le thème"380 381 #: inc/index.setting.php:1 74409 msgstr "les balises de thème" 410 411 #: inc/index.setting.php:188 382 412 msgid "content" 383 msgstr "le contenu "413 msgstr "le contenu (wiki)" 384 414 385 415 #: inc/lib.dc.twitter.php:169 … … 407 437 msgstr "Message" 408 438 409 #: inc/lib.dc.twitter.php: 301439 #: inc/lib.dc.twitter.php:296 410 440 msgid "User is not set." 411 441 msgstr "L'utilisateur est pas renseigné." 412 442 413 #: inc/lib.dc.twitter.php:30 9443 #: inc/lib.dc.twitter.php:304 414 444 msgid "Nothing to send." 415 445 msgstr "Il n'y a rien à envoyer." 416 446 417 #: inc/lib.dc.twitter.php:3 33447 #: inc/lib.dc.twitter.php:328 418 448 msgid "Failed to send message (%s)" 419 449 msgstr "Impossible d'envoyer le message (%s)" 420 450 421 #: inc/lib.dc.twitter.php:3 93451 #: inc/lib.dc.twitter.php:388 422 452 msgid "Failed to get short url (%s)" 423 453 msgstr "Impossible de récupérer le lien court (%s)" 424 454 425 #: inc/lib.dc.twitter.php:39 9455 #: inc/lib.dc.twitter.php:394 426 456 msgid "Failed to get short url" 427 457 msgstr "Impossible de récupérer le lien court" … … 443 473 msgstr "Il n'y a rien à configurer pour ce service." 444 474 445 #: inc/lib.wiki.kutrl.php: 73475 #: inc/lib.wiki.kutrl.php:84 446 476 msgid "%s (Shorten with %s)" 447 477 msgstr "% (réduit avec %s)" … … 501 531 msgstr "Une erreur est survenu avec le code \"%s\" et le message \"%s\"" 502 532 503 #: inc/services/class.local.service.php:44 533 #: inc/services/class.local.service.php:46 534 msgid "Settings:" 535 msgstr "paramètre :" 536 537 #: inc/services/class.local.service.php:48 538 msgid "Allowed protocols:" 539 msgstr "Protocoles autorisés :" 540 541 #: inc/services/class.local.service.php:53 542 msgid "Use comma seperated list like: \"http:,https:,ftp:\"" 543 msgstr "Utiliser une virgule pour séparer la liste des protocoles. Ex: \"http:,https:,ftp:\"" 544 545 #: inc/services/class.local.service.php:58 546 msgid "Enable public page for visitors to shorten links" 547 msgstr "Activer la page publique pour que les visiteurs puissent réduire des liens" 548 549 #: inc/services/class.local.service.php:61 550 msgid "CSS:" 551 msgstr "CSS :" 552 553 #: inc/services/class.local.service.php:64 554 msgid "You can add here special cascading style sheet. Body of page has class \"dc-kutrl\" and widgets have class \"shortenkutrlwidget\" and \"rankkutrlwidget\"." 555 msgstr "Vous pouvez ajouter des styles ici. La balise \"body\" a la class \"dc-kutrl\" et les widgets ont les class \"shortenkutrlwidget\" et \"rankkutrlwidget\"." 556 557 #: inc/services/class.local.service.php:68 558 msgid "Enable special 404 error public page for unknow urls" 559 msgstr "Activer la page spéciale d'erreur 404 pour les liens inconnus" 560 561 #: inc/services/class.local.service.php:70 562 msgid "If this is not activated, the default 404 page of the theme will be display." 563 msgstr "Si cette option est désactivée, la page d'erreur 404 par défaut du thème sera utilisée." 564 565 #: inc/services/class.local.service.php:74 566 msgid "Note:" 567 msgstr "Note :" 568 569 #: inc/services/class.local.service.php:76 504 570 msgid "This service use your own Blog to shorten and serve URL." 505 571 msgstr "Ce service utilise votre propre blog pour réduire et servir des liens." 506 572 507 #: inc/services/class.local.service.php: 45573 #: inc/services/class.local.service.php:77 508 574 msgid "This means that with this service short links start with \"%s\"." 509 575 msgstr "Cela signifie qu'avec ce service vos liens courts commencent par \"%s\"." 510 576 511 #: inc/services/class.local.service.php: 48577 #: inc/services/class.local.service.php:80 512 578 msgid "You can use Dotclear's plugin called myUrlHandlers to change short links prefix on your blog." 513 579 msgstr "Vous pouvez utiliser l'extension myUrlHandlers pour Dotclear afin de changer le prefix de vos liens courts depuis votre blog." 514 580 515 #: inc/services/class.local.service.php: 54581 #: inc/services/class.local.service.php:86 516 582 msgid "We recommand that you use a rewrite engine in order to remove 'index.php' from your blog's URL." 517 583 msgstr "Nous vous recommandons d'utiliser la réécriture d'URL pour supprimer 'index.php de l'URL de votre blog." 518 584 519 #: inc/services/class.local.service.php: 56585 #: inc/services/class.local.service.php:88 520 586 msgid "You can find more about this on the Dotclear's documentation." 521 587 msgstr "Vous trouverez plus d'information à ce sujet dans la documentation Dotclear." 522 588 523 #: inc/services/class.local.service.php:63 524 msgid "Allowed protocols:" 525 msgstr "Protocoles autorisés :" 526 527 #: inc/services/class.local.service.php:68 528 msgid "Use comma seperated list like: \"http:,https:,ftp:\"" 529 msgstr "Utiliser une virgule pour séparer la liste des protocoles. Ex: \"http:,https:,ftp:\"" 530 531 #: inc/services/class.local.service.php:73 532 msgid "Enable public page for visitors to shorten links" 533 msgstr "Activer la page publique pour que les visiteurs puissent réduire des liens" 534 535 #: inc/services/class.local.service.php:76 536 msgid "CSS:" 537 msgstr "CSS :" 538 539 #: inc/services/class.local.service.php:79 540 msgid "You can add here special cascading style sheet. Body of page has class \"dc-kutrl\" and widgets have class \"shortenkutrlwidget\" and \"rankkutrlwidget\"." 541 msgstr "Vous pouvez ajouter des styles ici. La balise \"body\" a la class \"dc-kutrl\" et les widgets ont les class \"shortenkutrlwidget\" et \"rankkutrlwidget\"." 542 543 #: inc/services/class.local.service.php:120 589 #: inc/services/class.local.service.php:93 590 msgid "There are two templates delivered with kUtRL, if you do not use default theme, you may adapt them to yours." 591 msgstr "Il y a deux templates livrés avec kUtRL, si vous n'utilisez pas le thème par défaut, vous devrez peut-être les adapter au votre." 592 593 #: inc/services/class.local.service.php:94 594 msgid "Files are in plugin directory /default-templates, just copy them into your theme and edit them." 595 msgstr "Les fichiers sont dans le répertoire /default-templates du plugin, copiez les dans votre thème et modifiez les." 596 597 #: inc/services/class.local.service.php:137 544 598 msgid "Custom short link is already taken." 545 599 msgstr "Le lien court personnalisé est déjà pris." 546 600 547 #: inc/services/class.local.service.php:1 30601 #: inc/services/class.local.service.php:147 548 602 msgid "Custom short link is not valid." 549 603 msgstr "Le lien court personnalisé n'est pas valide." 550 604 551 #: inc/services/class.local.service.php:1 41605 #: inc/services/class.local.service.php:158 552 606 msgid "Failed to save link." 553 607 msgstr "Impossible d'enregistrer le lien." -
plugins/kUtRL/release.txt
r2274 r2405 3 3 - Added passworded links 4 4 - fixed or removed tweet from comment when it is spam 5 6 0.4 20100628 7 * Switched to DC 2.2 8 * Fixed no short urls on preview mode 9 * Fixed lock hash of deleted urls 10 * Fixed hide new short url widget on kutrl pages 11 * Fixed typo 12 * Added active mode that shorten urls on default template values 13 * Added special tweeter message for post (can include post title) 14 * Added kutrl special 404 page 5 15 6 16 0.3.3 20100528
Note: See TracChangeset
for help on using the changeset viewer.