Dotclear

source: plugins/widgets/_install.php @ 665:315ff9eb4199

Revision 665:315ff9eb4199, 1.4 KB checked in by Franck <carnet.franck.paul@…>, 14 years ago (diff)

Ajout d'un bandeau de widgets supplémentaire (custom)

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 -----------------------------------------
12if (!defined('DC_CONTEXT_ADMIN')) { return; }
13
14$version = $core->plugins->moduleInfo('widgets','version');
15if (version_compare($core->getVersion('widgets'),$version,'>=')) {
16     return;
17}
18
19require dirname(__FILE__).'/_default_widgets.php';
20
21$settings =& $core->blog->settings;
22$settings->addNamespace('widgets');
23if ($settings->widgets->widgets_nav != null) {
24     $settings->widgets->put('widgets_nav',dcWidgets::load($settings->widgets->widgets_nav)->store());
25} else {
26     $settings->widgets->put('widgets_nav','','string','Navigation widgets',false);
27}
28if ($settings->widgets->widgets_extra != null) {
29     $settings->widgets->put('widgets_extra',dcWidgets::load($settings->widgets->widgets_extra)->store());
30} else {
31     $settings->widgets->put('widgets_extra','','string','Extra widgets',false);
32}
33if ($settings->widgets->widgets_custom != null) {
34     $settings->widgets->put('widgets_custom',dcWidgets::load($settings->widgets->widgets_custom)->store());
35} else {
36     $settings->widgets->put('widgets_custom','','string','Custom widgets',false);
37}
38$core->setVersion('widgets',$version);
39return true;
40?>
Note: See TracBrowser for help on using the repository browser.

Sites map