Changeset 3043 for plugins/adminExample/_admin.php
- Timestamp:
- 05/18/11 22:46:23 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/adminExample/_admin.php
r1719 r3043 8 8 # http://sam.zoy.org/wtfpl/COPYING for more details. 9 9 # 10 # Icon (icon.png) is from Silk Icons : 11 # http://www.famfamfam.com/lab/icons/silk/ 10 # Icons by http://dryicons.com 12 11 # 13 12 # ***** END LICENSE BLOCK ***** … … 32 31 # permissions nécessaires pour afficher le lien 33 32 $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 40 class 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 34 79 ?>
Note: See TracChangeset
for help on using the changeset viewer.