[pmwiki-users] Today Tomorrow the day after and so on

Firefly stealth at fireflyuk.net
Mon Apr 3 06:22:22 CDT 2006


[@
[[#Today]]
[[Caln.{$Today}|{$Weekday}]] - (:include Caln.{$Today} lines=1:)\\
[[Caln.{$Todaya}|{$Weekdaya}]] - (:include Caln.{$Todaya} lines=1:)\\
[[Caln.{$Todayb}|{$Weekdayb}]] - (:include Caln.{$Todayb} lines=1:)\\
[[Caln.{$Todayc}|{$Weekdayc}]] - (:include Caln.{$Todayc} lines=1:)\\
[[Caln.{$Todayd}|{$Weekdayd}]] - (:include Caln.{$Todayd} lines=1:)\\
[[#Todayend]]
@]

This is how I did it. I know wtf its huge but it works for me..
Only thing that is slight odd is that it shows the dates even without a page
there. Which Is actually no problem, as it lets people add things for those
dates, but might be nice if I didn’t show them

-----Original Message-----
From: Hans [mailto:design at softflow.co.uk] 
Sent: 03 April 2006 11:46
To: Firefly
Cc: pmwiki-users at pmichaud.com
Subject: Re: [pmwiki-users] Today Tomorrow the day after and so on

Monday, April 3, 2006, 11:26:07 AM, Firefly wrote:
> If the page name = todays date, show the page name linked to the page,
first
> line of text. And what day today is?..

perhaps
(:if equal {$Name} {$Today}:)(:include {$FullName} lines=1:)(:if:)

or simpler:
(:include {$Group}.{$Today} lines=1:)

This assumes your page names have the same format than the {$Today}
page variable.

Please see all the various formatting options for time and dates at
the link about the php strftime function: http://uk.php.net/strftime

%A - full weekday name according to the current locale, so

# adds page variable {$Weekday}:
FmtPV['$Weekday'] = 'strftime("%A", time() )';


Best,
 Hans                           

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.4/299 - Release Date: 31/03/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.4/299 - Release Date: 31/03/2006
 





More information about the pmwiki-users mailing list