|
Cookbook /
PageHistSummary: View Historical Revisions of Pages
Version: 2009-04-18B
Prerequisites: PHP5
Status: experimental
Maintainer: Peter Bowers
Download: pagehist.phpΔ
Categories: Uncategorized
Questions answered by this recipe
DescriptionView information about page revisions and view page(s) "as of" a particular point in time. Installation
NotesBy appending "?asof=TIMESTAMP" to the URL in your address bar you can view a page as of that particular point in time. An effort is made to append the same "?asof=TIMESTAMP" to all intra-wiki links automatically (once you have explicitly requested the first one) so that you can actually browse your site as of that point in time. A markup expression is also provided with lots of options to list the revisions of a given page. Here is perhaps the most useful version of this MX:
This will list the last 10 revisions of Group.Pagename in the format "Group.Pagename as of 04/07/2009 10:01:31" and that text will be a link pointing to "Group.Pagename?asof=12342345", thus allowing you to go directly to the view of that page as of that point in time. The
Obviously pagehist can be used within WikiSh in which case you can use usage such as The following script gives an idea of how @@pagehist could be integrated into WikiSh and manipulation of page revisions could be done very powerfully (don't forget the existence of the diff command as well):
pagehist -ud Pagename | while read timestamp desc
do
echo "----\n${desc}\n----"
cat Pagename@${timestamp}
done
You can also specify Note that everything in your site will be viewed as of this particular date. This means (:include:) will include the version as of that time, and etc. It also means that if your account in authuser was added after that time then you're potentially going to have problems. To get around this difficulty there is a global variable $PageHistIgnorePages which can be set to an array of pagenames (group period pagename) and these pages will be ignored (i.e., they will always be read as of the current snapshot rather than as of the date being used for other pages). It defaults to no pages being ignored -- in other words all pages will be viewed as of the time specified in the URL. This recipe is only active if the action is "browse" or "source". This can be changed by changing the global variable Release Notes
See Also
ContributorsCommentsUser 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. |