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.

25 lines
714 B

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. /**
  6. * Create link/button to discussion page and back
  7. */
  8. function _tpl_discussion($discussNS='discussion:',$link=0) {
  9. global $ID;
  10. global $lang;
  11. if(substr($ID,0,strlen($discussNS))==$discussNS) {
  12. $backID = substr(strstr($ID,':'),1);
  13. if ($link)
  14. tpl_pagelink(':'.$backID,$lang['btn_back']);
  15. else
  16. echo html_btn('back',$backID,'',array());
  17. } else {
  18. if ($link)
  19. tpl_pagelink($discussNS.$ID,tpl_getLang('btn_discussion'));
  20. else
  21. echo html_btn('discussion',$discussNS.$ID,'',array());
  22. }
  23. }