|
Cookbook /
AllRecentChangesSummary: 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 recipeI'd like I'd like DescriptionLog 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. Comments
AllEdits is sorted oldest-first, can it be newest-first?
$RecentChangesFmt['Site.AllEdits'] = '* [[{$FullName}]] (:comment ' . microtime()
. ' :) . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';
//Aidin Size issue?Is there a limit to how much the Site.AllRecentChanges will display? My page has stopped displaying, although when I look at the source, I can see that all edits are still being logged. I just can't display the page. RDJones December 14, 2011, at 11:48 AM How many lines do you have ? I guess there something like a limit (server, php). You may want to delete old lines or move them manually in an archive page. See also 056130.html and LayoutVariables#RCLinesMax and focus=20215. gb December 14, 2011, at 12:56 PM
My Site.AllRecentChanges page had exceeded some 2100 lines. So archiving the list is a must. Once I cleared out a bunch of lines the page displayed again. So regular archiving is important. My $RCLinesMax is set at the default (no limit). RDJones December 14, 2011, at 01:37 PM
See AlsoOriginal email list thread for getting all of history into recent changes Contributors
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. |