1
Howdie!
I was looking for a way to implement XOOPS pagetitles in the Dokuwiki module, but I couldn't find anything on this site or on Xoopsforge. Then I figured: why not implement it myself
Put this in doku.php:
if($_SERVER['REQUEST_URI'] == '/modules/dokuwiki/doku.php?'){
$xoopsTpl->assign('xoops_pagetitle', 'Start | '.$xoopsModule->name()); }
else {
$title = ereg_replace('/modules/dokuwiki/doku.php/(.*)', '1', $_SERVER['REQUEST_URI']);
$title = ucfirst(ereg_replace('_', ' ', $title));
$xoopsTpl->assign('xoops_pagetitle', $title.' | '.$xoopsModule->name()); }
just before this line at the end of the file:
include_once XOOPS_ROOT_PATH."/footer.php";
I basically used $_SERVER['REQUEST_URI'] to extract part of the URL and then used regular expressions to strip the first part off.
I use the internal url rewrite option in dokuwiki ('$conf['userewrite'] = 2;' in /conf/dokuwiki.php), but I guess someone can figure out a way to make this work without mod_rewrite (I'm too lazy
)
Cheers,
Jay Jay