This is a guide to building your own hybrid etherpad + wiki.

Why are we doing this? I put this together because my company, Canidu, is partially based in China and so we can't reliably use google Docs, but we need to collaboratively edit documents all the time — so we use this tool pretty much daily for collecting all of our organizational knowledge.

Relatedly if you're in a similar situation, we also host our own VPN so we can watch youtube videos and post to twitter and facebook without having to think too hard about it.The linode library has a great guide for that as well, and was generally indispensable for everything we've done here for our tech infrastructure.

Oh also, you may be interested in a hosted solution like Hackpad.

So, let's get started.

  1. First, install etherpad-lite, and install dokuwiki (as well as the prerequisite webserver of your choice).

  2. Then, getting to interoperation is simple. You only need to change two lines, both in dokuwiki.

    Note: What we're doing here is basically making a wiki where the first page, called 'start', has an iframe that any wiki links open into. That lets us use the page as an 'index' for pad pages so they don't get lost, and allows fast switching between pad pages — as well as enabling collaborative editing without the pain and suffering of using a wiki for that. It's sort of a specialized hack, so I hope this line helps with understanding why we're doing what we're doing.

  3. Find and edit the file in dokuwiki/conf/dokuwiki.php. You're going to set all "external" links to open in a target called "pad".

    //Set target to use when creating links - leave empty for same window
    $conf['target']['wiki']      = '';
    $conf['target']['interwiki'] = '';
    ...
    $conf['target']['extern']    = 'pad';
    ...
    $conf['target']['media']     = '';
    $conf['target']['windows']   = '';

    Save and close this file.

    (Note: this does create the caveat that *any* links on the wiki will open into this iframe. Since our use case is strictly wiki-as-index-for-pad-pages, with maybe a few other links that can be forced to open in a new window/tab by the user, that's okay.)

  4. Then, navigate to dokuwiki/lib/tpl/default. Create a backup of everything in default, if you like. Then, edit main.php.

    Find these lines:

        <div class="page">
          <!-- wikipage start -->

    copy and paste this line between those two:

          <?php if (($ID == 'start') && ($ACT == 'show'))
    echo('<iframe style="display: block; float: right; width: 60%;
    height: 600px" name="pad" src="http://pad.yourdomain.com/p/StartPad">
    lt;/iframe>'); ?>
    

    So now it looks like this:

      <div class="page">
          <?php if (($ID == 'start') && ($ACT == 'show'))
    echo('<iframe style="display: block; float: right; width: 60%;
    height: 600px" name="pad" src="http://pad.yourdomain.com/p/StartPad">
    </iframe>'); ?>
          <!-- wikipage start -->

    We're using the default dokuwiki theme. If you need to change things to match your theme, a good first place to start is by tweaking the parameters in iframe style. I don't know that much about dokuwiki configurations, so if that doesn't work you'll have to try someone else (I recommend Stack Overflow).

Ta da! You're done editing! So now, reload your wiki page and see if that didn't just work.

Going further: For our wiki install, I also made some other changes in the webserver to only allow users to access any etherpad URL over HTTP BasicAuth, and to only serve etherpad-lite and the wiki over https (with SSL encryption), to give some semblance of protection from data snoopers or great-firewall sniffing. I don't know if I would trust my life to SSL, but it's at least on par with what what google Docs offers.

cheers,

-Star Simpson for Canidu