By: SarCaSM
Date: 2004-12-16
Time: 06:25
|
Outputing DefinesWondering if it is at all possible to use the value of defines from php scripts in templates tinybutstrong.
|
||
By: Skrol29
Date: 2004-12-16
Time: 15:40
|
Re: Outputing DefinesHello,
What is a define? |
||
By: SarCaSM
Date: 2004-12-16
Time: 15:44
|
Re: Outputing DefinesLike this
|
||
By: Skrol29
Date: 2004-12-16
Time: 16:28
|
Re: Outputing DefinesHa ok, they are user constants.
Contsnats are not available like Php Global Variables but you can display them doing the following: Html:
I will add this in the Tips & Tricks. |
||
By: SarCaSM
Date: 2004-12-16
Time: 16:31
|
Re: Outputing DefinesThanks Skrol! Now, do I need to have the f_found_cst function in my code? or this is something you have in TBS already?
|
||
By: Skrol29
Date: 2004-12-16
Time: 16:44
|
Re: Outputing DefinesYou have to code it in your application.
This example illutsrates the MergeField() call with a user function. You can change 'f_found_cst' to any other function name, but the function must exist in your application. |
||
By: SarCaSM
Date: 2004-12-16
Time: 16:47
|
Re: Outputing Definesok, sounds good to me. Thanks again!
|
||
By: Ed
Date: 2005-10-30
Time: 15:57
|
Re: Outputing DefinesIn a related topic, how about if in:
PHP:
where: var is a variable and i want to use a class method instead of a regular function for f_found_var What TBS statements i need to add inside the class method and how to declare var in the template? |
||
By: Skrol29
Date: 2005-10-31
Time: 01:11
|
Re: Outputing DefinesHi Ed,
This is possible using the Object Oriented Programing syntax. Described here: http://www.tinybutstrong.com/manual.php#php_oop |
||
By: Ed
Date: 2005-10-31
Time: 04:42
|
Re: Outputing DefinesThanks. I read that already and honestly i need example. I guess, i had to do my homework first. I need to code first an example to reflect the scenario i want and discuss to you on specifics. will be back..thanks again
|