Categories > TinyButStrong general >

Another constant question

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: SarCaSM
Date: 2004-12-18
Time: 17:10

Another constant question

ok, so I have another question involving constants. Lets say I have the following  PHP and HTML code.

PHP:
define('DATE_SEP_CHAR','/');

HTML:
...[blk1.Date;frm="mm/dd/yyyy"]...

Now though, I want to have the format for the date in the HTML side to be based on the constant defined above.  Like if the user wanted to change DATE_SEP_CHAR to '-', it gets formatted as "mm-dd-yyyy".  Is this possible and if so, how?
By: Skrol29
Date: 2004-12-18
Time: 18:45

Re: Another constant question

HTML:
... [blk1.Date;frm="mm[cst.DATE_SEP_CHAR]dd[cst.DATE_SEP_CHAR]yyyy"] ...

PHP:
$TBS->MergeField('cst','my_user_function',true) ;
...
$TBS->MergeBlock('blk1',...);