[pmwiki-users] page refresh

Patrick R. Michaud pmichaud at pobox.com
Tue Sep 26 09:21:04 CDT 2006


On Tue, Sep 26, 2006 at 03:59:02PM +0200, Thomas N. Burg wrote:
> I need a wiki page to refresh either on demand (by savin it) or  
> regularily. The page is supposed to be shown on a TV-screen without  
> any chance to manually refresh the browser so that page is edited  
> remotely.
> 
> Is this possible after all.
> 
> Thanks for any ideas how to achieve that

The following will cause a browser to refresh the page every 30
seconds.

  if ($action == 'browse') 
    $HTMLHeaderFmt['refresh'] = 
      "<meta http-equiv='Refresh' Content='30; URL={\$PageUrl}' />";

It can be done sitewide in local/config.php (probably not recommended),
or in a per-page or per-group customization file.

Or, one could use the following customization to add a '?refresh=nn'
option to all pages:

  if (@$_GET['refresh']) {
    $r = $_GET['refresh'];
    $HTMLHeaderFmt['refresh'] =
      "<meta http-equiv='Refresh' Content='$r; URL={\$PageUrl}?refresh=$r' />";
  }

For demonstration, I've enabled this latter option at
http://www.pmwiki.org/wiki/Test/Refresh .

Pm




More information about the pmwiki-users mailing list