On Wed, Mar 11, 2009 at 4:13 PM, Peter Bowers <span dir="ltr">&lt;<a href="mailto:pbowers@pobox.com">pbowers@pobox.com</a>&gt;</span> wrote:<br><div><div class="h5">On Wed, Mar 11, 2009 at 10:29 AM, noskule <span dir="ltr">&lt;<a href="mailto:noskule@gmx.net" target="_blank">noskule@gmx.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Actually this is possible using wikish.  See<br>
<br>
<a href="http://www.pmwiki.org/wiki/Cookbook/WikiShExamples#PageHistForm" target="_blank">http://www.pmwiki.org/wiki/Cookbook/WikiShExamples#PageHistForm</a><br>
<br>
This solution gives you a form to type in a pagename and a date description<br>
(&quot;1 hour ago&quot;, &quot;yesterday&quot;, &quot;1/1/09 1:00am&quot;, &quot;last Thursday&quot;, etc.) and the<br>
page will be displayed immediately below the form between horizontal lines.<br>
<br>
-Peter<br>
<br>
<br>
  <br>
</blockquote></div>
this looks very promissing to me (except I have to switch to php5 first). But one question.<br>
Would it be possible to have an action called something like action=showdiff&amp;timestamp=unixtime, witch would<br>
display/highlight the changes directly in the rendered page?<br>
</blockquote></div></div><br>After a little messing around with pear (1st time I&#39;ve used it to install something) I ended up with this in my config.php which does in fact give me a prettily highlighted diff.  (Note that I had to specify $action == &#39;browse&#39; as well because it was messing up the page history otherwise.)<br>
<br>if ($pagename == &#39;Test.Diff&#39; &amp;&amp; $action==&#39;browse&#39;) {<br>    $DiffFunction = &#39;mydiff&#39;;<br>    include_once(&quot;Text/Diff.php&quot;);<br>    include_once(&quot;Text/Diff/Renderer.php&quot;);<br>
    include_once(&quot;Text/Diff/Renderer/inline.php&quot;);<br>    function mydiff($text1, $text2)<br>    {<br>        $diff = &amp;new Text_Diff(explode(&quot;\n&quot;, $text1), explode(&quot;\n&quot;, $text2));<br>        $renderer = &amp;new Text_Diff_Renderer_inline();<br>
        return($renderer-&gt;render($diff));<br>    }<br>}<br><br>I went ahead and coded up the diff form too (it&#39;s virtually identical to the previous solution except using the diff command.)  You can see it here: <br>
<br><a href="http://www.pmwiki.org/wiki/Cookbook/WikiShExamples#HistDiffForm">http://www.pmwiki.org/wiki/Cookbook/WikiShExamples#HistDiffForm</a><br><br>This form allows you to enter the page name and some date string.  After you submit you will be shown the diff output comparing that revision with the current revision, even if there are several revisions in between.  If you combine this with the PEAR Text_Diff mentioned above then you&#39;ve got a very useful little tool that&#39;s very user-friendly...<br>
<br>-Peter<br>