AllRecentChanges

Summary: Log each and every page edit to Site.AllEdits or per-author edits to Site.AllRecentChangesPerAuthor.
Version: 2006-11-18
Prerequisites: PmWiki 2.x
Status: Quo
Maintainer:
Categories:

Questions answered by this recipe

I'd like Site.AllEdits to show all recent changes. It should make a list out of every historical change to every page.

I'd like Site.AllRecentChangesPerAuthor to show all recent changes, with successive edits of a page by a single author into a single record.

Description

Log each and every page edit to Site.AllEdits or per-author edits to Site.AllRecentChangesPerAuthor.

Logging all edits is no problem -- it's just:

$RecentChangesFmt['Site.AllEdits'] = '* [[{$FullName}]] . . .'
  .'$CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';

The key to getting this to work is to make sure that there aren't two consecutive spaces in the formatting line (unlike the standard RC entries which use the two spaces to figure out what's the same and what is different).

One can reformat the line to get successive edits of a page by a single author into a single record. It technically doesn't show every edit -- it just shows the last edit for each page by each author.

$RecentChangesFmt['Site.AllRecentChangesPerAuthor'] =
'* [[{$FullName}]] $[by] $AuthorLink  . . . $CurrentTime: [=$ChangeSummary=]';

The two spaces after "$AuthorLink" will combine changes of the same page by the same author into a single entry, but edits from different authors will generate new entries.

See Also

Original email list thread for getting all of history into recent changes
$RecentChangesFmt layout variable

Contributors

  • Original solution from Pm on the pmwiki-users list.

Comments

See discussion at AllRecentChanges-Talk

User notes : 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.