Dotclear

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

Revision 3333:11107ba2fc59, 811 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)

  • Property exe set to *
Line 
1<?php
2# -- BEGIN LICENSE BLOCK ----------------------------------
3# This file is part of breadcrumb, a plugin for Dotclear 2.
4#
5# Copyright (c) Franck Paul and contributors
6# carnet.franck.paul@gmail.com
7#
8# Licensed under the GPL version 2.0 license.
9# A copy of this license is available in LICENSE file or at
10# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11# -- END LICENSE BLOCK ------------------------------------
12
13if (!defined('DC_RC_PATH')) { return; }
14
15$this->registerModule(
16     /* Name */               "Breadcrumb",
17     /* Description*/         "Breadcrumb for Dotclear",
18     /* Author */             "Franck Paul",
19     /* Version */            '0.7',
20     array(
21          /* Permissions */   'permissions' =>    'usage,contentadmin',
22          /* Type */               'type' =>           'plugin',
23          'settings'     =>        array(
24                                        'blog' => '#params.breadcrumb_params'
25                                   )
26     )
27);
Note: See TracBrowser for help on using the repository browser.

Sites map