Changeset 548
- Timestamp:
- 11/06/08 21:59:28 (15 years ago)
- google:author:
- appears
- Location:
- plugins/dlManager
- Files:
-
- 6 added
- 1 deleted
- 9 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
plugins/dlManager/_admin.php
r544 r548 22 22 # ***** END LICENSE BLOCK ***** 23 23 24 if (!defined('DC_ RC_PATH')) {return;}24 if (!defined('DC_CONTEXT_ADMIN')) { return; } 25 25 26 $core->addBehavior('adminBeforeBlogSettingsUpdate', 27 array('dlManagerAdmin','adminBeforeBlogSettingsUpdate')); 28 $core->addBehavior('adminBlogPreferencesForm', 29 array('dlManagerAdmin','adminBlogPreferencesForm')); 26 $_menu['Plugins']->addItem(__('Download Manager'), 27 'plugin.php?p=dlManager', 28 'index.php?pf=dlManager/icon.png', 29 preg_match('/plugin.php\?p=dlManager(&.*)?$/',$_SERVER['REQUEST_URI']), 30 $core->auth->check('admin',$core->blog->id)); 30 31 31 32 $core->addBehavior('initWidgets',array('dlManagerAdmin','initWidgets')); … … 37 38 class dlManagerAdmin 38 39 { 39 /**40 adminBeforeBlogSettingsUpdate behavior41 @param settings <b>object</b> Settings42 */43 public static function adminBeforeBlogSettingsUpdate(&$settings)44 {45 global $core;46 47 $settings->setNameSpace('dlmanager');48 $settings->put('dlmanager_active',!empty($_POST['dlmanager_active']),49 'boolean','Enable DL Manager');50 $settings->put('dlmanager_counter',!empty($_POST['dlmanager_counter']),51 'boolean','Enable download counter');52 $settings->put('dlmanager_attachment_url',!empty($_POST['dlmanager_attachment_url']),53 'boolean','Redirect attachments links to DL Manager');54 $settings->put('dlmanager_enable_sort',!empty($_POST['dlmanager_enable_sort']),55 'boolean','Allow visitors to choose how to sort files');56 $settings->put('dlmanager_file_sort',57 (!empty($_POST['dlmanager_file_sort']) ? $_POST['dlmanager_file_sort'] : ''),58 'string','file sort');59 $settings->put('dlmanager_root',60 (!empty($_POST['dlmanager_root']) ? $_POST['dlmanager_root'] : ''),61 'string', 'root directory');62 # inspirated from lightbox/admin.php63 $settings->setNameSpace('system');64 }65 66 /**67 adminBlogPreferencesForm behavior68 @param core <b>object</b> Core69 @return <b>string</b> XHTML70 */71 public static function adminBlogPreferencesForm(&$core)72 {73 echo '<fieldset>'.74 '<legend>'.__('Download manager').'</legend>'.75 '<p>'.76 form::checkbox('dlmanager_active',1,77 $core->blog->settings->dlmanager_active).78 '<label class="classic" for="dlmanager_active">'.79 sprintf(__('Enable the %s'),__('Download manager')).80 '</label>'.81 '</p>'.82 '<p class="form-note">'.83 sprintf(__('The %s display media on a public page.'),84 __('Download manager')).85 '</p>'.86 '<p>'.87 form::checkbox('dlmanager_counter',1,88 $core->blog->settings->dlmanager_counter).89 '<label class="classic" for="dlmanager_counter">'.90 __('Enable the download counter').91 '</label>'.92 '</p>'.93 '<p>'.94 form::checkbox('dlmanager_attachment_url',1,95 $core->blog->settings->dlmanager_attachment_url).96 '<label class="classic" for="dlmanager_attachment_url">'.97 sprintf(__('Redirect attachments links to %s'),98 __('Download manager')).99 '</label>'.100 '</p>'.101 '<p class="form-note">'.102 __('When downloading an attachment, the download counter will be increased.').' '.103 sprintf(__('This will redefine the %s tag.'),104 '<strong>{{tpl:AttachmentURL}}</strong>').105 '</p>'.106 '<p>'.107 form::checkbox('dlmanager_enable_sort',1,108 $core->blog->settings->dlmanager_enable_sort).109 '<label class="classic" for="dlmanager_enable_sort">'.110 __('Allow visitors to choose how to sort files').111 '</label> '.112 '</p>'.113 '<p>'.114 '<label for="dlmanager_file_sort">'.115 __('Sort files:').116 form::combo('dlmanager_file_sort',dlManager::getSortValues(true),117 $core->blog->settings->dlmanager_file_sort).118 '</label> '.119 '</p>'.120 '<p class="form-note">'.121 __('Leave empty to cancel this feature.').122 '</p>'.123 '<p>'.124 '<label for="dlmanager_root">'.125 sprintf(__('Change root of %s:'),__('Download manager')).126 form::combo('dlmanager_root',dlManager::listDirs(),127 $core->blog->settings->dlmanager_root).128 '</label> '.129 '</p>'.130 '<p class="form-note">'.131 __('Leave empty to cancel this feature.').' '.132 sprintf(__('This will change the root of the %s page and of the widget.'),133 __('Download manager')).' '.134 sprintf(__('If you change this setting, reconfigure the %s widget.'),135 __('Download manager')).136 '</p>'.137 # filemanager->$exclude_list is protected138 '<p>'.139 sprintf(140 __('Files can be excluded from %1$s by editing <strong>%2$s</strong> in <strong>%3$s</strong>.'),141 __('Download manager'),'media_exclusion',__('about:config')).' '.142 sprintf(__('For example, to exclude %1$s and %2$s files : <code>%3$s</code>'),143 __('PNG'),__('JPG'),'/\.(png|jpg)/i').144 '</p>'.145 '<p>'.146 sprintf(__('URL of the %s page :'),__('Download manager')).147 '<br />'.148 '<code>'.dlManager::pageURL().'</code>'.149 '<br />'.150 '<a href="'.dlManager::pageURL().'">'.sprintf(__('View the %s page'),151 __('Download manager')).'</a>'.152 '</p>'.153 '</fieldset>';154 }155 156 40 /** 157 41 widget -
plugins/dlManager/_define.php
r547 r548 22 22 # ***** END LICENSE BLOCK ***** 23 23 24 if (!defined('DC_RC_PATH')) { return;}24 if (!defined('DC_RC_PATH')) {return;} 25 25 26 26 $this->registerModule( … … 28 28 /* Description*/ "Download manager with a public page and a widget", 29 29 /* Author */ "Moe (http://gniark.net/), Osku and Tomtom (http://blog.zenstyle.fr)", 30 /* Version */ '1.0-RC 2',30 /* Version */ '1.0-RC3', 31 31 /* Permissions */ 'admin' 32 32 ); -
plugins/dlManager/_public.php
r547 r548 22 22 # ***** END LICENSE BLOCK ***** 23 23 24 if (!defined('DC_RC_PATH')) { return;}24 if (!defined('DC_RC_PATH')) {return;} 25 25 26 26 /** … … 132 132 } 133 133 } 134 135 foreach ($core->media->dir['files'] as $k => $v) 136 { 137 $item =& $core->media->dir['files'][$k]; 138 139 $item->relname = 140 substr($item->relname,$page_root_len); 141 } 134 135 $_ctx->dlManager_dirs = $core->media->dir['dirs']; 136 137 $files_array = $core->media->dir['files']; 138 139 $_ctx->dlManager_pager = new pager( 140 # page 141 ((isset($_GET['page'])) ? $_GET['page'] : 1),count($files_array), 142 $core->blog->settings->dlmanager_nb_per_page,10); 143 144 $_ctx->dlManager_pager->html_prev = '« '.__('previous page'); 145 $_ctx->dlManager_pager->html_next = __('next page').' »'; 146 147 $core->media->dir['files'] = array(); 148 149 for ($i=$_ctx->dlManager_pager->index_start, $j=0; 150 $i<=$_ctx->dlManager_pager->index_end; $i++, $j++) 151 { 152 $item =& $files_array[$i]; 153 154 $item->relname = substr($item->relname,$page_root_len); 155 156 $core->media->dir['files'][] = $files_array[$i]; 157 } 158 $_ctx->dlManager_files = $core->media->dir['files']; 159 160 # download counter 161 $_ctx->dlManager_count_dl = 162 unserialize($core->blog->settings->dlmanager_count_dl); 163 if (!is_array($_ctx->dlManager_count_dl)) 164 { 165 $_ctx->dlManager_count_dl = array(); 166 } 167 168 unset($files_array); 142 169 } 143 170 catch (Exception $e) … … 174 201 } 175 202 176 $_ctx-> dlManager_item= $file;203 $_ctx->items = $file; 177 204 $_ctx->file_url = $file->file_url; 178 205 … … 188 215 if (!dlManager::inJail($file->relname)) {self::p404();} 189 216 190 $_ctx-> dlManager_item->relname =191 dirname(substr($_ctx-> dlManager_item->relname,$page_root_len));192 if ($_ctx-> dlManager_item->relname == '.')193 { 194 $_ctx-> dlManager_item->relname = '';217 $_ctx->items->relname = 218 dirname(substr($_ctx->items->relname,$page_root_len)); 219 if ($_ctx->items->relname == '.') 220 { 221 $_ctx->items->relname = ''; 195 222 } 196 223 197 224 # if visitor asked a directory 198 $_ctx->dlManager_currentDir = $_ctx-> dlManager_item->relname;225 $_ctx->dlManager_currentDir = $_ctx->items->relname; 199 226 $page_dir = $page_root.'/'.$_ctx->dlManager_currentDir; 200 227 … … 203 230 # /BreadCrumb 204 231 232 # download counter 233 $_ctx->dlManager_count_dl = 234 unserialize($core->blog->settings->dlmanager_count_dl); 235 if (!is_array($_ctx->dlManager_count_dl)) 236 { 237 $_ctx->dlManager_count_dl = array(); 238 } 239 205 240 $core->tpl->setPath($core->tpl->getPath(), 206 241 dirname(__FILE__).'/default-templates/'); 207 242 208 243 if (preg_match('#^.*\/js$#',$args)) { 209 self::serveDocument(' media_player_js.html','text/html');244 self::serveDocument('_media_player_content.html','text/html'); 210 245 } 211 246 else { … … 315 350 $core->tpl->addValue('DLMBreadCrumbDirURL',array('dlManagerPageTpl', 316 351 'breadCrumbDirURL')); 317 $core->tpl->addBlock('DLMBreadCrumbSeparator',array('dlManagerPageTpl',318 'breadCrumbSeparator'));319 352 320 353 # items … … 322 355 323 356 $core->tpl->addBlock('DLMIfNoItem',array('dlManagerPageTpl','ifNoItem')); 324 325 $core->tpl->addBlock('DLMHeader',array('dlManagerPageTpl','header'));326 $core->tpl->addBlock('DLMFooter',array('dlManagerPageTpl','footer'));327 357 328 358 # item … … 350 380 'itemImageThumbPath')); 351 381 352 $core->tpl->addBlock('DLM DownloadCounter',array('dlManagerPageTpl','downloadCounter'));382 $core->tpl->addBlock('DLMIfDownloadCounter',array('dlManagerPageTpl','ifDownloadCounter')); 353 383 354 384 # image meta … … 370 400 'itemEntries')); 371 401 402 # 403 $core->tpl->addValue('DLMPageLinks',array('dlManagerPageTpl', 404 'pageLinks')); 405 372 406 if ($core->blog->settings->dlmanager_attachment_url) 373 407 { … … 436 470 public static function breadCrumb($attr,$content) 437 471 { 438 return("<?php ". 439 '$_ctx->dlManagerBCIndex = 0;'. 440 'foreach ($_ctx->dlManager_BreadCrumb as $k => $v) {'. 441 '?>'. 472 return('<?php while ($_ctx->dlManager_BreadCrumb->fetch()) : ?>'. 442 473 $content. 443 '<?php $_ctx->dlManagerBCIndex += 1; }'. 444 'unset($_ctx->dlManagerBCIndex,$k,$v);'. 445 "?>"); 474 '<?php endwhile; ?>'); 446 475 } 447 476 … … 454 483 $f = $GLOBALS['core']->tpl->getFilters($attr); 455 484 456 return('<?php echo('.sprintf($f,'$ v').'); ?>');485 return('<?php echo('.sprintf($f,'$_ctx->dlManager_BreadCrumb->url').'); ?>'); 457 486 } 458 487 … … 465 494 $f = $GLOBALS['core']->tpl->getFilters($attr); 466 495 467 return('<?php echo('.sprintf($f,'$ k').'); ?>');468 } 469 470 /** 471 BreadCrumb separator496 return('<?php echo('.sprintf($f,'$_ctx->dlManager_BreadCrumb->name').'); ?>'); 497 } 498 499 /** 500 No item 472 501 @param attr <b>array</b> Attribute 473 502 @param content <b>string</b> Content 474 503 @return <b>string</b> PHP block 475 504 */ 476 public static function breadCrumbSeparator($attr,$content) 477 { 478 $equal = (((isset($attr['last'])) && ($attr['last'] == 1)) ? '=' : ''); 479 480 return('<?php if ($_ctx->dlManagerBCIndex <'.$equal. 481 ' (count($_ctx->dlManager_BreadCrumb)-1)) : ?>'. 505 public static function ifNoItem($attr,$content) 506 { 507 $type = ($attr['type'] == 'dirs') ? 'dirs' : 'files'; 508 509 return('<?php if (count($_ctx->{\'dlManager_'.$type.'\'}) == 0) : ?>'. 482 510 $content. 483 511 '<?php endif; ?>'); … … 485 513 486 514 /** 487 No item515 loop on items 488 516 @param attr <b>array</b> Attribute 489 517 @param content <b>string</b> Content 490 518 @return <b>string</b> PHP block 491 519 */ 492 public static function i fNoItem($attr,$content)520 public static function items($attr,$content) 493 521 { 494 522 $type = ($attr['type'] == 'dirs') ? 'dirs' : 'files'; 495 496 return('<?php if (count($core->media->dir[\''.$type.'\']) == 0) : ?>'. 523 524 return 525 '<?php '. 526 '$_ctx->items = dlManager::getItems($_ctx->{\'dlManager_'.$type.'\'}); '. 527 'while ($_ctx->items->fetch()) : ?>'."\n". 497 528 $content. 498 '<?php endif; ?>'); 499 } 500 501 /** 502 loop on items 503 @param attr <b>array</b> Attribute 504 @param content <b>string</b> Content 505 @return <b>string</b> PHP block 506 */ 507 public static function items($attr,$content) 508 { 509 $type = ($attr['type'] == 'dirs') ? 'dirs' : 'files'; 510 return("<?php ". 511 '$_ctx->dlManager_items = $core->media->dir[\''.$type.'\'];'. 512 "if (\$_ctx->dlManager_items !== null) :"."\n". 513 '$_ctx->dlManager_index = 0;'. 514 "foreach (\$_ctx->dlManager_items as \$_ctx->dlManager_item) { ". 515 "?>"."\n". 516 $content. 517 '<?php $_ctx->dlManager_index += 1; } '."\n". 518 " endif;"."\n". 519 'unset($_ctx->dlManager_item,$_ctx->dlManager_index); ?>'); 520 } 521 522 /** 523 Header 524 @param attr <b>array</b> Attribute 525 @param content <b>string</b> Content 526 @return <b>string</b> PHP block 527 */ 528 public static function header($attr,$content) 529 { 530 return('<?php if ($_ctx->dlManager_index == 0) : ?>'. 531 $content. 532 '<?php endif; ?>'); 533 } 534 535 /** 536 Footer 537 @param attr <b>array</b> Attribute 538 @param content <b>string</b> Content 539 @return <b>string</b> PHP block 540 */ 541 public static function footer($attr,$content) 542 { 543 return('<?php if ($_ctx->dlManager_index == '. 544 '(count($_ctx->dlManager_items)-1)) : ?>'. 545 $content. 546 '<?php endif; ?>'); 529 '<?php endwhile; unset($_ctx->items); ?>'; 547 530 } 548 531 … … 555 538 { 556 539 $f = $GLOBALS['core']->tpl->getFilters($attr); 557 return('<?php echo '.sprintf($f,'$_ctx-> dlManager_item->dir_url').'; ?>');540 return('<?php echo '.sprintf($f,'$_ctx->items->dir_url').'; ?>'); 558 541 } 559 542 … … 566 549 global $core; 567 550 return('<?php echo '. 568 'dlManager::pageURL().'.569 ' ((!empty($_ctx->dlManager_item->relname)) ?'.570 '\'/\'.$_ctx-> dlManager_item->relname : \'\'); ?>');551 # empty can't be used with $_ctx->items->relname, use strlen() instead 552 'dlManager::pageURL().'.'((strlen($_ctx->items->relname) > 0) ?'. 553 '\'/\'.$_ctx->items->relname : \'\'); ?>'); 571 554 } 572 555 … … 594 577 foreach ($types as $type) 595 578 { 596 $if[] = '$_ctx-> dlManager_item->type '.$sign.'= "'.$type.'"';579 $if[] = '$_ctx->items->type '.$sign.'= "'.$type.'"'; 597 580 } 598 581 } … … 609 592 foreach ($types as $type) 610 593 { 611 $if[] = '$_ctx-> dlManager_item->media_type '.$sign.'= "'.$type.'"';594 $if[] = '$_ctx->items->media_type '.$sign.'= "'.$type.'"'; 612 595 } 613 596 } … … 651 634 { 652 635 return('<?php echo $core->blog->url.$core->url->getBase(\'icon\').'. 653 '\'/\'.$_ctx-> dlManager_item->media_type; ?>');636 '\'/\'.$_ctx->items->media_type; ?>'); 654 637 } 655 638 … … 664 647 $f = $GLOBALS['core']->tpl->getFilters($attr); 665 648 666 return('<?php echo '.sprintf($f, 667 '$_ctx->dlManager_item->media_title').'; ?>'); 649 return('<?php echo '.sprintf($f,'$_ctx->items->media_title').'; ?>'); 668 650 } 669 651 … … 684 666 685 667 return('<?php echo '.sprintf($f, 686 $format_open.'$_ctx-> dlManager_item->size'.$format_close).'; ?>');668 $format_open.'$_ctx->items->size'.$format_close).'; ?>'); 687 669 } 688 670 … … 696 678 $f = $GLOBALS['core']->tpl->getFilters($attr); 697 679 698 return('<?php echo '.sprintf($f,'$_ctx-> dlManager_item->file_url').'; ?>');680 return('<?php echo '.sprintf($f,'$_ctx->items->file_url').'; ?>'); 699 681 } 700 682 … … 709 691 710 692 return('<?php echo($core->blog->url.$core->url->getBase(\'download\').'. 711 '\'/\'.'.sprintf($f,'$_ctx-> dlManager_item->media_id').'); ?>');693 '\'/\'.'.sprintf($f,'$_ctx->items->media_id').'); ?>'); 712 694 } 713 695 … … 722 704 723 705 return('<?php echo($core->blog->url.$core->url->getBase(\'mediaplayer\').'. 724 '\'/\'.'.sprintf($f,'$_ctx-> dlManager_item->media_id').'); ?>');706 '\'/\'.'.sprintf($f,'$_ctx->items->media_id').'); ?>'); 725 707 } 726 708 … … 734 716 $f = $GLOBALS['core']->tpl->getFilters($attr); 735 717 736 return('<?php echo '.sprintf($f,'$_ctx-> dlManager_item->basename').'; ?>');718 return('<?php echo '.sprintf($f,'$_ctx->items->basename').'; ?>'); 737 719 } 738 720 … … 746 728 $f = $GLOBALS['core']->tpl->getFilters($attr); 747 729 748 return('<?php echo '.sprintf($f,'$_ctx-> dlManager_item->extension').'; ?>');730 return('<?php echo '.sprintf($f,'$_ctx->items->extension').'; ?>'); 749 731 } 750 732 … … 758 740 $f = $GLOBALS['core']->tpl->getFilters($attr); 759 741 760 return('<?php echo '.sprintf($f,'$_ctx-> dlManager_item->type').'; ?>');742 return('<?php echo '.sprintf($f,'$_ctx->items->type').'; ?>'); 761 743 } 762 744 … … 770 752 $f = $GLOBALS['core']->tpl->getFilters($attr); 771 753 772 return('<?php echo '.sprintf($f,'$_ctx-> dlManager_item->media_type').'; ?>');754 return('<?php echo '.sprintf($f,'$_ctx->items->media_type').'; ?>'); 773 755 } 774 756 … … 782 764 $f = $GLOBALS['core']->tpl->getFilters($attr); 783 765 784 return('<?php echo '.sprintf($f,'$_ctx-> dlManager_item->media_dtstr').'; ?>');766 return('<?php echo '.sprintf($f,'$_ctx->items->media_dtstr').'; ?>'); 785 767 } 786 768 … … 790 772 @return <b>string</b> PHP block 791 773 */ 792 public static function itemDlCount($attr) 793 { 794 $f = $GLOBALS['core']->tpl->getFilters($attr); 795 774 public static function itemDlCount() 775 { 796 776 return 797 '<?php $count = unserialize($core->blog->settings->dlmanager_count_dl); '. 798 'if (empty($count)) {$count = array();}'. 799 'echo '.sprintf($f,'array_key_exists($_ctx->dlManager_item->media_id,'. 800 '$count) ? $count[$_ctx->dlManager_item->media_id] : "0"'). 801 '; ?>'; 777 '<?php echo (array_key_exists($_ctx->items->media_id,'. 778 '$_ctx->dlManager_count_dl) ? $_ctx->dlManager_count_dl[$_ctx->items->media_id] : "0"); ?>'; 802 779 } 803 780 … … 808 785 @return <b>string</b> PHP block 809 786 */ 810 public static function downloadCounter($attr,$content)787 public static function ifDownloadCounter($attr,$content) 811 788 { 812 789 return('<?php if ($core->blog->settings->dlmanager_counter) : ?>'. … … 830 807 {$size = $attr['size'];} 831 808 832 return('<?php if (isset($_ctx-> dlManager_item->media_thumb[\''.809 return('<?php if (isset($_ctx->items->media_thumb[\''. 833 810 $size.'\'])) :'. 834 'echo($_ctx-> dlManager_item->media_thumb[\''.$size.'\']);'.811 'echo($_ctx->items->media_thumb[\''.$size.'\']);'. 835 812 'else :'. 836 'echo($_ctx-> dlManager_item->file_url);'.813 'echo($_ctx->items->file_url);'. 837 814 'endif; ?>'); 838 815 } … … 846 823 public static function itemImageMeta($attr,$content) 847 824 { 848 return("<?php ".849 '$_ctx->dlManager_index = 0;'.850 '$_ctx->dlManager_items = new ArrayObject();'.851 'foreach ($_ctx->dlManager_item->media_meta as $k => $v) {'.852 'if (!empty($v)) {$_ctx->dlManager_items[$k] = $v;}'.853 '}'.854 'foreach ($_ctx->dlManager_items as $name => $value) { ?>'."\n".855 $content.856 '<?php '.857 '$_ctx->dlManager_index += 1; } '."\n".858 'unset($_ctx->dlManager_items,$_ctx->dlManager_item,'.859 '$_ctx->dlManager_index); ?>');860 }861 862 /**863 Image meta name864 @param attr <b>array</b> Attribute865 @return <b>string</b> PHP block866 */867 public static function itemImageMetaName($attr)868 {869 $f = $GLOBALS['core']->tpl->getFilters($attr);870 871 return('<?php echo '.sprintf($f,'$name').'; ?>');872 }873 874 /**875 Image meta value876 @param attr <b>array</b> Attribute877 @return <b>string</b> PHP block878 */879 public static function itemImageMetaValue($attr)880 {881 $f = $GLOBALS['core']->tpl->getFilters($attr);882 883 return('<?php echo '.sprintf($f,'$value').'; ?>');884 }885 886 /**887 Loop on zip content888 @param attr <b>array</b> Attribute889 @return <b>string</b> PHP block890 */891 public static function itemZipContent($attr,$content)892 {893 $f = $GLOBALS['core']->tpl->getFilters($attr);894 895 825 return 896 826 '<?php '. 897 '$_ctx->dlManager_index = 0;'. 898 '$content = $core->media->getZipContent($_ctx->dlManager_item); '. 899 'foreach ($content as $file => $v) { '. 900 '?>'."\n". 827 '$_ctx->meta = dlManager::getImageMeta($_ctx->items); '. 828 'while ($_ctx->meta->fetch()) : ?>'."\n". 901 829 $content. 902 '<?php $_ctx->dlManager_index += 1; '. 903 '}'. 904 'unset($content,$_ctx->dlManager_index,$file); ?>'; 830 '<?php endwhile; unset($_ctx->meta); ?>'; 831 } 832 833 /** 834 Image meta name 835 @param attr <b>array</b> Attribute 836 @return <b>string</b> PHP block 837 */ 838 public static function itemImageMetaName($attr) 839 { 840 $f = $GLOBALS['core']->tpl->getFilters($attr); 841 842 return('<?php echo '.sprintf($f,'$_ctx->meta->name').'; ?>'); 843 } 844 845 /** 846 Image meta value 847 @param attr <b>array</b> Attribute 848 @return <b>string</b> PHP block 849 */ 850 public static function itemImageMetaValue($attr) 851 { 852 $f = $GLOBALS['core']->tpl->getFilters($attr); 853 854 return('<?php echo '.sprintf($f,'$_ctx->meta->value').'; ?>'); 855 } 856 857 /** 858 Loop on zip content 859 @param attr <b>array</b> Attribute 860 @return <b>string</b> PHP block 861 */ 862 public static function itemZipContent($attr,$content) 863 { 864 $f = $GLOBALS['core']->tpl->getFilters($attr); 865 866 return 867 '<?php '. 868 '$_ctx->files = dlManager::getZipContent($_ctx->items); '. 869 'while ($_ctx->files->fetch()) : ?>'."\n". 870 $content. 871 '<?php endwhile; unset($_ctx->files); ?>'; 905 872 } 906 873 … … 914 881 $f = $GLOBALS['core']->tpl->getFilters($attr); 915 882 916 return('<?php echo '.sprintf($f,'$ file').'; ?>');883 return('<?php echo '.sprintf($f,'$_ctx->files->file').'; ?>'); 917 884 } 918 885 … … 926 893 { 927 894 return("<?php ". 928 '$_ctx->posts = dlManager::findPosts($_ctx->dlManager_item->media_id);'. 929 '$_ctx->dlManager_index = 0;'. 930 "if (!\$_ctx->posts->isEmpty()) :"."\n". 895 '$_ctx->posts = dlManager::findPosts($_ctx->items->media_id);'. 931 896 "while (\$_ctx->posts->fetch()) : ?>"."\n". 932 897 $content. 933 "<?php \$_ctx->dlManager_index += 1;". 934 "endwhile; "."\n". 935 " endif;"."\n". 936 "unset(\$_ctx->posts,\$_ctx->dlManager_index); ?>"); 937 } 938 939 public function AttachmentURL($attr) 898 "<?php endwhile; unset(\$_ctx->posts); ?>"); 899 } 900 901 /** 902 redefine {{tpl:AttachmentURL}} to point to download/id 903 @param attr <b>array</b> Attribute 904 @return <b>string</b> PHP block 905 */ 906 public static function AttachmentURL($attr) 940 907 { 941 908 $f = $GLOBALS['core']->tpl->getFilters($attr); … … 943 910 return('<?php echo($core->blog->url.$core->url->getBase(\'download\').'. 944 911 '\'/\'.'.sprintf($f,'$attach_f->media_id').'); ?>'); 912 } 913 914 /** 915 get page links 916 @return <b>string</b> PHP block 917 */ 918 public static function pageLinks() 919 { 920 return('<?php echo($_ctx->dlManager_pager->getLinks()); ?>'); 945 921 } 946 922 } … … 1028 1004 'pf=dlManager/images/image.png" alt="'.__('Preview').'" />'. 1029 1005 '</a>'; 1030 } elseif ($item->type == 'audio/mpeg3' || $item->type == 'video/x-flv')1006 } elseif ($item->type == 'audio/mpeg3' ) 1031 1007 { 1032 1008 $mediaplayer = '<a href="'.$core->blog->url.$core->url->getBase('mediaplayer').'/'. 1033 1009 $item->media_id.'" title="'.__('Preview :').' '.$item->media_title.'">'. 1034 1010 '<img src="'.$core->blog->getQmarkURL(). 1035 'pf=dlManager/images/control_play.png" alt="'.__('Preview').'" />'. 1011 'pf=dlManager/images/music.png" alt="'.__('Preview').'" />'. 1012 '</a>'; 1013 } elseif ($item->type == 'video/x-flv') 1014 { 1015 $mediaplayer = '<a href="'.$core->blog->url.$core->url->getBase('mediaplayer').'/'. 1016 $item->media_id.'" title="'.__('Preview :').' '.$item->media_title.'">'. 1017 '<img src="'.$core->blog->getQmarkURL(). 1018 'pf=dlManager/images/film.png" alt="'.__('Preview').'" />'. 1036 1019 '</a>'; 1037 1020 } elseif ($item->type == 'application/zip') -
plugins/dlManager/default-templates/_media_player_content.html
r547 r548 16 16 <tpl:DLMBreadCrumb> 17 17 <a href="{{tpl:DLMBreadCrumbDirURL}}"> 18 {{tpl:DLMBreadCrumbDirName}}</a> 19 <tpl:DLMBreadCrumbSeparator last="1"> / 20 </tpl:DLMBreadCrumbSeparator> 18 {{tpl:DLMBreadCrumbDirName}}</a> / 21 19 </tpl:DLMBreadCrumb> 22 20 {{tpl:DLMItemBasename}} … … 49 47 <h3>{{tpl:lang Zip file content}}</h3> 50 48 <tpl:DLMItemZipContent> 51 <tpl: DLMHeader>49 <tpl:LoopPosition start="1" length="1"> 52 50 <ul> 53 </tpl: DLMHeader>51 </tpl:LoopPosition> 54 52 <li>{{tpl:DLMItemZipContentFile}}</li> 55 <tpl: DLMFooter>53 <tpl:LoopPosition start="-1"> 56 54 </ul> 57 </tpl: DLMFooter>55 </tpl:LoopPosition> 58 56 </tpl:DLMItemZipContent> 59 57 </tpl:DLMItemIf> 60 </div> 58 </div><!-- End #player --> 61 59 62 60 <h3>{{tpl:lang Informations}}</h3> … … 70 68 <dt>{{tpl:lang Modification time}}</dt> 71 69 <dd>{{tpl:DLMItemMTime}}</dd> 72 <tpl:DLM DownloadCounter>70 <tpl:DLMIfDownloadCounter> 73 71 <dt>{{tpl:lang Download number}}</dt> 74 72 <dd>{{tpl:DLMItemDlCount}}</dd> 75 </tpl:DLM DownloadCounter>73 </tpl:DLMIfDownloadCounter> 76 74 </dl> 77 75 78 76 <tpl:DLMItemIf media_type="image"> 79 77 <tpl:DLMItemImageMeta> 80 <tpl: DLMHeader>78 <tpl:LoopPosition start="1" length="1"> 81 79 <h3>{{tpl:lang Image meta}}</h3> 82 80 <dl> 83 </tpl: DLMHeader>81 </tpl:LoopPosition> 84 82 <dt>{{tpl:DLMItemImageMetaName}}</dt> 85 83 <dd>{{tpl:DLMItemImageMetaValue}}</dd> 86 <tpl: DLMFooter>84 <tpl:LoopPosition start="-1"> 87 85 </dl> 88 </tpl: DLMFooter>86 </tpl:LoopPosition> 89 87 </tpl:DLMItemImageMeta> 90 88 </tpl:DLMItemIf> 91 89 92 90 <tpl:DLMItemEntries> 93 <tpl: DLMHeader>91 <tpl:LoopPosition start="1" length="1"> 94 92 <h3>{{tpl:lang Entries containing this media}}</h3> 95 93 <ul> 96 </tpl: DLMHeader>94 </tpl:LoopPosition> 97 95 <li> 98 96 <a href="{{tpl:EntryURL}}">{{tpl:EntryTitle encode_html="1"}} 99 97 ({{tpl:EntryDate format="%d/%m/%Y"}})</a> 100 98 </li> 101 <tpl: DLMFooter>99 <tpl:LoopPosition start="-1"> 102 100 </ul> 103 </tpl: DLMFooter>101 </tpl:LoopPosition> 104 102 </tpl:DLMItemEntries> 105 103 </div><!-- End #dlmanager --> -
plugins/dlManager/default-templates/media.html
r547 r548 20 20 21 21 <style type="text/css"> 22 23 24 25 .TB_overlayMacFFBGHack {background: url({{tpl:BlogURL}}pf=dlManager/default-templates/macFFBgHack.png) repeat;}22 .center {text-align:center;} 23 .size {white-space:pre;} 24 .number {text-align:right;} 25 .TB_overlayMacFFBGHack {background: url({{tpl:BlogURL}}pf=dlManager/images/macFFBgHack.png) repeat;} 26 26 </style> 27 27 … … 29 29 30 30 {{tpl:include src="_head.html"}} 31 32 <script type="text/javascript"> 33 $(document).ready(function () { 34 var tb_pathToImage = "{{tpl:BlogURL}}pf=dlManager/default-templates/loadingAnimation.gif"; 35 $("a.thickbox").each(function() { 36 $(this).attr("href",this.href+"/js"); 31 32 <script type="text/javascript" src="{{tpl:BlogURL}}pf=dlManager/js/thickbox.js"></script> 33 34 <script type="text/javascript"> 35 //<![CDATA[ 36 /* define this before $(document).ready() to avoid an error */ 37 var tb_pathToImage = "{{tpl:BlogURL}}pf=dlManager/images/loadingAnimation.gif"; 38 $(document).ready(function () { 39 $("a.thickbox").each(function() { 40 $(this).attr("href",this.href+"/js"); 41 }); 37 42 }); 38 });43 //]]> 39 44 </script> 40 <script type="text/javascript" src="{{tpl:BlogURL}}pf=dlManager/default-templates/thickbox.js"></script>41 45 </head> 42 46 … … 67 71 <tpl:DLMBreadCrumb> 68 72 <a href="{{tpl:DLMBreadCrumbDirURL}}"> 69 {{tpl:DLMBreadCrumbDirName}}</a> 70 <tpl:DLMBreadCrumbSeparator last="0"> / 71 </tpl:DLMBreadCrumbSeparator> 73 {{tpl:DLMBreadCrumbDirName}}</a> / 72 74 </tpl:DLMBreadCrumb> 73 75 </p> … … 80 82 81 83 <tpl:DLMItems type="dirs"> 82 <tpl: DLMHeader>84 <tpl:LoopPosition start="1" length="1"> 83 85 <ul id="dlmanager-dirs"> 84 </tpl: DLMHeader>86 </tpl:LoopPosition> 85 87 <li><a href="{{tpl:DLMItemDirPath}}"> 86 88 {{tpl:DLMItemBasename}}</a></li> 87 <tpl: DLMFooter>89 <tpl:LoopPosition start="-1"> 88 90 </ul> 89 </tpl: DLMFooter>91 </tpl:LoopPosition> 90 92 </tpl:DLMItems> 91 93 … … 107 109 108 110 <tpl:DLMItems type="files"> 109 <tpl: DLMHeader>111 <tpl:LoopPosition start="1" length="1"> 110 112 <table rules="rows" id="dlmanager-files"> 111 113 <thead> … … 121 123 <!-- #<th>{{tpl:lang Extension}}</th>--> 122 124 <th>{{tpl:lang Modification time}}</th> 123 <tpl:DLM DownloadCounter>125 <tpl:DLMIfDownloadCounter> 124 126 <th>{{tpl:lang Downloads}}</th> 125 </tpl:DLM DownloadCounter>127 </tpl:DLMIfDownloadCounter> 126 128 </tr> 127 129 </thead> 128 130 <tbody> 129 </tpl: DLMHeader>131 </tpl:LoopPosition> 130 132 <tr class="{{tpl:DLMItemMediaType}}"> 131 133 <td><img src="{{tpl:DLMItemIconPath}}" width="48" height="48" title="{{tpl:DLMItemMediaType}}" alt="{{tpl:DLMItemMediaType}}" /></td> … … 142 144 </a> 143 145 </tpl:DLMItemIf> 144 <!-- # mp3 and flv files --> 145 <tpl:DLMItemIf operator="or" type="audio/mpeg3,video/x-flv"> 146 <a href="{{tpl:DLMItemPlayerURL}}" class="preview thickbox" title="{{tpl:lang Preview :}} {{tpl:DLMItemBasename}}"> 147 <img src="{{tpl:BlogQmarkURL}}pf=dlManager/images/control_play.png" alt="{{tpl:lang Preview}}" /> 146 <!-- # mp3 files --> 147 <tpl:DLMItemIf type="audio/mpeg3"> 148 <a href="{{tpl:DLMItemPlayerURL}}" class="preview thickbox" title="{{tpl:lang Preview :}} {{tpl:DLMItemBasename}}"> 149 <img src="{{tpl:BlogQmarkURL}}pf=dlManager/images/music.png" alt="{{tpl:lang Preview}}" /> 150 </a> 151 </tpl:DLMItemIf> 152 <!-- # flv files --> 153 <tpl:DLMItemIf type="video/x-flv"> 154 <a href="{{tpl:DLMItemPlayerURL}}" class="preview thickbox" title="{{tpl:lang Preview :}} {{tpl:DLMItemBasename}}"> 155 <img src="{{tpl:BlogQmarkURL}}pf=dlManager/images/film.png" alt="{{tpl:lang Preview}}" /> 148 156 </a> 149 157 </tpl:DLMItemIf> … … 154 162 </a> 155 163 </tpl:DLMItemIf> 156 157 164 </td> 158 165 <td class="size">{{tpl:DLMItemSize format="1"}}</td> … … 164 171 return "txt" --> 165 172 <td>{{tpl:DLMItemMTime}}</td> 166 <tpl:DLM DownloadCounter>173 <tpl:DLMIfDownloadCounter> 167 174 <td class="number">{{tpl:DLMItemDlCount}}</td> 168 </tpl:DLM DownloadCounter>175 </tpl:DLMIfDownloadCounter> 169 176 </tr> 170 <tpl: DLMFooter>177 <tpl:LoopPosition start="-1"> 171 178 </tbody> 172 179 </table> 173 </tpl:DLMFooter> 180 <p>{{tpl:DLMPageLinks}}</p> 181 </tpl:LoopPosition> 174 182 </tpl:DLMItems> 175 183 </div><!-- End #dlmanager --> -
plugins/dlManager/default-templates/media_player.html
r544 r548 35 35 <div id="content"> 36 36 37 <div class="content-inner"> 38 <div id="content-info"> 39 <h2> 40 {{tpl:lang Download manager}} - {{tpl:lang Preview}} 41 </h2> 42 </div> 43 44 <tpl:SysIfFormError> 45 <div class="error">{{tpl:SysFormError}}</div> 46 </tpl:SysIfFormError> 47 48 <div id="dlmanager"> 49 <p> 50 <a href="{{tpl:DLMBaseURL}}">{{tpl:lang Home}}</a> / 51 <!-- # loop on directory path, display dir / subdir --> 52 <tpl:DLMBreadCrumb> 53 <a href="{{tpl:DLMBreadCrumbDirURL}}"> 54 {{tpl:DLMBreadCrumbDirName}}</a> 55 <tpl:DLMBreadCrumbSeparator last="1"> / 56 </tpl:DLMBreadCrumbSeparator> 57 </tpl:DLMBreadCrumb> 58 {{tpl:DLMItemBasename}} 59 </p> 60 61 <p><a href="{{tpl:DLMItemDirPath}}">{{tpl:lang Get back to the directory}}</a></p> 62 63 <h3> 64 <a href="{{tpl:DLMItemDlURL}}" title="{{tpl:DLMItemBasename}}"> 65 {{tpl:lang Download this file}} 66 </a> 67 </h3> 68 69 <div id="player"> 70 <tpl:DLMItemIf media_type="image"> 71 <a href="{{tpl:DLMItemDlURL}}" title="{{tpl:DLMItemBasename}}"> 72 <img src="{{tpl:DLMItemImageThumbPath size="m"}}" alt="{{tpl:DLMItemTitle}}" /> 73 </a> 74 </tpl:DLMItemIf> 75 76 <tpl:DLMItemIf type="audio/mpeg3"> 77 {{tpl:include src="_mp3_player.html"}} 78 </tpl:DLMItemIf> 79 80 <tpl:DLMItemIf type="video/x-flv"> 81 {{tpl:include src="_flv_player.html"}} 82 </tpl:DLMItemIf> 83 84 <tpl:DLMItemIf type="application/zip"> 85 <h3>{{tpl:lang Zip file content}}</h3> 86 <tpl:DLMItemZipContent> 87 <tpl:DLMHeader> 88 <ul> 89 </tpl:DLMHeader> 90 <li>{{tpl:DLMItemZipContentFile}}</li> 91 <tpl:DLMFooter> 92 </ul> 93 </tpl:DLMFooter> 94 </tpl:DLMItemZipContent> 95 </tpl:DLMItemIf> 96 </div> 97 98 <h3>{{tpl:lang Informations}}</h3> 99 <dl> 100 <dt>{{tpl:lang Basename}}</dt> 101 <dd>{{tpl:DLMItemBasename}}</dd> 102 <dt>{{tpl:lang Type}}</dt> 103 <dd>{{tpl:DLMItemType}}</dd> 104 <dt>{{tpl:lang Size}}</dt> 105 <dd>{{tpl:DLMItemSize format="1"}}</dd> 106 <dt>{{tpl:lang Modification time}}</dt> 107 <dd>{{tpl:DLMItemMTime}}</dd> 108 <tpl:DLMDownloadCounter> 109 <dt>{{tpl:lang Download number}}</dt> 110 <dd>{{tpl:DLMItemDlCount}}</dd> 111 </tpl:DLMDownloadCounter> 112 </dl> 113 114 <tpl:DLMItemIf media_type="image"> 115 <tpl:DLMItemImageMeta> 116 <tpl:DLMHeader> 117 <h3>{{tpl:lang Image meta}}</h3> 118 <dl> 119 </tpl:DLMHeader> 120 <dt>{{tpl:DLMItemImageMetaName}}</dt> 121 <dd>{{tpl:DLMItemImageMetaValue}}</dd> 122 <tpl:DLMFooter> 123 </dl> 124 </tpl:DLMFooter> 125 </tpl:DLMItemImageMeta> 126 </tpl:DLMItemIf> 127 128 <tpl:DLMItemEntries> 129 <tpl:DLMHeader> 130 <h3>{{tpl:lang Entries containing this media}}</h3> 131 <ul> 132 </tpl:DLMHeader> 133 <li> 134 <a href="{{tpl:EntryURL}}">{{tpl:EntryTitle encode_html="1"}} 135 ({{tpl:EntryDate format="%d/%m/%Y"}})</a> 136 </li> 137 <tpl:DLMFooter> 138 </ul> 139 </tpl:DLMFooter> 140 </tpl:DLMItemEntries> 141 </div><!-- End #dlmanager --> 142 143 </div><!-- End #content-inner --> 37 {{tpl:include src="_media_player_content.html"}} 144 38 145 39 </div><!-- End #content --> -
plugins/dlManager/lib.dlManager.php
r546 r548 21 21 # 22 22 # ***** END LICENSE BLOCK ***** 23 24 if (!defined('DC_RC_PATH')) {return;} 23 25 24 26 /** … … 99 101 make BreadCrumb 100 102 @param dir <b>string</b> path directory 101 @return <b> array</b> BreadCrumb103 @return <b>record</b> BreadCrumb 102 104 */ 103 105 public static function breadCrumb($dir) … … 118 120 { 119 121 $path = (($path == '') ? $dir : $path.'/'.$dir); 120 $breadCrumb[$dir] = $base_url.$path; 121 } 122 } 123 124 if (empty($breadCrumb)) {$breadCrumb = array();} 125 126 return($breadCrumb); 122 $breadCrumb[] = array( 123 'name' => $dir, 124 'url' => $base_url.$path 125 ); 126 } 127 } 128 129 return(staticRecord::newFromArray($breadCrumb)); 127 130 } 128 131 … … 144 147 145 148 return true; 149 } 150 151 /** 152 get a static record for items 153 @param array <b>array</b> path directory 154 @return <b>record</b> Items 155 */ 156 public static function getItems($array) 157 { 158 global $core; 159 160 $items = array(); 161 162 foreach ($array as $k => $v) 163 { 164 $items[] = array( 165 'dir_url' => $v->dir_url, 166 'relname' => $v->relname, 167 'media_type' => $v->media_type, 168 'media_title' => $v->media_title, 169 'size' => $v->size, 170 'file_url' => $v->file_url, 171 'media_id' => $v->media_id, 172 'media_id' => $v->media_id, 173 'basename' => $v->basename, 174 'extension' => $v->extension, 175 'type' => $v->type, 176 'media_type' => $v->media_type, 177 'media_dtstr' => $v->media_dtstr, 178 'media_thumb' => $v->media_thumb 179 ); 180 } 181 182 return(staticRecord::newFromArray($items)); 183 } 184 185 /** 186 get zip content (files) of a media item 187 @param array <b>fileItem</b> File item 188 @return <b>record</b> Files 189 */ 190 public static function getZipContent($item) 191 { 192 global $core; 193 194 $files = array(); 195 196 $content = $core->media->getZipContent($item); 197 198 foreach ($content as $file => $v) 199 { 200 $files[] = array('file' => $file); 201 } 202 203 return(staticRecord::newFromArray($files)); 204 } 205 206 /** 207 get image metadata a media item 208 @param array <b>fileItem</b> File item 209 @return <b>record</b> Image metadata 210 */ 211 public static function getImageMeta($item) 212 { 213 global $core; 214 215 $meta = array(); 216 217 foreach ($item->media_meta as $k => $v) 218 { 219 if (!empty($v)) 220 { 221 $meta[] = array( 222 'name' => $k , 223 'value' => $v 224 ); 225 } 226 } 227 228 return(staticRecord::newFromArray($meta)); 146 229 } 147 230 -
plugins/dlManager/locales/fr/main.po
r544 r548 3 3 "Project-Id-Version: DL Manager\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 2008-11-0 4 20:13+0100\n"6 "PO-Revision-Date: 2008-11-0 4 20:19+0100\n"5 "POT-Creation-Date: 2008-11-06 21:20+0100\n" 6 "PO-Revision-Date: 2008-11-06 21:21+0100\n" 7 7 "Last-Translator: Moe <poedit@gniark.net>\n" 8 8 "Language-Team: Moe <poedit@gniark.net>\n" … … 18 18 19 19 #: _public.php:130 20 #: public_l10n.php:721 20 msgid "parent directory" 22 21 msgstr "répertoire parent" 23 22 24 #: _public.php:1007 25 #: _public.php:1014 26 #: _public.php:1021 23 #: _public.php:144 24 msgid "previous page" 25 msgstr "page précédente" 26 27 #: _public.php:145 28 msgid "next page" 29 msgstr "page suivante" 30 31 #: _public.php:990 32 #: _public.php:997 33 #: _public.php:1004 34 #: public_l10n.php:21 27 35 msgid "Preview :" 28 36 msgstr "" 29 37 30 #: _public.php:1009 31 #: _public.php:1016 32 #: _public.php:1023 38 #: _public.php:992 39 #: _public.php:999 40 #: _public.php:1006 41 #: public_l10n.php:22 33 42 msgid "Preview" 34 43 msgstr "" 35 44 36 #: lib.dlManager.php:8 345 #: lib.dlManager.php:82 37 46 msgid "By names, ascendant" 38 47 msgstr "Par noms, croissants" 39 48 40 #: lib.dlManager.php:8 449 #: lib.dlManager.php:83 41 50 msgid "By names, descendant" 42 51 msgstr "Par noms, décroissants" 43 52 44 #: lib.dlManager.php:8 553 #: lib.dlManager.php:84 45 54 msgid "By dates, ascendant" 46 55 msgstr "Par dates, croissantes" 47 56 48 #: lib.dlManager.php:8 657 #: lib.dlManager.php:85 49 58 msgid "By dates, descendant" 50 59 msgstr "Par dates, décroissantes" 51 60 52 #: _admin.php:70 53 #: _admin.php:75 61 #: _admin.php:26 62 #: index.php:76 63 #: index.php:80 64 msgid "Download Manager" 65 msgstr "Gestionnaire de téléchargements" 66 67 #: _admin.php:50 68 #: _admin.php:54 54 69 #: _admin.php:80 55 #: _admin.php: 9456 #: _admin.php:12157 #: _admin.php:12958 #: _admin.php:13159 #: _admin.php:13760 #: _admin.php:14261 #: _admin.php:14762 #: _admin.php:16263 #: _admin.php:16664 #: _admin.php:19265 #: _admin.php:19366 #: public_l10n.php:370 #: _admin.php:81 71 #: public_l10n.php:5 72 #: index.php:88 73 #: index.php:93 74 #: index.php:98 75 #: index.php:112 76 #: index.php:147 77 #: index.php:155 78 #: index.php:157 79 #: index.php:163 80 #: index.php:169 81 #: index.php:175 67 82 msgid "Download manager" 68 83 msgstr "Gestionnaire de téléchargements" 69 84 70 #: _admin.php:75 71 #, php-format 72 msgid "Enable the %s" 73 msgstr "Activer %s" 74 75 #: _admin.php:79 76 #, php-format 77 msgid "The %s display media on a public page." 78 msgstr "Le %s affiche les médias sur une page publique." 79 80 #: _admin.php:86 81 msgid "Enable the download counter" 82 msgstr "Activer le compteur de téléchargements" 83 84 #: _admin.php:93 85 #, php-format 86 msgid "Redirect attachments links to %s" 87 msgstr "Rediriger les liens des pièces jointes vers %s" 88 89 #: _admin.php:98 90 msgid "When downloading an attachment, the download counter will be increased." 91 msgstr "Lors du téléchargement d'une pièce jointe, le compteur de téléchargements sera augmenté." 92 93 #: _admin.php:99 94 #, php-format 95 msgid "This will redefine the %s tag." 96 msgstr "Ceci redéfinira la balise %s." 97 98 #: _admin.php:106 99 msgid "Allow visitors to choose how to sort files" 100 msgstr "Autoriser les visiteurs à choisir l'ordre des fichiers" 101 102 #: _admin.php:111 103 #: _admin.php:168 104 #: public_l10n.php:5 85 #: _admin.php:53 86 msgid "Title:" 87 msgstr "Titre :" 88 89 #: _admin.php:53 90 #: _admin.php:66 91 #: _admin.php:72 92 #: _admin.php:81 93 msgid "optional" 94 msgstr "facultatif" 95 96 #: _admin.php:56 97 #: public_l10n.php:24 98 #: index.php:137 105 99 msgid "Sort files:" 106 100 msgstr "Trier les fichiers :" 107 101 108 #: _admin.php:117 109 #: _admin.php:127 110 msgid "Leave empty to cancel this feature." 111 msgstr "" 112 113 #: _admin.php:121 114 #, php-format 115 msgid "Change root of %s:" 116 msgstr "Changer la racine de %s :" 117 118 #: _admin.php:128 119 #, php-format 120 msgid "This will change the root of the %s page and of the widget." 121 msgstr "Ceci changera la racine de la page %s et du widget." 122 123 #: _admin.php:130 124 #, php-format 125 msgid "If you change this setting, reconfigure the %s widget." 126 msgstr "Si vous changez ce paramètre, reconfigurez le widget %s." 127 128 #: _admin.php:136 129 #, php-format 130 msgid "Files can be excluded from %1$s by editing <strong>%2$s</strong> in <strong>%3$s</strong>." 131 msgstr "Les fichiers peuvent être exclus de %1$s en éditant <strong>%2$s</strong> dans <strong>%3$s</strong>." 132 133 #: _admin.php:137 134 msgid "about:config" 135 msgstr "" 136 137 #: _admin.php:138 138 #, php-format 139 msgid "For example, to exclude %1$s and %2$s files : <code>%3$s</code>" 140 msgstr "Par exemple, pour exclure les fichiers %1$s et %2$s : <code>%3$s</code>" 141 142 #: _admin.php:139 143 msgid "PNG" 144 msgstr "" 145 146 #: _admin.php:139 147 msgid "JPG" 148 msgstr "" 149 150 #: _admin.php:142 151 #, php-format 152 msgid "URL of the %s page :" 153 msgstr "URL de la page %s :" 154 155 #: _admin.php:146 156 #, php-format 157 msgid "View the %s page" 158 msgstr "Voir la page %s" 159 160 #: _admin.php:165 161 msgid "Title:" 162 msgstr "Titre :" 163 164 #: _admin.php:165 165 #: _admin.php:178 166 #: _admin.php:184 167 #: _admin.php:193 168 msgid "optional" 169 msgstr "facultatif" 170 171 #: _admin.php:171 102 #: _admin.php:59 172 103 msgid "root directory:" 173 104 msgstr "répertoire de base :" 174 105 175 #: _admin.php: 174106 #: _admin.php:62 176 107 msgid "Display subdirectories" 177 108 msgstr "Afficher les sous-répertoires :" 178 109 179 #: _admin.php: 177110 #: _admin.php:65 180 111 msgid "Subdirectories title:" 181 112 msgstr "Titre des sous-répertoires :" 182 113 183 #: _admin.php: 178184 #: public_l10n.php: 6114 #: _admin.php:66 115 #: public_l10n.php:4 185 116 msgid "Directories" 186 117 msgstr "Répertoires" 187 118 188 #: _admin.php: 180119 #: _admin.php:68 189 120 msgid "Display files" 190 121 msgstr "Afficher les fichiers" 191 122 192 #: _admin.php: 183123 #: _admin.php:71 193 124 msgid "Files title:" 194 125 msgstr "Titre des fichiers :" 195 126 196 #: _admin.php: 184127 #: _admin.php:72 197 128 #: public_l10n.php:12 198 129 msgid "Files" 199 130 msgstr "Fichiers" 200 131 201 #: _admin.php: 186132 #: _admin.php:74 202 133 msgid "Block display:" 203 134 msgstr "Affichage du bloc :" 204 135 205 #: _admin.php: 188136 #: _admin.php:76 206 137 msgid "Item display:" 207 138 msgstr "Affichage d'un élément :" 208 139 209 #: _admin.php: 192140 #: _admin.php:80 210 141 #, php-format 211 142 msgid "Add a link to %s in the widget:" 212 143 msgstr "Ajouter un lien vers %s dans le widget :" 213 144 214 #: _admin.php: 195145 #: _admin.php:83 215 146 msgid "Home page only" 216 147 msgstr "" 217 148 149 #: public_l10n.php:2 150 msgid "Archives" 151 msgstr "" 152 153 #: public_l10n.php:3 154 msgid "Basename" 155 msgstr "Nom du fichier" 156 157 #: public_l10n.php:6 158 msgid "Download number" 159 msgstr "Nombre de téléchargements" 160 161 #: public_l10n.php:7 162 msgid "Download this file" 163 msgstr "Télécharger ce fichier" 164 165 #: public_l10n.php:8 166 msgid "Downloads" 167 msgstr "Téléchargements" 168 218 169 #: public_l10n.php:9 170 msgid "Entries containing this media" 171 msgstr "Billets contenant ce média" 172 173 #: public_l10n.php:10 174 msgid "Extension" 175 msgstr "Extension" 176 177 #: public_l10n.php:11 178 msgid "File" 179 msgstr "Fichier" 180 181 #: public_l10n.php:13 182 msgid "Get back to the directory" 183 msgstr "Revenir au répertoire" 184 185 #: public_l10n.php:14 186 msgid "Home" 187 msgstr "" 188 189 #: public_l10n.php:15 190 msgid "Image meta" 191 msgstr "Méta données" 192 193 #: public_l10n.php:16 194 msgid "Informations" 195 msgstr "Informations" 196 197 #: public_l10n.php:17 198 msgid "Media type" 199 msgstr "Type de média" 200 201 #: public_l10n.php:18 202 msgid "Modification time" 203 msgstr "Date de modification" 204 205 #: public_l10n.php:19 219 206 msgid "No directory." 220 207 msgstr "Aucun répertoire." 221 208 222 #: public_l10n.php: 10209 #: public_l10n.php:20 223 210 msgid "No file." 224 211 msgstr "Aucun fichier." 225 212 226 #: public_l10n.php:13 227 msgid "Basename" 228 msgstr "Nom du fichier" 229 230 #: public_l10n.php:14 231 msgid "File" 232 msgstr "Fichier" 233 234 #: public_l10n.php:15 235 msgid "Title" 236 msgstr "Titre" 237 238 #: public_l10n.php:16 213 #: public_l10n.php:23 239 214 msgid "Size" 240 215 msgstr "Taille" 241 216 242 #: public_l10n.php: 17217 #: public_l10n.php:25 243 218 msgid "Type" 244 219 msgstr "Type" 245 220 246 #: public_l10n.php:18247 msgid "Media type"248 msgstr "Type de média"249 250 #: public_l10n.php:19251 msgid "Extension"252 msgstr "Extension"253 254 #: public_l10n.php:20255 msgid "Modification time"256 msgstr "Date de modification"257 258 #: public_l10n.php:21259 msgid "Download number"260 msgstr "Nombre de téléchargements"261 262 #: public_l10n.php:22263 msgid "Downloads"264 msgstr "Téléchargements"265 266 #: public_l10n.php:25267 msgid "Get back to the directory"268 msgstr "Revenir au répertoire"269 270 221 #: public_l10n.php:26 271 msgid "Download this file"272 msgstr "Télécharger ce fichier"273 274 #: public_l10n.php:27275 msgid "Image meta"276 msgstr "Méta données"277 278 #: public_l10n.php:28279 222 msgid "Zip file content" 280 223 msgstr "Contenu du fichier zip" 281 224 282 #: public_l10n.php:29 283 msgid "Entries containing this media" 284 msgstr "Billets contenant ce média" 285 286 #~ msgid "Display a subdirectory :" 287 #~ msgstr "Afficher un sous-répertoire :" 288 #~ msgid "The public directory will be displayed." 289 #~ msgstr "Le répertoire public sera affiché." 290 225 #: index.php:70 226 msgid "Configuration successfully updated." 227 msgstr "Configuration mise à jour avec succès." 228 229 #: index.php:93 230 #, php-format 231 msgid "Enable the %s" 232 msgstr "Activer %s" 233 234 #: index.php:97 235 #, php-format 236 msgid "The %s display media on a public page." 237 msgstr "Le %s affiche les médias sur une page publique." 238 239 #: index.php:104 240 msgid "Enable the download counter" 241 msgstr "Activer le compteur de téléchargements" 242 243 #: index.php:111 244 #, php-format 245 msgid "Redirect attachments links to %s" 246 msgstr "Rediriger les liens des pièces jointes vers %s" 247 248 #: index.php:116 249 msgid "When downloading an attachment, the download counter will be increased." 250 msgstr "Lors du téléchargement d'une pièce jointe, le compteur de téléchargements sera augmenté." 251 252 #: index.php:117 253 #, php-format 254 msgid "This will redefine the %s tag." 255 msgstr "Ceci redéfinira la balise %s." 256 257 #: index.php:122 258 msgid "Files per page:" 259 msgstr "Fichiers par page :" 260 261 #: index.php:132 262 msgid "Allow visitors to choose how to sort files" 263 msgstr "Autoriser les visiteurs à choisir l'ordre des fichiers" 264 265 #: index.php:143 266 #: index.php:153 267 msgid "Leave empty to cancel this feature." 268 msgstr "" 269 270 #: index.php:147 271 #, php-format 272 msgid "Change root of %s:" 273 msgstr "Changer la racine de %s :" 274 275 #: index.php:154 276 #, php-format 277 msgid "This will change the root of the %s page and of the widget." 278 msgstr "Ceci changera la racine de la page %s et du widget." 279 280 #: index.php:156 281 #, php-format 282 msgid "If you change this setting, reconfigure the %s widget." 283 msgstr "Si vous changez ce paramètre, reconfigurez le widget %s." 284 285 #: index.php:162 286 #, php-format 287 msgid "Files can be excluded from %1$s by editing %2$s in %3$s." 288 msgstr "Les fichiers peuvent être exclus de %1$s en éditant %2$s< dans %3$s." 289 290 #: index.php:165 291 #, php-format 292 msgid "For example, to exclude %1$s and %2$s files : <code>%3$s</code>" 293 msgstr "Par exemple, pour exclure les fichiers %1$s et %2$s : <code>%3$s</code>" 294 295 #: index.php:169 296 #, php-format 297 msgid "URL of the %s page :" 298 msgstr "URL de la page %s :" 299 300 #: index.php:174 301 #, php-format 302 msgid "View the %s page" 303 msgstr "Voir la page %s" 304 305 #: index.php:180 306 msgid "Save configuration" 307 msgstr "Enregistrer la configuration" 308 -
plugins/dlManager/public_l10n.php
r544 r548 1 1 <?php 2 # media.html 3 __('Download manager'); 4 5 __('Sort files:'); 6 __('Directories'); 7 __('parent directory'); 8 9 __('No directory.'); 10 __('No file.'); 11 12 __('Files'); 13 __('Basename'); 14 __('File'); 15 __('Title'); 16 __('Size'); 17 __('Type'); 18 __('Media type'); 19 __('Extension'); 20 __('Modification time'); 21 __('Download number'); 22 __('Downloads'); 23 24 # media_item.html 25 __('Get back to the directory'); 26 __('Download this file'); 27 __('Image meta'); 28 __('Zip file content'); 29 __('Entries containing this media'); 2 __("Archives"); 3 __("Basename"); 4 __("Directories"); 5 __("Download manager"); 6 __("Download number"); 7 __("Download this file"); 8 __("Downloads"); 9 __("Entries containing this media"); 10 __("Extension"); 11 __("File"); 12 __("Files"); 13 __("Get back to the directory"); 14 __("Home"); 15 __("Image meta"); 16 __("Informations"); 17 __("Media type"); 18 __("Modification time"); 19 __("No directory."); 20 __("No file."); 21 __("Preview :"); 22 __("Preview"); 23 __("Size"); 24 __("Sort files:"); 25 __("Type"); 26 __("Zip file content"); 30 27 ?>
Note: See TracChangeset
for help on using the changeset viewer.