Changeset 19427


Ignore:
Timestamp:
Dec 14, 2012, 1:04:27 AM (8 years ago)
Author:
julien1311
Message:

fix update of config when click on submit (admin advanced)

Location:
extensions/Media_Icon
Files:
1 added
2 deleted
12 edited

Legend:

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

    r19374 r19427  
    33        font-weight: bold;
    44        float: left;
    5         margin: 1,5em 1,5em;
     5        margin: 2em 2em;
    66}
    77
  • extensions/Media_Icon/admin/admin_advanced.php

    r19392 r19427  
    77if (isset($_POST['submit'])) {
    88        $conf_media_icon_advanced = $_POST['media_icon'];
     9       
    910        $media_icon_errors = array();
    1011       
     
    5253        array(
    5354                'position' => $conf_media_icon_advanced['position'],
     55                'xposition' => $conf_media_icon_advanced['xposition'],
     56                'yposition' => $conf_media_icon_advanced['yposition'],
    5457                'opacity' => $conf_media_icon_advanced['opacity'],
    5558        )
     
    6063$template->set_filenames(
    6164        array(
    62                 'plugin_admin_content_advanced' => dirname(__FILE__).'/admin_advanced.tpl'
     65                'plugin_master_content' => MEDIA_ICON_ABSOLUTE_PATH.'template/media_icon.tpl'
    6366        )   
    6467);
    65  
     68$template->set_filenames(
     69        array(
     70                'plugin_admin_content_advanced' => dirname(__FILE__).'/admin_advanced.tpl',
     71        )
     72);
     73
    6674//Assign the template contents to ADMIN_CONTENT
     75$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_master_content');
    6776$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content_advanced');
    6877?>
  • extensions/Media_Icon/admin/admin_advanced.tpl

    r19392 r19427  
    2323        #media_icon_position_box label.right {
    2424                float: right;
     25        }
     26       
     27        #media_icon_opacity {
     28                text-align: center;
    2529        }
    2630       
     
    5963        <fieldset>
    6064        <legend>{'Opacity'|@translate}</legend>
    61                 <label>{'Opacity'|@translate}</label>
    62                 <input size="3" maxlength="3" type="text" name="media_icon[opacity]" value="{$media_icon_advanced.opacity}"{if isset($media_icon_errors.opacity)} class="media_icon_error"{/if}> %
    63                 {if isset($media_icon_errors.opacity)}<span class="media_icon_error_description" title="{$media_icon_errors.opacity}">!</span>{/if}
     65                <div id="media_icon_opacity">
     66                        <label for="media_icon_opacity_input">{'Opacity'|@translate}</label>
     67                        <input size="3" maxlength="3" id="media_icon_opacity_input" type="text" name="media_icon[opacity]" value="{$media_icon_advanced.opacity}"{if isset($media_icon_errors.opacity)} class="media_icon_error"{/if}> %
     68                        {if isset($media_icon_errors.opacity)}<span class="media_icon_error_description" title="{$media_icon_errors.opacity}">!</span>{/if}
     69                </div>
    6470        </fieldset>
    6571       
     
    6874        <fieldset>
    6975                <legend>{'Result'|@translate}</legend>
    70                 <div class="media_icon_bold_center">
    71                         <a href="#"><span class="media_icon media_icon_pdf_{$media_icon_style}"></span><img class="thumbnail" alt="landscape" src="{$media_icon_admin_path}plugins/media_icon/admin/img/landscape.png" width="323" height="200" /></a>
    72                         <a href="#"><span class="media_icon media_icon_youtube_{$media_icon_style}"></span><img class="thumbnail" alt="portrait" src="{$media_icon_admin_path}plugins/media_icon/admin/img/portrait.png" width="150" height="200" /></a>
    73                 </div>
     76                        <span style="float: left;">
     77                                <a href="#" style="position: absolute; clip: rect(0px, 323px, 200px, 0px);"><span class="media_icon media_icon_pdf_{$media_icon_style}"></span><img class="thumbnail" alt="landscape" src="{$media_icon_admin_path}plugins/media_icon/admin/img/landscape.png" width="323" height="200" /></a>
     78                        </span>
     79                        <span style="float: left; margin-left: 333px;">
     80                                <a href="#" style="position: absolute; clip: rect(0px, 150px, 200px, 0px);"><span class="media_icon media_icon_youtube_{$media_icon_style}"></span><img class="thumbnail" alt="portrait" src="{$media_icon_admin_path}plugins/media_icon/admin/img/portrait.png" width="150" height="200" /></a>
     81                        </span>
     82                        <span class="media_icon_clear"></span>
    7483        </fieldset>
    7584</form>
  • extensions/Media_Icon/admin/admin_general.php

    r19374 r19427  
    88        $conf_media_icon_general['style'] = $_POST['media_icon_style'];
    99       
    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;
     10        foreach ($conf_media_icon_general['active'] as $media_icon_active => $value) {
     11                if(isset($_POST['media_icon_checkbox']['media_icon_checkbox_'.$media_icon_active]) && ($_POST['media_icon_checkbox']['media_icon_checkbox_'.$media_icon_active] == 1))
     12                        $conf_media_icon_general['active'][$media_icon_active] = 1;
     13                else
     14                        $conf_media_icon_general['active'][$media_icon_active] = 0;
    1615        }
    1716       
     
    2726foreach ($conf_media_icon_general['styles'] as $media_icon_style)
    2827        $media_icon_style_selected[$media_icon_style] = (($conf_media_icon_general['style'] == $media_icon_style) ? 'selected="selected"' : '');
     28$media_icon_active_checked = array();
     29foreach ($conf_media_icon_general['support'] as $media_icon_support => $value)
     30        $media_icon_active_checked[$media_icon_support] = (($conf_media_icon_general['active'][$media_icon_support] == 1) ? 'checked = "checked"' : '');
    2931
    3032$template->assign('media_icon_style_selected', $media_icon_style_selected);
    31 $template->assign('media_icon_support',$conf_media_icon_general['support']);
    32 $template->assign(
    33         'media_icon_support_checked',
    34         array(
    35                 'youtube' => (($conf_media_icon_general['support']['youtube'] == 1) ? 'checked = "checked"' : ""),
    36                 'vimeo' => (($conf_media_icon_general['support']['vimeo'] == 1) ? 'checked = "checked"' : ""),
    37                 'dailymotion' => (($conf_media_icon_general['support']['dailymotion'] == 1) ? 'checked = "checked"' : ""),
    38                 'wideo' => (($conf_media_icon_general['support']['wideo'] == 1) ? 'checked = "checked"' : ""),
    39                 'wat' => (($conf_media_icon_general['support']['wat'] == 1) ? 'checked = "checked"' : ""),
    40                 'video' => (($conf_media_icon_general['support']['video'] == 1) ? 'checked = "checked"' : ""),
    41                 'music' => (($conf_media_icon_general['support']['music'] == 1) ? 'checked = "checked"' : ""),
    42                 'pdf' => (($conf_media_icon_general['support']['pdf'] == 1) ? 'checked = "checked"' : ""),
    43                 'document' => (($conf_media_icon_general['support']['document'] == 1) ? 'checked = "checked"' : ""),
    44                 'spreadsheet' => (($conf_media_icon_general['support']['spreadsheet'] == 1) ? 'checked = "checked"' : ""),
    45                 'presentation' => (($conf_media_icon_general['support']['presentation'] == 1) ? 'checked = "checked"' : ""),
    46         )
    47 );
     33$template->assign('media_icon_active',$conf_media_icon_general['active']);
     34$template->assign('media_icon_active_checked',$media_icon_active_checked);
    4835
    4936//Add our template to the global template
  • extensions/Media_Icon/admin/admin_general.tpl

    r19374 r19427  
    3232        <p>
    3333                <div id="media_icon_admin_checkbox_left">
    34                         <label>{'Youtube videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_youtube]" value="1" {$media_icon_support_checked.youtube}></label><br />
    35                         <label>{'Vimeo videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_vimeo]" value="1" {$media_icon_support_checked.vimeo}></label><br />
    36                         <label>{'Dailymotion videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_dailymotion]" value="1" {$media_icon_support_checked.dailymotion}></label><br />
    37                         <label>{'Wat videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_wat]" value="1" {$media_icon_support_checked.wat}></label><br />
    38                         <label>{'Wideo videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_wideo]" value="1" {$media_icon_support_checked.wideo}></label><br />
    39                         <label>{'Videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_video]" value="1" {$media_icon_support_checked.video}></label>
     34                        <label>{'Youtube videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_youtube]" value="1" {$media_icon_active_checked.youtube}></label><br />
     35                        <label>{'Vimeo videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_vimeo]" value="1" {$media_icon_active_checked.vimeo}></label><br />
     36                        <label>{'Dailymotion videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_dailymotion]" value="1" {$media_icon_active_checked.dailymotion}></label><br />
     37                        <label>{'Wat videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_wat]" value="1" {$media_icon_active_checked.wat}></label><br />
     38                        <label>{'Wideo videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_wideo]" value="1" {$media_icon_active_checked.wideo}></label><br />
     39                        <label>{'Videos'|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_video]" value="1" {$media_icon_active_checked.video}></label>
    4040                </div>
    4141                <div id="media_icon_admin_checkbox_right">
    42                         <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_music]" value="1" {$media_icon_support_checked.music}> {'Musics'|@translate}</label><br />
    43                         <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_pdf]" value="1" {$media_icon_support_checked.pdf}> {'pdf files'|@translate}</label><br />
    44                         <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_document]" value="1" {$media_icon_support_checked.document}> {'Documents'|@translate}</label><br />
    45                         <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_spreadsheet]" value="1" {$media_icon_support_checked.spreadsheet}> {'Spreadsheets'|@translate}</label><br />
    46                         <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_presentation]" value="1" {$media_icon_support_checked.presentation}> {'Presentations'|@translate}</label>
     42                        <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_music]" value="1" {$media_icon_active_checked.music}> {'Musics'|@translate}</label><br />
     43                        <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_pdf]" value="1" {$media_icon_active_checked.pdf}> {'pdf files'|@translate}</label><br />
     44                        <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_document]" value="1" {$media_icon_active_checked.document}> {'Documents'|@translate}</label><br />
     45                        <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_spreadsheet]" value="1" {$media_icon_active_checked.spreadsheet}> {'Spreadsheets'|@translate}</label><br />
     46                        <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_presentation]" value="1" {$media_icon_active_checked.presentation}> {'Presentations'|@translate}</label>
    4747                </div>
    4848        </p>
     
    5858<fieldset>
    5959        <legend>{'Result'|@translate}</legend>
    60         <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>
    61         <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>
    62         <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>
    63         <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>
    64         <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>
    65         <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>
    66         <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>
    67         <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>
    68         <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>
    69         <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>
    70         <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>
     60        <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_active.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>
     61        <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_active.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>
     62        <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_active.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>
     63        <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_active.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>
     64        <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_active.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>
     65        <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_active.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>
     66        <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_active.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>
     67        <div class="media_icon_admin_element">{'pdf files'|@translate} <a class="showInfo" title="{'Files supported: pdf'|@translate}">i</a>{if $media_icon_active.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>
     68        <div class="media_icon_admin_element">{'Documents'|@translate} <a class="showInfo" title="{'Files supported: doc, docx and odt'|@translate}">i</a>{if $media_icon_active.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>
     69        <div class="media_icon_admin_element">{'Spreadsheets'|@translate} <a class="showInfo" title="{'Files supported: xls, xlsx and ods'|@translate}">i</a>{if $media_icon_active.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>
     70        <div class="media_icon_admin_element">{'Presentations'|@translate} <a class="showInfo" title="{'Files supported: ppt, pptx and odp'|@translate}">i</a>{if $media_icon_active.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>
    7171</fieldset>
  • extensions/Media_Icon/config_default.inc.php

    r19374 r19427  
    88                'foldercolor' => 'foldercolor',
    99                'folderpicture' => 'folderpicture',
     10                'cracked' => 'cracked',
    1011        ),
    1112        'style' => 'logo',
    1213        'support' => array(
     14                'youtube' => 'Youtube videos',
     15                'vimeo' => 'Vimeo videos',
     16                'dailymotion' => 'Dailymotion videos',
     17                'wideo' => 'Wideo videos',
     18                'wat' => 'Wat videos',
     19                'video' => 'Videos',
     20                'music' => 'Musics',
     21                'pdf' => 'pdf documents',
     22                'document' => 'Documents',
     23                'spreadsheet' => 'Spreadsheets',
     24                'presentation' => 'Presentations',
     25        ),
     26        'active' => array(
    1327                'youtube' => 1,
    1428                'vimeo' => 1,
  • extensions/Media_Icon/language/es_ES/plugin.lang.php

    r19390 r19427  
    2929$lang['Spreadsheets'] = 'Hojas de cálculo';
    3030$lang['Presentations'] = 'Presentaciones';
    31 $lang['Videos added with'] = 'Vídeo añadido con';
     31$lang['Videos added with'] = 'Vídeos añadido con';
    3232$lang['Files supported: webm, webmv, ogv, m4v, flv, mp4'] = 'Archivos admitidos : mp3, ogg, oga, m4a, webma, fla, wav';
    3333$lang['Files supported: mp3, ogg, oga, m4a, webma, fla, wav'] = 'Archivos admitidos : mp3, ogg, oga, m4a, webma, fla, wav';
  • extensions/Media_Icon/language/fr_FR/plugin.lang.php

    r19390 r19427  
    2929$lang['Spreadsheets'] = 'Tableurs';
    3030$lang['Presentations'] = 'Présentations';
    31 $lang['Videos added with'] = 'Videos added with';
     31$lang['Videos added with'] = 'Vidéos ajoutées avec';
    3232$lang['Files supported: webm, webmv, ogv, m4v, flv, mp4'] = 'Fichiers supportés : mp3, ogg, oga, m4a, webma, fla, wav';
    3333$lang['Files supported: mp3, ogg, oga, m4a, webma, fla, wav'] = 'Fichiers supportés : mp3, ogg, oga, m4a, webma, fla, wav';
  • extensions/Media_Icon/main.inc.php

    r19352 r19427  
    1313define('MEDIA_ICON_DIR' , basename(dirname(__FILE__)));
    1414define('MEDIA_ICON_PATH' , PHPWG_PLUGINS_PATH.MEDIA_ICON_DIR.'/');
     15define('MEDIA_ICON_ABSOLUTE_PATH' , dirname(__FILE__).'/');
    1516define('MEDIA_ICON_ADMIN',   get_root_url() . 'admin.php?page=plugin-media_icon');
    1617
  • extensions/Media_Icon/picture.php

    r19392 r19427  
    11<?php
    2 add_event_handler('loc_end_page_header', 'media_icon_picture_css');
    32add_event_handler('render_element_content','media_icon_add_tag_picture',EVENT_HANDLER_PRIORITY_NEUTRAL+10,2);
    43
    54function media_icon_add_tag_picture($content, $element_info) {
    65        global $conf;
     6       
     7        add_event_handler('loc_end_page_header', 'media_icon_picture_css');
    78       
    89        $conf_media_icon_general = unserialize($conf['media_icon_general']);
     
    1112        switch (strrchr($element_info['file'], ".")) {
    1213                case ".pdf":
    13                         if ($conf_media_icon_general['support']['pdf'] == 1)
     14                        if ($conf_media_icon_general['active']['pdf'] == 1)
    1415                                $media_icon_type = "pdf";
    1516                        break;
    1617                case ".docx":
    17                         if ($conf_media_icon_general['support']['document'] == 1)
     18                        if ($conf_media_icon_general['active']['document'] == 1)
    1819                                $media_icon_type = "document";
    1920                        break;
    2021                case ".doc":
    21                         if ($conf_media_icon_general['support']['document'] == 1)
     22                        if ($conf_media_icon_general['active']['document'] == 1)
    2223                                $media_icon_type = "document";
    2324                        break;
    2425                case ".odt":
    25                         if ($conf_media_icon_general['support']['document'] == 1)
     26                        if ($conf_media_icon_general['active']['document'] == 1)
    2627                                $media_icon_type = "document";
    2728                        break;
    2829                case ".xlsx":
    29                         if ($conf_media_icon_general['support']['spreadsheet'] == 1)
     30                        if ($conf_media_icon_general['active']['spreadsheet'] == 1)
    3031                                $media_icon_type = "spreadsheet";
    3132                        break;
    3233                case ".xls":
    33                         if ($conf_media_icon_general['support']['spreadsheet'] == 1)
     34                        if ($conf_media_icon_general['active']['spreadsheet'] == 1)
    3435                                $media_icon_type = "spreadsheet";
    3536                        break;
    3637                case ".ods":
    37                         if ($conf_media_icon_general['support']['spreadsheet'] == 1)
     38                        if ($conf_media_icon_general['active']['spreadsheet'] == 1)
    3839                                $media_icon_type = "spreadsheet";
    3940                        break;
    4041                case ".pptx":
    41                         if ($conf_media_icon_general['support']['presentation'] == 1)
     42                        if ($conf_media_icon_general['active']['presentation'] == 1)
    4243                                $media_icon_type = "presentation";
    4344                        break;
    4445                case ".ppt":
    45                         if ($conf_media_icon_general['support']['presentation'] == 1)
     46                        if ($conf_media_icon_general['active']['presentation'] == 1)
    4647                                $media_icon_type = "presentation";
    4748                        break;
    4849                case ".odp":
    49                         if ($conf_media_icon_general['support']['presentation'] == 1)
     50                        if ($conf_media_icon_general['active']['presentation'] == 1)
    5051                                $media_icon_type = "presentation";
    5152                        break;
     
    6768        $conf_media_icon_advanced = unserialize($conf['media_icon_advanced']);
    6869       
    69         $template->set_filename('media_icon_template', dirname(__FILE__).'/template/media_icon_picture.tpl');
     70        $template->set_filename('media_icon_template', dirname(__FILE__).'/template/media_icon.tpl');
    7071       
    7172        $template->assign(
  • extensions/Media_Icon/template/media_icon.css

    r19374 r19427  
    199199
    200200/* +-----------------------------------------------------------------------+
    201  * | folderpicture                                                           |
    202  * +-----------------------------------------------------------------------+ */
    203  
    204  .media_icon_youtube_folderpicture, .media_icon_admin_youtube_folderpicture {
    205         background: transparent url('icons/folderpicture_youtube.png') no-repeat;
    206 }
    207 
    208 .media_icon_vimeo_folderpicture, .media_icon_admin_vimeo_folderpicture {
    209         background: transparent url('icons/folderpicture_video.png') no-repeat;
    210 }
    211 
    212 .media_icon_dailymotion_folderpicture, .media_icon_admin_dailymotion_folderpicture {
    213         background: transparent url('icons/folderpicture_video.png') no-repeat;
    214 }
    215 
    216 .media_icon_wat_folderpicture, .media_icon_admin_wat_folderpicture {
    217         background: transparent url('icons/folderpicture_video.png') no-repeat;
    218 }
    219 
    220 .media_icon_wideo_folderpicture, .media_icon_admin_wideo_folderpicture {
    221         background: transparent url('icons/folderpicture_video.png') no-repeat;
    222 }
    223 
    224 .media_icon_video_folderpicture, .media_icon_admin_video_folderpicture {
    225         background: transparent url('icons/folderpicture_video.png') no-repeat;
    226 }
    227 
    228 .media_icon_music_folderpicture, .media_icon_admin_music_folderpicture {
    229         background: transparent url('icons/folderpicture_music.png') no-repeat;
    230 }
    231 
    232 .media_icon_pdf_folderpicture, .media_icon_admin_pdf_folderpicture {
    233         background: transparent url('icons/folderpicture_pdf.png') no-repeat;
    234 }
    235 
    236 .media_icon_document_folderpicture, .media_icon_admin_document_folderpicture {
    237         background: transparent url('icons/folderpicture_document.png') no-repeat;
    238 }
    239 
    240 .media_icon_spreadsheet_folderpicture, .media_icon_admin_spreadsheet_folderpicture {
    241         background: transparent url('icons/folderpicture_spreadsheet.png') no-repeat;
    242 }
    243 
    244 .media_icon_presentation_folderpicture, .media_icon_admin_presentation_folderpicture {
    245         background: transparent url('icons/folderpicture_presentation.png') no-repeat;
    246 }
     201 * | cracked                                                               |
     202 * +-----------------------------------------------------------------------+ */
     203 
     204.media_icon_youtube_cracked, .media_icon_admin_youtube_cracked {
     205        background: transparent url('icons/cracked_youtube.png') no-repeat;
     206}
     207
     208.media_icon_vimeo_cracked, .media_icon_admin_vimeo_cracked {
     209        background: transparent url('icons/cracked_video.png') no-repeat;
     210}
     211
     212.media_icon_dailymotion_cracked, .media_icon_admin_dailymotion_cracked {
     213        background: transparent url('icons/cracked_dailymotion.png') no-repeat;
     214}
     215
     216.media_icon_wat_cracked, .media_icon_admin_wat_cracked {
     217        background: transparent url('icons/cracked_video.png') no-repeat;
     218}
     219
     220.media_icon_wideo_cracked, .media_icon_admin_wideo_cracked {
     221        background: transparent url('icons/cracked_video.png') no-repeat;
     222}
     223
     224.media_icon_video_cracked, .media_icon_admin_video_cracked {
     225        background: transparent url('icons/cracked_video.png') no-repeat;
     226}
     227
     228.media_icon_music_cracked, .media_icon_admin_music_cracked {
     229        background: transparent url('icons/cracked_music.png') no-repeat;
     230}
     231
     232.media_icon_pdf_cracked, .media_icon_admin_pdf_cracked {
     233        background: transparent url('icons/cracked_pdf.png') no-repeat;
     234}
     235
     236.media_icon_document_cracked, .media_icon_admin_document_cracked {
     237        background: transparent url('icons/cracked_document.png') no-repeat;
     238}
     239
     240.media_icon_spreadsheet_cracked, .media_icon_admin_spreadsheet_cracked {
     241        background: transparent url('icons/cracked_spreadsheet.png') no-repeat;
     242}
     243
     244.media_icon_presentation_cracked, .media_icon_admin_presentation_cracked {
     245        background: transparent url('icons/cracked_presentation.png') no-repeat;
     246}
     247
     248/* +-----------------------------------------------------------------------+
     249 * | cracked                                                           |
     250 * +-----------------------------------------------------------------------+ */
     251 
     252 .media_icon_youtube_cracked, .media_icon_admin_youtube_cracked {
     253        background: transparent url('icons/cracked_youtube.png') no-repeat;
     254}
     255
     256.media_icon_vimeo_cracked, .media_icon_admin_vimeo_cracked {
     257        background: transparent url('icons/cracked_video.png') no-repeat;
     258}
     259
     260.media_icon_dailymotion_cracked, .media_icon_admin_dailymotion_cracked {
     261        background: transparent url('icons/cracked_video.png') no-repeat;
     262}
     263
     264.media_icon_wat_cracked, .media_icon_admin_wat_cracked {
     265        background: transparent url('icons/cracked_video.png') no-repeat;
     266}
     267
     268.media_icon_wideo_cracked, .media_icon_admin_wideo_cracked {
     269        background: transparent url('icons/cracked_video.png') no-repeat;
     270}
     271
     272.media_icon_video_cracked, .media_icon_admin_video_cracked {
     273        background: transparent url('icons/cracked_video.png') no-repeat;
     274}
     275
     276.media_icon_music_cracked, .media_icon_admin_music_cracked {
     277        background: transparent url('icons/cracked_music.png') no-repeat;
     278}
     279
     280.media_icon_pdf_cracked, .media_icon_admin_pdf_cracked {
     281        background: transparent url('icons/cracked_pdf.png') no-repeat;
     282}
     283
     284.media_icon_document_cracked, .media_icon_admin_document_cracked {
     285        background: transparent url('icons/cracked_document.png') no-repeat;
     286}
     287
     288.media_icon_spreadsheet_cracked, .media_icon_admin_spreadsheet_cracked {
     289        background: transparent url('icons/cracked_spreadsheet.png') no-repeat;
     290}
     291
     292.media_icon_presentation_cracked, .media_icon_admin_presentation_cracked {
     293        background: transparent url('icons/cracked_presentation.png') no-repeat;
     294}
  • extensions/Media_Icon/thumbnails.php

    r19372 r19427  
    1010        $template->set_prefilter('index_thumbnails', 'media_icon_prefilter_thumbnails');
    1111       
    12         $template->set_filename('media_icon_template', dirname(__FILE__).'/template/media_icon_thumbnails.tpl');
     12        $template->set_filename('media_icon_template', dirname(__FILE__).'/template/media_icon.tpl');
    1313       
    1414        $template->assign('media_icon_style',$conf_media_icon_general['style']);
    1515       
    16         $template->assign('media_icon_support', $conf_media_icon_general['support']);
     16        $template->assign('media_icon_active',  $conf_media_icon_general['active']);
    1717        $template->assign(
    1818                'media_icon_advanced',
Note: See TracChangeset for help on using the changeset viewer.