Dotclear

Changeset 3043


Ignore:
Timestamp:
05/18/11 22:46:23 (12 years ago)
Author:
Moe
Message:

Admin Example 0.2:

  • Dotclear 2.3:
    • added behaviours and images for the new dashboard
    • added required field
Location:
plugins/adminExample
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • plugins/adminExample/_admin.php

    r1719 r3043  
    88# http://sam.zoy.org/wtfpl/COPYING for more details. 
    99#  
    10 # Icon (icon.png) is from Silk Icons : 
    11 #  http://www.famfamfam.com/lab/icons/silk/ 
     10# Icons by http://dryicons.com 
    1211#  
    1312# ***** END LICENSE BLOCK ***** 
     
    3231     # permissions nécessaires pour afficher le lien 
    3332     $core->auth->check('usage,contentadmin',$core->blog->id)); 
     33 
     34$core->addBehavior('adminDashboardFavs', 
     35     array('adminExampleBehaviors','adminDashboardFavs')); 
     36 
     37$core->addBehavior('adminDashboardFavsIcon', 
     38     array('adminExampleBehaviors','adminDashboardFavsIcon')); 
     39  
     40class adminExampleBehaviors 
     41{ 
     42    public static function adminDashboardFavs($core,$favs) 
     43    { 
     44        $favs['adminExample'] = new ArrayObject(array( 
     45            'adminExample', 
     46            __('Admin example'), 
     47            'plugin.php?p=adminExample', 
     48            'index.php?pf=adminExample/icon.png', 
     49            'index.php?pf=adminExample/icon-big.png', 
     50            'usage,contentadmin', 
     51            null, 
     52            null)); 
     53    } 
     54 
     55    public static function adminDashboardFavsIcon($core,$name,$icon) 
     56    { 
     57               if ($name == 'adminExample') 
     58               { 
     59                    # this is an example to show how the icon, the URL and the URL 
     60                    #  can be changed with a test 
     61                    # ceci est un un exemple pour montrer comment l'icône, l'URL et 
     62                    #  l'image peuvent être changées avec un test 
     63                    if ($core->blog->settings->adminExample->adminexample_active) 
     64                    { 
     65                         $icon[0] = __('Admin example: active'); 
     66                         $icon[1] = 'plugin.php?p=adminExample&tab=settings'; 
     67                         $icon[2] = 'index.php?pf=adminExample/icon-big.png'; 
     68                    } 
     69                    else 
     70                    { 
     71                         $icon[0] = __('Admin example: inactive'); 
     72                         $icon[1] = 'plugin.php?p=adminExample'; 
     73                         $icon[2] = 'index.php?pf=adminExample/icon-block.png'; 
     74                    } 
     75               } 
     76    } 
     77} 
     78 
    3479?> 
  • plugins/adminExample/_define.php

    r3032 r3043  
    88# http://sam.zoy.org/wtfpl/COPYING for more details. 
    99#  
    10 # Icon (icon.png) is from Silk Icons : 
    11 #  http://www.famfamfam.com/lab/icons/silk/ 
     10# Icons by http://dryicons.com 
    1211#  
    1312# ***** END LICENSE BLOCK ***** 
     
    1918     /* Description */        'Admin Example', 
    2019     /* Author */                  'Dotclear Documentation', 
    21      /* Version */                 '0.1.2', 
     20     /* Version */                 '0.2', 
    2221     /* Permissions */        'usage,contentadmin' 
    2322); 
  • plugins/adminExample/index.php

    r3032 r3043  
    88# http://sam.zoy.org/wtfpl/COPYING for more details. 
    99#  
    10 # Icon (icon.png) is from Silk Icons : 
    11 #  http://www.famfamfam.com/lab/icons/silk/ 
     10# Icons by http://dryicons.com 
    1211#  
    1312# ***** END LICENSE BLOCK ***** 
     
    8281 
    8382          <?php 
    84                /* 
    85                For Dotclear 2.3 
    8683               echo 
    8784               '<p><label class="required" for="required_field_id"><abbr title="'. 
    8885               __('Required field').'">*</abbr> '.__('A required field:').'</label> '. 
    8986               form::field('required_field_id',30,32, 
    90                     html::escapeHTML(__('Hello World!'))).'</p>';*/ 
     87                    html::escapeHTML(__('Hello World'))).'</p>'; 
    9188          ?> 
    9289     </fieldset> 
  • plugins/adminExample/locales/fr/admin.lang.php

    r1719 r3043  
    11<?php 
    2 // Language: français  
    3 // Module: adminExample - 0.1 
    4 // Date: 2009-10-25 11:24:03  
    5 // Translated with dcTranslater - 1.2  
     2// Language: Français  
     3// Module: adminExample - 0.1.2 
     4// Date: 2011-05-18 20:42:27  
     5// Translated with dcTranslater - 1.5  
    66 
    7 #index.php:41 
     7#_admin.php:65 
     8$GLOBALS['__l10n']['Admin example: active'] = 'Example d\'administration&nbsp;: actif'; 
     9 
     10#_admin.php:71 
     11$GLOBALS['__l10n']['Admin example: inactive'] = 'Example d\'administration&nbsp;: inactif'; 
     12 
     13#index.php:38 
    814$GLOBALS['__l10n']['Configuration successfully updated.'] = 'Configuration mise à jour avec succès.'; 
    915 
    10 #index.php:57 
     16#index.php:53 
    1117$GLOBALS['__l10n']['Tab 1'] = 'Onglet 1'; 
    1218 
    13 #index.php:62 
     19#index.php:58 
    1420$GLOBALS['__l10n']['Numbers'] = 'Numéros'; 
    1521 
    16 #index.php:92 
     22#index.php:59 
     23#index.php:97 
    1724$GLOBALS['__l10n']['one'] = 'un'; 
    1825 
    19 #index.php:95 
     26#index.php:60 
     27#index.php:100 
    2028$GLOBALS['__l10n']['two'] = 'deux'; 
    2129 
    22 #index.php:111 
     30#index.php:64 
     31#index.php:69 
     32#index.php:79 
     33#index.php:92 
     34#index.php:116 
    2335$GLOBALS['__l10n']['Hello World!'] = 'Bonjour le monde&nbsp;!'; 
    2436 
    25 #index.php:109 
     37#index.php:73 
     38#index.php:114 
    2639$GLOBALS['__l10n']['Enable'] = 'Activer'; 
    2740 
    28 #index.php:89 
     41#index.php:75 
     42#index.php:94 
    2943$GLOBALS['__l10n']['Title:'] = 'Titre&nbsp;:'; 
    3044 
    31 #index.php:104 
     45#index.php:85 
     46$GLOBALS['__l10n']['Required field'] = 'Champ obligatoire'; 
     47 
     48#index.php:85 
     49$GLOBALS['__l10n']['A required field:'] = 'Un champ obligatoire&nbsp;:'; 
     50 
     51#index.php:87 
     52$GLOBALS['__l10n']['Hello World'] = 'Bonjour le monde'; 
     53 
     54#index.php:109 
    3255$GLOBALS['__l10n']['Settings'] = 'Paramètres'; 
    3356 
    34 #index.php:115 
     57#index.php:120 
    3558$GLOBALS['__l10n']['Save configuration'] = 'Enregistrer la configuration'; 
    3659 
    37 #index.php:120 
     60#index.php:125 
    3861$GLOBALS['__l10n']['Columns'] = 'Colonnes'; 
    3962 
    40 #index.php:131 
     63#index.php:126 
     64#index.php:136 
    4165$GLOBALS['__l10n']['%s columns'] = '%s colonnes'; 
    4266 
  • plugins/adminExample/locales/fr/admin.po

    r1719 r3043  
    1 # Language: français 
    2 # Module: adminExample - 0.1 
    3 # Date: 2009-10-25 11:24:03 
    4 # Translated with dcTranslater - 1.2 
     1# Language: Français 
     2# Module: adminExample - 0.1.2 
     3# Date: 2011-05-18 20:42:27 
     4# Translated with translater 1.5 
    55 
    66msgid "" 
    7 msgstr "Content-Type: text/plain; charset=UTF-8\n" 
     7msgstr "" 
     8"Content-Type: text/plain; charset=UTF-8\n" 
     9"Project-Id-Version: adminExample 0.1.2\n" 
     10"POT-Creation-Date: \n" 
     11"PO-Revision-Date: 2011-05-18T20:42:27+00:00\n" 
     12"MIME-Version: 1.0\n" 
     13"Content-Transfer-Encoding: 8bit\n" 
    814 
    9 #: index.php:41 
     15#: _admin.php:65 
     16msgid "Admin example: active" 
     17msgstr "Example d'administration&nbsp;: actif" 
     18 
     19#: _admin.php:71 
     20msgid "Admin example: inactive" 
     21msgstr "Example d'administration&nbsp;: inactif" 
     22 
     23#: index.php:38 
    1024msgid "Configuration successfully updated." 
    1125msgstr "Configuration mise à jour avec succès." 
    1226 
    13 #: index.php:57 
     27#: index.php:53 
    1428msgid "Tab 1" 
    1529msgstr "Onglet 1" 
    1630 
    17 #: index.php:62 
     31#: index.php:58 
    1832msgid "Numbers" 
    1933msgstr "Numéros" 
    2034 
    21 #: index.php:92 
     35#: index.php:59 
     36#: index.php:97 
    2237msgid "one" 
    2338msgstr "un" 
    2439 
    25 #: index.php:95 
     40#: index.php:60 
     41#: index.php:100 
    2642msgid "two" 
    2743msgstr "deux" 
    2844 
    29 #: index.php:111 
     45#: index.php:64 
     46#: index.php:69 
     47#: index.php:79 
     48#: index.php:92 
     49#: index.php:116 
    3050msgid "Hello World!" 
    3151msgstr "Bonjour le monde&nbsp;!" 
    3252 
    33 #: index.php:109 
     53#: index.php:73 
     54#: index.php:114 
    3455msgid "Enable" 
    3556msgstr "Activer" 
    3657 
    37 #: index.php:89 
     58#: index.php:75 
     59#: index.php:94 
    3860msgid "Title:" 
    3961msgstr "Titre&nbsp;:" 
    4062 
    41 #: index.php:104 
     63#: index.php:85 
     64msgid "Required field" 
     65msgstr "Champ obligatoire" 
     66 
     67#: index.php:85 
     68msgid "A required field:" 
     69msgstr "Un champ obligatoire&nbsp;:" 
     70 
     71#: index.php:87 
     72msgid "Hello World" 
     73msgstr "Bonjour le monde" 
     74 
     75#: index.php:109 
    4276msgid "Settings" 
    4377msgstr "Paramètres" 
    4478 
    45 #: index.php:115 
     79#: index.php:120 
    4680msgid "Save configuration" 
    4781msgstr "Enregistrer la configuration" 
    4882 
    49 #: index.php:120 
     83#: index.php:125 
    5084msgid "Columns" 
    5185msgstr "Colonnes" 
    5286 
    53 #: index.php:131 
     87#: index.php:126 
     88#: index.php:136 
    5489msgid "%s columns" 
    5590msgstr "%s colonnes" 
  • plugins/adminExample/locales/fr/main.lang.php

    r1719 r3043  
    11<?php 
    2 // Language: français  
    3 // Module: adminExample - 0.1 
    4 // Date: 2009-10-25 11:24:03  
    5 // Translated with dcTranslater - 1.2  
     2// Language: Français  
     3// Module: adminExample - 0.1.2 
     4// Date: 2011-05-18 20:42:27  
     5// Translated with dcTranslater - 1.5  
    66 
    7 #index.php:52 
     7#_admin.php:19 
     8#_admin.php:46 
     9#index.php:43 
     10#index.php:49 
    811$GLOBALS['__l10n']['Admin example'] = 'Example d\'administration'; 
    912 
  • plugins/adminExample/locales/fr/main.po

    r1719 r3043  
    1 # Language: français 
    2 # Module: adminExample - 0.1 
    3 # Date: 2009-10-25 11:24:03 
    4 # Translated with dcTranslater - 1.2 
     1# Language: Français 
     2# Module: adminExample - 0.1.2 
     3# Date: 2011-05-18 20:42:27 
     4# Translated with translater 1.5 
    55 
    66msgid "" 
    7 msgstr "Content-Type: text/plain; charset=UTF-8\n" 
     7msgstr "" 
     8"Content-Type: text/plain; charset=UTF-8\n" 
     9"Project-Id-Version: adminExample 0.1.2\n" 
     10"POT-Creation-Date: \n" 
     11"PO-Revision-Date: 2011-05-18T20:42:27+00:00\n" 
     12"MIME-Version: 1.0\n" 
     13"Content-Transfer-Encoding: 8bit\n" 
    814 
    9 #: index.php:52 
     15#: _admin.php:19 
     16#: _admin.php:46 
     17#: index.php:43 
     18#: index.php:49 
    1019msgid "Admin example" 
    1120msgstr "Example d'administration" 
Note: See TracChangeset for help on using the changeset viewer.

Sites map