[Pmwiki-users] page revisions: alternative "merged" view?

Patrick R. Michaud pmichaud
Wed Dec 17 11:06:06 CST 2003

On Tue, Dec 16, 2003 at 10:39:42AM -0600, Jonathan Scott Duff wrote:
> Now for me to propose my own wacky idea. What if there were a password
> protected way to mark a page such that you could restore it back to the
> state it was in at the time of the mark? Or view the revisions since the
> mark or show all recent changes (to all pages) since the mark or other
> such things.

There is sort of a way to do this--in fact, this is how wikilib.d works.
The variable $WikiLibDirs is an array of directories to be searched for 
wiki pages when requested.  By default it is set to

   $WikiLibDirs = array(&$WikiDir,"wikilib.d");

which tells PmWiki to look for pages in $WikiDir (default "wiki.d") and
"wikilib.d", in that order.  However, you can change this array to
include other directories, as in:

   $WikiLibDirs = array(&$WikiDir,"saved.d","wikilib.d");

Then, when there's a version of a page you want to save, simply copy 
or move the page file from "wiki.d" to the "saved.d" directory.  We can
probably develop a cookbook script to do this step.  Future edits of the 
page will continue to be stored in wiki.d (they're always saved to 
$WikiDir), and the edited version will obscure the saved version when
the page is viewed.  To recover the saved version of the page, one can
simply delete the page (change the page's contents to "delete"), and
that will remove the file from wiki.d, exposing the version that was
saved in saved.d again.


More information about the pmwiki-users mailing list