00745: conditional markup: ´if time´

Summary: conditional markup: ´if time´
Created: 2006-05-26 14:21
Status: Closed - cookbook recipe
Category: Feature
From: Lenard
Assigned:
Priority: 44444 33 2
Version: all
OS: n/a

Description: I want to display 2 different URL´s depending on the time of day. I want to use this for displaying the weather conditions of an external site for day, eavening and night conditions. Other examples for using this markup are: diplaying sunrise and sunset. Maybe there is another simple way to do this. I so please tell me (see profile mail adres) The markup I imagine is:

(:if time 00:00..11:59:)
URL A
(:if time 12:00..23:59:)
URL B
(:ifend:)

The problem is that the ´if time´ conditional markup is not available. Can it be added?

Thanks, Lenard.

lenard June 15, 2006, at 04:43 AM I don't get a lot of response on my request. I do think it's a very usefull function to implement. Can anyone reply if I'm right or wrong or maybe follow the wrong procedure?

Armin December 11, 2006 at 10:20 AM GMT Would an expansion (?) of the conditional markup (:if date YEAR-MO-DA..YEAR-MO-DA:) to a (:if date HH-MM-SS..HH-MM-SS:) help you? So it's just a mod and not a complete new cookbook.

lenard January 1, 2007 at 05:55 PM Armin, I did not see your comment until now. (Although I was watching this issue) I agree with your comment/proposal; this mod should be enough.

lenard January 2, 2007 at 11:20 PM Armin, just to be clear; I hope you can (help me) implement this mod because I'm not a php programmer and I don't understand the code in scripts/stdmarkup.php that must be added/modified to enable this function.

Please look at Cookbook:ConditionalMarkupSamples#iftime for a solution.