|
Cookbook /
InlineDiffSummary: Shows the difference between 2 versions by highlighting the changes in markup on word level.
Version: 2010-02-03
Prerequisites: PmWiki 2.2
Status: stable
Maintainer: Anno
Categories: Administration, Editing
Discussion: InlineDiff-Talk
DescriptionPmWiki's built in function for page history currently shows a comparison between each 2 lines of 2 versions, but without any highlighting. If the lines are long and the changes small, it is sometimes very difficult to see what actually changed. This recipe integrates the http://pear.php.net/package/Text_Diff package into the PmWiki original function to provide the highlighting so one can immediately spot the differences. You have to press "Show changes to markup" on the history page, to see the highlighting. Example of markup highlighting: ![]() Installation1. Extract the contents of the pagerevinline20100203.zipΔ file to the cookbook/ folder, preserving the directory structure: cookbook/pagerevinline/pagerevinline.php
/Text/Diff.php
/Diff/Renderer.php
/Renderer/inline.php
/Engine/native.php
2. Add this to your local/config.php file: if ($action=='diff')
include_once("If you would like to default to the markup view in the page history, add these lines instead: if(!isset($_REQUEST['source'])) $DiffShow['source'] ='y';
if ($action=='diff')
include_once("(This exact sequence is important in order for the "Show changes to markup/preview" links to work properly.) NotesFrom version 2.2.12, PmWiki contains a built-in word-level difference highlighter. See Release Notes
Integration with Limit Diffs Per PageFrom 2008-11-16 on, this recipe can be automatically integrated with the Limit Diffs Per Page recipe. To do it, copy the InlineDiff dirs/files to the cookbook/pagerevinline and install LDPP. --Petko CommentsSee Discussion at InlineDiff-Talk See AlsoContributorsUser notes +5: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |