Hi Patrick,

Where did you get those plugins for DokuWiki? I will try to implement something like that on the AMFPHP wiki.

If you're asking about the navigation pane, I followed the instructions from:
http://wiki.jalakai.co.uk/dokuwiki/doku.php/

Basically, I added the following to my template's (the default one) main.php (at the very top):

// Navigation sidebar hack
@require_once("tplfn_sidebar.php");

Here's the source for tplfn_sidebar.php:

<?php
/*
* Provide navigation sidebar functionality to Dokuwiki Templates
*
* This is not currently part of the official Dokuwiki release
*
* @link http://wiki.jalakai.co.uk/dokuwiki/doku.php?id=tutorials:dev:navigation_sidebar
* @author Christopher Smith <[EMAIL PROTECTED]>
*/

$conf['navigate']    = 'navigate';        //name of navigation page

// recursive function to establish best navigate file to be used
function getNavigateFN($ns, $file) {

   // check for wiki page = $ns:$file (or $file where no namespace)
   $nsFile = ($ns) ? "$ns:$file" : $file;
   if (file_exists(wikiFN($nsFile))) return $nsFile;
// remove deepest namespace level and call function recursively // no namespace left, exit with no file found if (!$ns) return ''; $i = strrpos($ns, ":"); $ns = ($i) ? substr($ns, 0, $i) : false; return getNavigateFN($ns, $file);
}

function html_navigate() {
   global $ID;
   global $REV;
   global $conf;
// save globals
   $saveID = $ID;
   $saveREV = $REV;

// discover file to be displayed in navigation sidebar $fileNavigate = ''; if (isset($conf['navigate'])) {
       $fileNavigate = getNavigateFN(getNS($ID), $conf['navigate']);
   }
// determine what to display
   if ($fileNavigate) {
       $ID = $fileNavigate;
       $REV = '';
       print p_wiki_xhtml($ID,$REV,false);
   }
   else {
       html_index('.');
   }
// close navigate <div> and restore globals
   $ID = $saveID;
   $REV = $saveREV;
}

?>

Then in layout.css, added the following to the end:

/* ---------------- Main Navigation ------------------- */
/* make some space in the main dokuwiki <div> */
.dokuwiki {margin-left:240px; border-left: 1px solid black;}
#wiki_navigate {position:absolute; top:0; left:0; width:240px;}

And in design.css, added the following to the end:

/* ------------------ Main Navigation ------------------- */

#wiki_navigate
{ margin-left: 2em;
 margin-top: 1.2em;
 margin-bottom: 0;
 float:right;
 width: 200px;
 font-size: 80%;
 clear:both;
}
#wiki_navigate a {color: #436976;}
#wiki_navigate a.wikilink2 {color:#999999;}
#wiki_navigate a.wikilink2:hover {text-decoration:none; cursor:default;}
#wiki_navigate h1
{ padding: 3px;
 border: 1px solid #8cacbb;
 background-color: #dee7ec;
 text-align: left;
 font-weight:bold;
 margin-bottom: 2px;
}
#wiki_navigate h2 {font-size:120%; margin-left: 4px; font-weight:bold; padding-bottom:0;} #wiki_navigate h3 {font-size:120%; margin-left: 8px; font-weight:normal; padding-bottom:0;} #wiki_navigate h4 {font-size:100%; margin-left: 12px; font-weight:bold; padding-bottom:0;} #wiki_navigate h5 {font-size:100%; margin-left: 16px; font-weight:normal; padding-bottom:0;}
#wiki_navigate .toc {display:none;}

* * *

Then, whatever page name you specified in tplfn_sidebar, just create a page with that name in the Wiki and it will function as your navigation page. In mine, I have:

$conf['navigate']    = 'navigate';        //name of navigation page

And the Wiki page is called "navigate" (I used the search to create it without creating a link on a page somewhere.)

hth,
Aral

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to