[pmwiki-users] page history, disable

Patrick R. Michaud pmichaud at pobox.com
Thu Feb 8 14:16:58 CST 2007


On Thu, Feb 08, 2007 at 09:12:47PM +0100, info at hassanein.ch wrote:
> Quoting "Patrick R. Michaud" <pmichaud at pobox.com>:
> 
> >On Thu, Feb 08, 2007 at 07:39:35PM +0100, info at hassanein.ch wrote:
> >>I have created a custom template page which will be read by my
> >>cookbook every time the user goes to the page. This template will be
> >>parsed and it replaces some items etc and then the page is being
> >>updated.
> >>Through this process the page history grows very fast.
> >>
> >>Is there a mechanism to limit or disable page history on specific
> >>pages or groups.?
> >
> >To disable the page history, set
> >
> >    $DiffKeepDays = 0;
>
> I use the pmWiki's normal edit mechanism.
> The page is displayed, an action button is pressed and the same page  
> is being rendered and enhanced with data.
> If I can disable the page history on per page basis that would be  
> really great, because there are only 3 pages affected.

Sure, no problem.  Let's suppose you want to disable page history
for XYZ.SomePage .  Simply create a file called local/XYZ.SomePage.php
that contains

    <?php
      $DiffKeepDays = 0;

Whenever the page is updated, any page history information older
than zero days will be discarded.  Repeat this for the other
two pages.

Or, if you want to handle it all from local/config.php, you can do:

    $pagename = ResolvePageName($pagename);
    if ($pagename == 'XYZ.SomePage')  $DiffKeepDays = 0;

Of course, you can set $DiffKeepDays to some value other than zero
if you want to keep some history but not as much as PmWiki's default
setting (ten years).

Pm



More information about the pmwiki-users mailing list