[pmwiki-users] How to view a page and its links as at a specified date and time
John Rankin
john.rankin at affinity.co.nz
Sun Oct 16 22:45:47 CDT 2005
On Monday, 17 October 2005 3:00 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>One can use the RestorePage function for this. For example, to
>get the text of a page as it existed as of October 1, 2006:
>
> $when = mktime(0, 0, 0, 10, 1, 2006);
> $page = ReadPage($pagename, $when);
> $new = array();
> $text = RestorePage($pagename, $page, $new, "diff:$when");
>
>($new is a dummy array here; normally RestorePage is used to fill
>in the text of $new when the Restore link is activated.)
>
>In reviewing the code I also found that RestorePage doesn't work
>exactly as it should, so there will be an update soon that fixes
>it. :-)
>
>> I envisage 'Previous' and 'Next' links
>> that show the previous and next versions of the page,
>> letting a reader see how a page has evolved. In an ideal
>> world: pick any 2 versions and generate a page with the
>> differences between them highlighted.
>
>This sounds like it'd be a good upgrade for ?action=diff;
>over the years there's been a handful of requests for an alternate
>?action=diff display like this; so far I've held off waiting
>for the number of requests to be more than a handful (and
>for a more complete description of what we'd like to see
>here :-).
Somebody just sent me a link to http://www.writeboard.com/tour/
which does a very nice job of showing differences between versions:
- check 2 and compare
- highlight insertions and deletions
- go to any version
--
JR
--
John Rankin
More information about the pmwiki-users
mailing list