|
@ -4,22 +4,34 @@ |
|
|
if (!defined('DOKU_INC')) die(); |
|
|
if (!defined('DOKU_INC')) die(); |
|
|
if (!defined('DOKU_LF')) define('DOKU_LF',"\n"); |
|
|
if (!defined('DOKU_LF')) define('DOKU_LF',"\n"); |
|
|
|
|
|
|
|
|
|
|
|
/* @todo: fix label of buttons */ |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Create link/button to discussion page and back |
|
|
* Create link/button to discussion page and back |
|
|
*/ |
|
|
*/ |
|
|
function _tpl_discussion($discussNS='discussion:',$link=0) { |
|
|
function _tpl_discussion($discussNS='discussion:',$link=0) { |
|
|
global $ID; |
|
|
global $ID; |
|
|
global $lang; |
|
|
|
|
|
if(substr($ID,0,strlen($discussNS))==$discussNS) { |
|
|
if(substr($ID,0,strlen($discussNS))==$discussNS) { |
|
|
$backID = substr(strstr($ID,':'),1); |
|
|
$backID = substr(strstr($ID,':'),1); |
|
|
if ($link) |
|
|
if ($link) |
|
|
tpl_pagelink(':'.$backID,$lang['btn_back']); |
|
|
|
|
|
|
|
|
tpl_link(wl($backID),tpl_getLang('btn_back2article')); |
|
|
else |
|
|
else |
|
|
echo html_btn('back',$backID,'',array()); |
|
|
|
|
|
|
|
|
echo html_btn('back2article',$backID,'',array()); |
|
|
} else { |
|
|
} else { |
|
|
if ($link) |
|
|
if ($link) |
|
|
tpl_pagelink($discussNS.$ID,tpl_getLang('btn_discussion')); |
|
|
|
|
|
|
|
|
tpl_link(wl($discussNS.$ID),tpl_getLang('btn_discussion')); |
|
|
else |
|
|
else |
|
|
echo html_btn('discussion',$discussNS.$ID,'',array()); |
|
|
echo html_btn('discussion',$discussNS.$ID,'',array()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Create link/button to user page |
|
|
|
|
|
*/ |
|
|
|
|
|
function _tpl_userpage($userNS='user:',$link=0) { |
|
|
|
|
|
global $conf; |
|
|
|
|
|
if ($link) |
|
|
|
|
|
tpl_link(wl($userNS.$_SERVER['REMOTE_USER'].':'.$conf['start']),tpl_getLang('btn_userpage')); |
|
|
|
|
|
else |
|
|
|
|
|
echo html_btn('userpage',$userNS.$_SERVER['REMOTE_USER'].':'.$conf['start'],'',array()); |
|
|
|
|
|
} |