[pmwiki-users] Again: looking to add more randomness

Comit sam at usamedia.tv
Wed Feb 15 12:25:07 CST 2006


"Patrick R. Michaud" <pmichaud at pobox.com> wrote in message 
news:20060215145144.GE23618 at host.pmichaud.com...

> How about the following instead?  (I'm looking to add this to
> beta26.)
>
>    (:pagelist group=Banners order=random count=1 fmt=#include 
> list=normal:)
>
> Then one can select random pages from any pagelist.  The above
> will pick a "normal" page from the Banners group.  One could also do
> things like
>
>  - from a trail
>    (:pagelist group=Banners.IndexTrail order=random count=1 fmt=#include 
> :)
>
>  - random page from a category (i.e., pages marked with [[!Banners]])
>    (:pagelist link=Category.Banners order=random count=1 fmt=#include :)
>
> This could also be used for the "Did You Know" capability,
> if you're willing to place each quote into its own wiki page:
>
>    %comment% display three quotes
>    (:pagelist group=Quotes order=random count=3 fmt=#include :)
>
> But there's also some advantage to be had by maintaining the
> quotes in a single page, so...


Seems like a pretty powerful markup with many uses. I like it :D
However, something about 1 DYK per page kinda sounds sorta clunky and 
perhaps even slow to process.
I'm not one to be picky though so if it works I'll use it, but the 
suggestion below sounds perfect IMO.



> I've looked at the Cookbook.RandomQuotes recipe, and it's not
> designed at all the way I would've done it.  I think that it
> ought to support multi-line quotations, and embedded wiki markup,
> and not use the bullet character to separate quotations.  Better would be
> to format the quotes page and file as something like:
>
>    [[#yoda]]
>    * Do, or do not.  There is no "try".
>    -> Yoda
>
>    [[#grandmother]]
>    * The impossible is only a little bit harder.
>    -> My Grandmother
>
>    [[#churchill_hell]]
>    * When you're going through hell, keep going.
>    -> Winston Churchill
>
> Then the random quote recipe could do something like
>
>    (:randquote QuotesPage count=3:)
>
> and grab + include three quotes at random from the page.  Formatting
> things this way also promotes re-use, since an author can then
> grab a specific quote with
>
>    (:include QuotesPage#grandmother:)
>
> I'll see about writing a version based on this design sometime
> later today.
>
> Pm


Thanks
- Com 







More information about the pmwiki-users mailing list