TrackChanges
Description
On an open wiki, that anyone can edit, or on one with multiple editors, verifying changes made by others requires time and a fair number of clicks. This page lists a number of tweaks to make this task easier.
Please add or link other tweaks useful for tracking changes.
Better RecentChanges pages
PmWiki's RecentChanges pages are a good way to check recent wiki activity, but the default format displays only a list of links to the pages. There are two inconvenient things:
- to see what are the actual changes, one must click first on the link to the page, then on the "History" link;
- it is difficult to know which changes were reviewed (unless one remembers the timestamps).
This snippet will enable a direct link to the page history. The link includes a timestamp and when it is clicked, its appearance changes to "visited link"; if a new edit of the page is made, the link in RecentChanges will display as "unvisited link".
Place this code by the end of (farm)config.php :
foreach($RecentChangesFmt as $k=>$v) $RecentChangesFmt[$k] = str_replace('$CurrentTime', '[[{$Group}.{$Name}?action=diff#diff$Now|$CurrentTime ]]', $v);
Please note that the recipe LocalTimes has the same feature and you must not install it along with the above code.
To benefit from the "visited link" feature, your skin/css should define different styles for visited and non-visited links. The default PmWiki skin does; if yours doesn't, you can add to a file /pub/css/local.css such a code for dark-violet visited links:
a:visited {color: #4b0082;}
This recipe is now enabled on pmwiki.org, see RecentChanges (actually, LocalTimes is enabled but you can see the links to the page histories which are similar).
See also:
- Delta bytes RecentChanges -- how many characters were added/deleted when a page was modified.
- Recent Uploads Log -- to also display uploads in the RecentChanges pages
- Custom RecentChanges -- various other tweaks of these special pages
- LocalTimes Display RecentChanges and History timestamps in the local timezone of each visitor.
Shorter RecentChanges
On a wiki with many pages, RecentChanges lists may grow to become very large. While it is possible to define a maximum number of lines (see $RCLinesMax
), it is safer not to. Here is what else can be done.
Create a new wiki page Site.AllRecentChangesShort with the following markup:
(:include Site.AllRecentChanges lines=50:)
Then, this page will display the first 50 lines of AllRecentChanges, that is 50 most recently modified pages. In some cases this is enough to track the activity for a week or month. This tweak is used here on PmWiki.org: see Site.AllRecentChangesShort. For a longer discussion, see RecentChanges Excerpt.
WatchLists
See Watch Lists. To use here "visited links" like in RecentChanges (see above), you can use such a pagelist template (add in your Site.LocalTemplates):
!! Better WatchList [= [[#RCstamps]] [[{=$FullName}?action=diff&source=y&stamp={=$LastModifiedTime} | \ {(ftime "%d.%m %Hh%M" "@{=$LastModifiedTime}")} ]] | \ '''[[{=$FullName}|{=$Name}]]''' - [[~{=$LastModifiedBy}]] \ ({=$LastModifiedSummary})\\ [[#RCstampsend]] =]
And in your WatchList page, use (:pagelist ... fmt=#RCstamps:)
.
Optimizing page history
- Cookbook /
- ExpireDiff How to remove a page's history (Stable)
- ExpireDiff-Talk Talk page for ExpireDiff.
- HideDiff Hide specific edits from page histories (Experimental)
- InlineDiff Shows the difference between 2 versions by highlighting the changes in markup on word level. (stable)
- InlineDiff-Talk Talk page for InlineDiff.
- LimitDiffsPerPage Paginate the "diff" output (when viewing a page history, limit the number of displayed revisions at once) (Stable/Beta)
- PageDiffSize Add an accurate count of characters added & removed to each edit summary (beta)
- SysDiff Use an external "diff" program to speed saving of long pages. (Stable)
- ViewDiff Compare arbitrary revisions and view a particular version. (Beta)
The SQLite recipe also strives to optimize page history handling.
A Notify tweak
You can use Notify to receive e-mails when wiki pages are edited. This tweak in (farm)config.php will place links directly to the page history, instead of to the page:
$NotifyItemFmt
= " * {\$FullName} . . . \$PostTime by {\$LastModifiedBy}
{\$PageUrl}?action=diff";
See also:
$NotifyItemFmt
and$NotifyBodyFmt
, where you could place a link to your AllRecentChangesShort page.- PITS:01171 for a way to include the edit summary and the page summary in the notifications
Log Recipe
- ActionLog : "Maintain a page log of wiki actions"
See Also
- LocalTimes Display RecentChanges and History timestamps in the local timezone of each visitor.
- GrepRC Search the RecentChanges entries similarly to a pagelist
- SpamFilters Automatic blocking of some spambots
Contributors
- Petko (5ko [snail] 5ko [period] fr)
- If this recipe helps you or saves you time, you can help support its continued development by ♥ .
Comments
User notes +4: 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.