[pmwiki-users] more than one cookbook- RotateMarkup possible?

Chris Cox ccox at airmail.net
Mon Sep 19 16:38:53 CDT 2005


Patrick R. Michaud wrote:
...
> 
> Awwww, "rotation" can be pretty darn simple too!   I just do the
> rotation based on wall clock time...  :-)
> 
>     $RotateMarkupFreq = 10;     # change every ten seconds
> 
>     $r = array("things", "to", "be", "rotated");
>     $i = (time() / $RotateMarkupFreq) % count($r);
>     return $r[$i];

Oh.. I was thinking rotation meant to go to the next one
based on the last one.  Not an automatic page refresh
thing.  Again.. I didn't look terribly close at what
was actually being asked for.







More information about the pmwiki-users mailing list