[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
for each page (or group) in the local/ directory, like

file Example.Test.php
with content
$AutoRestoreKeep = 15;

file Main.WikiSandbox.php
with content
$AutoRestoreKeep = 600;

file Main.php
with content
$AutoRestoreKeep = 120;

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;

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


More information about the pmwiki-users mailing list