adjusted _tpl_register() to reflect changes in the core
This commit is contained in:
parent
5f12b39ac2
commit
4a4cf7c5a6
2 changed files with 6 additions and 3 deletions
2
main.php
2
main.php
|
|
@ -68,7 +68,7 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER
|
||||||
tpl_action('admin', 1, 'li');
|
tpl_action('admin', 1, 'li');
|
||||||
_tpl_action('userpage', 1, 'li');
|
_tpl_action('userpage', 1, 'li');
|
||||||
tpl_action('profile', 1, 'li');
|
tpl_action('profile', 1, 'li');
|
||||||
_tpl_action('register', 1, 'li');
|
_tpl_action('register', 1, 'li'); /* DW versions > 2011-02-20 can use the core function tpl_action('register', 1, 'li') */
|
||||||
tpl_action('login', 1, 'li');
|
tpl_action('login', 1, 'li');
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ function _tpl_userpage($userPage,$title,$link=0,$wrapper=0) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create link/button to register page
|
* Create link/button to register page
|
||||||
|
* DW versions > 2011-02-20 can use the core function tpl_action('register')
|
||||||
*
|
*
|
||||||
* @author Anika Henke <anika@selfthinker.org>
|
* @author Anika Henke <anika@selfthinker.org>
|
||||||
*/
|
*/
|
||||||
|
|
@ -71,15 +72,16 @@ function _tpl_register($link=0,$wrapper=0) {
|
||||||
global $conf;
|
global $conf;
|
||||||
global $lang;
|
global $lang;
|
||||||
global $ID;
|
global $ID;
|
||||||
|
$lang_register = !empty($lang['btn_register']) ? $lang['btn_register'] : $lang['register'];
|
||||||
|
|
||||||
if ($_SERVER['REMOTE_USER'] || !$conf['useacl'] || !actionOK('register')) return;
|
if ($_SERVER['REMOTE_USER'] || !$conf['useacl'] || !actionOK('register')) return;
|
||||||
|
|
||||||
if ($wrapper) echo "<$wrapper>";
|
if ($wrapper) echo "<$wrapper>";
|
||||||
|
|
||||||
if ($link)
|
if ($link)
|
||||||
tpl_link(wl($ID,'do=register'),$lang['register'],'class="action register" rel="nofollow"');
|
tpl_link(wl($ID,'do=register'),$lang_register,'class="action register" rel="nofollow"');
|
||||||
else
|
else
|
||||||
echo html_btn('register',$ID,'',array('do'=>'register'),'get',0,$lang['register']);
|
echo html_btn('register',$ID,'',array('do'=>'register'),'get',0,$lang_register);
|
||||||
|
|
||||||
if ($wrapper) echo "</$wrapper>";
|
if ($wrapper) echo "</$wrapper>";
|
||||||
}
|
}
|
||||||
|
|
@ -110,6 +112,7 @@ function _tpl_action($type,$link=0,$wrapper=0) {
|
||||||
/**
|
/**
|
||||||
* Use favicon.ico from data/media root directory if it exists, otherwise use
|
* Use favicon.ico from data/media root directory if it exists, otherwise use
|
||||||
* the one in the template's image directory.
|
* the one in the template's image directory.
|
||||||
|
* DW versions > 2010-11-12 can use the core function tpl_getFavicon()
|
||||||
*
|
*
|
||||||
* @author Anika Henke <anika@selfthinker.org>
|
* @author Anika Henke <anika@selfthinker.org>
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue