You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1 KiB

14 years ago
14 years ago
14 years ago
14 years ago
14 years ago
  1. <?php
  2. // must be run from within DokuWiki
  3. if (!defined('DOKU_INC')) die();
  4. if (!defined('DOKU_LF')) define('DOKU_LF',"\n");
  5. /* @todo: fix label of buttons */
  6. /**
  7. * Create link/button to discussion page and back
  8. */
  9. function _tpl_discussion($discussNS='discussion:',$link=0) {
  10. global $ID;
  11. if(substr($ID,0,strlen($discussNS))==$discussNS) {
  12. $backID = substr(strstr($ID,':'),1);
  13. if ($link)
  14. tpl_link(wl($backID),tpl_getLang('btn_back2article'));
  15. else
  16. echo html_btn('back2article',$backID,'',array());
  17. } else {
  18. if ($link)
  19. tpl_link(wl($discussNS.$ID),tpl_getLang('btn_discussion'));
  20. else
  21. echo html_btn('discussion',$discussNS.$ID,'',array());
  22. }
  23. }
  24. /**
  25. * Create link/button to user page
  26. */
  27. function _tpl_userpage($userNS='user:',$link=0) {
  28. global $conf;
  29. if ($link)
  30. tpl_link(wl($userNS.$_SERVER['REMOTE_USER'].':'.$conf['start']),tpl_getLang('btn_userpage'));
  31. else
  32. echo html_btn('userpage',$userNS.$_SERVER['REMOTE_USER'].':'.$conf['start'],'',array());
  33. }