Dotclear

source: plugins/maintenance/_define.php @ 3333:11107ba2fc59

Revision 3333:11107ba2fc59, 722 bytes checked in by franck <carnet.franck.paul@…>, 9 years ago (diff)

Cope with settings URLs for modules (defined in _define.php).
The settings URLs are displayed on the plugins maganement page, and at the bottom of each plugin main page if any (index.php).

The URLs are set in _define.php, as a new property using this schema:

'settings' => array( <list of URLs> )

With:

<list of URLs> = '<type>' => '<location>', …
<type> = 'self' (own plugin page), 'blog' (in blog parameters page) or 'pref' (in user preferences page)
<location> = (empty) or #<tab>[.<id>] with <tab> = id of the corresponding tab, and <id> = id of fieldset, h4, h5, field, … of first corresponding field

The list of URLs are displayed in the order defined in the array above.

Examples:

Antispam plugin:

'settings' => array(

'self' => ,
'blog' => '#params.antispam_params'

)

self → for main settings of the plugin on its own page (index.php)
blog → for secondary settings in the blog parameters

Tags plugin:

'settings' => array(

'pref' => '#user-options.tags_prefs'

)

pref → for tags list format in user preferences

Maintenance plugin:

'settings' => array(

'self' => '#settings'

)

self → "settings" tab of its own page (index.php)

Line 
1<?php
2# -- BEGIN LICENSE BLOCK ---------------------------------------
3#
4# This file is part of 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 -----------------------------------------
12if (!defined('DC_RC_PATH')) { return; }
13
14$this->registerModule(
15     /* Name */               "Maintenance",
16     /* Description*/         "Maintain your installation",
17     /* Author */             "Olivier Meunier & Association Dotclear",
18     /* Version */            '1.3.1',
19     array(
20          'permissions' =>    'admin',
21          'type'         =>        'plugin',
22          'settings'     =>        array(
23                                        'self' => '#settings'
24                                   )
25     )
26
27);
Note: See TracBrowser for help on using the repository browser.

Sites map