[pmwiki-users] RecentChanges cleanup

Roman romat2 at gmail.com
Sun Jun 3 07:35:38 CDT 2007


On 6/3/07, Christophe David <pmwiki at christophedavid.org> wrote:
> >> Is there a way to specify the number of days the RecentChanges pages
> >> report changes ?
> >
> > I'm not sure if this is what you're referring to, but here goes.
> > >From the config.php file:
> >
> > ##  $DiffKeepDays specifies the minimum number of days to keep a page's
> > ##  revision history.  The default is 3650 (approximately 10 years).
> > $DiffKeepDays=30;                        # keep page history at least 30 days
> > Is this what you meant?
>
> I like having a long revision history ($DiffKeepDays), but I find the
> RecentChanges pages often show more than I would like.

RecentChanges is ordinary page so it would be much more complicated to
delete lines based on date then to simply delete lines after
$RCLinesMax. Format of RecentChanges items can be fully customized, so
parsing code would have to match this format. If you need to have a
list limited by date you could use dynamically created pagelist:

(:pagelist order=-time if="date {(ftime %F -7days)}..{(ftime %F
today)} @{=$LastModifiedTime}" fmt=#YourListFormat:)

where $LastModifiedTime is a page variable defined as

$FmtPV['$LastModifiedTime'] =  "\$page['time']";

and YourListFormat is pagelist template defining format of individual
list items. For testing purposes you could use fmt=#simple.

This requires pmwiki2.2.0beta45 or later.

Roman



More information about the pmwiki-users mailing list