Pagelist Recent Changes

Summary: A recent changes page created using Page lists
Version: 1.0
Prerequisites: 2.2.0
Status: Mature
Maintainer: Simon
Categories: PageList, MarkupOnly
Users: +1 (view / edit)

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:)

PageTimeByChange

(:template each:)

{=$Groupspaced}.{=$Namespaced}{=$LastModified}{=$LastModifiedBy}{=$LastModifiedSummary}

PageTimeByChange
Cookbook.Do The Right ThingAugust 16, 2026, at 11:56 amPetko20260816 - fix a bug where the opensearch file had literal "$ScriptUrl" instead of the actual URL. (+101)
Cookbook.Total Counter-TalkAugust 14, 2026, at 12:05 amsimonthanks, remove unneeded comments (-10425)
Profiles.Holger-watchlistAugust 13, 2026, at 09:16 amHolgerAdded a recipe that I use (+28)
Profiles.HolgerAugust 13, 2026, at 09:12 amHolgerAdded receipe I am using (+85)
PITS.01566August 12, 2026, at 08:39 pmPetkoInProgress (+482)
Pm Wiki.Change LogAugust 12, 2026, at 08:27 pmPetko$MatchSearched count should not include protected pages (PITS:01566). (+127)
PITS.01565August 12, 2026, at 07:09 pmPetkotemplate first|each|last (+303)
Cookbook.UTF 8 ConvAugust 10, 2026, at 07:40 pmsimonadd to see also (+93)
Cookbook.Tls Cert InfoAugust 08, 2026, at 12:25 pmHolgerImprove Configuration section formatting (-121)
Cookbook.Tls Cert Info-TalkAugust 08, 2026, at 10:47 amHolgerCreated talk page (+318)
News.2026-08-07August 07, 2026, at 10:31 amPetkoNotifyList (+4)
Pm Wiki.Release NotesAugust 07, 2026, at 10:30 amPetkomanual fix for wikis that cannot be upgraded (+575)

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:)

PageTimeByChange

(:template each:)

{=$Groupspaced}.{=$Namespaced}{=$LastModified}{=$LastModifiedBy}{=$LastModifiedSummary}

PageTimeByChange
Cookbook.Do The Right ThingAugust 16, 2026, at 11:56 amPetko20260816 - fix a bug where the opensearch file had literal "$ScriptUrl" instead of the actual URL. (+101)
Cookbook.Total Counter-TalkAugust 14, 2026, at 12:05 amsimonthanks, remove unneeded comments (-10425)
Cookbook.UTF 8 ConvAugust 10, 2026, at 07:40 pmsimonadd to see also (+93)
Cookbook.Tls Cert InfoAugust 08, 2026, at 12:25 pmHolgerImprove Configuration section formatting (-121)
Cookbook.Tls Cert Info-TalkAugust 08, 2026, at 10:47 amHolgerCreated talk page (+318)
Cookbook.Pm Wiki InfoJuly 26, 2026, at 02:22 amsimonupdate for 2.7.1 vars, improve var display, add vars, use $VarIndex (-26)
Cookbook.Thumb ListJuly 22, 2026, at 07:39 amPetko20260722 : Hide warning for recent PHP versions, reported by Simon. (+70)

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

  • Simon

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.