[pmwiki-users] display older page versions

Peter Bowers pbowers at pobox.com
Wed Mar 11 10:13:02 CDT 2009


On Wed, Mar 11, 2009 at 10:29 AM, noskule <noskule at gmx.net> wrote:

>
>  Actually this is possible using wikish.  See
>>
>> http://www.pmwiki.org/wiki/Cookbook/WikiShExamples#PageHistForm
>>
>> This solution gives you a form to type in a pagename and a date
>> description
>> ("1 hour ago", "yesterday", "1/1/09 1:00am", "last Thursday", etc.) and
>> the
>> page will be displayed immediately below the form between horizontal
>> lines.
>>
>> -Peter
>>
>>
>>
>>
> this looks very promissing to me (except I have to switch to php5 first).
> But one question.
> Would it be possible to have an action called something like
> action=showdiff&timestamp=unixtime, witch would
> display/highlight the changes directly in the rendered page?
>

Daniel was correct about using the page where the form exists and specifying
pn=x and when=y in the URL.

However, highlighting changes is a different issue altogether.  I could set
up a separate form (or a radio button on the same form - something like
that) to differentiate between the "diff" operation and the "cat"
operation.  But if you want changes highlighted in a different format than
the standard there would need to be some additional steps...

(1) Download and install/initialize a package such as PEAR's text_diff
(2) Set the $DiffFunction variable to some function which would implement
the specific renderer (probably inline is what you are looking for)

After that you will have inline diffs SHOWN both at the wikish form as well
as whenever you view page history.  HOWEVER, I'm pretty certain it would
have an impact on your ability to restore pages...  Probably your diff
function would have to be "aware" of some $_GET variable and call a
different diff function based on the current context...

-Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090311/da30f394/attachment.html 


More information about the pmwiki-users mailing list