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)

Location:
plugins/tags
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/tags/_define.php

    r2924 r3333  
    2020          'permissions' =>    'usage,contentadmin', 
    2121          'priority' =>       1001,     // Must be higher than dcLegacyEditor/dcCKEditor priority (ie 1000) 
    22           'type'         =>        'plugin' 
     22          'type'         =>        'plugin', 
     23          'settings'     =>        array( 
     24                                        'pref' => '#user-options.tags_prefs' 
     25                                   ) 
    2326     ) 
    2427); 
  • plugins/tags/inc/tags.behaviors.php

    r3024 r3333  
    363363 
    364364          echo 
     365          '<div class="fieldset"><h5 id="tags_prefs">'.__('Tags').'</h5>'. 
    365366          '<p><label for="user_tag_list_format" class="classic">'.__('Tags list format:').'</label> '. 
    366367          form::combo('user_tag_list_format',$combo,$value). 
    367           '</p>'; 
     368          '</p></div>'; 
    368369     } 
    369370 
Note: See TracChangeset for help on using the changeset viewer.

Sites map