Dotclear


Ignore:
Timestamp:
09/01/16 12:21:43 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/preferences.php

    r3330 r3333  
    490490echo 
    491491'<div class="fieldset">'. 
    492 '<h4>'.__('Interface').'</h4>'. 
     492'<h4 id="user_options_interface">'.__('Interface').'</h4>'. 
    493493 
    494494'<p><label for="user_ui_enhanceduploader" class="classic">'. 
     
    524524echo 
    525525'<div class="fieldset">'. 
    526 '<h4>'.__('Optional columns displayed in lists').'</h4>'; 
     526'<h4 id="user_options_columns">'.__('Optional columns displayed in lists').'</h4>'; 
    527527$odd = true; 
    528528foreach ($cols as $col_type => $col_list) { 
     
    541541echo 
    542542'<div class="fieldset">'. 
    543 '<h4>'.__('Edition').'</h4>'; 
     543'<h4 id="user_options_edition">'.__('Edition').'</h4>'; 
    544544 
    545545echo '<div class="two-boxes odd">'; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map