| 1 | <?php |
|---|
| 2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
|---|
| 3 | # |
|---|
| 4 | # This file is part of simpleMenu, a plugin for Dotclear 2. |
|---|
| 5 | # |
|---|
| 6 | # Copyright (c) 2003-2013 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, 'targetBlank' => false), |
|---|
| 23 | array('label' => 'Archives', 'descr' => '', 'url' => $blog_url.$core->url->getURLFor('archive'), 'targetBlank' => false) |
|---|
| 24 | ); |
|---|
| 25 | $core->blog->settings->system->put('simpleMenu',$menu_default,'array','simpleMenu default menu',false,true); |
|---|
| 26 | $core->blog->settings->system->put('simpleMenu_active',true,'boolean','Active',false,true); |
|---|
| 27 | |
|---|
| 28 | $core->setVersion('simpleMenu',$version); |
|---|
| 29 | return true; |
|---|