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 |
Pm Wiki.Pm Wiki Users | February 18, 2025, at 10:35 PM | Mr Encyclopedia | (+149) |
Test Blog.Tzhtzjtzjtzjtzj | February 17, 2025, at 11:47 AM | dsfsdfsdf | (+183) |
Cookbook.Footnotes | February 16, 2025, at 09:13 PM | Said Achmiz | Updated recipe to new version (+97) |
Cookbook.WP Categories-Users | February 16, 2025, at 09:22 AM | sergiu | (+137) |
Skins.Enlighten-Users | February 16, 2025, at 08:57 AM | Petko | Replied on Enlighten-Talk. (+32) |
Skins.Enlighten-Talk | February 16, 2025, at 08:55 AM | Petko | added Q from Users page and A (+644) |
Pm Wiki.Pm Wiki Friendly Hosting | February 15, 2025, at 06:43 AM | Petko | (-32) |
Pm Wiki Zh Tw.Initial Setup Tasks | February 12, 2025, at 04:29 AM | C | crypt()已弃用,更换为pmcrypt() (+10) |
Pm Wiki Zh Cn.Initial Setup Tasks | February 12, 2025, at 04:26 AM | C | crypt()已弃用,应更换为pmcrypt():密码管理;修改了一些 (+15) |
Pm Wiki Zh Cn.Pm Wiki Zh Cn | February 12, 2025, at 03:40 AM | C | .htaccess仅指Apache伪静态,不包含Nginx伪静态,容产生起歧义 (-6) |
Main.Wiki Sandbox | August 26, 2004, at 07:27 PM | | |
Pm Wiki.Table Of Contents-Talk | February 09, 2025, at 01:54 PM | Petko | UnnumberedHeadings (+165) |
|
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.Footnotes | February 16, 2025, at 09:13 PM | Said Achmiz | Updated recipe to new version (+97) |
Cookbook.WP Categories-Users | February 16, 2025, at 09:22 AM | sergiu | (+137) |
Cookbook.WP Categories | February 16, 2025, at 09:22 AM | Petko | fix link Skins/Monobook (-6) |
Cookbook.Reminder | February 08, 2025, at 10:42 AM | Petko | 20250208a : Fixed a but that incorrectly ordered 12am and 12pm (+158) |
Cookbook.Flickr | February 08, 2025, at 09:49 AM | Volker Mörke | (+0) |
Cookbook.Captcha-Talk | February 06, 2025, at 07:33 PM | Robert Pollice | (+151) |
Cookbook.Page Table Of Contents-Talk | February 04, 2025, at 03:31 PM | Nitram | (+4) |
|
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.