[pmwiki-users] New {$$ } and {( )} markups [Was: Can any of the form recipes do this?]

The Editor editor at fast.st
Tue Apr 3 16:29:24 CDT 2007


On 4/3/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Tue, Apr 03, 2007 at 04:06:44PM -0400, The Editor wrote:
> >
> > As it's not an urgent issue, I'll not rush into this as quick as Hans.
>
> I'll repeat my earlier comment -- I'm not at all saying that ZAP
> (or Fox) have to switch away from using {...} -- I'm just advising that
> based on my experience it's a bit of a risky markup choice for such
> a specialized purpose, and that it might interfere with other
> markups someday.  So there's no real rush.

Ok, I'll wait and think about it a bit more.  I want something very
simple for field replacements. And I think it should be different from
template insertions.  I will however use the standard markup for
templates at least by the time you roll it out in Pmwiki.

> But a few
> general observations on these, for whatever they're worth:
>
>  - "count" may be too generalized a word to mean "count pages in a
>    group", especially since PHP already has a count() function that
>    does something else entirely.  Perhaps "pagecount" or "grouppagecount"
>    or "groupcount" would be more explicit.

Yes maybe groupcount is better...

>  - My captcha implementation will be written as (:input captcha:).

Curious how this will work...  Are you building your own conditional
testing and all too, or something specialized for this one input?

>  - it seems like "attr" really ought to be a page variable, since
>    attributes are directly associated with pages.

Yeah maybe, but I have to admit I prefer it as a markup to a page variable...

> > time: alternately, takes a number like 03 or 3 combined with w or m to
> > return Tuesday, or March based on a configurable string.  Useful with
> > Hg for page names like 2007-03-15 (ie using {$n2}).
>
> Interesting.  Given a pagename like 2007-03-15, my version of this would be:
>
>     {(time %B {$Name})}    # March
>     {(time %A {$Name})}    # Thursday

If you can get it to work, I'd be good with this.  I suppose you can
somehow configure %B or %A easily enough to reflect different values?

> In the more general sense, is there a difference between...?
>
>     {(time)}
>     {(date)}
>     {(strftime)}
>
> In other words, do we need all three?

Don't really think so.  Date and strftime are both php functions and
should be available specifically through a php list of sorts.  You
should develop a multipurpose time function as we'll all have
different ideas how it should work. And it's use in php is pretty
limited.

Cheers,
Dan



More information about the pmwiki-users mailing list