|
Cookbook /
MajorChangesSummary: How to create MajorChanges pages and Site.AllMajorChanges
Version: 2009-08-19
Prerequisites: pmwiki 2.1
Status:
Maintainer:
Categories: Searching
Questions answered by this recipe
DescriptionCreate group.MajorChanges pages and Site.AllMajorChanges to track all major changes.. I've been unsatisfied with Recent Changes as implemented in PmWiki and although there are several Cookbook recipes available for modifying the Recent Changes behaviour, I decided to roll my own Major Changes tracking. I have left the Recent Changes processing unaltered. Recent Changes track the last change to each page - each entry is overwritten as a new change is made to that page. Modifications described in other cookbooks allow you to track the last change made per author or track ALL changes. What I wanted was something to track ALL of the changes, but not repeat multiple edits for the same "change". This means that if an author edits the page several times but keeps the Summary of the change the same, it only creates a single entry on the Major Changes pages. If the author changes the Summary, then a new entry is made on the Major Changes pages. If the Minor Edit checkbox is checked, then an entry is never made on the Major Changes pages. In this way, all major changes are documented without the extreme of logging each individual edit. In order to accomplish this configuration change, we make several changes to one of the local configuration files
# Add Major Changes
# record every major change unless just different date/time
if (@$_POST['diffclass'] != 'minor') {
$RecentChangesFmt['$SiteGroup.AllMajorChanges'] =
'* [[{$Group}.{$Name}]] . . . $[by] $AuthorLink: [=$ChangeSummary=] [$CurrentTime]';
$RecentChangesFmt['$Group.MajorChanges'] =
'* [[{$Group}/{$Name}]] . . . $[by] $AuthorLink: [=$ChangeSummary=] [$CurrentTime]';
}
# record uploads as major change
if (@$_REQUEST['action'] == 'postupload') {
$RecentUploadsFmt['$SiteGroup.AllMajorChanges'] =
'* [[{$Group}/{$Name}]]/[[(Attach:{$Group}.{$Name}/)$upname]]'
.' . . . $[by] $AuthorLink ($upsize) [$CurrentTime]';
$RecentUploadsFmt['$Group.MajorChanges'] =
'* [[{$Group}/{$Name}]]/[[(Attach:{$Group}.{$Name}/)$upname]]'
.' . . . $[by] $AuthorLink ($upsize) [$CurrentTime]';
}
# add AllMajorChanges and MajorChanges to the normal pages Search should ignore
$SearchPatterns['normal']['recent'] = '!\.(All)?(Recent|Major)(Changes|Uploads)$!';
If the page Site.AllMajorChanges is used as part of an RSS feed, the RSS feed will show all of the major changes made to a wiki. NotesRelease notes
See alsoOther Recent Changes cookbooks: Other related cookbooks: ContributorsCommentsUser notes +1: 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. |