Changeset 522
- Timestamp:
- 10/13/08 21:05:16 (15 years ago)
- google:author:
- appears
- Location:
- plugins/dlManager
- Files:
-
- 9 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
plugins/dlManager/_admin.php
r520 r522 2 2 # ***** BEGIN LICENSE BLOCK ***** 3 3 # 4 # This file is part of Public Media.5 # Copyright 2008 Moe (http://gniark.net/) 4 # This file is part of DL Manager. 5 # Copyright 2008 Moe (http://gniark.net/) and Tomtom (http://blog.zenstyle.fr) 6 6 # 7 # Public Mediais free software; you can redistribute it and/or modify7 # DL Manager is free software; you can redistribute it and/or modify 8 8 # it under the terms of the GNU General Public License as published by 9 9 # the Free Software Foundation; either version 3 of the License, or 10 10 # (at your option) any later version. 11 11 # 12 # Public Mediais distributed in the hope that it will be useful,12 # DL Manager is distributed in the hope that it will be useful, 13 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the … … 23 23 24 24 $core->addBehavior('adminBeforeBlogSettingsUpdate', 25 array(' publicMediaAdmin','adminBeforeBlogSettingsUpdate'));25 array('dlManagerAdmin','adminBeforeBlogSettingsUpdate')); 26 26 $core->addBehavior('adminBlogPreferencesForm', 27 array(' publicMediaAdmin','adminBlogPreferencesForm'));27 array('dlManagerAdmin','adminBlogPreferencesForm')); 28 28 29 $core->addBehavior('initWidgets',array(' publicMediaAdmin','initWidgets'));29 $core->addBehavior('initWidgets',array('dlManagerAdmin','initWidgets')); 30 30 31 31 /** 32 @ingroup Public Media32 @ingroup Download manager 33 33 @brief Admin 34 34 */ 35 class publicMediaAdmin35 class dlManagerAdmin 36 36 { 37 37 /** … … 43 43 global $core; 44 44 45 $settings->setNameSpace(' publicmedia');46 $settings->put(' publicmedia_page_active',!empty($_POST['publicmedia_page_active']),47 'boolean','Activate Media Page');48 $settings->put(' publicmedia_page_enable_sort',!empty($_POST['publicmedia_page_enable_sort']),45 $settings->setNameSpace('dlmanager'); 46 $settings->put('dlmanager_active',!empty($_POST['dlmanager_active']), 47 'boolean','Activate DL Manager'); 48 $settings->put('dlmanager_enable_sort',!empty($_POST['dlmanager_enable_sort']), 49 49 'boolean','Allow visitors to choose how to sort files'); 50 $settings->put(' publicmedia_page_file_sort',51 (!empty($_POST[' publicmedia_page_file_sort']) ? $_POST['publicmedia_page_file_sort'] : ''),50 $settings->put('dlmanager_file_sort', 51 (!empty($_POST['dlmanager_file_sort']) ? $_POST['dlmanager_file_sort'] : ''), 52 52 'string','file sort'); 53 $settings->put(' publicmedia_page_root',54 (!empty($_POST[' publicmedia_page_root']) ? $_POST['publicmedia_page_root'] : ''),53 $settings->put('dlmanager_root', 54 (!empty($_POST['dlmanager_root']) ? $_POST['dlmanager_root'] : ''), 55 55 'string', 'root directory'); 56 /*$settings->put('publicmedia_count_dl',57 (!empty($_POST['publicmedia_count_dl']) ? $_POST['publicmedia_count_dl'] : serialize(array())),58 'string', 'Download counter');*/59 56 # inspirated from lightbox/admin.php 60 57 $settings->setNameSpace('system'); … … 69 66 { 70 67 echo '<fieldset>'. 71 '<legend>'.__(' Media Page').'</legend>'.68 '<legend>'.__('Download manager').'</legend>'. 72 69 '<p>'. 73 form::checkbox(' publicmedia_page_active',1,$core->blog->settings->publicmedia_page_active).74 '<label class="classic" for=" publicmedia_page_active">'.75 sprintf(__('Activate %s'),__(' Media Page')).70 form::checkbox('dlmanager_active',1,$core->blog->settings->dlmanager_active). 71 '<label class="classic" for="dlmanager_active">'. 72 sprintf(__('Activate %s'),__('Download manager')). 76 73 '</label>'. 77 74 '</p>'. 78 75 '<p class="form-note">'. 79 sprintf(__('%s display media on a public page.'),__(' Media Page')).76 sprintf(__('%s display media on a public page.'),__('Download manager')). 80 77 '</p>'. 81 78 '<p>'. 82 form::checkbox(' publicmedia_page_enable_sort',1,83 $core->blog->settings-> publicmedia_page_enable_sort).84 '<label class="classic" for=" publicmedia_page_enable_sort">'.79 form::checkbox('dlmanager_enable_sort',1, 80 $core->blog->settings->dlmanager_enable_sort). 81 '<label class="classic" for="dlmanager_enable_sort">'. 85 82 __('Allow visitors to choose how to sort files'). 86 83 '</label> '. 87 84 '</p>'. 88 85 '<p>'. 89 '<label for=" publicmedia_page_file_sort">'.86 '<label for="dlmanager_file_sort">'. 90 87 __('Sort files:'). 91 form::combo(' publicmedia_page_file_sort',publicMedia::getSortValues(true),92 $core->blog->settings-> publicmedia_page_file_sort).88 form::combo('dlmanager_file_sort',dlManager::getSortValues(true), 89 $core->blog->settings->dlmanager_file_sort). 93 90 '</label> '. 94 91 '</p>'. … … 97 94 '</p>'. 98 95 '<p>'. 99 '<label for=" publicmedia_page_root">'.96 '<label for="dlmanager_root">'. 100 97 __('Limit display to a subdirectory :'). 101 form::combo(' publicmedia_page_root',publicMedia::listDirs(),102 $core->blog->settings-> publicmedia_page_root).98 form::combo('dlmanager_root',dlManager::listDirs(), 99 $core->blog->settings->dlmanager_root). 103 100 '</label> '. 104 101 '</p>'. … … 110 107 '<p>'. 111 108 sprintf(__('Files can be excluded from %1$s by editing <strong>%2$s</strong> in <strong>%3$s</strong>.'), 112 __(' Media Page'),'media_exclusion',__('about:config')).' '.109 __('Download manager'),' media_exclusion',__('about:config')).' '. 113 110 sprintf(__('For example, to exclude %1$s and %2$s files : <code>%3$s</code>'), 114 111 __('PNG'),__('JPG'),'/\.(png|jpg)/i'). 115 112 '</p>'. 116 113 '<p>'. 117 sprintf(__('URL of the %s :'),__(' Media Page')).114 sprintf(__('URL of the %s :'),__('Download manager')). 118 115 '<br />'. 119 '<code>'. publicMedia::pageURL().'</code>'.116 '<code>'.dlManager::pageURL().'</code>'. 120 117 '<br />'. 121 '<a href="'. publicMedia::pageURL().'">'.sprintf(__('View %s'),__('Media Page')).'</a>'.118 '<a href="'.dlManager::pageURL().'">'.sprintf(__('View %s'),__('Download manager')).'</a>'. 122 119 '</p>'. 123 120 '</fieldset>'; … … 134 131 $tz = $core->blog->settings->blog_timezone; 135 132 136 $w->create(' Media',__('Media'),array('publicMediaWidget','show'));133 $w->create('dlManager',__('Download manager'),array('dlManagerWidget','show')); 137 134 138 $w-> Media->setting('title',__('Title:').' ('.__('optional').')',__('Media'),'text');135 $w->dlManager->setting('title',__('Title:').' ('.__('optional').')',__('Download manager'),'text'); 139 136 140 $w-> Media->setting('file_sort',__('Sort files:'),'','combo',141 publicMedia::getSortValues(true));137 $w->dlManager->setting('file_sort',__('Sort files:'),'','combo', 138 dlManager::getSortValues(true)); 142 139 143 $w-> Media->setting('root',__('root directory:'),'','combo',144 publicMedia::listDirs());140 $w->dlManager->setting('root',__('root directory:'),'','combo', 141 dlManager::listDirs()); 145 142 146 $w-> Media->setting('block',__('Block display:'),'<ul>%s</ul>','text');143 $w->dlManager->setting('block',__('Block display:'),'<ul>%s</ul>','text'); 147 144 148 $w-> Media->setting('item',__('Item display:'),145 $w->dlManager->setting('item',__('Item display:'), 149 146 '<li><a href="%1$s" title="%3$s">%2$s</a></li>','text'); 150 147 151 $w-> Media->setting('link',152 sprintf(__('Add a link to %s in the widget:'),__(' Media Page')).153 ' ('.__('optional').')',__(' Media'),'text');148 $w->dlManager->setting('link', 149 sprintf(__('Add a link to %s in the widget:'),__('Download manager')). 150 ' ('.__('optional').')',__('Download manager'),'text'); 154 151 155 $w-> Media->setting('homeonly',__('Home page only'),false,'check');152 $w->dlManager->setting('homeonly',__('Home page only'),false,'check'); 156 153 } 157 154 } -
plugins/dlManager/_define.php
r521 r522 2 2 # ***** BEGIN LICENSE BLOCK ***** 3 3 # 4 # This file is part of Public Media.5 # Copyright 2008 Moe (http://gniark.net/) 4 # This file is part of DL Manager. 5 # Copyright 2008 Moe (http://gniark.net/) and Tomtom (http://blog.zenstyle.fr) 6 6 # 7 # Public Mediais free software; you can redistribute it and/or modify7 # DL Manager is free software; you can redistribute it and/or modify 8 8 # it under the terms of the GNU General Public License as published by 9 9 # the Free Software Foundation; either version 3 of the License, or 10 10 # (at your option) any later version. 11 11 # 12 # Public Mediais distributed in the hope that it will be useful,12 # DL Manager is distributed in the hope that it will be useful, 13 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the … … 23 23 24 24 $this->registerModule( 25 /* Name */ " Public Media",26 /* Description*/ "D isplay media on a public page or ina widget",25 /* Name */ "DL Manager", 26 /* Description*/ "Download manager with a public page and a widget", 27 27 /* Author */ "Moe (http://gniark.net/), Osku and Tomtom (http://blog.zenstyle.fr)", 28 /* Version */ '1. 1.3',28 /* Version */ '1.0-beta1', 29 29 /* Permissions */ 'admin' 30 30 ); -
plugins/dlManager/_install.php
r520 r522 2 2 # ***** BEGIN LICENSE BLOCK ***** 3 3 # 4 # This file is part of Public Media.5 # Copyright 2008 Moe (http://gniark.net/) 4 # This file is part of DL Manager. 5 # Copyright 2008 Moe (http://gniark.net/) and Tomtom (http://blog.zenstyle.fr) 6 6 # 7 # Public Mediais free software; you can redistribute it and/or modify7 # DL Manager is free software; you can redistribute it and/or modify 8 8 # it under the terms of the GNU General Public License as published by 9 9 # the Free Software Foundation; either version 3 of the License, or 10 10 # (at your option) any later version. 11 11 # 12 # Public Mediais distributed in the hope that it will be useful,12 # DL Manager is distributed in the hope that it will be useful, 13 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the … … 23 23 24 24 # On lit la version du plugin 25 $m_version = $core->plugins->moduleInfo(' publicMedia','version');25 $m_version = $core->plugins->moduleInfo('dlManager','version'); 26 26 27 27 # On lit la version du plugin dans la table des versions 28 $i_version = $core->getVersion(' publicMedia');28 $i_version = $core->getVersion('dlManager'); 29 29 30 30 # La version dans la table est supérieure ou égale à … … 41 41 'AND setting_ns = \'system\';'); 42 42 43 # DL Manager 44 # rename Public Media settings 45 $core->con->execute('UPDATE '.$core->prefix.'setting SET '. 46 'setting_id = replace(setting_id,\'publicmedia_page\',\'dlmanager\') '. 47 'WHERE (setting_id LIKE \'publicmedia_%\');'); 48 # change namespace of settings 49 $cur = $core->con->openCursor($core->prefix.'setting'); 50 $cur->setting_ns = 'dlmanager'; 51 $cur->update('WHERE setting_ns = \'publicmedia\';'); 52 43 53 # La procédure d'installation commence vraiment là 44 $core->setVersion(' publicMedia',$m_version);54 $core->setVersion('dlManager',$m_version); 45 55 return true; 46 56 ?> -
plugins/dlManager/_prepend.php
r516 r522 2 2 # ***** BEGIN LICENSE BLOCK ***** 3 3 # 4 # This file is part of Public Media.5 # Copyright 2008 Moe (http://gniark.net/) 4 # This file is part of DL Manager. 5 # Copyright 2008 Moe (http://gniark.net/) and Tomtom (http://blog.zenstyle.fr) 6 6 # 7 # Public Mediais free software; you can redistribute it and/or modify7 # DL Manager is free software; you can redistribute it and/or modify 8 8 # it under the terms of the GNU General Public License as published by 9 9 # the Free Software Foundation; either version 3 of the License, or 10 10 # (at your option) any later version. 11 11 # 12 # Public Mediais distributed in the hope that it will be useful,12 # DL Manager is distributed in the hope that it will be useful, 13 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the … … 22 22 if (!defined('DC_RC_PATH')) {return;} 23 23 24 $__autoload[' publicMedia'] = dirname(__FILE__).'/lib.publicMedia.php';24 $__autoload['dlManager'] = dirname(__FILE__).'/lib.dlManager.php'; 25 25 26 26 $core->url->register('media','media', 27 '^media(/.+)?$',array(' publicMediaPageDocument','page'));27 '^media(/.+)?$',array('dlManagerPageDocument','page')); 28 28 $core->url->register('download','download', 29 '^download/([0-9]+)$',array(' publicMediaPageDocument','wrapper'));29 '^download/([0-9]+)$',array('dlManagerPageDocument','wrapper')); 30 30 31 31 ?> -
plugins/dlManager/_public.php
r521 r522 2 2 # ***** BEGIN LICENSE BLOCK ***** 3 3 # 4 # This file is part of Public Media.5 # Copyright 2008 Moe (http://gniark.net/) 4 # This file is part of DL Manager. 5 # Copyright 2008 Moe (http://gniark.net/) and Tomtom (http://blog.zenstyle.fr) 6 6 # 7 # Public Mediais free software; you can redistribute it and/or modify7 # DL Manager is free software; you can redistribute it and/or modify 8 8 # it under the terms of the GNU General Public License as published by 9 9 # the Free Software Foundation; either version 3 of the License, or 10 10 # (at your option) any later version. 11 11 # 12 # Public Mediais distributed in the hope that it will be useful,12 # DL Manager is distributed in the hope that it will be useful, 13 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the … … 27 27 28 28 /** 29 @ingroup Public Media29 @ingroup Download manager 30 30 @brief Document 31 31 */ 32 class publicMediaPageDocument extends dcUrlHandlers32 class dlManagerPageDocument extends dcUrlHandlers 33 33 { 34 34 /** … … 40 40 global $core; 41 41 42 if (!$core->blog->settings-> publicmedia_page_active) {self::p404();}42 if (!$core->blog->settings->dlmanager_active) {self::p404();} 43 43 44 44 # start session … … 50 50 $_ctx =& $GLOBALS['_ctx']; 51 51 52 $_ctx->media = new dcMedia($core); 52 if (!is_object($core->media)) 53 { 54 $core->media = new dcMedia($core); 55 } 53 56 54 # define root of the media page55 $page_root = $core->blog->settings-> publicmedia_page_root;57 # define root of DL Manager 58 $page_root = $core->blog->settings->dlmanager_root; 56 59 57 60 # used to remove root from path … … 60 63 $page_dir = $page_root; 61 64 62 $_ctx-> mediaPage_currentDir = '/';65 $_ctx->dlManager_currentDir = '/'; 63 66 64 67 # BreadCrumb … … 68 71 if ((!empty($args)) && (substr($args,0,1) == '/')) 69 72 { 70 $_ctx-> mediaPage_currentDir = substr($args,1);71 $page_dir = $page_root.'/'.$_ctx-> mediaPage_currentDir;73 $_ctx->dlManager_currentDir = substr($args,1); 74 $page_dir = $page_root.'/'.$_ctx->dlManager_currentDir; 72 75 73 76 # BreadCrumb 74 $base_url = publicMedia::pageURL().'/';75 $dirs = explode('/',$_ctx-> mediaPage_currentDir);77 $base_url = dlManager::pageURL().'/'; 78 $dirs = explode('/',$_ctx->dlManager_currentDir); 76 79 $path = ''; 77 80 … … 87 90 } 88 91 89 $_ctx-> mediaPage_BreadCrumb = $breadCrumb;92 $_ctx->dlManager_BreadCrumb = $breadCrumb; 90 93 unset($breadCrumb); 94 # /BreadCrumb 91 95 92 96 # file sort 93 97 # default value 94 $_ctx-> mediaPage_fileSort = $core->blog->settings->publicmedia_page_file_sort;98 $_ctx->dlManager_fileSort = $core->blog->settings->dlmanager_file_sort; 95 99 96 100 # if visitor can choose how to sort files 97 if ($core->blog->settings-> publicmedia_page_enable_sort === true)101 if ($core->blog->settings->dlmanager_enable_sort === true) 98 102 { 99 103 # from /dotclear/admin/media.php 100 104 if ((!empty($_POST['media_file_sort'])) 101 && (in_array($_POST['media_file_sort'], publicMedia::getSortValues())))105 && (in_array($_POST['media_file_sort'],dlManager::getSortValues()))) 102 106 { 103 107 $_SESSION['media_file_sort'] = $_POST['media_file_sort']; … … 105 109 if (!empty($_SESSION['media_file_sort'])) 106 110 { 107 $ _ctx->media->setFileSort($_SESSION['media_file_sort']);108 $_ctx-> mediaPage_fileSort = $_SESSION['media_file_sort'];111 $core->media->setFileSort($_SESSION['media_file_sort']); 112 $_ctx->dlManager_fileSort = $_SESSION['media_file_sort']; 109 113 } 110 114 # /from /dotclear/admin/media.php … … 112 116 113 117 # exit if the directory doesn't exist 114 $dir_full_path = $ _ctx->media->root.'/'.$page_dir;118 $dir_full_path = $core->media->root.'/'.$page_dir; 115 119 $parent_dir_full_path = path::real(dirname($dir_full_path)); 116 120 if (!is_dir($dir_full_path)) {self::p404();} 117 121 118 $ _ctx->media->setFileSort($_ctx->mediaPage_fileSort);119 120 $ _ctx->media->chdir($page_dir);121 $ _ctx->media->getDir();122 $core->media->setFileSort($_ctx->dlManager_fileSort); 123 124 $core->media->chdir($page_dir); 125 $core->media->getDir(); 122 126 123 # get relative paths from root of the media page124 foreach ($ _ctx->media->dir['dirs'] as $k => $v)127 # get relative paths from root of DL Manager 128 foreach ($core->media->dir['dirs'] as $k => $v) 125 129 { 126 $item =& $ _ctx->media->dir['dirs'][$k];127 if (($item->file == $ _ctx->media->root)128 && ($_ctx-> mediaPage_currentDir == '/'))130 $item =& $core->media->dir['dirs'][$k]; 131 if (($item->file == $core->media->root) 132 && ($_ctx->dlManager_currentDir == '/')) 129 133 { 130 134 # remove link to root directory 131 unset($ _ctx->media->dir['dirs'][$k]);135 unset($core->media->dir['dirs'][$k]); 132 136 } 133 137 else … … 148 152 } 149 153 150 foreach ($ _ctx->media->dir['files'] as $k => $v)154 foreach ($core->media->dir['files'] as $k => $v) 151 155 { 152 $item =& $ _ctx->media->dir['files'][$k];156 $item =& $core->media->dir['files'][$k]; 153 157 154 158 $item->relname = … … 158 162 catch (Exception $e) 159 163 { 160 $_ctx-> mediaPage_Error = $e->getMessage();164 $_ctx->dlManager_Error = $e->getMessage(); 161 165 } 162 166 … … 174 178 global $core; 175 179 176 if (empty($args) || $core->blog->settings-> publicmedia_page_active == '0') {180 if (empty($args) || $core->blog->settings->dlmanager_active == '0') { 177 181 self::p404(); 178 182 } … … 185 189 $file = $core->media->getFile($args); 186 190 187 $page_root = $core->blog->settings-> publicmedia_page_root;191 $page_root = $core->blog->settings->dlmanager_root; 188 192 189 193 if (!empty($page_root)) … … 196 200 197 201 if ($file->file && is_readable($file->file)) { 198 $count = unserialize($core->blog->settings-> publicmedia_count_dl);202 $count = unserialize($core->blog->settings->dlmanager_count_dl); 199 203 $count[$file->media_id] = array_key_exists($file->media_id,$count) ? $count[$file->media_id]+1 : 1; 200 204 if (!is_object($core->blog->settings)) … … 206 210 $settings =& $core->blog->settings; 207 211 } 208 $settings->setNamespace(' publicmedia');209 $settings->put(' publicmedia_count_dl',serialize($count),'string','Download counter');212 $settings->setNamespace('dlmanager'); 213 $settings->put('dlmanager_count_dl',serialize($count),'string','Download counter'); 210 214 //$core->callBehavior('publicDownloadedFile',(integer)$args); 211 215 header('Content-type: '.$file->type); … … 219 223 } 220 224 221 $core->tpl->addValue(' MediaCurrentDir',array('publicMediaPageTpl','currentDir'));225 $core->tpl->addValue('DLMCurrentDir',array('dlManagerPageTpl','currentDir')); 222 226 223 227 # sort files 224 $core->tpl->addBlock(' MediaIfSortIsEnabled',array('publicMediaPageTpl',228 $core->tpl->addBlock('DLMIfSortIsEnabled',array('dlManagerPageTpl', 225 229 'ifSortIsEnabled')); 226 230 227 $core->tpl->addValue(' MediaFileSortOptions',array('publicMediaPageTpl',231 $core->tpl->addValue('DLMFileSortOptions',array('dlManagerPageTpl', 228 232 'fileSortOptions')); 229 233 230 234 # Bread Crumb 231 $core->tpl->addValue(' MediaBaseURL',array('publicMediaPageTpl','baseURL'));232 233 $core->tpl->addBlock(' MediaBreadCrumb',array('publicMediaPageTpl','breadCrumb'));234 $core->tpl->addValue(' MediaBreadCrumbDirName',array('publicMediaPageTpl',235 $core->tpl->addValue('DLMBaseURL',array('dlManagerPageTpl','baseURL')); 236 237 $core->tpl->addBlock('DLMBreadCrumb',array('dlManagerPageTpl','breadCrumb')); 238 $core->tpl->addValue('DLMBreadCrumbDirName',array('dlManagerPageTpl', 235 239 'breadCrumbDirName')); 236 $core->tpl->addValue(' MediaBreadCrumbDirURL',array('publicMediaPageTpl',240 $core->tpl->addValue('DLMBreadCrumbDirURL',array('dlManagerPageTpl', 237 241 'breadCrumbDirURL')); 238 $core->tpl->addBlock(' MediaBreadCrumbSeparator',array('publicMediaPageTpl',242 $core->tpl->addBlock('DLMBreadCrumbSeparator',array('dlManagerPageTpl', 239 243 'breadCrumbSeparator')); 240 244 241 245 # error 242 $core->tpl->addBlock(' MediaIfError',array('publicMediaPageTpl','ifError'));243 $core->tpl->addValue(' MediaError',array('publicMediaPageTpl','error'));244 245 # media246 $core->tpl->addBlock(' Media',array('publicMediaPageTpl','media'));247 248 $core->tpl->addBlock(' MediaIfNoItem',array('publicMediaPageTpl','ifNoItem'));249 250 $core->tpl->addBlock(' MediaHeader',array('publicMediaPageTpl','header'));251 $core->tpl->addBlock(' MediaFooter',array('publicMediaPageTpl','footer'));246 $core->tpl->addBlock('DLMIfError',array('dlManagerPageTpl','ifError')); 247 $core->tpl->addValue('DLMError',array('dlManagerPageTpl','error')); 248 249 # items 250 $core->tpl->addBlock('DLMItems',array('dlManagerPageTpl','items')); 251 252 $core->tpl->addBlock('DLMIfNoItem',array('dlManagerPageTpl','ifNoItem')); 253 254 $core->tpl->addBlock('DLMHeader',array('dlManagerPageTpl','header')); 255 $core->tpl->addBlock('DLMFooter',array('dlManagerPageTpl','footer')); 252 256 253 257 # item switch 254 $core->tpl->addBlock(' MediaItemSwitch',array('publicMediaPageTpl','itemSwitch'));255 $core->tpl->addValue(' MediaSwitchCase',array('publicMediaPageTpl','itemSwitchCase'));256 $core->tpl->addValue(' MediaSwitchBreak',array('publicMediaPageTpl',258 $core->tpl->addBlock('DLMItemSwitch',array('dlManagerPageTpl','itemSwitch')); 259 $core->tpl->addValue('DLMSwitchCase',array('dlManagerPageTpl','itemSwitchCase')); 260 $core->tpl->addValue('DLMSwitchBreak',array('dlManagerPageTpl', 257 261 'itemSwitchBreak')); 258 $core->tpl->addValue(' MediaSwitchDefault',array('publicMediaPageTpl',262 $core->tpl->addValue('DLMSwitchDefault',array('dlManagerPageTpl', 259 263 'itemSwitchDefault')); 260 264 261 265 # item 262 $core->tpl->addValue(' MediaItemDirURL',array('publicMediaPageTpl','itemDirURL'));263 $core->tpl->addValue(' MediaItemDirPath',array('publicMediaPageTpl','itemDirPath'));264 265 $core->tpl->addValue(' MediaItemTitle',array('publicMediaPageTpl','itemTitle'));266 $core->tpl->addValue(' MediaItemSize',array('publicMediaPageTpl','itemSize'));267 $core->tpl->addValue(' MediaItemFileURL',array('publicMediaPageTpl','itemFileURL'));268 $core->tpl->addValue(' MediaItemDlURL',array('publicMediaPageTpl','itemDlURL'));269 270 $core->tpl->addValue(' MediaItemBasename',array('publicMediaPageTpl',266 $core->tpl->addValue('DLMItemDirURL',array('dlManagerPageTpl','itemDirURL')); 267 $core->tpl->addValue('DLMItemDirPath',array('dlManagerPageTpl','itemDirPath')); 268 269 $core->tpl->addValue('DLMItemTitle',array('dlManagerPageTpl','itemTitle')); 270 $core->tpl->addValue('DLMItemSize',array('dlManagerPageTpl','itemSize')); 271 $core->tpl->addValue('DLMItemFileURL',array('dlManagerPageTpl','itemFileURL')); 272 $core->tpl->addValue('DLMItemDlURL',array('dlManagerPageTpl','itemDlURL')); 273 274 $core->tpl->addValue('DLMItemBasename',array('dlManagerPageTpl', 271 275 'itemBasename')); 272 $core->tpl->addValue(' MediaItemExtension',array('publicMediaPageTpl',276 $core->tpl->addValue('DLMItemExtension',array('dlManagerPageTpl', 273 277 'itemExtension')); 274 $core->tpl->addValue(' MediaItemType',array('publicMediaPageTpl','itemType'));275 $core->tpl->addValue(' MediaItemMediaType',array('publicMediaPageTpl',278 $core->tpl->addValue('DLMItemType',array('dlManagerPageTpl','itemType')); 279 $core->tpl->addValue('DLMItemMediaType',array('dlManagerPageTpl', 276 280 'itemMediaType')); 277 $core->tpl->addValue(' MediaItemMTime',array('publicMediaPageTpl','itemMTime'));278 $core->tpl->addValue(' MediaItemDlCount',array('publicMediaPageTpl','itemDlCount'));279 $core->tpl->addValue(' MediaItemImageThumbPath',array('publicMediaPageTpl',281 $core->tpl->addValue('DLMItemMTime',array('dlManagerPageTpl','itemMTime')); 282 $core->tpl->addValue('DLMItemDlCount',array('dlManagerPageTpl','itemDlCount')); 283 $core->tpl->addValue('DLMItemImageThumbPath',array('dlManagerPageTpl', 280 284 'itemImageThumbPath')); 281 285 282 286 /** 283 @ingroup Public Media287 @ingroup Download manager 284 288 @brief Template 285 289 */ 286 class publicMediaPageTpl290 class dlManagerPageTpl 287 291 { 288 292 /** … … 292 296 public static function currentDir() 293 297 { 294 return("<?php echo(\$_ctx-> mediaPage_currentDir); ?>");298 return("<?php echo(\$_ctx->dlManager_currentDir); ?>"); 295 299 } 296 300 … … 304 308 { 305 309 return 306 '<?php if ($core->blog->settings-> publicmedia_page_enable_sort === true) : ?>'."\n".310 '<?php if ($core->blog->settings->dlmanager_enable_sort === true) : ?>'."\n". 307 311 $content. 308 312 '<?php endif; ?>'; … … 316 320 { 317 321 return('<?php echo form::combo(\'media_file_sort\', 318 publicMedia::getSortValues(),$_ctx->mediaPage_fileSort); ?>');322 dlManager::getSortValues(),$_ctx->dlManager_fileSort); ?>'); 319 323 } 320 324 … … 328 332 $f = $GLOBALS['core']->tpl->getFilters($attr); 329 333 330 return('<?php echo('.sprintf($f,' publicMedia::pageURL()').'); ?>');334 return('<?php echo('.sprintf($f,'dlManager::pageURL()').'); ?>'); 331 335 } 332 336 … … 340 344 { 341 345 return("<?php ". 342 '$_ctx-> mediaBCIndex = 0;'.343 'foreach ($_ctx-> mediaPage_BreadCrumb as $k => $v) {'.346 '$_ctx->dlManagerBCIndex = 0;'. 347 'foreach ($_ctx->dlManager_BreadCrumb as $k => $v) {'. 344 348 '?>'. 345 349 $content. 346 '<?php $_ctx-> mediaBCIndex += 1; }'.347 'unset($_ctx-> mediaBCIndex,$k,$v);'.350 '<?php $_ctx->dlManagerBCIndex += 1; }'. 351 'unset($_ctx->dlManagerBCIndex,$k,$v);'. 348 352 "?>"); 349 353 } … … 381 385 $equal = (((isset($attr['last'])) && ($attr['last'] == 1)) ? '=' : ''); 382 386 383 return('<?php if ($_ctx-> mediaBCIndex <'.$equal.384 ' (count($_ctx-> mediaPage_BreadCrumb)-1)) : ?>'.387 return('<?php if ($_ctx->dlManagerBCIndex <'.$equal. 388 ' (count($_ctx->dlManager_BreadCrumb)-1)) : ?>'. 385 389 $content. 386 390 '<?php endif; ?>'); … … 396 400 { 397 401 return 398 "<?php if (\$_ctx-> mediaPage_Error !== null) : ?>"."\n".402 "<?php if (\$_ctx->dlManager_Error !== null) : ?>"."\n". 399 403 $content. 400 404 "<?php endif; ?>"; … … 410 414 $f = $GLOBALS['core']->tpl->getFilters($attr); 411 415 412 return("<?php if (\$_ctx-> mediaPage_Error !== null) :"."\n".413 'echo('.sprintf($f,'$_ctx-> mediaPage_Error').');'.416 return("<?php if (\$_ctx->dlManager_Error !== null) :"."\n". 417 'echo('.sprintf($f,'$_ctx->dlManager_Error').');'. 414 418 "endif; ?>"); 415 419 } … … 425 429 $type = ($attr['type'] == 'dirs') ? 'dirs' : 'files'; 426 430 427 return('<?php if (count($ _ctx->media->dir[\''.$type.'\']) == 0) : ?>'.431 return('<?php if (count($core->media->dir[\''.$type.'\']) == 0) : ?>'. 428 432 $content. 429 433 '<?php endif; ?>'); … … 431 435 432 436 /** 433 loop on media434 @param attr <b>array</b> Attribute 435 @param content <b>string</b> Content 436 @return <b>string</b> PHP block 437 */ 438 public static function media($attr,$content)437 loop on items 438 @param attr <b>array</b> Attribute 439 @param content <b>string</b> Content 440 @return <b>string</b> PHP block 441 */ 442 public static function items($attr,$content) 439 443 { 440 444 $type = ($attr['type'] == 'dirs') ? 'dirs' : 'files'; 441 445 return("<?php ". 442 '$_ctx-> media_items = $_ctx->media->dir[\''.$type.'\'];'.443 "if (\$_ctx-> media_items !== null) :"."\n".444 '$_ctx-> media->index = 0;'.445 "foreach (\$_ctx-> media_items as \$_ctx->media_item) { ".446 '$_ctx->dlManager_items = $core->media->dir[\''.$type.'\'];'. 447 "if (\$_ctx->dlManager_items !== null) :"."\n". 448 '$_ctx->dlManager_index = 0;'. 449 "foreach (\$_ctx->dlManager_items as \$_ctx->dlManager_item) { ". 446 450 "?>"."\n". 447 451 $content. 448 '<?php $_ctx-> media->index += 1; } '."\n".452 '<?php $_ctx->dlManager_index += 1; } '."\n". 449 453 " endif;"."\n". 450 'unset($_ctx-> media_item,$_ctx->media->index); ?>');454 'unset($_ctx->dlManager_item,$_ctx->dlManager_index); ?>'); 451 455 } 452 456 … … 459 463 public static function header($attr,$content) 460 464 { 461 return('<?php if ($_ctx-> media->index == 0) : ?>'.465 return('<?php if ($_ctx->dlManager_index == 0) : ?>'. 462 466 $content. 463 467 '<?php endif; ?>'); … … 472 476 public static function footer($attr,$content) 473 477 { 474 return('<?php if ($_ctx-> media->index == (count($_ctx->media_items)-1)) : ?>'.478 return('<?php if ($_ctx->dlManager_index == (count($_ctx->dlManager_items)-1)) : ?>'. 475 479 $content. 476 480 '<?php endif; ?>'); … … 485 489 { 486 490 $f = $GLOBALS['core']->tpl->getFilters($attr); 487 return('<?php echo '.sprintf($f,'$_ctx-> media_item->dir_url').'; ?>');491 return('<?php echo '.sprintf($f,'$_ctx->dlManager_item->dir_url').'; ?>'); 488 492 } 489 493 … … 496 500 global $core; 497 501 return('<?php echo '. 498 ' publicMedia::pageURL().'.499 '((!empty($_ctx-> media_item->relname)) ?'.500 '\'/\'.$_ctx-> media_item->relname : \'\'); ?>');502 'dlManager::pageURL().'. 503 '((!empty($_ctx->dlManager_item->relname)) ?'. 504 '\'/\'.$_ctx->dlManager_item->relname : \'\'); ?>'); 501 505 } 502 506 … … 511 515 if (!isset($attr['value'])) {return;} 512 516 513 return('<?php switch($_ctx-> media_item->'.$attr['value'].') : ?>'.517 return('<?php switch($_ctx->dlManager_item->'.$attr['value'].') : ?>'. 514 518 $content. 515 519 '<?php endswitch; ?>'); … … 555 559 $f = $GLOBALS['core']->tpl->getFilters($attr); 556 560 557 return('<?php echo '.sprintf($f,'$_ctx-> media_item->media_title').'; ?>');561 return('<?php echo '.sprintf($f,'$_ctx->dlManager_item->media_title').'; ?>'); 558 562 } 559 563 /** … … 573 577 574 578 return('<?php echo '.sprintf($f, 575 $format_open.'$_ctx-> media_item->size'.$format_close).'; ?>');579 $format_open.'$_ctx->dlManager_item->size'.$format_close).'; ?>'); 576 580 } 577 581 /** … … 584 588 $f = $GLOBALS['core']->tpl->getFilters($attr); 585 589 586 return('<?php echo '.sprintf($f,'$_ctx-> media_item->file_url').'; ?>');590 return('<?php echo '.sprintf($f,'$_ctx->dlManager_item->file_url').'; ?>'); 587 591 } 588 592 /** … … 595 599 $f = $GLOBALS['core']->tpl->getFilters($attr); 596 600 597 return('<?php echo($core->blog->url.$core->url->getBase(\'download\').\'/\'.'.sprintf($f,'$_ctx-> media_item->media_id').'); ?>');601 return('<?php echo($core->blog->url.$core->url->getBase(\'download\').\'/\'.'.sprintf($f,'$_ctx->dlManager_item->media_id').'); ?>'); 598 602 } 599 603 /** … … 606 610 $f = $GLOBALS['core']->tpl->getFilters($attr); 607 611 608 return('<?php echo '.sprintf($f,'$_ctx-> media_item->basename').'; ?>');612 return('<?php echo '.sprintf($f,'$_ctx->dlManager_item->basename').'; ?>'); 609 613 } 610 614 /** … … 617 621 $f = $GLOBALS['core']->tpl->getFilters($attr); 618 622 619 return('<?php echo '.sprintf($f,'$_ctx-> media_item->extension').'; ?>');623 return('<?php echo '.sprintf($f,'$_ctx->dlManager_item->extension').'; ?>'); 620 624 } 621 625 /** … … 628 632 $f = $GLOBALS['core']->tpl->getFilters($attr); 629 633 630 return('<?php echo '.sprintf($f,'$_ctx-> media_item->type').'; ?>');634 return('<?php echo '.sprintf($f,'$_ctx->dlManager_item->type').'; ?>'); 631 635 } 632 636 … … 640 644 $f = $GLOBALS['core']->tpl->getFilters($attr); 641 645 642 return('<?php echo '.sprintf($f,'$_ctx-> media_item->media_type').'; ?>');646 return('<?php echo '.sprintf($f,'$_ctx->dlManager_item->media_type').'; ?>'); 643 647 } 644 648 … … 652 656 $f = $GLOBALS['core']->tpl->getFilters($attr); 653 657 654 return('<?php echo '.sprintf($f,'$_ctx-> media_item->media_dtstr').'; ?>');658 return('<?php echo '.sprintf($f,'$_ctx->dlManager_item->media_dtstr').'; ?>'); 655 659 } 656 660 … … 665 669 666 670 return 667 '<?php $count = unserialize($core->blog->settings-> publicmedia_count_dl); '.671 '<?php $count = unserialize($core->blog->settings->dlmanager_count_dl); '. 668 672 'if (empty($count)) {$count = array();}'. 669 'echo '.sprintf($f,'array_key_exists($_ctx-> media_item->media_id,$count) ? $count[$_ctx->media_item->media_id] : "0"').673 'echo '.sprintf($f,'array_key_exists($_ctx->dlManager_item->media_id,$count) ? $count[$_ctx->dlManager_item->media_id] : "0"'). 670 674 '; ?>'; 671 675 } … … 686 690 {$size = $attr['size'];} 687 691 688 return('<?php if (isset($_ctx-> media_item->media_thumb[\''.692 return('<?php if (isset($_ctx->dlManager_item->media_thumb[\''. 689 693 $size.'\'])) :'. 690 'echo($_ctx-> media_item->media_thumb[\''.$size.'\']);'.694 'echo($_ctx->dlManager_item->media_thumb[\''.$size.'\']);'. 691 695 'else :'. 692 'echo($_ctx-> media_item->file_url);'.696 'echo($_ctx->dlManager_item->file_url);'. 693 697 'endif; ?>'); 694 698 } … … 696 700 697 701 /** 698 @ingroup Public Media702 @ingroup Download manager 699 703 @brief Widget 700 704 */ 701 class publicMediaWidget705 class dlManagerWidget 702 706 { 703 707 /** … … 733 737 734 738 foreach ($items as $media_item) { 735 $items_str .= sprintf($w->item,$core->blog->url. 'download/'.$media_item->media_id,739 $items_str .= sprintf($w->item,$core->blog->url.$core->url->getBase('download').'/'.$media_item->media_id, 736 740 $media_item->media_title,$media_item->basename); 737 741 } … … 744 748 $str = sprintf($w->block,$items_str); 745 749 746 $link = (strlen($w->link) > 0) ? '<p class="text"><a href="'. publicMedia::pageURL().'">'.750 $link = (strlen($w->link) > 0) ? '<p class="text"><a href="'.dlManager::pageURL().'">'. 747 751 html::escapeHTML($w->link).'</a></p>' : null; 748 752 749 return '<div class=" media">'.$header.$str.$link.'</div>';753 return '<div class="dlmanager">'.$header.$str.$link.'</div>'; 750 754 } 751 755 } -
plugins/dlManager/default-templates/media.html
r519 r522 7 7 <meta name="MSSmartTagsPreventParsing" content="TRUE" /> 8 8 <meta name="robots" content="noindex, nofollow" /> 9 <title>{{tpl:lang Media}} - {{tpl:MediaCurrentDir}} - {{tpl:BlogName encode_html="1"}}</title>9 <title>{{tpl:lang Download manager}} - {{tpl:DLMCurrentDir}} - {{tpl:BlogName encode_html="1"}}</title> 10 10 11 11 <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> … … 22 22 </head> 23 23 24 <body class="dc- media">24 <body class="dc-dlmanager"> 25 25 <div id="page"> 26 26 {{tpl:include src="_top.html"}} … … 34 34 <div id="content-info"> 35 35 <h2> 36 {{tpl:lang Media}}36 {{tpl:lang Download manager}} 37 37 </h2> 38 38 </div> 39 39 40 <tpl: MediaIfError>40 <tpl:DLMIfError> 41 41 <div class="error"> 42 {{tpl: MediaError}}42 {{tpl:DLMError}} 43 43 </div> 44 </tpl: MediaIfError>44 </tpl:DLMIfError> 45 45 46 <div id=" media">47 <tpl: MediaIfSortIsEnabled>46 <div id="dlmanager"> 47 <tpl:DLMIfSortIsEnabled> 48 48 <form method="post" action="{{tpl:SysSelfURI}}"> 49 49 <p> 50 50 {{tpl:lang Sort files:}} 51 {{tpl: MediaFileSortOptions}}51 {{tpl:DLMFileSortOptions}} 52 52 <input class="submit" type="submit" value="ok" /> 53 53 </p> 54 54 </form> 55 </tpl: MediaIfSortIsEnabled>55 </tpl:DLMIfSortIsEnabled> 56 56 57 57 <h3>{{tpl:lang Directories}}</h3> 58 58 59 59 <p> 60 <a href="{{tpl: MediaBaseURL}}">{{tpl:lang Media}}</a> /61 <!-- # loop on directory path, display Media /full / 3 / 2 / 1 -->62 <tpl: MediaBreadCrumb>63 <a href="{{tpl: MediaBreadCrumbDirURL}}">64 {{tpl: MediaBreadCrumbDirName}}</a>65 <tpl: MediaBreadCrumbSeparator last="0"> /66 </tpl: MediaBreadCrumbSeparator>67 </tpl: MediaBreadCrumb>60 <a href="{{tpl:DLMBaseURL}}">{{tpl:lang Home}}</a> / 61 <!-- # loop on directory path, display full / 3 / 2 / 1 --> 62 <tpl:DLMBreadCrumb> 63 <a href="{{tpl:DLMBreadCrumbDirURL}}"> 64 {{tpl:DLMBreadCrumbDirName}}</a> 65 <tpl:DLMBreadCrumbSeparator last="0"> / 66 </tpl:DLMBreadCrumbSeparator> 67 </tpl:DLMBreadCrumb> 68 68 </p> 69 69 70 <tpl: MediaIfNoItem type="dirs">70 <tpl:DLMIfNoItem type="dirs"> 71 71 <p>{{tpl:lang No directory.}}</p> 72 </tpl: MediaIfNoItem>72 </tpl:DLMIfNoItem> 73 73 74 <tpl: Mediatype="dirs">75 <tpl: MediaHeader>74 <tpl:DLMItems type="dirs"> 75 <tpl:DLMHeader> 76 76 <ul> 77 </tpl: MediaHeader>78 <li><a href="{{tpl: MediaItemDirPath}}">79 {{tpl: MediaItemBasename}}</a></li>80 <tpl: MediaFooter>77 </tpl:DLMHeader> 78 <li><a href="{{tpl:DLMItemDirPath}}"> 79 {{tpl:DLMItemBasename}}</a></li> 80 <tpl:DLMFooter> 81 81 </ul> 82 </tpl: MediaFooter>83 </tpl: Media>82 </tpl:DLMFooter> 83 </tpl:DLMItems> 84 84 85 85 <h3>{{tpl:lang Files}}</h3> 86 86 87 <tpl: MediaIfNoItem type="files">87 <tpl:DLMIfNoItem type="files"> 88 88 <p>{{tpl:lang No file.}}</p> 89 </tpl: MediaIfNoItem>89 </tpl:DLMIfNoItem> 90 90 91 <tpl: Mediatype="files">92 <tpl: MediaHeader>91 <tpl:DLMItems type="files"> 92 <tpl:DLMHeader> 93 93 <table> 94 94 <thead> … … 106 106 </thead> 107 107 <tbody> 108 </tpl: MediaHeader>109 <tr class="{{tpl: MediaItemMediaType}}">108 </tpl:DLMHeader> 109 <tr class="{{tpl:DLMItemMediaType}}"> 110 110 <td> 111 <!-- # do not insert a newline after <tpl: MediaItemSwitch> -->111 <!-- # do not insert a newline after <tpl:DLMItemSwitch> --> 112 112 <!-- # yes, it sucks --> 113 <tpl: MediaItemSwitch<!-- # images -->114 value="type">{{tpl: MediaSwitchCase case="image/bmp"}}115 {{tpl: MediaSwitchCase case="image/bmp"}}116 {{tpl: MediaSwitchCase case="image/gif"}}117 {{tpl: MediaSwitchCase case="image/jpeg"}}118 {{tpl: MediaSwitchCase case="image/jpeg"}}119 {{tpl: MediaSwitchCase case="image/jpeg"}}120 {{tpl: MediaSwitchCase case="image/png"}}121 {{tpl: MediaSwitchCase case="image/tiff"}}122 {{tpl: MediaSwitchCase case="image/tiff"}}123 {{tpl: MediaSwitchCase case="image/x-xbitmap"}}124 <a href="{{tpl: MediaItemDlURL}}"125 title="{{tpl: MediaItemBasename}}">126 <img src="{{tpl: MediaItemImageThumbPath size="s"}}" alt="{{tpl:MediaItemTitle}}" />113 <tpl:DLMItemSwitch<!-- # images --> 114 value="type">{{tpl:DLMSwitchCase case="image/bmp"}} 115 {{tpl:DLMSwitchCase case="image/bmp"}} 116 {{tpl:DLMSwitchCase case="image/gif"}} 117 {{tpl:DLMSwitchCase case="image/jpeg"}} 118 {{tpl:DLMSwitchCase case="image/jpeg"}} 119 {{tpl:DLMSwitchCase case="image/jpeg"}} 120 {{tpl:DLMSwitchCase case="image/png"}} 121 {{tpl:DLMSwitchCase case="image/tiff"}} 122 {{tpl:DLMSwitchCase case="image/tiff"}} 123 {{tpl:DLMSwitchCase case="image/x-xbitmap"}} 124 <a href="{{tpl:DLMItemDlURL}}" 125 title="{{tpl:DLMItemBasename}}"> 126 <img src="{{tpl:DLMItemImageThumbPath size="s"}}" alt="{{tpl:DLMItemTitle}}" /> 127 127 </a> 128 {{tpl: MediaSwitchBreak}}128 {{tpl:DLMSwitchBreak}} 129 129 <!-- # /images --> 130 130 <!-- # MP3 --> 131 {{tpl: MediaSwitchCase case="audio/mpeg3"}}131 {{tpl:DLMSwitchCase case="audio/mpeg3"}} 132 132 <object type="application/x-shockwave-flash" data="{{tpl:BlogQmarkURL}}pf=player_mp3.swf" width="200" height="20"> 133 133 <param name="movie" value="{{tpl:BlogQmarkURL}}pf=player_mp3.swf" /> 134 134 <param name="wmode" value="transparent" /> 135 <param name="FlashVars" value="mp3={{tpl: MediaItemFileURL}}&loadingcolor=ff9900&bgcolor1=eeeeee&bgcolor2=cccccc&buttoncolor=0066cc&buttonovercolor=ff9900&slidercolor1=cccccc&slidercolor2=999999&sliderovercolor=0066cc" />135 <param name="FlashVars" value="mp3={{tpl:DLMItemFileURL}}&loadingcolor=ff9900&bgcolor1=eeeeee&bgcolor2=cccccc&buttoncolor=0066cc&buttonovercolor=ff9900&slidercolor1=cccccc&slidercolor2=999999&sliderovercolor=0066cc" /> 136 136 </object> 137 {{tpl: MediaSwitchBreak}}137 {{tpl:DLMSwitchBreak}} 138 138 <!-- # /MP3 --> 139 139 <!-- # FLV --> 140 {{tpl: MediaSwitchCase case="video/x-flv"}}140 {{tpl:DLMSwitchCase case="video/x-flv"}} 141 141 <object type="application/x-shockwave-flash" data="{{tpl:BlogQmarkURL}}pf=player_flv.swf" 142 142 width="400" height="300"> 143 143 <param name="movie" value="{{tpl:BlogQmarkURL}}pf=player_flv.swf" /> 144 144 <param value="true" name="allowFullScreen" /> 145 <param name="FlashVars" value="flv={{tpl: MediaItemFileURL}}&width=400&height=300&margin=1&showfullscreen=1&showvolume=1&showtime=1" />145 <param name="FlashVars" value="flv={{tpl:DLMItemFileURL}}&width=400&height=300&margin=1&showfullscreen=1&showvolume=1&showtime=1" /> 146 146 </object> 147 {{tpl: MediaSwitchBreak}}147 {{tpl:DLMSwitchBreak}} 148 148 <!-- # /FLV --> 149 149 <!-- # other files --> 150 {{tpl: MediaSwitchDefault}}151 <a href="{{tpl: MediaItemDlURL}}"152 title="{{tpl: MediaItemBasename}}">153 {{tpl: MediaItemTitle}}150 {{tpl:DLMSwitchDefault}} 151 <a href="{{tpl:DLMItemDlURL}}" 152 title="{{tpl:DLMItemBasename}}"> 153 {{tpl:DLMItemTitle}} 154 154 </a> 155 {{tpl: MediaSwitchBreak}}155 {{tpl:DLMSwitchBreak}} 156 156 <!-- # /other files --> 157 </tpl: MediaItemSwitch>157 </tpl:DLMItemSwitch> 158 158 </td> 159 <td>{{tpl: MediaItemSize format="1"}}</td>160 <!-- #<td>{{tpl: MediaItemType}}</td>159 <td>{{tpl:DLMItemSize format="1"}}</td> 160 <!-- #<td>{{tpl:DLMItemType}}</td> 161 161 return "text/plain" --> 162 <!-- #<td>{{tpl: MediaItemMediaType}}</td>162 <!-- #<td>{{tpl:DLMItemMediaType}}</td> 163 163 return "text" --> 164 <!-- #<td>{{tpl: MediaItemExtension}}</td>164 <!-- #<td>{{tpl:DLMItemExtension}}</td> 165 165 return "txt" --> 166 <td>{{tpl: MediaItemMTime}}</td>167 <td>{{tpl: MediaItemDlCount}}</td>166 <td>{{tpl:DLMItemMTime}}</td> 167 <td>{{tpl:DLMItemDlCount}}</td> 168 168 </tr> 169 <tpl: MediaFooter>169 <tpl:DLMFooter> 170 170 </tbody> 171 171 </table> 172 </tpl: MediaFooter>173 </tpl: Media>174 </div><!-- End # media-->172 </tpl:DLMFooter> 173 </tpl:DLMItems> 174 </div><!-- End #dlmanager --> 175 175 176 176 </div><!-- End #content-inner --> -
plugins/dlManager/lib.dlManager.php
r513 r522 2 2 # ***** BEGIN LICENSE BLOCK ***** 3 3 # 4 # This file is part of Public Media.5 # Copyright 2008 Moe (http://gniark.net/) 4 # This file is part of DL Manager. 5 # Copyright 2008 Moe (http://gniark.net/) and Tomtom (http://blog.zenstyle.fr) 6 6 # 7 # Public Mediais free software; you can redistribute it and/or modify7 # DL Manager is free software; you can redistribute it and/or modify 8 8 # it under the terms of the GNU General Public License as published by 9 9 # the Free Software Foundation; either version 3 of the License, or 10 10 # (at your option) any later version. 11 11 # 12 # Public Mediais distributed in the hope that it will be useful,12 # DL Manager is distributed in the hope that it will be useful, 13 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the … … 21 21 22 22 /** 23 @ingroup Public Media23 @ingroup Download manager 24 24 @brief General class 25 25 */ 26 class publicMedia26 class dlManager 27 27 { 28 28 /** … … 75 75 76 76 /** 77 return Media PageURL77 return DL Manager URL 78 78 @return <b>string</b> URL 79 79 */ -
plugins/dlManager/locales/fr/main.po
r513 r522 3 3 "Project-Id-Version: Public Media\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 2008-10- 09 22:29+0100\n"6 "PO-Revision-Date: 2008-10- 09 22:31+0100\n"5 "POT-Creation-Date: 2008-10-13 20:43+0100\n" 6 "PO-Revision-Date: 2008-10-13 20:43+0100\n" 7 7 "Last-Translator: Moe <poedit@gniark.net>\n" 8 8 "Language-Team: Moe <poedit@gniark.net>\n" … … 17 17 "X-Poedit-SearchPath-0: .\n" 18 18 19 #: public_l10n.php:2 19 20 #: _admin.php:68 20 21 #: _admin.php:72 … … 23 24 #: _admin.php:114 24 25 #: _admin.php:118 26 #: _admin.php:133 27 #: _admin.php:135 25 28 #: _admin.php:149 26 msgid "Media Page" 27 msgstr "Page des médias" 29 #: _admin.php:150 30 msgid "Download manager" 31 msgstr "Gestionnaire de téléchargements" 32 33 #: public_l10n.php:4 34 #: _admin.php:87 35 #: _admin.php:137 36 msgid "Sort files:" 37 msgstr "Trier les fichiers :" 38 39 #: public_l10n.php:5 40 msgid "Directories" 41 msgstr "Répertoires" 42 43 #: public_l10n.php:6 44 #: _public.php:146 45 msgid "parent directory" 46 msgstr "répertoire parent" 47 48 #: public_l10n.php:8 49 msgid "No directory." 50 msgstr "Aucun répertoire." 51 52 #: public_l10n.php:9 53 msgid "No file." 54 msgstr "Aucun fichier." 55 56 #: public_l10n.php:11 57 msgid "Files" 58 msgstr "Fichiers" 59 60 #: public_l10n.php:12 61 msgid "Basename" 62 msgstr "Nom du fichier" 63 64 #: public_l10n.php:13 65 msgid "Title" 66 msgstr "Titre" 67 68 #: public_l10n.php:14 69 msgid "Size" 70 msgstr "Taille" 71 72 #: public_l10n.php:15 73 msgid "Extension" 74 msgstr "Extension" 75 76 #: public_l10n.php:16 77 msgid "Type" 78 msgstr "Type" 79 80 #: public_l10n.php:17 81 msgid "Modification time" 82 msgstr "Date de modification" 28 83 29 84 #: _admin.php:72 … … 40 95 msgid "Allow visitors to choose how to sort files" 41 96 msgstr "Autoriser les visiteurs à choisir l'ordre des fichiers" 42 43 #: _admin.php:8744 #: _admin.php:13745 #: public_l10n.php:446 msgid "Sort files:"47 msgstr "Trier les fichiers :"48 97 49 98 #: _admin.php:93 … … 92 141 msgstr "Voir la %s" 93 142 94 #: _admin.php:13395 #: _admin.php:13596 #: _admin.php:15097 #: public_l10n.php:298 msgid "Media"99 msgstr "Médias"100 101 143 #: _admin.php:135 102 144 msgid "Title:" … … 129 171 msgstr "" 130 172 131 #: _public.php:132 132 #: public_l10n.php:6 133 msgid "parent directory" 134 msgstr "répertoire parent" 135 136 #: public_l10n.php:5 137 msgid "Directories" 138 msgstr "Répertoires" 139 140 #: public_l10n.php:8 141 msgid "No directory." 142 msgstr "Aucun répertoire." 143 144 #: public_l10n.php:9 145 msgid "No file." 146 msgstr "Aucun fichier." 147 148 #: public_l10n.php:11 149 msgid "Files" 150 msgstr "Fichiers" 151 152 #: public_l10n.php:12 153 msgid "Basename" 154 msgstr "Nom du fichier" 155 156 #: public_l10n.php:13 157 msgid "Title" 158 msgstr "Titre" 159 160 #: public_l10n.php:14 161 msgid "Size" 162 msgstr "Taille" 163 164 #: public_l10n.php:15 165 msgid "Extension" 166 msgstr "Extension" 167 168 #: public_l10n.php:16 169 msgid "Type" 170 msgstr "Type" 171 172 #: public_l10n.php:17 173 msgid "Modification time" 174 msgstr "Date de modification" 175 176 #: lib.publicMedia.php:69 173 #: lib.dlManager.php:69 177 174 msgid "By names, ascendant" 178 175 msgstr "Par noms, croissants" 179 176 180 #: lib. publicMedia.php:70177 #: lib.dlManager.php:70 181 178 msgid "By names, descendant" 182 179 msgstr "Par noms, décroissants" 183 180 184 #: lib. publicMedia.php:71181 #: lib.dlManager.php:71 185 182 msgid "By dates, ascendant" 186 183 msgstr "Par dates, croissantes" 187 184 188 #: lib. publicMedia.php:72185 #: lib.dlManager.php:72 189 186 msgid "By dates, descendant" 190 187 msgstr "Par dates, décroissantes" 191 188 189 #~ msgid "Media" 190 #~ msgstr "Médias" 191 192 #, fuzzy 193 #~ msgid "Download Manager" 194 #~ msgstr "Gestionnaire de téléchargements" 195 #~ msgid "Media Page" 196 #~ msgstr "Page des médias" 197 -
plugins/dlManager/public_l10n.php
r513 r522 1 1 <?php 2 __(' Media');2 __('Download manager'); 3 3 4 4 __('Sort files:');
Note: See TracChangeset
for help on using the changeset viewer.