[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Date, Time, Minivend, Perl Question Answered
****** message to minivend-users from Steve & Patti Getzinger <steveandpatti@wubs.org> ******
Found the solution shortly after sending the message. Doesn't it always go that way :) Here's what I
ended up using to alter the page based on the day and time it is. Just in case anyone desires a similiar
effect. As with everything in life I am sure there are other solutions to the problem.
[if explicit]
[condition]
(localtime)[6] => 1 && (localtime)[6] < 6 && (localtime)[2] => 9 && (localtime)[2] < 12
[/condition]
Put your page stuff here
[/if]
Stefan Hornburg wrote:
> ****** message to minivend-users from Stefan Hornburg <racke@linuxia.de> ******
>
> Steve & Patti Getzinger <steveandpatti@wubs.org> writes:
>
> > ****** message to minivend-users from Steve & Patti Getzinger <steveandpatti@wubs.org> ******
> >
> > I am trying to write an [if] for MV 4.03 and so far am stumped. Both halves work
> > fine by themselves so I am thinking operator problem. I have tried may configs
> > utilizing ( ) here and there but always come up empty when I try both together. It
> > must meet both conditions. Actually there are 3 conditions and when I can get past
> > this I am sure the third will be a no brainer to put in place. Here is my basic tag
> >
> > [if (`date` =~ /^S/) && (localtime($hours) => 7)]
> > R
> > [/if]
>
> MV isn't a programming language like perl, read the docs more thoroughly.
> For your task, try embedded perl.
>
> Ciao
> Racke
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list