Dotclear

Changeset 1097


Ignore:
Timestamp:
04/27/09 22:48:28 (15 years ago)
Author:
Moe
Message:

DL Manager 1.1 :

  • added pages list on the top of the files list
  • removed icon/* URL, replaced by files in the plugin's directory
  • updated template file
Location:
plugins/dlManager/trunk
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • plugins/dlManager/trunk/_define.php

    r1096 r1097  
    2828     /* Description*/                "Download manager with a public page and a widget", 
    2929     /* Author */                    "Moe (http://gniark.net/), Osku and Tomtom (http://blog.zenstyle.fr)", 
    30      /* Version */                   '1.0.1', 
     30     /* Version */                   '1.1', 
    3131     /* Permissions */               'admin' 
    3232); 
  • plugins/dlManager/trunk/_prepend.php

    r1096 r1097  
    3434$core->url->register('viewfile','viewfile', 
    3535          '^viewfile/(.+)$',array('dlManagerPageDocument','viewfile')); 
    36 $core->url->register('icon','icon', 
    37           '^icon/(.+)$',array('dlManagerPageDocument','icon')); 
    3836 
    3937require_once(dirname(__FILE__).'/_widget.php'); 
  • plugins/dlManager/trunk/_public.php

    r1096 r1097  
    320320                    exit; 
    321321               } 
     322               else 
     323               { 
     324                    self::p404(); 
     325               } 
    322326          } 
    323327          catch (Exception $e) 
     
    404408          } 
    405409     } 
    406       
    407      /** 
    408      serve icon files  
    409      @param    args <b>string</b>  Argument 
    410      */ 
    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           try 
    422           { 
    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.php 
    428                     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.php 
    435                } 
    436           } 
    437           catch (Exception $e) 
    438           { 
    439                $core->error->add($e->getMessage()); 
    440           } 
    441      } 
    442410} 
    443411 
     
    472440$core->tpl->addValue('DLMItemDirPath',array('dlManagerPageTpl','itemDirPath')); 
    473441 
    474 $core->tpl->addValue('DLMItemIconPath',array('dlManagerPageTpl','itemIconPath')); 
    475442$core->tpl->addValue('DLMItemTitle',array('dlManagerPageTpl','itemTitle')); 
    476443$core->tpl->addValue('DLMItemSize',array('dlManagerPageTpl','itemSize')); 
     
    754721      
    755722     /** 
    756      Item icon path 
    757      @param    attr <b>array</b>   Attribute 
    758      @param    content   <b>string</b>  Content 
    759      @return   <b>string</b> PHP block 
    760      */ 
    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      /** 
    768723     Item title 
    769724     @param    attr <b>array</b>   Attribute 
  • plugins/dlManager/trunk/default-templates/media.html

    r1096 r1097  
    136136                         </form> 
    137137                    </tpl:DLMIfSortIsEnabled> 
     138                     
     139                    <tpl:DLMIfPages> 
     140                         <p>{{tpl:lang Page(s):}} {{tpl:DLMPageLinks}}</p> 
     141                    </tpl:DLMIfPages> 
     142                     
    138143                    <table rules="rows" id="dlmanager-files"> 
    139144                         <thead> 
     
    157162               </tpl:LoopPosition> 
    158163               <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> 
    160166                    <td> 
    161167                         <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.

Sites map