views:

45

answers:

1

Hi, I am building my application in Codeigniter. It has a module where users create documents, which can be edited at a later time. How do I implement a 'history' of revisions, perhaps like a wiki ? Is it possible to embed a php wiki in a web app (twiki/dokuwiki)?

A: 

Based on your question, a CMS component could do the trick. For a ready-made Codeigniter based CMS, take a look at PyroCMS. With a ready CMS component, you save a lot of hard work.

If you prefer embedding an external wiki component, for instance Dokuwiki, consider the following steps:

  • Install a dokuwiki and use an authentication plugin to connect it to your user database. For a list of currently available authentication plugins for Dokuwiki, see plugins [DokuWiki].
  • By using Dokuwiki's theming system, you can also create a custom theme to make the look-and-feel of the wiki more like of the rest of your site.

My point here is that writing a wiki/CMS component takes a lot of work. Unless you really really have to write one, stick with ready components. Writing a new wiki from scratch might seem like a good idea right now, but trust me its a lot of work.

If you still decide to build your own CMS, take a look at the tutorials. For instance "Building a Content Management System with Code Igniter". But regarding whether there is a ready-made wiki component for CodeIgniter I have the same feeling as you: you might need to write one yourself.

As a curiousity, CodeIgniter's own wiki is not built with CodeIgniter, but rather uses ExpressionEngine Wiki.

jsalonen
I did look at CMS platforms including pyrocms, before finally deciding to build the app from ground-up.
RisingSun
Oh good to know. So what kind of features it lacked? Version history?
jsalonen
If there is a document version history in Pyro CMS, I clearly missed it. But the problem is document management is just one of the modules in the application; the functionality required is relatively simple except for the revision history part. I am finding the dokuwiki stuff interesting though
RisingSun
Oh I see. Please see edited answer and ask more if I didn't provide you with enough information!
jsalonen
For instance, I load the inventory revisions into a 'history' table. Works surprisingly well. I could do the same for documents; I just wanted to make sure that I am not reinventing the wheel and there are well known ways to do that. Thanks
RisingSun
Please see edited answer.
jsalonen
I have decided to save a 'history' table for edited docs and offer the user access to previous revisions; Telling the 'differences' by comparing any 2 versions is a feature beyond my programmatic abilities. Thanks for your help -> I have taken your warning about building things from scratch very seriously.
RisingSun
No problem. I'm of course unaware of the bigger picture you are dealing with, so I cannot absolutely say what is best for you. But as a proof, using a readymade wiki/CMS tool would readily give you also a differences tool -- building of which is actually beyond programmatic abilities of many programmers.
jsalonen