[pmwiki-users] RecentChanges to actually show AllRecentChanges

Patrick R. Michaud pmichaud at pobox.com
Mon Jan 9 07:54:22 CST 2006


On Mon, Jan 09, 2006 at 07:31:34PM +1300, Simon wrote:
> Once upon a time I was given the following to change the RecentChanges 
> on a page from showing only those for the Group to those for all Groups.
> 
>   if (substr($pagename, -14) == '.RecentChanges')
>     $DefaultPageTextFmt = '(:include Site.AllRecentChanges:)';
> 
> This no longer seems to work (perhaps because of the hard coded 14?)
> Could somebody please suggest an update.

It might be because the $pagename contains a slash instead of
a dot (i.e., "Group/RecentChanges" instead of "Group.RecentChanges").
While I expect this to be fixed in an upcoming beta release, it
might work if you do:

    if (preg_match('![./]RecentChanges$!', $pagename))
      $DefaultPageTextFmt = '(:include Site.AllRecentChanges:)';

Pm




More information about the pmwiki-users mailing list