[pmwiki-users] browse older revisions?
Christopher League
league at contrapunctus.net
Thu Jun 22 23:36:02 CDT 2006
On 22 Jun 2006, at 22:20, Christopher League wrote:
> I'm capable in PHP, so I started looking into how one might
> accomplish this, for example by optionally calling RestorePage in
> HandleBrowse or HandleSource in response to a request ?rev=1113498764
> (with the timestamp of the revision you want). I got this to work,
> sort of, in some cases, but it's going to take a good bit more
> digging and deciphering to get it right.
Just to follow up, I think I got the very basic functionality working
now. If you go to the history page (action=diff), there is a little
pound sign (#) beside each entry that takes you to a browse page with
rev=timestamp to show you that revision. Adding the previous/next
links should be possible now given what's in the $page map, and a
permalink to current revision of current page would be constructed as
PageUrl?rev=$page['time'] or something.
So far I'm hacking directly on pmwiki.php and scripts/pagerev.php.
Looks like it could be factored out into a recipe, though it would
unfortunately involve duplicating all of HandleBrowse and
HandleSource to change ~1 line each.
Attached is a 2.5kb patch against pmwiki-2.1.11. Feedback welcome.
Chris
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pmwiki--rev-param.patch.txt
Url: /pipermail/pmwiki-users/attachments/20060623/8fdc8c83/attachment.txt
More information about the pmwiki-users
mailing list