Dotclear

Changeset 553


Ignore:
Timestamp:
11/09/08 20:26:40 (15 years ago)
Author:
Moe
google:author:
appears
Message:

DL Manager 1.0-RC6 :

  • improved download counter display, it is now in the static record
  • renamed $_ctx->meta to $_ctx->imagemeta to avoid potential bugs
Location:
plugins/dlManager
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • plugins/dlManager/_define.php

    r552 r553  
    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-RC5', 
     30     /* Version */                   '1.0-RC6', 
    3131     /* Permissions */               'admin' 
    3232); 
  • plugins/dlManager/_public.php

    r552 r553  
    185185               # /pager 
    186186                
    187                # download counter 
    188                $_ctx->dlManager_count_dl = 
    189                     unserialize($core->blog->settings->dlmanager_count_dl); 
    190                if (!is_array($_ctx->dlManager_count_dl)) 
    191                { 
    192                     $_ctx->dlManager_count_dl = array(); 
    193                } 
    194                 
    195187               unset($files_array); 
    196188          } 
     
    259251               $_ctx->dlManager_BreadCrumb = dlManager::breadCrumb($file->relname); 
    260252               # /BreadCrumb 
    261                 
    262                # download counter 
    263                $_ctx->dlManager_count_dl = 
    264                     unserialize($core->blog->settings->dlmanager_count_dl); 
    265                if (!is_array($_ctx->dlManager_count_dl)) 
    266                { 
    267                     $_ctx->dlManager_count_dl = array(); 
    268                } 
    269253                
    270254               # get static record 
     
    945929     public static function itemDlCount() 
    946930     { 
    947           return  
    948                '<?php echo (array_key_exists($_ctx->items->media_id,'. 
    949                     '$_ctx->dlManager_count_dl) ? $_ctx->dlManager_count_dl[$_ctx->items->media_id] : "0"); ?>'; 
     931          return('<?php echo $_ctx->items->count_dl; ?>'); 
    950932     } 
    951933 
     
    1001983          return 
    1002984          '<?php '. 
    1003           '$_ctx->meta = dlManager::getImageMeta($_ctx->items); '. 
    1004           'while ($_ctx->meta->fetch()) : ?>'."\n". 
     985          '$_ctx->imagemeta = dlManager::getImageMeta($_ctx->items); '. 
     986          'while ($_ctx->imagemeta->fetch()) : ?>'."\n". 
    1005987          $content. 
    1006           '<?php endwhile; unset($_ctx->meta); ?>'; 
     988          '<?php endwhile; unset($_ctx->imagemeta); ?>'; 
    1007989     } 
    1008990      
     
    1016998          $f = $GLOBALS['core']->tpl->getFilters($attr); 
    1017999           
    1018           return('<?php echo '.sprintf($f,'$_ctx->meta->name').'; ?>'); 
     1000          return('<?php echo '.sprintf($f,'$_ctx->imagemeta->name').'; ?>'); 
    10191001     } 
    10201002      
     
    10281010          $f = $GLOBALS['core']->tpl->getFilters($attr); 
    10291011           
    1030           return('<?php echo '.sprintf($f,'$_ctx->meta->value').'; ?>'); 
     1012          return('<?php echo '.sprintf($f,'$_ctx->imagemeta->value').'; ?>'); 
    10311013     } 
    10321014      
  • plugins/dlManager/default-templates/media_player.html

    r552 r553  
    113113                    <dd>{{tpl:DLMItemMTime format="date_format"}} {{tpl:DLMItemMTime format="time_format"}}</dd> 
    114114                    <tpl:DLMIfDownloadCounter> 
    115                          <dt>{{tpl:lang Download number}}</dt> 
     115                         <dt>{{tpl:lang Downloads}}</dt> 
    116116                         <dd>{{tpl:DLMItemDlCount}}</dd> 
    117117                    </tpl:DLMIfDownloadCounter> 
  • plugins/dlManager/index.php

    r552 r553  
    188188               </p> 
    189189               <p> 
    190                <a href="<?php echo dlManager::pageURL(); ?>"> 
     190                    <a href="<?php echo dlManager::pageURL(); ?>"> 
    191191                    <?php printf(__('View the %s page'),__('Download manager')); ?></a> 
    192192               </p> 
  • plugins/dlManager/lib.dlManager.php

    r552 r553  
    165165          global $core; 
    166166           
     167          $count_dl = unserialize($core->blog->settings->dlmanager_count_dl); 
     168          if (!is_array($count_dl)) 
     169          { 
     170               $count_dl = array(); 
     171          } 
     172           
    167173          $items = array(); 
    168174                     
    169175          foreach ($array as $k => $v) 
    170176          { 
     177               $dl = '0'; 
     178               if ($core->blog->settings->dlmanager_counter) 
     179               { 
     180                    if ((isset($v->media_id)) 
     181                         && (array_key_exists($v->media_id,$count_dl))) 
     182                    { 
     183                              $dl = $count_dl[$v->media_id]; 
     184                    } 
     185               } 
    171186               $items[] = array( 
    172187                    'dir_url' => (isset($v->dir_url) ? $v->dir_url : ''), 
     
    184199                    'media_dtstr' => (isset($v->media_dtstr) ? $v->media_dtstr : ''), 
    185200                    'media_thumb' => (isset($v->media_thumb) ? $v->media_thumb : ''), 
    186                     'media_meta' => (isset($v->media_meta) ? $v->media_meta : '') 
     201                    'media_meta' => (isset($v->media_meta) ? $v->media_meta : ''), 
     202                    'count_dl' => $dl, 
    187203               ); 
    188204          } 
  • plugins/dlManager/locales/fr/main.po

    r552 r553  
    33"Project-Id-Version: DL Manager\n" 
    44"Report-Msgid-Bugs-To: \n" 
    5 "POT-Creation-Date: 2008-11-09 04:14+0100\n" 
    6 "PO-Revision-Date: 2008-11-09 04:14+0100\n" 
     5"POT-Creation-Date: 2008-11-09 19:36+0100\n" 
     6"PO-Revision-Date: 2008-11-09 19:36+0100\n" 
    77"Last-Translator: Moe <poedit@gniark.net>\n" 
    88"Language-Team: Moe <poedit@gniark.net>\n" 
     
    1818 
    1919#: _public.php:74 
    20 #: public_l10n.php:14 
     20#: public_l10n.php:13 
    2121msgid "Home" 
    2222msgstr "" 
     
    3434msgstr "suivante" 
    3535 
    36 #: _public.php:1213 
     36#: _public.php:1194 
     37#: public_l10n.php:21 
     38msgid "Preview:" 
     39msgstr "" 
     40 
     41#: _public.php:1196 
    3742#: public_l10n.php:22 
    38 msgid "Preview:" 
    39 msgstr "" 
    40  
    41 #: _public.php:1215 
    42 #: public_l10n.php:23 
    4343msgid "Preview" 
    4444msgstr "" 
     
    9696 
    9797#: _admin.php:56 
    98 #: public_l10n.php:25 
     98#: public_l10n.php:24 
    9999#: index.php:152 
    100100msgid "Sort files:" 
     
    127127 
    128128#: _admin.php:72 
    129 #: public_l10n.php:12 
     129#: public_l10n.php:11 
    130130msgid "Files" 
    131131msgstr "Fichiers" 
     
    157157 
    158158#: public_l10n.php:6 
    159 msgid "Download number" 
    160 msgstr "Nombre de téléchargements" 
    161  
    162 #: public_l10n.php:7 
    163159msgid "Downloads" 
    164160msgstr "Téléchargements" 
    165161 
    166 #: public_l10n.php:8 
     162#: public_l10n.php:7 
    167163msgid "Download this file" 
    168164msgstr "Télécharger ce fichier" 
    169165 
    170 #: public_l10n.php:9 
     166#: public_l10n.php:8 
    171167msgid "Entries containing this media" 
    172168msgstr "Billets contenant ce média" 
    173169 
    174 #: public_l10n.php:10 
     170#: public_l10n.php:9 
    175171msgid "Extension" 
    176172msgstr "Extension" 
    177173 
    178 #: public_l10n.php:11 
     174#: public_l10n.php:10 
    179175msgid "File" 
    180176msgstr "Fichier" 
    181177 
    182 #: public_l10n.php:13 
     178#: public_l10n.php:12 
    183179msgid "Get back to the directory" 
    184180msgstr "Revenir au répertoire" 
    185181 
    186 #: public_l10n.php:15 
     182#: public_l10n.php:14 
    187183msgid "Image meta" 
    188184msgstr "Méta données" 
    189185 
    190 #: public_l10n.php:16 
     186#: public_l10n.php:15 
    191187msgid "Informations" 
    192188msgstr "Informations" 
    193189 
    194 #: public_l10n.php:17 
     190#: public_l10n.php:16 
    195191msgid "Media type" 
    196192msgstr "Type de média" 
    197193 
    198 #: public_l10n.php:18 
     194#: public_l10n.php:17 
    199195msgid "Modification time" 
    200196msgstr "Date de modification" 
    201197 
    202 #: public_l10n.php:19 
     198#: public_l10n.php:18 
    203199msgid "No directory." 
    204200msgstr "Aucun répertoire." 
    205201 
    206 #: public_l10n.php:20 
     202#: public_l10n.php:19 
    207203msgid "No file." 
    208204msgstr "Aucun fichier." 
    209205 
    210 #: public_l10n.php:21 
     206#: public_l10n.php:20 
    211207msgid "Page(s):" 
    212208msgstr "Page(s) :" 
    213209 
    214 #: public_l10n.php:24 
     210#: public_l10n.php:23 
    215211msgid "Size" 
    216212msgstr "Taille" 
    217213 
    218 #: public_l10n.php:26 
     214#: public_l10n.php:25 
    219215msgid "Type" 
    220216msgstr "Type" 
    221217 
    222 #: public_l10n.php:27 
     218#: public_l10n.php:26 
    223219msgid "Zip file content" 
    224220msgstr "Contenu du fichier zip" 
     
    321317msgstr "Enregistrer la configuration" 
    322318 
    323 #~ msgid "Hide files URLs" 
    324 #~ msgstr "Cacher les URLs des fichiers" 
    325  
  • plugins/dlManager/public_l10n.php

    r552 r553  
    1 <?php 
     1<?php # made by Dotclear l10n.sh 
    22__("Archives"); 
    33__("Basename"); 
    44__("Directories"); 
    55__("Download manager"); 
    6 __("Download number"); 
    76__("Downloads"); 
    87__("Download this file"); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map