Summary: A recent changes page created using
Page lists
Version: 1.0
Prerequisites: 2.2.0
Status: Mature
Maintainer: Simon
Questions answered by this recipe
- How do I roll my own recent changes page?
- How can I gain more control over the recent changes I display?
Description
Using a pagelist to create a recent changes page.
After copying the code, you need to restore the lines, by removing the unnecessary line breaks. |
Create a pagelist in Site.LocalTemplates as follows
#recentlychanged
>>comment<<
[[#recentlychanged]]
(:template defaults trail=Site.AllRecentChanges:)
(:template first:)
||width=*
||!Page ||! Time||!By ||!Change ||
(:template each:)
||''[[{=$FullName} | {=$Groupspaced}.{=$Namespaced}]]'' || [[{=$FullName}?action=diff | {=$LastModified}]]||(:if !equal {=$LastModifiedBy}:)[[~{=$LastModifiedBy}]](:ifend:) ||{=$LastModifiedSummary} ||
[[#recentlychangedend]]
>>font-size:smaller<<
(:pagelist fmt=#recentlychanged count=12:)
|
(:template defaults trail=Site.AllRecentChanges:)
(:template first:)
(:template each:)
Page | Time | By | Change |
Cookbook.Export HTML Wiki-Talk | September 24, 2023, at 07:44 PM | Bernhard | (+1267) |
Pm Wiki.Pm Wiki Features | September 21, 2023, at 05:31 PM | Matt Damon | (+0) |
Pm Wiki De.Wiki Wiki Web | September 21, 2023, at 05:30 PM | Matt Damon | (+0) |
Pm Wiki De.Pm Wiki Features | September 21, 2023, at 05:30 PM | Matt Damon | we are going to steal (-8547) |
Pm Wiki.Pm Wiki Philosophy | September 21, 2023, at 05:29 PM | Matt Damon | fcnonhdecndw imcifyxe 3 buub ed (-3367) |
Pm Wiki.Failure Stories | September 21, 2023, at 05:29 PM | Matt Damon | retards (-3513) |
Site Admin.Blocklist | September 21, 2023, at 05:29 PM | Petko | (+22) |
Main.Wiki Sandbox | August 26, 2004, at 07:27 PM | | |
Pm Wiki.Passwords Admin-Talk | September 20, 2023, at 07:56 PM | Jeff | (+45) |
Profiles.Dave Cooke | September 18, 2023, at 02:56 AM | Dave Cooke | (+62) |
Cookbook.B3-Users | September 18, 2023, at 02:54 AM | Dave Cooke | (+126) |
Pm Wiki.前端文档 | September 25, 2023, at 08:44 AM | | |
|
Add the pagelist to the page of your choice, specifying group, name, count, etc pagelist parameters
(:pagelist fmt=#recentlychanged)
Please note that it is very much faster and less heavy for PmWiki to use trail=Group.RecentChanges count=7
instead of group=Group order=-time count=7
. To list all 7 most recent changes, you could have trail=Site.AllRecentChanges count=7
. --Petko April 21, 2009, at 06:50 PM
fmt=#recentchanges
>>comment<<
[[#recentchanges]]
(:template defaults order=-time name=-GroupAttributes,-Site.AllRecentChanges,-Site.LastChanged,-RecentChanges,-RecentUploads,-SiteAdmin.Blocklist-*:)
(:template first:)
||width=*
||!Page ||! Time||!By ||!Change ||
(:template each:)
||''[[{=$FullName} | {=$Groupspaced}.{=$Namespaced}]]'' || [[{=$FullName}?action=diff | {=$LastModified}]]||(:if !equal {=$LastModifiedBy}:)[[~{=$LastModifiedBy}]](:ifend:) ||{=$LastModifiedSummary} ||
[[#recentchangesend]]
>>font-size:smaller<<
(:pagelist group={*$Group} fmt=#recentchanges count=7:)
|
(:template defaults order=-time name=-GroupAttributes,-Site.AllRecentChanges,-Site.LastChanged,-RecentChanges,-RecentUploads,-SiteAdmin.Blocklist-*:)
(:template first:)
(:template each:)
Page | Time | By | Change |
Cookbook.Export HTML Wiki-Talk | September 24, 2023, at 07:44 PM | Bernhard | (+1267) |
Cookbook.B3-Users | September 18, 2023, at 02:54 AM | Dave Cooke | (+126) |
Cookbook.B 3 | September 18, 2023, at 02:54 AM | Petko | * 20230131: Update for PHP 8.2, reported by Dave Cooke. (+56) |
Cookbook.Pm Feed | September 12, 2023, at 01:30 AM | XES | recipe throws fatal error (+154) |
Cookbook.Recent Changes Deletion-Users | September 05, 2023, at 07:08 AM | Petko | indeed! (+45) |
Cookbook.Recent Changes Deletion | September 05, 2023, at 06:56 AM | Dfaure | fix for PHP 8.2+ (+63) |
Cookbook.Clean Urls | September 03, 2023, at 08:40 AM | Petko | [B,QSA,L], hlt (-549) |
|
Add the pagelist to the page of your choice, specifying group, name, count, etc pagelist parameters
(:pagelist fmt=#recentchanges)
This lists differently from the standard Recent Changes as follows
- it does not display deleted pages
- it does show all pages that are updated as the result of a change, eg RecentChanges, RecentUploads, LastChanged, AllRecentChanges
- if there are zero length files in the page store they are all shown as having changed now.
- it displays other pages that are updated, eg GroupAttributes, Category pages, SiteAdmin,Blocklist-* pages
Release Notes
If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".
See Also
Contributors
Comments
See discussion at PagelistRecentChanges-Talk
User 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.