| Revision 538:aedf484a0a44,
            1.0 KB
            checked in by Franck <carnet.franck.paul@…>, 14 years ago
            (diff) | 
        
        
          | 
               
Gestion complète (hormis drag'n'drop pour la gestion de l'ordre des items de menu) 
 
           | 
        
      
      
        
  | Line |   | 
|---|
| 1 | <?php | 
|---|
| 2 | # -- BEGIN LICENSE BLOCK --------------------------------------- | 
|---|
| 3 | # | 
|---|
| 4 | # This file is part of widgets, a plugin for Dotclear 2. | 
|---|
| 5 | # | 
|---|
| 6 | # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear | 
|---|
| 7 | # Licensed under the GPL version 2.0 license. | 
|---|
| 8 | # See LICENSE file or | 
|---|
| 9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | 
|---|
| 10 | # | 
|---|
| 11 | # -- END LICENSE BLOCK ----------------------------------------- | 
|---|
| 12 | if (!defined('DC_CONTEXT_ADMIN')) { return; } | 
|---|
| 13 |  | 
|---|
| 14 | $version = $core->plugins->moduleInfo('simpleMenu','version'); | 
|---|
| 15 | if (version_compare($core->getVersion('simpleMenu'),$version,'>=')) { | 
|---|
| 16 |      return; | 
|---|
| 17 | } | 
|---|
| 18 |  | 
|---|
| 19 | # Menu par défaut | 
|---|
| 20 | $blog_url = html::stripHostURL($core->blog->url); | 
|---|
| 21 | $menu_default = array( | 
|---|
| 22 |      array('label' => 'Home', 'descr' => 'Recent posts', 'url' => $blog_url), | 
|---|
| 23 |      array('label' => 'Archives', 'descr' => '', 'url' => $blog_url.$core->url->getBase('archive')) | 
|---|
| 24 | ); | 
|---|
| 25 | $core->blog->settings->system->put('simpleMenu',serialize($menu_default),'string','simpleMenu default menu',false,true); | 
|---|
| 26 |  | 
|---|
| 27 | $core->setVersion('simpleMenu',$version); | 
|---|
| 28 | return true; | 
|---|
| 29 | ?> | 
|---|
       
      Note: See 
TracBrowser
        for help on using the repository browser.