|
Cookbook /
TrackChangesDescriptionOn 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 pagesPmWiki'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:
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);
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. See also:
Shorter RecentChangesOn 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 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. WatchListsSee 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 Note: the recipe requires PmWiki version 2.2.0-beta67 or newer.
Optimizing page history
The SQLite recipe also strives to optimize page history handling. A Notify tweakYou 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: See also:
Log Recipe
See Also
ContributorsCommentsUser notes +3: 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. |