Changeset 19543


Ignore:
Timestamp:
Dec 24, 2012, 1:28:33 AM (11 years ago)
Author:
julien1311
Message:

foreach pour service

Location:
extensions/Media_Icon
Files:
3 added
10 edited

Legend:

Unmodified
Added
Removed
  • extensions/Media_Icon/admin/admin_general.php

    r19427 r19543  
    2222//Parameters of the template
    2323$template->assign('media_icon_style',$conf_media_icon_general['style']);
    24 
    25 $media_icon_style_selected = array();
    26 foreach ($conf_media_icon_general['styles'] as $media_icon_style)
    27         $media_icon_style_selected[$media_icon_style] = (($conf_media_icon_general['style'] == $media_icon_style) ? 'selected="selected"' : '');
    28 $media_icon_active_checked = array();
    29 foreach ($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"' : '');
    31 
    32 $template->assign('media_icon_style_selected', $media_icon_style_selected);
     24$template->assign('media_icon_styles', $conf_media_icon_general['styles']);
    3325$template->assign('media_icon_active',$conf_media_icon_general['active']);
    34 $template->assign('media_icon_active_checked',$media_icon_active_checked);
     26$template->assign('media_icon_support',$conf_media_icon_general['support']);
    3527
    3628//Add our template to the global template
  • extensions/Media_Icon/admin/admin_general.tpl

    r19427 r19543  
    2222        <p class="media_icon_bold_center">     
    2323                <select id="media_icon_select" name="media_icon_style">
    24                         {foreach from=$media_icon_style_selected item=media_icon_style_selected_value key=media_icon_style_selected_key}
    25                                 <option value="{$media_icon_style_selected_key}" {$media_icon_style_selected_value}>{$media_icon_style_selected_key|@translate}</option>
     24                        {foreach from=$media_icon_styles item=media_icon_styles_value key=media_icon_styles_key}
     25                                <option value="{$media_icon_styles_key}" {if $media_icon_styles_key eq $media_icon_style}selected="selected"{/if}>{$media_icon_styles_value|@translate}</option>
    2626                        {/foreach}
    2727                </select>
     
    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_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>
     34                        {foreach from=$media_icon_support item=media_icon_support_value key=media_icon_support_key name=media_icon_admin_checkbox_left}
     35                                {if $smarty.foreach.media_icon_admin_checkbox_left.index < $smarty.foreach.media_icon_admin_checkbox_left.total/2|ceil}
     36                                        <label>{$media_icon_support_value.name|@translate} <input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_{$media_icon_support_key}]" value="1" {if $media_icon_active.$media_icon_support_key eq 1}checked = "checked"{/if}{$media_icon_active_checked.youtube}></label><br />
     37                                {/if}
     38                        {/foreach}
    4039                </div>
    4140                <div id="media_icon_admin_checkbox_right">
    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>
     41                        {foreach from=$media_icon_support item=media_icon_support_value key=media_icon_support_key name=media_icon_admin_checkbox_left}
     42                                {if $smarty.foreach.media_icon_admin_checkbox_left.index >= $smarty.foreach.media_icon_admin_checkbox_left.total/2|ceil}
     43                                        <label><input type="checkbox" name="media_icon_checkbox[media_icon_checkbox_{$media_icon_support_key}]" value="1" {if $media_icon_active.$media_icon_support_key eq 1}checked = "checked"{/if}{$media_icon_active_checked.youtube}> {$media_icon_support_value.name|@translate} </label><br />
     44                                {/if}
     45                        {/foreach}
    4746                </div>
    4847        </p>
     
    5857<fieldset>
    5958        <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_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>
     59        {foreach from=$media_icon_support item=media_icon_support_value key=media_icon_support_key}
     60                <div class="media_icon_admin_element">{$media_icon_support_value.name|@translate} <a class="showInfo" title="{$media_icon_support_value.infos|@translate}">i</a>{if $media_icon_active.$media_icon_support_key eq 1}<span class="media_icon_admin media_icon_admin_{$media_icon_support_key}_{$media_icon_style}">{else}<span class="media_icon_admin">{'Not displayed'|@translate}{/if}</span></div>
     61        {/foreach}
    7162</fieldset>
  • extensions/Media_Icon/config_default.inc.php

    r19427 r19543  
    33$config_default_general = array(
    44        'styles' => array(
    5                 'logo' => 'logo',
    6                 'page' => 'page',
    7                 'folder' => 'folder',
    8                 'foldercolor' => 'foldercolor',
    9                 'folderpicture' => 'folderpicture',
    10                 'cracked' => 'cracked',
     5                'logo' => 'Logo',
     6                'page' => 'Page',
     7                'folder' => 'Folder',
     8                'foldercolor' => 'Folder color',
     9                'folderpicture' => 'Folder picture',
    1110        ),
    1211        'style' => 'logo',
    1312        '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',
     13                'youtube' => array(
     14                        'name' => 'Youtube videos',
     15                        'infos' => 'Videos added with Embedded Videos',
     16                ),
     17                'vimeo' => array(
     18                        'name' => 'Vimeo videos',
     19                        'infos' => 'Videos added with Embedded Videos',
     20                ),
     21                'dailymotion' => array(
     22                        'name' => 'Dailymotion videos',
     23                        'infos' => 'Videos added with Embedded Videos',
     24                ),
     25                'wideo' => array(
     26                        'name' => 'Wideo videos',
     27                        'infos' => 'Videos added with Embedded Videos',
     28                ),
     29                'wat' => array(
     30                        'name' => 'Wat videos',
     31                        'infos' => 'Videos added with Embedded Videos',
     32                ),
     33                'video' => array(
     34                        'name' => 'Videos',
     35                        'infos' => 'Files supported: webm, webmv, ogv, m4v, flv, mp4',
     36                ),
     37                'music' => array(
     38                        'name' => 'Musics',
     39                        'infos' => 'Files supported: mp3, ogg, oga, m4a, webma, fla, wav',
     40                ),
     41                'pdf' => array(
     42                        'name' => 'pdf files',
     43                        'infos' => 'Files supported: pdf',
     44                ),
     45                'document' => array(
     46                        'name' => 'Documents',
     47                        'infos' => 'Files supported: doc, docx and odt',
     48                ),
     49                'spreadsheet' => array(
     50                        'name' => 'Spreadsheets',
     51                        'infos' => 'Files supported: xls, xlsx and ods',
     52                ),
     53                'presentation' => array(
     54                        'name' => 'Presentations',
     55                        'infos' => 'Files supported: ppt, pptx and odp',
     56                ),
    2557        ),
    2658        'active' => array(
  • extensions/Media_Icon/language/da_DK/plugin.lang.php

    r19490 r19543  
    2121// | USA.                                                                  |
    2222// +-----------------------------------------------------------------------+
    23 $lang['folderpicture'] = 'Mappebillede';
    24 $lang['logo'] = 'Logo';
    25 $lang['page'] = 'Side';
     23$lang['Folder picture'] = 'Mappebillede';
     24$lang['Logo'] = 'Logo';
     25$lang['Page'] = 'Side';
    2626$lang['pdf'] = 'pdf';
    2727$lang['pdf files'] = 'pdf-filer';
     
    3636$lang['Video'] = 'Video';
    3737$lang['Videos'] = 'Videoer';
    38 $lang['Videos added with'] = 'Videoer tilføjet med';
     38$lang['Videos added with Embedded Videos'] = 'Videoer tilføjet med Embedded Videos';
    3939$lang['Vimeo'] = 'Vimeo';
    4040$lang['Vimeo videos'] = 'Vimeo-videoer';
     
    4545$lang['Youtube'] = 'Youtube';
    4646$lang['Youtube videos'] = 'Youtube-videoer';
    47 $lang['folder'] = 'Mappe';
    48 $lang['foldercolor'] = 'Mappefarve';
     47$lang['Folder'] = 'Mappe';
     48$lang['Folder color'] = 'Mappefarve';
    4949$lang['Information data registered in database'] = 'Informationer registreret i databasen';
    5050$lang['Media Icon Plugin'] = 'Media Icon Plugin';
  • extensions/Media_Icon/language/de_DE/plugin.lang.php

    r19490 r19543  
    7070$lang['Video'] = 'Video';
    7171$lang['Videos'] = 'Videos';
    72 $lang['Videos added with'] = 'Videos hinzugefügt mit';
     72$lang['Videos added with Embedded Videos'] = 'Videos hinzugefügt mit Embedded Videos';
    7373$lang['Vimeo'] = 'Vimeo';
    7474$lang['Vimeo videos'] = 'Vimeo Videos';
     
    7979$lang['Youtube'] = 'Youtube';
    8080$lang['Youtube videos'] = 'Youtube Videos';
    81 $lang['folder'] = 'Verzeichnis';
    82 $lang['foldercolor'] = 'Verzeichnis Farbe';
    83 $lang['folderpicture'] = 'Verzeichnis Bild';
    84 $lang['logo'] = 'Logo';
    85 $lang['page'] = 'Seite';
     81$lang['Folder'] = 'Verzeichnis';
     82$lang['Folder color'] = 'Verzeichnis Farbe';
     83$lang['Folder picture'] = 'Verzeichnis Bild';
     84$lang['Logo'] = 'Logo';
     85$lang['Page'] = 'Seite';
    8686$lang['pdf'] = 'PDF';
    8787$lang['pdf files'] = 'PDF Dateien';
  • extensions/Media_Icon/language/en_UK/plugin.lang.php

    r19490 r19543  
    1010$lang['Style'] = 'Style';
    1111$lang['Icon style:'] = 'Icon style:';
    12 $lang['logo'] = 'Logo';
    13 $lang['page'] = 'Page';
    14 $lang['folder'] = 'Folder';
    15 $lang['foldercolor'] = 'Folder color';
    16 $lang['folderpicture'] = 'Folder picture';
     12$lang['Logo'] = 'Logo';
     13$lang['Page'] = 'Page';
     14$lang['Folder'] = 'Folder';
     15$lang['Folder color'] = 'Folder color';
     16$lang['Folder picture'] = 'Folder picture';
    1717$lang['Types of files you want to add an icon to:'] = 'Types of files you want to add an icon to:';
    1818$lang['Click on submit to see changes.'] = 'Click on submit to see changes.';
     
    2929$lang['Spreadsheets'] = 'Spreadsheets';
    3030$lang['Presentations'] = 'Presentations';
    31 $lang['Videos added with'] = 'Videos added with';
     31$lang['Videos added with Embedded Videos'] = 'Videos added with Embedded Videos';
    3232$lang['Files supported: webm, webmv, ogv, m4v, flv, mp4'] = 'Files supported: mp3, ogg, oga, m4a, webma, fla, wav';
    3333$lang['Files supported: mp3, ogg, oga, m4a, webma, fla, wav'] = 'Files supported: mp3, ogg, oga, m4a, webma, fla, wav';
  • extensions/Media_Icon/language/es_ES/plugin.lang.php

    r19490 r19543  
    1010$lang['Style'] = 'Estilo';
    1111$lang['Icon style:'] = 'Estilo de los iconos :';
    12 $lang['logo'] = 'Logo';
    13 $lang['page'] = 'Pajina';
    14 $lang['folder'] = 'Carpeta';
    15 $lang['foldercolor'] = 'Carpeta en color';
    16 $lang['folderpicture'] = 'Carpeta imagen';
     12$lang['Logo'] = 'Logo';
     13$lang['Page'] = 'Pajina';
     14$lang['Folder'] = 'Carpeta';
     15$lang['Folder color'] = 'Carpeta en color';
     16$lang['Folder picture'] = 'Carpeta imagen';
    1717$lang['Types of files you want to add an icon to:'] = 'Tipos de archivos a los que desea añadir un icono :';
    1818$lang['Click on submit to see changes.'] = 'Haga clic en enviar para ver los cambios.';
     
    2929$lang['Spreadsheets'] = 'Hojas de cálculo';
    3030$lang['Presentations'] = 'Presentaciones';
    31 $lang['Videos added with'] = 'Vídeos añadido con';
     31$lang['Videos added with Embedded Videos'] = 'Vídeos añadido con Embedded Videos';
    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

    r19490 r19543  
    1010$lang['Style'] = 'Style';
    1111$lang['Icon style:'] = 'Style d\'icône :';
    12 $lang['logo'] = 'Logo';
    13 $lang['page'] = 'Page';
    14 $lang['folder'] = 'Dossier';
    15 $lang['foldercolor'] = 'Dossier en couleurs';
    16 $lang['folderpicture'] = 'Dossier image';
     12$lang['Logo'] = 'Logo';
     13$lang['Page'] = 'Page';
     14$lang['Folder'] = 'Dossier';
     15$lang['Folder color'] = 'Dossier en couleurs';
     16$lang['Folder picture'] = 'Dossier image';
    1717$lang['Types of files you want to add an icon to:'] = 'Types de fichiers pour lesquels vous voulez ajouter une icône :';
    1818$lang['Click on submit to see changes.'] = 'Cliquez sur valider pour voir les changements apparaître.';
     
    2929$lang['Spreadsheets'] = 'Tableurs';
    3030$lang['Presentations'] = 'Présentations';
    31 $lang['Videos added with'] = 'Vidéos ajoutées avec';
     31$lang['Videos added with Embedded Videos'] = 'Vidéos ajoutées avec Embedded Videos';
    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/language/lv_LV/plugin.lang.php

    r19533 r19543  
    5656$lang['Top right corner'] = 'Augšējais labais stūris';
    5757$lang['Top left corner'] = 'Augšējais kreisais stūris';
    58 $lang['folder'] = 'Mape';
    59 $lang['foldercolor'] = 'Mapes krāsa';
     58$lang['Folder'] = 'Mape';
     59$lang['Folder color'] = 'Mapes krāsa';
    6060$lang['Youtube videos'] = 'Youtube video';
    6161$lang['Youtube'] = 'Youtube';
     
    6666$lang['Vimeo'] = 'Vimeo';
    6767$lang['Vimeo videos'] = 'Vimeo video';
    68 $lang['Videos added with'] = 'Video pievienoti ar';
     68$lang['Videos added with Embedded Videos'] = 'Video pievienoti ar Embedded Videos';
    6969$lang['Videos'] = 'Video';
    7070$lang['Video'] = 'Video';
    71 $lang['folderpicture'] = 'Mapes attēls';
     71$lang['Folder picture'] = 'Mapes attēls';
    7272$lang['ppt, pptx and odp files'] = 'Atbalstītie failu tipi: ppt, pptx, odp';
    7373$lang['pdf files'] = 'pdf faili';
    7474$lang['pdf'] = 'pdf';
    75 $lang['page'] = 'Lapa';
    76 $lang['logo'] = 'Logo';
     75$lang['Page'] = 'Lapa';
     76$lang['Logo'] = 'Logo';
    7777$lang['Piwigo is a free software (opensource software), you can use it for free and this is not going to change. Donations are collected by the Piwigo Foundation (non profit organization) to cover project fees.'] = 'Piwigo ir bezmaksas programmatūra (atvērtā koda programmatūra), jūs varat to izmantot bez maksas, un tā tas būs arī turpmāk. Lai segtu projekta izmaksas, ar Piwigo fonda (bezpeļņas organizācija) palīdzību tiek vākti ziedojumi.  ';
    7878$lang['The type of files you want to add an icon to. Uncheck a type of file to deactivate the display of the icon for this type of file. <i>Not displayed</i> is then displayed in the result pane.'] = 'Failu tipi, kuriem vēlaties pievienot ikonu. Noņemiet atzīmi failu tipam, lai nerādītu ikonu šim failu tipam. <i>Nerādīt</i> tādā gadījumā parādās rezultātu panelī.';
  • extensions/Media_Icon/main.inc.php

    r19427 r19543  
    1414define('MEDIA_ICON_PATH' , PHPWG_PLUGINS_PATH.MEDIA_ICON_DIR.'/');
    1515define('MEDIA_ICON_ABSOLUTE_PATH' , dirname(__FILE__).'/');
    16 define('MEDIA_ICON_ADMIN',   get_root_url() . 'admin.php?page=plugin-media_icon');
     16define('MEDIA_ICON_ADMIN',   get_root_url() . 'admin.php?page=plugin-Media_Icon');
    1717
    1818/* +-----------------------------------------------------------------------+
Note: See TracChangeset for help on using the changeset viewer.