Changeset 1097
- Timestamp:
- 04/27/09 22:48:28 (15 years ago)
- Location:
- plugins/dlManager/trunk
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/dlManager/trunk/_define.php
r1096 r1097 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.1',30 /* Version */ '1.1', 31 31 /* Permissions */ 'admin' 32 32 ); -
plugins/dlManager/trunk/_prepend.php
r1096 r1097 34 34 $core->url->register('viewfile','viewfile', 35 35 '^viewfile/(.+)$',array('dlManagerPageDocument','viewfile')); 36 $core->url->register('icon','icon',37 '^icon/(.+)$',array('dlManagerPageDocument','icon'));38 36 39 37 require_once(dirname(__FILE__).'/_widget.php'); -
plugins/dlManager/trunk/_public.php
r1096 r1097 320 320 exit; 321 321 } 322 else 323 { 324 self::p404(); 325 } 322 326 } 323 327 catch (Exception $e) … … 404 408 } 405 409 } 406 407 /**408 serve icon files409 @param args <b>string</b> Argument410 */411 public static function icon($args)412 {413 global $core;414 415 if (empty($args) || (!$core->blog->settings->dlmanager_active)416 || (!preg_match('/^[a-z]+$/',$args)))417 {418 self::p404();419 }420 421 try422 {423 $icon_path = path::real(DC_ROOT.'/admin/images/media/'.$args.'.png');424 425 if (is_readable($icon_path))426 {427 # from /dotclear/inc/load_plugin_file.php428 http::$cache_max_age = 36000;429 http::cache(array_merge(array($icon_path),get_included_files()));430 header('Content-type: '.files::getMimeType($icon_path));431 header('Content-Length: '.filesize($icon_path));432 readfile($icon_path);433 exit;434 # /from /dotclear/inc/load_plugin_file.php435 }436 }437 catch (Exception $e)438 {439 $core->error->add($e->getMessage());440 }441 }442 410 } 443 411 … … 472 440 $core->tpl->addValue('DLMItemDirPath',array('dlManagerPageTpl','itemDirPath')); 473 441 474 $core->tpl->addValue('DLMItemIconPath',array('dlManagerPageTpl','itemIconPath'));475 442 $core->tpl->addValue('DLMItemTitle',array('dlManagerPageTpl','itemTitle')); 476 443 $core->tpl->addValue('DLMItemSize',array('dlManagerPageTpl','itemSize')); … … 754 721 755 722 /** 756 Item icon path757 @param attr <b>array</b> Attribute758 @param content <b>string</b> Content759 @return <b>string</b> PHP block760 */761 public static function itemIconPath($attr)762 {763 return('<?php echo $core->blog->url.$core->url->getBase(\'icon\').'.764 '\'/\'.$_ctx->items->media_type; ?>');765 }766 767 /**768 723 Item title 769 724 @param attr <b>array</b> Attribute -
plugins/dlManager/trunk/default-templates/media.html
r1096 r1097 136 136 </form> 137 137 </tpl:DLMIfSortIsEnabled> 138 139 <tpl:DLMIfPages> 140 <p>{{tpl:lang Page(s):}} {{tpl:DLMPageLinks}}</p> 141 </tpl:DLMIfPages> 142 138 143 <table rules="rows" id="dlmanager-files"> 139 144 <thead> … … 157 162 </tpl:LoopPosition> 158 163 <tr class="{{tpl:DLMItemMediaType}}"> 159 <td><img src="{{tpl:DLMItemIconPath}}" width="48" height="48" title="{{tpl:DLMItemMediaType}}" alt="{{tpl:DLMItemMediaType}}" /></td> 164 <td><img src="{{tpl:BlogQmarkURL}}pf=dlManager/images/media/{{tpl:DLMItemMediaType}}.png" 165 width="48" height="48" title="{{tpl:DLMItemMediaType}}" alt="{{tpl:DLMItemMediaType}}" /></td> 160 166 <td> 161 167 <a href="{{tpl:DLMItemDlURL}}" title="{{tpl:DLMItemBasename}}"> -
plugins/dlManager/trunk/images
- Property svn:externals set to
Note: See TracChangeset
for help on using the changeset viewer.