[pmwiki-users] more than one cookbook- RotateMarkup possible?
    Patrick R. Michaud 
    pmichaud at pobox.com
       
    Mon Sep 19 14:39:56 CDT 2005
    
    
  
On Mon, Sep 19, 2005 at 02:26:12PM -0500, Chris Cox wrote:
> Stephan Schildberg wrote:
> > 
> > you did provide us with this cookbook file.
> > http://www.pmwiki.org/wiki/Cookbook/RotateMarkup
> > It works fine. :-)
> > 
> > - Is it possible to use more than one 'tour' of changes, like (:rotate
> > 1:) .... (:rotate n:) ?
One possibility might be to change (:rotate:) to use a page
divided into sections (a la BreakPage or SectionEdit), where each
section is one element of the rotation.  
(And yes, I'm looking at integrating a version of section edits
into the core.)
> > - Is it possible to point to a directory, given I show alternating
> > pictures, instead of a fixed list, then abjuring the use of links?
> > This would provide the wiki author with more power to change the content
> > (by uploads). Now we have access only through config.php
Perhaps, although it seems to me that most times there are likely to
be things in an upload directory that wouldn't belong in a rotation,
so we end up having to have a list anyway.
> (I've thought about adding pure rotation eventually.. feel free
> to do so... random is easier since you don't care about state).
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];
Pm
    
    
More information about the pmwiki-users
mailing list