summaryrefslogtreecommitdiff
path: root/tpl_functions.php
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2010-11-05 10:34:56 +0000
committerAnika Henke <anika@selfthinker.org>2010-11-05 10:34:56 +0000
commit5b4c3e60499b9ce847a755833ee8041800e0fcdb (patch)
tree91032dbb1e14b7ab6d9d0c7cc07e48a471a0cb17 /tpl_functions.php
parentf4d27201048c83c893d9476dd80a89bbce29a1c6 (diff)
downloadrpg-5b4c3e60499b9ce847a755833ee8041800e0fcdb.tar.gz
rpg-5b4c3e60499b9ce847a755833ee8041800e0fcdb.tar.bz2
added user page link
Diffstat (limited to 'tpl_functions.php')
-rw-r--r--tpl_functions.php20
1 files changed, 16 insertions, 4 deletions
diff --git a/tpl_functions.php b/tpl_functions.php
index 58f9ab4f9..6dc9e4bc2 100644
--- a/tpl_functions.php
+++ b/tpl_functions.php
@@ -4,22 +4,34 @@
if (!defined('DOKU_INC')) die();
if (!defined('DOKU_LF')) define('DOKU_LF',"\n");
+/* @todo: fix label of buttons */
+
/**
* Create link/button to discussion page and back
*/
function _tpl_discussion($discussNS='discussion:',$link=0) {
global $ID;
- global $lang;
if(substr($ID,0,strlen($discussNS))==$discussNS) {
$backID = substr(strstr($ID,':'),1);
if ($link)
- tpl_pagelink(':'.$backID,$lang['btn_back']);
+ tpl_link(wl($backID),tpl_getLang('btn_back2article'));
else
- echo html_btn('back',$backID,'',array());
+ echo html_btn('back2article',$backID,'',array());
} else {
if ($link)
- tpl_pagelink($discussNS.$ID,tpl_getLang('btn_discussion'));
+ tpl_link(wl($discussNS.$ID),tpl_getLang('btn_discussion'));
else
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());
+}