On Mon, Apr 16, 2007 at 09:51:36AM -0500, Patrick R. Michaud wrote:
> On Mon, Apr 16, 2007 at 10:28:38AM -0400, The Editor wrote:
> > I've been using the {(time)} markup, now changed to {(ftime)} by Pm.
> > But can no longer get it to produce a pure timestamp. Wish that had
> > been the default.
On Mon, Apr 16, 2007 at 10:28:38AM -0400, The Editor wrote:
> > Monday, April 16, 2007, 3:06:59 PM, The wrote:
> > > I spent hours debugging my code only to discover the problem was
> > > there. I never could find out how to do it, so added my own {(time)}
> > > extension to produce a timestamp.
On 4/16/07, Hans <[EMAIL PROTECTED]> wrote:
> Monday, April 16, 2007, 3:06:59 PM, The wrote:
>
> > So how do you get a timestamp...
>
> > I spent hours debugging my code only to discover the problem was
> > there. I never could find out how to do it, so added my own {(time)}
> > extension to produ
Monday, April 16, 2007, 3:06:59 PM, The wrote:
> So how do you get a timestamp...
> I spent hours debugging my code only to discover the problem was
> there. I never could find out how to do it, so added my own {(time)}
> extension to produce a timestamp. Did I miss something? I tried the
> %s
So how do you get a timestamp...
I spent hours debugging my code only to discover the problem was
there. I never could find out how to do it, so added my own {(time)}
extension to produce a timestamp. Did I miss something? I tried the
%s thing but no luck. It's also not on the php documentatio
On Thu, Apr 12, 2007 at 11:17:23PM +0200, Roman wrote:
> I like #1, #2 or #3, mostly #1.
Just to follow up on this -- the {(ftime ...)} markup
that made it into beta43 will accept format and when parameters
in any order. It also allows explicitly labeling the parameters.
So, for {(ftime ...)}, t
On Sun, Apr 15, 2007 at 11:47:27PM +0100, Hans wrote:
> Sunday, April 15, 2007, 11:41:15 PM, Patrick wrote:
>
> > Still shorter:
>
> > $FmtPV['$AccessCode'] = rand(100, 999);
>
> > Or if you really feel a need to use the {(...)} markup:
>
> > $MarkupExpr['captcha'] = rand(100, 999);
>
On 4/16/07, Hans <[EMAIL PROTECTED]> wrote:
> Sunday, April 15, 2007, 11:41:15 PM, Patrick wrote:
>
> > Still shorter:
>
> > $FmtPV['$AccessCode'] = rand(100, 999);
>
> > Or if you really feel a need to use the {(...)} markup:
>
> > $MarkupExpr['captcha'] = rand(100, 999);
>
> Both fine! Ca
Sunday, April 15, 2007, 11:41:15 PM, Patrick wrote:
> Still shorter:
> $FmtPV['$AccessCode'] = rand(100, 999);
> Or if you really feel a need to use the {(...)} markup:
> $MarkupExpr['captcha'] = rand(100, 999);
Both fine! Can you please explain the difference between
$MarkupExpr
On Sun, Apr 15, 2007 at 11:34:43PM +0100, Hans wrote:
> ...
> And I have been using this form all along, using a PV:
>
> $FmtPV['$AccessCode'] = RandomAccess();
> function RandomAccess() {
> return rand(100,999);
> }
>
> A lot less code for the same work. I might as well stick with it,
> sinc
Sunday, April 15, 2007, 11:23:54 PM, The wrote:
> No, it contains the first random number once the captcha has been set.
> All future occurrences of {(captcha)} will return that number rather
> than generating a new random number. Works fine..
I see. Thanks. so here I got this slightly shortene
On 4/15/07, Hans <[EMAIL PROTECTED]> wrote:
> Sunday, April 15, 2007, 10:58:47 PM, The wrote:
>
> > It won't work here because it will generate two separate random
> > numbers. Well it will work once in 1000 times.
>
> Yes I figured. grumble. I actually tried putting it into a PTV on the
> page, a
Sunday, April 15, 2007, 10:58:47 PM, The wrote:
> It won't work here because it will generate two separate random
> numbers. Well it will work once in 1000 times.
Yes I figured. grumble. I actually tried putting it into a PTV on the
page, and using the PTV for display of the number and for the h
On 4/15/07, Hans <[EMAIL PROTECTED]> wrote:
> A question about using rand:
>
> I am failing to use {(rand 100 999)} for random number generation for
> access code. I do get nice random numbers, but when submitting the
> post I get an error, saying basically the number typed is not the
> random numb
A question about using rand:
I am failing to use {(rand 100 999)} for random number generation for
access code. I do get nice random numbers, but when submitting the
post I get an error, saying basically the number typed is not the
random number given. So is this markup expression not suitable for
On Sun, Apr 15, 2007 at 10:11:18PM +0100, Hans wrote:
> Sunday, April 15, 2007, 10:01:35 PM, Patrick wrote:
>
> > Already added, but I added it as {(rand)} instead of {(random)}.
> > If it really needs to be {(random)} we can add it or change it.
>
> Thanks! I have no preference namewise.
>
> I
Sunday, April 15, 2007, 10:01:35 PM, Patrick wrote:
> Already added, but I added it as {(rand)} instead of {(random)}.
> If it really needs to be {(random)} we can add it or change it.
Thanks! I have no preference namewise.
I have another "please add to the core" wish though:
numerical compariso
On Sun, Apr 15, 2007 at 09:58:28PM +0100, Hans wrote:
> Wednesday, April 11, 2007, 7:58:39 PM, Patrick wrote:
>
> > I can add rand, definitely.
>
> I noticed you are putting the markup expressions into the core.
> Will you please add 'random' as well? Then it is one less page
> variable to define
Wednesday, April 11, 2007, 7:58:39 PM, Patrick wrote:
> I can add rand, definitely.
I noticed you are putting the markup expressions into the core.
Will you please add 'random' as well? Then it is one less page
variable to define. Used for Access-code human verification in
form recipes.
~Hans
On Fri, Apr 13, 2007 at 11:35:50AM -0500, Tegan Dowling wrote:
> On 4/13/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> >On Fri, Apr 13, 2007 at 10:59:51AM -0500, Tegan Dowling wrote:
> >> The pagelist is also working. This is great!
> >>
> >> Now, in a GroupHeader, I'd like to have
> >> ! (:
On 4/13/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 13, 2007 at 10:59:51AM -0500, Tegan Dowling wrote:
> > The pagelist is also working. This is great!
> >
> > Now, in a GroupHeader, I'd like to have
> > ! (:if pagename-format is text:){$Titlespaced}(:else:){(ftime ''
> > {$Nam
On Fri, Apr 13, 2007 at 10:59:51AM -0500, Tegan Dowling wrote:
> The pagelist is also working. This is great!
>
> Now, in a GroupHeader, I'd like to have
> ! (:if pagename-format is text:){$Titlespaced}(:else:){(ftime ''
> {$Name})}(:ifend:)
How about something like...?
(:if name 200[0-9]*)
On 4/13/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 13, 2007 at 08:58:59AM -0500, Tegan Dowling wrote:
> > On 4/11/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> > >I've now published my version of the {(...)} markup as a recipe,
> > >available at
> > >
> > >http://www.
> Works without the ZAP forms processing engine. Do use if you have the
> ZAPtoolbox installed as it will duplicate functions.
oops. Do NOT use (both)...
___
pmwiki-users mailing list
[EMAIL PROTECTED]
http://www.pmichaud.com/mailman/listinfo/pmwiki-u
Just released an updated version of the ZAP markups recipe to work
with Pm's new recipe.
http://www.pmwiki.org/wiki/Cookbook/ZAP-Markups
The description from the recipe page says:
ZAP markups Add a number of extensions to Pm's new markup expressions
recipe--including:
math
threads
capt
On Fri, Apr 13, 2007 at 08:58:59AM -0500, Tegan Dowling wrote:
> On 4/11/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> >I've now published my version of the {(...)} markup as a recipe,
> >available at
> >
> >http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions
> >
>
> 1) recipe page doe
On 4/11/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> I've now published my version of the {(...)} markup as a recipe,
> available at
>
> http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions
>
1) recipe page doesn't mention pre-requisites. I'm running v2.1.26 -
will it work for me?
2)
On 4/12/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> On Thu, Apr 12, 2007 at 05:47:21PM -0400, The Editor wrote:
> > BTW, it may be a small thing, but I really l wish you had gone with
> > time not ftime. Is there a reason you made that choice Pm?
>
> The biggest reason was to leave the {(t
On Thu, Apr 12, 2007 at 05:09:26PM -0500, Patrick R. Michaud wrote:
> On Thu, Apr 12, 2007 at 05:47:21PM -0400, The Editor wrote:
> > BTW, it may be a small thing, but I really l wish you had gone with
> > time not ftime. Is there a reason you made that choice Pm?
>
> The biggest reason was to le
On Thu, Apr 12, 2007 at 05:39:15PM -0400, The Editor wrote:
> FWIW, I use time in a lot of different formats, but almost always
> based on the current time. The exact opposite of Roman's needs.
Yes, this is exactly what I was thinking. :-)
> Yet for me, option 1 is also the best. That's a go
On Thu, Apr 12, 2007 at 05:47:21PM -0400, The Editor wrote:
> BTW, it may be a small thing, but I really l wish you had gone with
> time not ftime. Is there a reason you made that choice Pm?
The biggest reason was to leave the {(time ...)} expression available
for other purposes if we came up wit
BTW, it may be a small thing, but I really l wish you had gone with
time not ftime. Is there a reason you made that choice Pm?
I realize f is for format, but for something as generic and frequently
used as this it would be nice to use something a bit more natural and
intuitive. I can change mine
FWIW, I use time in a lot of different formats, but almost always
based on the current time. The exact opposite of Roman's needs. Yet
for me, option 1 is also the best. That's a good sign when opposite
needs like the same solution!
I suppose to maintain consistency of the formats in Roman's cas
I like #1, #2 or #3, mostly #1.
> But ultimately the question of order for format and when comes
> down to asking which is likely to occur most often: (1) formatting
> different time values using a common default admin-defined
> format, or (2) specifying that the current time is to be displayed
>
On Thu, Apr 12, 2007 at 11:53:35AM +0200, Roman wrote:
> The only comment I have is that I would transpose parameters of ftime
> expression so second parameter (format) could be omitted. That would
> allow users to specify only "when" parameter, for example {(ftime
> "next Monday")} without the nee
Thank you for this recipe. I've immediately found lot of usages for
it. And it is extensible as usually!
The only comment I have is that I would transpose parameters of ftime
expression so second parameter (format) could be omitted. That would
allow users to specify only "when" parameter, for exam
On Wed, Apr 11, 2007 at 02:17:30PM -0500, Ben Stallings wrote:
> Patrick R. Michaud wrote:
> >It may need some serious tweaking, because {(...)} always
> >expects the operation to be at the front, while {( ? : )} seems
> >to have its operators in the middle. If I were doing this
> >from scratch, I
Patrick R. Michaud wrote:
> It may need some serious tweaking, because {(...)} always
> expects the operation to be at the front, while {( ? : )} seems
> to have its operators in the middle. If I were doing this
> from scratch, I would probably write it as:
>
> {(if cond true false)}
That's so
On Wed, Apr 11, 2007 at 01:54:00PM -0400, The Editor wrote:
> I'm thinking about deleting my php markup since you have most of the
> commands I'm using built in. Any chance you could add the remainder?
>
> Specificially: strpos, rand?
I can add rand, definitely.
Can you give some examples for
On Wed, Apr 11, 2007 at 06:15:56PM +0200, Hladůvka Jiří wrote:
> I am missing the european date format %d/%m/%Y or %d-%m-%Y
> Or can I just put into the markup such a format ?
Short answer:
You can just put that into the markup directly, as in
{(ftime '%d/%m/%Y')}
Almost any format will wo
Patrick R. Michaud said...
> I've now published my version of the {(...)} markup as a recipe,
> available at
>
> http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions
>
> The description on the recipe page only scratches the surface of
> what the recipe can do. I'm particularly happy with
On Wed, Apr 11, 2007 at 12:53:40PM -0500, Ben Stallings wrote:
> With some tweaking of the Markup definitions, this recipe might be able
> to coexist peacefully with the existing {( ? : )} ternary logic markup
> used in SelectQuery for the past year. Or a variant of that markup,
> compatible wi
On 4/11/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 11, 2007 at 06:08:27PM +0100, Hans wrote:
> > Wednesday, April 11, 2007, 4:44:09 PM, Patrick wrote:
> > > http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions
> > > ...
> > > I'm particularly happy with the
> > > {(ftime .
[EMAIL PROTECTED] wrote:
>> I've now published my version of the {(...)} markup as a recipe,
>> available at
>>
>> http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions
>>
>> The description on the recipe page only scratches the surface of
>> what the recipe can do.
Nicely done, Pm! I part
Wednesday, April 11, 2007, 6:43:14 PM, Patrick wrote:
> Any chance you happened to view the page at exactly 12:00 noon? :-) :-)
> I just looked at the page, and it now says:
> now:April 11, 2007, at 12:37 PM
you are right! Egg in my face!
Great work Pm!
~Hans
__
On Wed, Apr 11, 2007 at 06:08:27PM +0100, Hans wrote:
> Wednesday, April 11, 2007, 4:44:09 PM, Patrick wrote:
> > http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions
> > ...
> > I'm particularly happy with the
> > {(ftime ...)} markup, which seems to be able to handle just
> > about any dat
On 4/11/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> On Wed, Apr 11, 2007 at 01:28:42PM -0400, The Editor wrote:
> > Pm, I'm trying to get my ZAP markup functions updated but seem to be
> > doing something wrong. Here is one example that doesn't seem to work
> > right...
> >
> > $MarkupExpr
On Wed, Apr 11, 2007 at 01:28:42PM -0400, The Editor wrote:
> Pm, I'm trying to get my ZAP markup functions updated but seem to be
> doing something wrong. Here is one example that doesn't seem to work
> right...
>
> $MarkupExpr['code'] = 'ZAPMcode($args[0])';
> function ZAPMcode($p) {
> // d
Pm, I'm trying to get my ZAP markup functions updated but seem to be
doing something wrong. Here is one example that doesn't seem to work
right...
$MarkupExpr['code'] = 'ZAPMcode($args[0])';
function ZAPMcode($p) {
// do my stuff;
return $p;
}
When I enter {(code {$:value})} I get
Wednesday, April 11, 2007, 4:44:09 PM, Patrick wrote:
> http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions
> The description on the recipe page only scratches the surface of
> what the recipe can do. I'm particularly happy with the
> {(ftime ...)} markup, which seems to be able to handl
I am missing the european date format %d/%m/%Y or %d-%m-%Y
Or can I just put into the markup such a format ?
Jiri
Patrick R. Michaud napsal(a):
> I've now published my version of the {(...)} markup as a recipe,
> available at
>
> http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions
>
> The
I've now published my version of the {(...)} markup as a recipe,
available at
http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions
The description on the recipe page only scratches the surface of
what the recipe can do. I'm particularly happy with the
{(ftime ...)} markup, which seems t
On 4/11/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> I've now published my version of the {(...)} markup as a recipe,
> available at
>
>http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions
>
> The description on the recipe page only scratches the surface of
> what the recipe can do. I'
53 matches
Mail list logo