The plan is to create a new table which will hold, essentially, the page name and the page contents along with the time the page was created. The revisioning code in the bug above already handles keeping track of who made the changes to the page and when. Since wiki page names tend to be alphanumeric and story sids are mostly more numerical I don't see any conflicts with the rid field happening. The history op in the patch above would obviously be expanded to handle displaying of old wiki pages. It also needs to be improved to show what the page was like at that revision of a page/story instead of just showing the old database value along with the new one and it should allow diffing of arbitrary versions, but I'd like to get the basic framework down first.
The next step is to make a wiki op which handles actually showing the wiki pages (and throws in appropriate "Edit this page" links.) I'm thinking this will basically involve making an op that uses the default_template with a URL Template looking something like "/page/command". The function that handles the op would basically fetch page from the database, throw it through the autoformatting code* and put it in the |CONTENT| block by default. If command is defined (the only command I can think of is "edit" right now) then the behaviour will be modified appropriately (Question that just popped into my head: how do I handle http POST requests in scoop?) (Another question: other than diff'ing and editing, what commands would be nice for a scoop wiki?)
The next step after that is to modify autoformat to handle WikiWords and generally be more wiki-ish. (Alternatively build on autoformat and create a new wikiformat mode.)
The next next step is to make it permissions-aware and create some view_wiki and edit_wiki and __ perms.
But first, I need people to point out any problems they see with this plan and ways to improve it.
* In theory wikis should be edited almost as much as they're read, so I think the wiki should store the data before it gets converted to HTML. Converting from autoformat to HTML is simpler than converting from HTML to autoformat mode, especially since the former is already done.