[pmwiki-users] New PageListTemplate to simulate RecentChanges

Martin Fick fick at fgm.com
Wed Nov 9 17:08:01 CST 2005


> very nice.
> 
> By including
> 
> unset($RecentChangesFmt['Site.AllRecentChanges']);
> unset($RecentChangesFmt['$Group.RecentChanges']);
> 
> in your 'local\config.php' and manually create
> $Group.RecentChanges in every group with
> 
> (:pagelist order=-time list=normal group={$Group}:)
> 
> it will do the same as old RecentChanges skript.
> 
> 
> Is there a way to generate the $Group.RecentChanges automaticly for new groups?




  I don't know, but you would probably want to rip out the
current RecnetChanges mechanism if you were to do that. I'm
not sure what the driving factor for this would be, but I
guess if people want it, ask Patrick.  I would be happy to 
have my recipe used.


  One way to avoid having to do this is by using a
RecentChanges group.  In the RecentChanges.GroupHeader you
put a pagelist that uses the group={$Name} option and points
to a template with whatever format you would like to see
your RecentChanges in and voila: a reverse RecentChanges
lookup group!

  Now, to see your new fancy Foo.RecentChanges you would go
to RecentChanges.Foo instead.  With this solution you do not
have to create a pagelist for each group in your site. You
will however have to so some fancy conditional stuff to be
able to use it for AllRecentChanges.  I have done a mockup
here:

http://www.theficks.name/test/PLT/pmwiki.php?n=RecentChanges.SiteAll

  Try it out and replace the SiteAll with another group name
such as Test.


  Using this method you can also "piggyback" off of the 
real RecentChanges pages.  In the RecentChanges.GroupHeader 
you put a pagelist that uses the trail={$Name}.RecentChanges
option instead.  This now reads the real RecentChanges page
to figure out which pages to list.  This has the advantage
that it will track the real RecentChanges and reflect
excatly the same pages as it.  Another major advantage is
that this will not suffer the performance hit that a real
pagelist will suffer!  You can see a mockup of this here:

http://www.theficks.name/test/PLT/pmwiki.php?n=RecentChangesPiggyBack.PageList


  Note the minor glitch of having a none existing page put:

Describe <pagename>? here.
 
  It would be neat to have a markup that you could put in a
GroupHeader that would kill this.

  Enjoy,


  -Martin




More information about the pmwiki-users mailing list