[pmwiki-users] working with page variables

Marco Ferretti marco.ferretti at gmail.com
Tue May 16 18:47:38 CDT 2006


Hi all,

I am trying to understand how variables work, specially, when they can be used 
inside a page. Thanks to Hans I managed to have my event handler using his 
BlogSimple cookbook.  In the modified php file now there's a EventDate 
declared as 

$FmtPV['$EventDate'] = 'StripName($pagename)';

And I thought of formatting it to use in pagelist .  So I tried 
#$FmtPV['$EventRealDate'] = 'strftime("%Y-%m-%d",$EventDate)';

but using {=$EventRealDate} in wikipages results in nothing ( maybe an empty 
space... didn't check out ) .

I then tried 
#$FmtPV['$EventRealDate'] = 'strftime("%Y-%m-%d",$page("EventDate"))';
just to be sure I wasn't wasting your time.

I even tried passing StripName($pagename) as the second argument of strftime, 
with the same result.

Now, since StripName($pagename) ALWAYS returns a string of the form yyyymmdd 
(because the first part of the page name is inserted in that form by the 
system, thus holding a number ) I was wondering : how do I format it ??

In general , when is 
$FmtPV['$EventDate'] = 'StripName($pagename)'; 
being computed and when can I use the variable in the file ?

hope this is not OT.

TIA

Marco


-- 
AWAKE! FEAR! FIRE! FOES! AWAKE!
	FEAR! FIRE! FOES!
		AWAKE! AWAKE!
		-- J. R. R. Tolkien
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/pmwiki-users/attachments/20060517/f83c1176/attachment.bin 


More information about the pmwiki-users mailing list