[pmwiki-users] Better diff

Daniel Roesler diafygi at gmail.com
Tue Mar 29 09:01:14 CDT 2011


Howdy,

You wouldn't change $ViewDiffChangesFmt, because that is the format
used for the actual ?action=viewdiff page. What you're looking to do
is to make a formatting change to the ?action=diff page, right?

The ViewDiff recipe does make formatting changes to each diff header
?action=diff page (by a custom $DiffStartFmt), but you're looking to
remove the actual diff content, right?

To do that you need to create a custom DiffHTML function that returns
just a blank space. Here's an example of how you can do that in your
local/config.php file:
SDV($DiffHTMLFunction, 'NoDiffHTML');
function NoDiffHTML($pagename, $diff) {return " ";}

You can also include the ViewDiff recipe to add the comparison radio buttons:
include_once("$FarmD/cookbook/viewdiff.php");

Here's the output with ViewDiff and the custom NoDiffHTML function:
http://i.imgur.com/UjABO.png

You can customize the formatting for $DiffStartFmt, $DiffEndFmt, and
$DiffRestoreFmt so that it looks better (defaults are found in
scripts/pagerev.php and cookbook/viewdiff.php).

Avast!
Daniel Roesler
diafygi at gmail.com

On Tue, Mar 29, 2011 at 8:12 AM,  <pmwiki-users-request at pmichaud.com> wrote:
> Date: Tue, 29 Mar 2011 16:07:55 +0300
> From: Kenneth Forsb?ck <kenneth.forsback at bob.fi>
> To: pmwiki-users at pmichaud.com
> Subject: Re: [pmwiki-users] Better diff
> Message-ID: <4D91D9AB.203 at bob.fi>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> The script has the $ViewDiffChangesFmt which seems like it could be
> useful, but how in the world do I get an array of the changes in a page
> with timestamp, user, summary, etc., which I could then use to generate
> a list?
>



More information about the pmwiki-users mailing list