Changeset 19372


Ignore:
Timestamp:
Dec 9, 2012, 6:34:58 PM (8 years ago)
Author:
julien1311
Message:

add the capacity to choose the supported files

Location:
extensions/Media_Icon
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • extensions/Media_Icon/admin/admin.css

    r19353 r19372  
     1div.media_icon_admin_element {
     2        width: 20%;
     3        font-weight: bold;
     4        float: left;
     5        margin: 1,5em 1,5em;
     6}
     7
     8.media_icon_bold_center {
     9        font-weight: bold;
     10        text-align: center;
     11}
     12
     13.media_icon_important {
     14        font-weight: bold;
     15}
     16       
    117.showInfo {
    218  position:static;
     
    1733        margin-right: auto;
    1834        margin-bottom: 2em;
     35        font-weight: normal;
    1936}
    2037
  • extensions/Media_Icon/admin/admin_advanced.php

    r19324 r19372  
    5757$template->set_filenames(
    5858        array(
    59                 'plugin_admin_content' => dirname(__FILE__).'/admin_advanced.tpl'
     59                'plugin_admin_content_advanced' => dirname(__FILE__).'/admin_advanced.tpl'
    6060        )   
    6161);
    6262 
    6363//Assign the template contents to ADMIN_CONTENT
    64 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
     64$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content_advanced');
    6565?>
  • extensions/Media_Icon/admin/admin_general.php

    r19352 r19372  
    77        //New parameters
    88        $conf_media_icon_general['style'] = $_POST['media_icon_style'];
     9       
     10        //faire avec foreach
     11        foreach ($conf_media_icon_general['support'] as $media_icon_support => $value) {
     12        if(isset($_POST['media_icon_checkbox']['media_icon_checkbox_'.$media_icon_support]) && ($_POST['media_icon_checkbox']['media_icon_checkbox_'.$media_icon_support] == 1))
     13                $conf_media_icon_general['support'][$media_icon_support] = 1;
     14        else
     15                $conf_media_icon_general['support'][$media_icon_support] = 0;
     16        }
    917       
    1018        //Save
     
    2432        )
    2533);
     34$template->assign('media_icon_support',$conf_media_icon_general['support']);
     35$template->assign(
     36        'media_icon_support_checked',
     37        array(
     38                'youtube' => (($conf_media_icon_general['support']['youtube'] == 1) ? 'checked = "checked"' : ""),
     39                'vimeo' => (($conf_media_icon_general['support']['vimeo'] == 1) ? 'checked = "checked"' : ""),
     40                'dailymotion' => (($conf_media_icon_general['support']['dailymotion'] == 1) ? 'checked = "checked"' : ""),
     41                'wideo' => (($conf_media_icon_general['support']['wideo'] == 1) ? 'checked = "checked"' : ""),
     42                'wat' => (($conf_media_icon_general['support']['wat'] == 1) ? 'checked = "checked"' : ""),
     43                'video' => (($conf_media_icon_general['support']['video'] == 1) ? 'checked = "checked"' : ""),
     44                'music' => (($conf_media_icon_general['support']['music'] == 1) ? 'checked = "checked"' : ""),
     45                'pdf' => (($conf_media_icon_general['support']['pdf'] == 1) ? 'checked = "checked"' : ""),
     46                'document' => (($conf_media_icon_general['support']['document'] == 1) ? 'checked = "checked"' : ""),
     47                'spreadsheet' => (($conf_media_icon_general['support']['spreadsheet'] == 1) ? 'checked = "checked"' : ""),
     48                'presentation' => (($conf_media_icon_general['support']['presentation'] == 1) ? 'checked = "checked"' : ""),
     49        )
     50);
    2651
    2752//Add our template to the global template
    2853$template->set_filenames(
    2954        array(
    30                 'plugin_admin_content' => dirname(__FILE__).'/admin_general.tpl'
     55                'plugin_admin_content_general' => dirname(__FILE__).'/admin_general.tpl'
    3156        )
    3257);
    3358 
    3459//Assign the template contents to ADMIN_CONTENT
    35 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
     60$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content_general');
    3661?>
  • extensions/Media_Icon/admin/admin_general.tpl

    r19353 r19372  
    1 {html_head}{literal}
    2 <style type="text/css">
    3         div.media_icon_admin_element {
    4                 width: 20%;
    5                 font-weight: bold;
    6                 float: left;
    7                 margin: 1,5em 1,5em;
    8         }
    9  
    10         .properties label {
    11                 font-weight: bold;
    12                 text-align: center;
    13         }
    14 
    15         .properties p {
    16                 font-weight: normal;
    17                 margin-top: 1em;
    18                 text-align: center;
    19         }
    20 
    21         .media_icon_important {
    22                 font-weight: bold;
    23         }
    24 </style>
    25 {/literal}{/html_head}
    261{footer_script}{literal}
    272jQuery(".showInfo").tipTip({
     
    4217        <fieldset>
    4318    <legend>{'Style'|@translate}</legend>
    44         <p>
    45                 <label for="media_icon_select">{'Icon style:'|@translate}</label>
     19        <p class="media_icon_bold_center">
     20                {'Icon style:'|@translate}
    4621        </p>
    47         <p>     
     22        <p class="media_icon_bold_center">     
    4823                <select id="media_icon_select" name="media_icon_style">
    49                         <option value="logo"{$media_icon_style_selected.logo}>{'Logo'|@translate}</option>
    50                         <option value="photo"{$media_icon_style_selected.photo}>{'Photo'|@translate}</option>
    51                         <option value="folder"{$media_icon_style_selected.folder}>{'Folder'|@translate}</option>
    52                         <option value="foldercolor"{$media_icon_style_selected.foldercolor}>{'Folder color'|@translate}</option>
     24                        <option value="logo" {$media_icon_style_selected.logo}>{'Logo'|@translate}</option>
     25                        <option value="photo" {$media_icon_style_selected.photo}>{'Photo'|@translate}</option>
     26                        <option value="folder" {$media_icon_style_selected.folder}>{'Folder'|@translate}</option>
     27                        <option value="foldercolor" {$media_icon_style_selected.foldercolor}>{'Folder color'|@translate}</option>
    5328                </select>
    5429        </p>
    55         <p>
    56                 <label>{'Type of files you want to add an icon to:'|@translate}</label>
     30        <p class="media_icon_bold_center">
     31                {'Types of files you want to add an icon to:'|@translate}
    5732        </p>
    5833        <p>
    5934                <div id="media_icon_admin_checkbox_left">
    60                         {'Youtube videos'|@translate} <input type="checkbox" name="media_icon_checkbox_youtube" value="1"><br />
    61                         {'Vimeo videos'|@translate} <input type="checkbox" name="media_icon_checkbox_vimeo" value="1"><br />
    62                         {'Dailymotion videos'|@translate} <input type="checkbox" name="media_icon_checkbox_dailymotion" value="1"><br />
    63                         {'Wideo videos'|@translate} <input type="checkbox" name="media_icon_checkbox_wideo" value="1"><br />
    64                         {'Wat videos'|@translate} <input type="checkbox" name="media_icon_checkbox_wat" value="1"><br />
    65                         {'Videos'|@translate} <input type="checkbox" name="media_icon_checkbox_video" value="1">
     35                        <label>{'Youtube videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_youtube]" value="1" {$media_icon_support_checked.youtube}></label><br />
     36                        <label>{'Vimeo videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_vimeo]" value="1" {$media_icon_support_checked.vimeo}></label><br />
     37                        <label>{'Dailymotion videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_dailymotion]" value="1" {$media_icon_support_checked.dailymotion}></label><br />
     38                        <label>{'Wat videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_wat]" value="1" {$media_icon_support_checked.wat}></label><br />
     39                        <label>{'Wideo videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_wideo]" value="1" {$media_icon_support_checked.wideo}></label><br />
     40                        <label>{'Videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_video]" value="1" {$media_icon_support_checked.video}></label>
    6641                </div>
    6742                <div id="media_icon_admin_checkbox_right">
    68                         <input type="checkbox" name="media_icon_checkbox_music" value="1"> {'Musics'|@translate}<br />
    69                         <input type="checkbox" name="media_icon_checkbox_pdf" value="1"> {'pdf files'|@translate}<br />
    70                         <input type="checkbox" name="media_icon_checkbox_document" value="1"> {'Documents'|@translate}<br />
    71                         <input type="checkbox" name="media_icon_checkbox_spreadsheet" value="1"> {'Spreadsheets'|@translate}<br />
    72                         <input type="checkbox" name="media_icon_checkbox_presentation" value="1"> {'Presentations'|@translate}
     43                        <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_music]" value="1" {$media_icon_support_checked.music}> {'Musics'|@translate}</label><br />
     44                        <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_pdf]" value="1" {$media_icon_support_checked.pdf}> {'pdf files'|@translate}</label><br />
     45                        <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_document]" value="1" {$media_icon_support_checked.document}> {'Documents'|@translate}</label><br />
     46                        <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_spreadsheet]" value="1" {$media_icon_support_checked.spreadsheet}> {'Spreadsheets'|@translate}</label><br />
     47                        <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_presentation]" value="1" {$media_icon_support_checked.presentation}> {'Presentations'|@translate}</label>
    7348                </div>
    7449        </p>
    7550        <div class="clear"></div>
    76         <p>{'Click on submit to see changes.'|@translate}</p>
     51        <p class="media_icon_bold_center">
     52                {'Click on submit to see changes.'|@translate}
     53        </p>
    7754        </fieldset>
    7855 
     
    8259<fieldset>
    8360        <legend>{'Result'|@translate}</legend>
    84         <div class="media_icon_admin_element">{'Youtube videos'|@translate} <a class="showInfo" title="{'Videos added with'|@translate} <a href='http://piwigo.org/ext/extension_view.php?eid=136'>Embedded Videos</a>">i</a><span class="media_icon_admin media_icon_admin_youtube_{$media_icon_style}"></span></div>
    85         <div class="media_icon_admin_element">{'Vimeo videos'|@translate} <a class="showInfo" title="{'Videos added with'|@translate} <a href='http://piwigo.org/ext/extension_view.php?eid=136'>Embedded Videos</a>">i</a><span class="media_icon_admin media_icon_admin_vimeo_{$media_icon_style}"></span></div>
    86         <div class="media_icon_admin_element">{'Dailymotion videos'|@translate} <a class="showInfo" title="{'Videos added with'|@translate} <a href='http://piwigo.org/ext/extension_view.php?eid=136'>Embedded Videos</a>">i</a><span class="media_icon_admin media_icon_admin_dailymotion_{$media_icon_style}"></span></div>
    87         <div class="media_icon_admin_element">{'Wat videos'|@translate} <a class="showInfo" title="{'Videos added with'|@translate} <a href='http://piwigo.org/ext/extension_view.php?eid=136'>Embedded Videos</a>">i</a><span class="media_icon_admin media_icon_admin_wat_{$media_icon_style}"></span></div>
    88         <div class="media_icon_admin_element">{'Wideo videos'|@translate} <a class="showInfo" title="{'Videos added with'|@translate} <a href='http://piwigo.org/ext/extension_view.php?eid=136'>Embedded Videos</a>">i</a><span class="media_icon_admin media_icon_admin_wideo_{$media_icon_style}"></span></div>
    89         <div class="media_icon_admin_element">{'Videos'|@translate} <a class="showInfo" title="{'Files supported: webm, webmv, ogv, m4v, flv, mp4'|@translate}">i</a><span class="media_icon_admin media_icon_admin_video_{$media_icon_style}"></span></div>
    90         <div class="media_icon_admin_element">{'Musics'|@translate} <a class="showInfo" title="{'Files supported: mp3, ogg, oga, m4a, webma, fla, wav'|@translate}">i</a><span class="media_icon_admin media_icon_admin_music_{$media_icon_style}"></span></div>
    91         <div class="media_icon_admin_element">{'pdf files'|@translate} <a class="showInfo" title="{'Files supported: pdf'|@translate}">i</a><span class="media_icon_admin media_icon_admin_pdf_{$media_icon_style}"></span></div>
    92         <div class="media_icon_admin_element">{'Documents'|@translate} <a class="showInfo" title="{'Files supported: doc, docx and odt'|@translate}">i</a><span class="media_icon_admin media_icon_admin_document_{$media_icon_style}"></span></div>
    93         <div class="media_icon_admin_element">{'Spreadsheets'|@translate} <a class="showInfo" title="{'Files supported: xls, xlsx and ods'|@translate}">i</a><span class="media_icon_admin media_icon_admin_spreadsheet_{$media_icon_style}"></span></div>
    94         <div class="media_icon_admin_element">{'Presentations'|@translate} <a class="showInfo" title="{'Files supported: ppt, pptx and odp'|@translate}">i</a><span class="media_icon_admin media_icon_admin_presentation_{$media_icon_style}"></span></div>
     61        <div class="media_icon_admin_element">{'Youtube videos'|@translate} <a class="showInfo" title="{'Videos added with'|@translate} <a href='http://piwigo.org/ext/extension_view.php?eid=136'>Embedded Videos</a>">i</a>{if $media_icon_support.youtube eq 1}<span class="media_icon_admin media_icon_admin_youtube_{$media_icon_style}">{else}<span class="media_icon_admin">{'Not displayed'|@translate}{/if}</span></div>
     62        <div class="media_icon_admin_element">{'Vimeo videos'|@translate} <a class="showInfo" title="{'Videos added with'|@translate} <a href='http://piwigo.org/ext/extension_view.php?eid=136'>Embedded Videos</a>">i</a>{if $media_icon_support.vimeo eq 1}<span class="media_icon_admin media_icon_admin_vimeo_{$media_icon_style}">{else}<span class="media_icon_admin">{'Not displayed'|@translate}{/if}</span></div>
     63        <div class="media_icon_admin_element">{'Dailymotion videos'|@translate} <a class="showInfo" title="{'Videos added with'|@translate} <a href='http://piwigo.org/ext/extension_view.php?eid=136'>Embedded Videos</a>">i</a>{if $media_icon_support.dailymotion eq 1}<span class="media_icon_admin media_icon_admin_dailymotion_{$media_icon_style}">{else}<span class="media_icon_admin">{'Not displayed'|@translate}{/if}</span></div>
     64        <div class="media_icon_admin_element">{'Wat videos'|@translate} <a class="showInfo" title="{'Videos added with'|@translate} <a href='http://piwigo.org/ext/extension_view.php?eid=136'>Embedded Videos</a>">i</a>{if $media_icon_support.wat eq 1}<span class="media_icon_admin media_icon_admin_wat_{$media_icon_style}">{else}<span class="media_icon_admin">{'Not displayed'|@translate}{/if}</span></div>
     65        <div class="media_icon_admin_element">{'Wideo videos'|@translate} <a class="showInfo" title="{'Videos added with'|@translate} <a href='http://piwigo.org/ext/extension_view.php?eid=136'>Embedded Videos</a>">i</a>{if $media_icon_support.wideo eq 1}<span class="media_icon_admin media_icon_admin_wideo_{$media_icon_style}">{else}<span class="media_icon_admin">{'Not displayed'|@translate}{/if}</span></div>
     66        <div class="media_icon_admin_element">{'Videos'|@translate} <a class="showInfo" title="{'Files supported: webm, webmv, ogv, m4v, flv, mp4'|@translate}">i</a>{if $media_icon_support.video eq 1}<span class="media_icon_admin media_icon_admin_video_{$media_icon_style}">{else}<span class="media_icon_admin">{'Not displayed'|@translate}{/if}</span></div>
     67        <div class="media_icon_admin_element">{'Musics'|@translate} <a class="showInfo" title="{'Files supported: mp3, ogg, oga, m4a, webma, fla, wav'|@translate}">i</a>{if $media_icon_support.music eq 1}<span class="media_icon_admin media_icon_admin_music_{$media_icon_style}">{else}<span class="media_icon_admin">{'Not displayed'|@translate}{/if}</span></div>
     68        <div class="media_icon_admin_element">{'pdf files'|@translate} <a class="showInfo" title="{'Files supported: pdf'|@translate}">i</a>{if $media_icon_support.pdf eq 1}<span class="media_icon_admin media_icon_admin_pdf_{$media_icon_style}">{else}<span class="media_icon_admin">{'Not displayed'|@translate}{/if}</span></div>
     69        <div class="media_icon_admin_element">{'Documents'|@translate} <a class="showInfo" title="{'Files supported: doc, docx and odt'|@translate}">i</a>{if $media_icon_support.document eq 1}<span class="media_icon_admin media_icon_admin_document_{$media_icon_style}">{else}<span class="media_icon_admin">{'Not displayed'|@translate}{/if}</span></div>
     70        <div class="media_icon_admin_element">{'Spreadsheets'|@translate} <a class="showInfo" title="{'Files supported: xls, xlsx and ods'|@translate}">i</a>{if $media_icon_support.spreadsheet eq 1}<span class="media_icon_admin media_icon_admin_spreadsheet_{$media_icon_style}">{else}<span class="media_icon_admin">{'Not displayed'|@translate}{/if}</span></div>
     71        <div class="media_icon_admin_element">{'Presentations'|@translate} <a class="showInfo" title="{'Files supported: ppt, pptx and odp'|@translate}">i</a>{if $media_icon_support.presentation eq 1}<span class="media_icon_admin media_icon_admin_presentation_{$media_icon_style}">{else}<span class="media_icon_admin">{'Not displayed'|@translate}{/if}</span></div>
    9572</fieldset>
  • extensions/Media_Icon/admin/admin_help.php

    r19353 r19372  
    33$template->set_filenames(
    44        array(
    5                 'plugin_admin_content' => dirname(__FILE__).'/admin_help.tpl'
     5                'plugin_admin_content_help' => dirname(__FILE__).'/admin_help.tpl'
    66        )
    77);
    88 
    99//Assign the template contents to ADMIN_CONTENT
    10 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
     10$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content_help');
    1111?>
  • extensions/Media_Icon/language/en_UK/plugin.lang.php

    r19337 r19372  
    1414$lang['Folder'] = 'Folder';
    1515$lang['Folder color'] = 'Folder color';
     16$lang['Types of files you want to add an icon to:'] = 'Types of files you want to add an icon to:';
    1617$lang['Click on submit to see changes.'] = 'Click on submit to see changes.';
    1718$lang['Result'] = 'Result';
     
    3435$lang['Files supported: xls, xlsx and ods'] = 'Files supported: xls, xlsx and ods';
    3536$lang['ppt, pptx and odp files'] = 'Files supported: ppt, pptx and odp';
     37$lang['Not displayed'] = 'Not displayed';
    3638
    3739//admin_advanced.php
  • extensions/Media_Icon/language/es_ES/plugin.lang.php

    r19337 r19372  
    1414$lang['Folder'] = 'Carpeta';
    1515$lang['Folder color'] = 'Carpeta en color';
     16$lang['Types of files you want to add an icon to:'] = 'Tipos de archivos a los que desea añadir un icono :';
    1617$lang['Click on submit to see changes.'] = 'Haga clic en enviar para ver los cambios.';
    1718$lang['Result'] = 'Resultado';
     
    3435$lang['Files supported: xls, xlsx and ods'] = 'Archivos admitidos : xls, xlsx y ods';
    3536$lang['ppt, pptx and odp files'] = 'Archivos admitidos : ppt, pptx y odp';
     37$lang['Not displayed'] = 'No presentado';
    3638
    3739//admin_advanced.php
  • extensions/Media_Icon/language/fr_FR/plugin.lang.php

    r19352 r19372  
    1414$lang['Folder'] = 'Dossier';
    1515$lang['Folder color'] = 'Dossier en couleurs';
     16$lang['Types of files you want to add an icon to:'] = 'Types de fichiers pour lesquels vous voulez ajouter une icône :';
    1617$lang['Click on submit to see changes.'] = 'Cliquez sur valider pour voir les changements apparaître.';
    1718$lang['Result'] = 'Résultat';
     
    3435$lang['Files supported: xls, xlsx and ods'] = 'Fichiers supportés : xls, xlsx et ods';
    3536$lang['ppt, pptx and odp files'] = 'Fichiers supportés : ppt, pptx et odp';
     37$lang['Not displayed'] = 'Non affiché';
    3638
    3739//admin_advanced.php
  • extensions/Media_Icon/picture.php

    r19352 r19372  
    1111        switch (strrchr($element_info['file'], ".")) {
    1212                case ".pdf":
    13                         $media_icon_type = "pdf";
     13                        if ($conf_media_icon_general['support']['pdf'] == 1)
     14                                $media_icon_type = "pdf";
    1415                        break;
    1516                case ".docx":
    16                         $media_icon_type = "document";
     17                        if ($conf_media_icon_general['support']['document'] == 1)
     18                                $media_icon_type = "document";
    1719                        break;
    1820                case ".doc":
    19                         $media_icon_type = "document";
     21                        if ($conf_media_icon_general['support']['document'] == 1)
     22                                $media_icon_type = "document";
    2023                        break;
    2124                case ".odt":
    22                         $media_icon_type = "document";
     25                        if ($conf_media_icon_general['support']['document'] == 1)
     26                                $media_icon_type = "document";
    2327                        break;
    2428                case ".xlsx":
    25                         $media_icon_type = "spreadsheet";
     29                        if ($conf_media_icon_general['support']['spreadsheet'] == 1)
     30                                $media_icon_type = "spreadsheet";
    2631                        break;
    2732                case ".xls":
    28                         $media_icon_type = "spreadsheet";
     33                        if ($conf_media_icon_general['support']['spreadsheet'] == 1)
     34                                $media_icon_type = "spreadsheet";
    2935                        break;
    3036                case ".ods":
    31                         $media_icon_type = "spreadsheet";
     37                        if ($conf_media_icon_general['support']['spreadsheet'] == 1)
     38                                $media_icon_type = "spreadsheet";
    3239                        break;
    3340                case ".pptx":
    34                         $media_icon_type = "presentation";
     41                        if ($conf_media_icon_general['support']['presentation'] == 1)
     42                                $media_icon_type = "presentation";
    3543                        break;
    3644                case ".ppt":
    37                         $media_icon_type = "presentation";
     45                        if ($conf_media_icon_general['support']['presentation'] == 1)
     46                                $media_icon_type = "presentation";
    3847                        break;
    3948                case ".odp":
    40                         $media_icon_type = "presentation";
     49                        if ($conf_media_icon_general['support']['presentation'] == 1)
     50                                $media_icon_type = "presentation";
    4151                        break;
    4252        }
  • extensions/Media_Icon/template/media_icon_thumbnails.tpl

    r19352 r19372  
    1818{/literal}
    1919                //Youtube
    20                 $("img[media_icon^=youtube]").before('<span class="media_icon media_icon_youtube_{$media_icon_style}"></span>');
     20                {if $media_icon_support.youtube eq 1}$("img[media_icon^=youtube]").before('<span class="media_icon media_icon_youtube_{$media_icon_style}"></span>'){/if};
    2121                //Vimeo
    22                 $("img[media_icon^=vimeo]").before('<span class="media_icon media_icon_vimeo_{$media_icon_style}"></span>');
     22                {if $media_icon_support.vimeo eq 1}$("img[media_icon^=vimeo]").before('<span class="media_icon media_icon_vimeo_{$media_icon_style}"></span>'){/if};
    2323                //Dailymotion
    24                 $("img[media_icon^=dailymotion]").before('<span class="media_icon media_icon_dailymotion_{$media_icon_style}"></span>');
     24                {if $media_icon_support.dailymotion eq 1}$("img[media_icon^=dailymotion]").before('<span class="media_icon media_icon_dailymotion_{$media_icon_style}"></span>'){/if};
    2525                //Wat
    26                 $("img[media_icon^=wat]").before('<span class="media_icon media_icon_wat_{$media_icon_style}"></span>');
     26                {if $media_icon_support.wat eq 1}$("img[media_icon^=wat]").before('<span class="media_icon media_icon_wat_{$media_icon_style}"></span>'){/if};
    2727                //Wideo
    28                 $("img[media_icon^=wideo]").before('<span class="media_icon media_icon_wideo_{$media_icon_style}"></span>');
     28                {if $media_icon_support.wideo eq 1}$("img[media_icon^=wideo]").before('<span class="media_icon media_icon_wideo_{$media_icon_style}"></span>'){/if};
    2929                //Video
    30                 $("img[media_icon$=webm]").before('<span class="media_icon media_icon_video_{$media_icon_style}"></span>');
    31                 $("img[media_icon$=webmv]").before('<span class="media_icon media_icon_video_{$media_icon_style}"></span>');
    32                 $("img[media_icon$=ogv]").before('<span class="media_icon media_icon_video_{$media_icon_style}"></span>');
    33                 $("img[media_icon$=m4v]").before('<span class="media_icon media_icon_video_{$media_icon_style}"></span>');
    34                 $("img[media_icon$=flv]").before('<span class="media_icon media_icon_video_{$media_icon_style}"></span>');
    35                 $("img[media_icon$=mp4]").before('<span class="media_icon media_icon_video_{$media_icon_style}"></span>');
     30                {if $media_icon_support.video eq 1}$("img[media_icon$=webm]").before('<span class="media_icon media_icon_video_{$media_icon_style}"></span>'){/if};
     31                {if $media_icon_support.video eq 1}$("img[media_icon$=webmv]").before('<span class="media_icon media_icon_video_{$media_icon_style}"></span>'){/if};
     32                {if $media_icon_support.video eq 1}$("img[media_icon$=ogv]").before('<span class="media_icon media_icon_video_{$media_icon_style}"></span>'){/if};
     33                {if $media_icon_support.video eq 1}$("img[media_icon$=m4v]").before('<span class="media_icon media_icon_video_{$media_icon_style}"></span>'){/if};
     34                {if $media_icon_support.video eq 1}$("img[media_icon$=flv]").before('<span class="media_icon media_icon_video_{$media_icon_style}"></span>'){/if};
     35                {if $media_icon_support.video eq 1}$("img[media_icon$=mp4]").before('<span class="media_icon media_icon_video_{$media_icon_style}"></span>'){/if};
    3636                //Music
    37                 $("img[media_icon$=mp3]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>');
    38                 $("img[media_icon$=ogg]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>');
    39                 $("img[media_icon$=oga]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>');
    40                 $("img[media_icon$=m4a]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>');
    41                 $("img[media_icon$=webma]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>');
    42                 $("img[media_icon$=fla]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>');
    43                 $("img[media_icon$=wav]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>');
     37                {if $media_icon_support.music eq 1}$("img[media_icon$=mp3]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>'){/if};
     38                {if $media_icon_support.music eq 1}$("img[media_icon$=ogg]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>'){/if};
     39                {if $media_icon_support.music eq 1}$("img[media_icon$=oga]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>'){/if};
     40                {if $media_icon_support.music eq 1}$("img[media_icon$=m4a]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>'){/if};
     41                {if $media_icon_support.music eq 1}$("img[media_icon$=webma]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>'){/if};
     42                {if $media_icon_support.music eq 1}$("img[media_icon$=fla]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>'){/if};
     43                {if $media_icon_support.music eq 1}$("img[media_icon$=wav]").before('<span class="media_icon media_icon_music_{$media_icon_style}"></span>'){/if};
    4444                //pdf
    45                 $("img[media_icon$=pdf]").before('<span class="media_icon media_icon media_icon_pdf_{$media_icon_style}"></span>');
     45                {if $media_icon_support.pdf eq 1}$("img[media_icon$=pdf]").before('<span class="media_icon media_icon media_icon_pdf_{$media_icon_style}"></span>'){/if};
    4646                //doc, docx or odt
    47                 $("img[media_icon$=doc]").before('<span class="media_icon media_icon_document_{$media_icon_style}"></span>');
    48                 $("img[media_icon$=docx]").before('<span class="media_icon media_icon_document_{$media_icon_style}"></span>');
    49                 $("img[media_icon$=odt]").before('<span class="media_icon media_icon_document_{$media_icon_style}"></span>');
     47                {if $media_icon_support.document eq 1}$("img[media_icon$=doc]").before('<span class="media_icon media_icon_document_{$media_icon_style}"></span>'){/if};
     48                {if $media_icon_support.document eq 1}$("img[media_icon$=docx]").before('<span class="media_icon media_icon_document_{$media_icon_style}"></span>'){/if};
     49                {if $media_icon_support.document eq 1}$("img[media_icon$=odt]").before('<span class="media_icon media_icon_document_{$media_icon_style}"></span>'){/if};
    5050                //xls, xlsx or ods
    51                 $("img[media_icon$=xls]").before('<span class="media_icon media_icon_spreadsheet_{$media_icon_style}"></span>');
    52                 $("img[media_icon$=xlsx]").before('<span class="media_icon media_icon_spreadsheet_{$media_icon_style}"></span>');
    53                 $("img[media_icon$=ods]").before('<span class="media_icon media_icon_spreadsheet_{$media_icon_style}"></span>');
     51                {if $media_icon_support.spreadsheet eq 1}$("img[media_icon$=xls]").before('<span class="media_icon media_icon_spreadsheet_{$media_icon_style}"></span>'){/if};
     52                {if $media_icon_support.spreadsheet eq 1}$("img[media_icon$=xlsx]").before('<span class="media_icon media_icon_spreadsheet_{$media_icon_style}"></span>'){/if};
     53                {if $media_icon_support.spreadsheet eq 1}$("img[media_icon$=ods]").before('<span class="media_icon media_icon_spreadsheet_{$media_icon_style}"></span>'){/if};
    5454                //ppt, pptx or odp
    55                 $("img[media_icon$=ppt]").before('<span class="media_icon media_icon_presentation_{$media_icon_style}"></span>');
    56                 $("img[media_icon$=pptx]").before('<span class="media_icon media_icon_presentation_{$media_icon_style}"></span>');
    57                 $("img[media_icon$=odp]").before('<span class="media_icon media_icon_presentation_{$media_icon_style}"></span>');
     55                {if $media_icon_support.presentation eq 1}$("img[media_icon$=ppt]").before('<span class="media_icon media_icon_presentation_{$media_icon_style}"></span>'){/if};
     56                {if $media_icon_support.presentation eq 1}$("img[media_icon$=pptx]").before('<span class="media_icon media_icon_presentation_{$media_icon_style}"></span>'){/if};
     57                {if $media_icon_support.presentation eq 1}$("img[media_icon$=odp]").before('<span class="media_icon media_icon_presentation_{$media_icon_style}"></span>'){/if};
    5858{literal}
    5959        }
  • extensions/Media_Icon/thumbnails.php

    r19352 r19372  
    1414        $template->assign('media_icon_style',$conf_media_icon_general['style']);
    1515       
     16        $template->assign('media_icon_support', $conf_media_icon_general['support']);
    1617        $template->assign(
    1718                'media_icon_advanced',
Note: See TracChangeset for help on using the changeset viewer.