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)?
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.