made template functions more flexible

* attention: incompatible to previous version!
* introduced _tpl_action() (wrapper similar to tpl_action())
* improved discussion and user page functions
  * made them work independent from config
  * added full control to how the page links are built (with placeholders @ID@ and @USER@)
* config option changes: removed 'discussNSreverse', renamed 'discussionNS' and 'userNS' to 'discussionPage' and 'userPage'
This commit is contained in:
Anika Henke 2010-12-05 13:01:15 +00:00
parent c21fe1fab8
commit afe47fae3b
5 changed files with 42 additions and 34 deletions

View file

@ -66,9 +66,7 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER
echo '</li>';
}
tpl_action('admin', 1, 'li');
if (tpl_getConf('userNS')) {
_tpl_userpage(tpl_getConf('userNS'),1,'li');
}
_tpl_action('userpage', 1, 'li');
tpl_action('profile', 1, 'li');
tpl_action('login', 1, 'li');
?>
@ -138,9 +136,7 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER
<ul>
<?php
tpl_action('edit', 1, 'li');
if (tpl_getConf('discussionNS')) {
_tpl_discussion(tpl_getConf('discussionNS'),1,'li',tpl_getConf('discussNSreverse'));
}
_tpl_action('discussion', 1, 'li');
tpl_action('history', 1, 'li');
tpl_action('backlink', 1, 'li');
tpl_action('subscribe', 1, 'li');