Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

TrackChanges

Summary:Ways to more easily detect and verify all recent edits
Version:N/A
Maintainer: Petko

Description

On an open wiki, that anyone can edit, or on one with multiple editors, verifying changes made by others is a task which 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&st=$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;}

A demo of this tweak can be seen here.

See also:

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:).

This format can be seen in action here (several watchlists in one table). Clicking on the date/time transforms the link to "visited".

Note: if you have PmWiki version 2.2.0-beta66 or older, you need to add to config.php this line:
  $FmtPV['$LastModifiedTime'] = '@$page["time"]';

Optimizing page history

Cookbook /
Expire Diff  How to remove a page's history
Inline Diff  Shows the difference between 2 versions by highlighting the changes in markup on word level.
Limit Diffs Per Page  Paginate the "diff" output (when viewing a page history, limit the number of displayed revisions at once)
Sys Diff  Use an external "diff" program to speed saving of long pages.

The SQLite recipe also strives to optimize page history handling.

A Notify tweak

You can use Notify to recieve 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.

Log Recipe

  • ActionLog : "Maintain a page log of wiki actions"

See Also

Contributors

Comments

Edit - History - Print - Recent Changes - Search
Page last modified on October 15, 2008, at 04:07 AM