[pmwiki-users] meta refresh?

Dominique Faure dominique.faure at gmail.com
Thu Apr 27 03:12:43 CDT 2006


On 4/26/06, Neil Herber <nospam at eton.ca> wrote:
> At 2006-04-26  10:58 AM +0200, Jens Schiffler is rumored to have said:
> >** Reply to message from Neil Herber <nospam at eton.ca> on Wed, 26 Apr 2006
> >00:34:46 -0400
> >
> > > Is there a way to insert a meta refresh tag on a wiki page?
> >
>
> I want to have something like (:refresh 10:) generate a tag like:
>
> <META HTTP-EQUIV=Refresh CONTENT="10">
>
Here you go:

Markup('refresh', '>&',
  "/\\(:refresh\\s+(.+?):\\)/ei",
  "PZZ(SetProperty(\$pagename, 'refresh', PSS('$1'), '\n'))");
$HTMLHeaderFmt['meta-refresh'] = 'function:PrintMetaRefresh';
function PrintMetaRefresh($pagename, $args) {
  global $PCache;
  $c = @$PCache[$pagename]["=p_refresh"];
  if(!$c) return;
  $u = MakeLink($pagename, $pagename, NULL, NULL, '$LinkUrl');
  print "<meta http-equiv='refresh' content='$c' url='$u'/>\n";
}

Regards,
Dom


--
The difference between theory and practice in theory is much less
than the difference between theory and practice in practice.
 — Randal L. Schwartz




More information about the pmwiki-users mailing list