[pmwiki-users] concerning autorestore...an idea

Hans design5 at softflow.co.uk
Tue Nov 4 04:47:39 CST 2008


Tuesday, November 4, 2008, 9:40:44 AM, Swift, Chris wrote:

> I'm probably making things too complicated, but I really like the
> autorestore function.  So much so, that I would like other pages to
> autorestore, but at different time intervals from another or a longer
> explanation:

> How can I get one page or group to autorestore at a different time
> interval?  So, for example, I would have my wikisandbox page autorestore
> every 10 minutes, but my Main group autorestore every 2 minutes and my
> page on Example/Test autorestore every 15 secs?
>

you could create local customisation files
(http://www.pmwiki.org/wiki/PmWiki/LocalCustomizations)
for each page (or group) in the local/ directory, like

file Example.Test.php
with content
<?php
$AutoRestoreKeep = 15;
include_once('cookbook/autorestore.php');

file Main.WikiSandbox.php
with content
<?php
$AutoRestoreKeep = 600;
include_once('cookbook/autorestore.php');

file Main.php
with content
<?php
$AutoRestoreKeep = 120;
include_once('cookbook/autorestore.php');


OR add something like this to config.php:

$group = PageVar($pagename, '$Group');
if ($group=='Main') $AutoRestoreKeep = 120;
if ($pagename=='Main.WikiSandbox') $AutoRestoreKeep = 600;
if ($pagename=='Example.Test') $AutoRestoreKeep = 15;
include_once('cookbook/autorestore.php');


AND file copy all the page files you wish to have autorestored
from wiki.d/ folder to wikirev.d/ folder.


  ~Hans




More information about the pmwiki-users mailing list