diff options
author | chris <chris@teacherscpd.co.uk> | 2005-08-25 00:47:18 +0200 |
---|---|---|
committer | chris <chris@teacherscpd.co.uk> | 2005-08-25 00:47:18 +0200 |
commit | 11e2ce226d64ac98b82ddc93a81eea66160bcc21 (patch) | |
tree | f19de21e96f8952161903dd34e01821b2e0ccb45 /inc/html.php | |
parent | f00151b4e3d17bcf50767f821c0e3834d36e7b4f (diff) | |
download | rpg-11e2ce226d64ac98b82ddc93a81eea66160bcc21.tar.gz rpg-11e2ce226d64ac98b82ddc93a81eea66160bcc21.tar.bz2 |
admin plugin i/face + acl plugin
darcs-hash:20050824224718-50fdc-6d27ff70e60e6fe547aff6c2b305507c4ab3f669.gz
Diffstat (limited to 'inc/html.php')
-rw-r--r-- | inc/html.php | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/inc/html.php b/inc/html.php index 478770d3b..8ec445248 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1065,11 +1065,6 @@ function html_debug(){ print '</body></html>'; } -/** - * Print the admin overview page - * - * @author Andreas Gohr <andi@splitbrain.org> - */ function html_admin(){ global $ID; global $lang; @@ -1077,15 +1072,45 @@ function html_admin(){ print p_locale_xhtml('admin'); - ptln('<ul class="admin">'); + // build menu of admin functions from the plugins that handle them + $pluginlist = plugin_list('admin'); + $menu = array(); + foreach ($pluginlist as $p) { + if($obj =& plugin_load('admin',$p) === NULL) continue; + $menu[] = array('plugin' => $p, + 'prompt' => $obj->getMenuText($conf['lang']), + 'sort' => $obj->getMenuSort() + ); + } + + usort($menu, p_sort_modes); + + // output the menu + ptln('<ul>'); + + foreach ($menu as $item) { + if (!$item['prompt']) continue; + ptln(' <li><a href="'.wl($ID, 'do=admin&page='.$item['plugin']).'">'.$item['prompt'].'</a></li>'); + } + + // add in non-plugin functions + if (!$conf['openregister']){ + ptln('<li><a href="'.wl($ID,'do=register').'">'.$lang['admin_register'].'</a></li>'); + } + + ptln('</ul>'); + +/* + ptln('<ul>'); ptln('<ul class="admin">'); // currently ACL only - more to come ptln('<li><a href="'.wl($ID,'do=admin&page=acl').'">'.$lang['admin_acl'].'</a></li>'); if (!$conf['openregister']){ ptln('<li><a href="'.wl($ID,'do=register').'">'.$lang['admin_register'].'</a></li>'); } - + ptln('</ul>'); +*/ } |