Dotclear

Changeset 398


Ignore:
Timestamp:
04/06/08 18:15:52 (16 years ago)
Author:
sacha
Message:

My Favicon : IE6 compatibility

Location:
plugins/myfavicon
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • plugins/myfavicon/CHANGELOG

    r397 r398  
     106.04.2008 Oleksandr Syenchuk - Version 0.5.1 
     2  
     3 - Option "Compatibilité Internet Explorer 6" 
     4 - Oubli d'une traduction : corrigé 
     5  
    1606.04.2008 Oleksandr Syenchuk - Version 0.4 
    27  
    3  Traduction en français 
     8 - Traduction en français 
    49  
    51005.04.2008 Oleksandr Syenchuk - Version 0.3 
    611  
    7  Un formulaire de configuration dans les préférences du blog est disponible 
     12 - Un formulaire de configuration dans les préférences du blog est disponible 
    813  
    91405.04.2008 Oleksandr Syenchuk - Version 0.2 
    1015  
    11  La détection du type d'icône se fait automatiquement 
     16 - La détection du type d'icône se fait automatiquement 
    1217  
    131805.04.2008 Oleksandr Syenchuk - Version 0.1 
    1419  
    15  Première version paramètrable dans about:config 
     20 - Première version paramètrable dans about:config 
  • plugins/myfavicon/_admin.php

    r395 r398  
    3434           
    3535          $favicon_url = $settings->favicon_url; 
     36          $favicon_ie6 = $settings->favicon_ie6; 
    3637           
    3738          echo 
     
    4041               form::checkbox('favicon_enable','1',!empty($favicon_url)). 
    4142               __('Enable favicon').'</label></p>'. 
    42           '<p id="favicon_config"><label>'.__('Favicon URL:').' '. 
     43          '<div id="favicon_config">'. 
     44          '<p><label class="classic">'. 
     45               form::checkbox('favicon_ie6','1',$favicon_ie6). 
     46               __('Enable Internet Explorer 6 compatibility').'</label></p>'. 
     47          '<p><label>'.__('Favicon URL:').' '. 
    4348               form::field('favicon_url',40,255,html::escapeHTML($favicon_url)).'</label></p>'. 
    44           '</fieldset>'; 
     49          '<p id="favicon_warn" class="form-note warn">' 
     50               .__('Please note, IE6 compatibility works only with ".ico" format.').'</p>'. 
     51          '</div></fieldset>'; 
    4552     } 
    4653      
    4754     public static function adminBeforeBlogSettingsUpdate(&$settings) 
    4855     { 
     56          $favicon_url = empty($_POST['favicon_enable']) ? '' : $_POST['favicon_url']; 
     57          $favicon_ie6 = !empty($_POST['favicon_ie6']); 
     58           
    4959          $settings->setNameSpace('myfavicon'); 
    50           $settings->put('favicon_url',$_POST['favicon_url']); 
     60          $settings->put('favicon_url',$favicon_url); 
     61          $settings->put('favicon_ie6',$favicon_ie6); 
    5162          $settings->setNameSpace('system'); 
    5263     } 
  • plugins/myfavicon/_define.php

    r397 r398  
    1919     /* Description*/    "Add a customized favicon to your blog", 
    2020     /* Author */        "Oleksandr Syenchuk", 
    21      /* Version */       '0.4', 
     21     /* Version */       '0.5.1', 
    2222     /* Permissions */   'contentadmin' 
    2323); 
  • plugins/myfavicon/_install.php

    r389 r398  
    3030# New install / update 
    3131$sets->put('favicon_url','','string','Favicon URL',false); 
     32$sets->put('favicon_ie6',false,'boolean','Internet Explorer 6 compatibility',false); 
    3233 
    3334# --SETTING NEW VERSION-- 
  • plugins/myfavicon/_public.php

    r389 r398  
    5454     { 
    5555          $favicon_url = $settings->favicon_url; 
     56          $favicon_ie6 = $settings->favicon_ie6; 
    5657           
    5758          if (empty($favicon_url)) { 
     
    7172          } 
    7273           
    73           return '<link rel="icon" type="'.$mimetype. 
     74          $rel = ($favicon_ie6 ? 'shortcut ' : '').'icon'; 
     75          return '<link rel="'.$rel.'" type="'.$mimetype. 
    7476               '" href="'.html::escapeHTML($favicon_url).'" />'; 
    7577     } 
  • plugins/myfavicon/blog_pref.js

    r395 r398  
    22     var favicon_url = ''; 
    33      
     4     // favicon_enable checkbox 
    45     $("#favicon_enable").change(function() 
    56     { 
     
    1819          $("#favicon_config").hide(); 
    1920     } 
     21      
     22     // favicon_ie6 checkbox 
     23     $("#favicon_ie6").change(function() 
     24     { 
     25          if (this.checked) { 
     26               $("#favicon_warn").show(); 
     27          } 
     28          else { 
     29               $("#favicon_warn").hide(); 
     30          } 
     31     }); 
     32      
     33     if (!document.getElementById('favicon_ie6').checked) { 
     34          $("#favicon_warn").hide(); 
     35     } 
    2036}); 
    2137 
  • plugins/myfavicon/locales/fr/main.po

    r397 r398  
    66msgstr "Content-Type: text/plain; charset=UTF-8" 
    77 
     8msgid "Enable favicon" 
     9msgstr "Activer le favicon" 
     10 
     11msgid "Enable Internet Explorer 6 compatibility" 
     12msgstr "Activer la compatibilité avec Internet Explorer 6" 
     13 
    814msgid "Favicon URL:" 
    915msgstr "URL du favicon :" 
     16 
     17msgid "Please note, IE6 compatibility works only with \".ico\" format." 
     18msgstr "Veuillez noter que la compatibilité IE6 fonctionne uniquement avec le format \".ico\"." 
Note: See TracChangeset for help on using the changeset viewer.

Sites map