By: b52
Date: 2006-10-20
Time: 00:05
|
call a php function in htmlthe topic is my question :p
hope someone knows what i mean and can help me |
|||
By: Skrol29
Date: 2006-10-20
Time: 02:26
|
Re: call a php function in htmlHi,
You can try to put something like this into your template :
Take care that my_function() is a custom function but must have the predefined syntax for the onformat parameter. |
|||
By: b52
Date: 2006-10-22
Time: 02:06
|
Re: call a php function in htmland how can i put paramaters in that function?
|
|||
By: b52
Date: 2006-10-22
Time: 02:21
|
Re: call a php function in htmland another problem
how must i plugin the ezsql plugin i included it but what now? |
|||
By: TomH
Date: 2006-10-22
Time: 18:11
|
Re: call a php function in htmlHere's how I set up for running all of my TBS/ezSQL applications -- I'll cut and past from some representative files - so there may be a few disconnections - but you's get the general idea...
I use php's autoprepend feature to load the classes and initialize db connection for all pages by using the apache .htaccess feature
Then the tbs_ezSQL.inc looks like this:
Then you're ready to create your typical TBS php file:
Hope that helps, |
|||
By: ghjf
Date: 2008-02-03
Time: 16:34
|
Re: call a php function in htmlfhjmf
|
|||
By: hozyali
Date: 2010-08-03
Time: 23:47
|
Re: call a php function in htmlHi,
I would like to know the answer of b52's second question
I need to pass a couple of patameters to my php function. please advise. thanks |
|||
By: Skrol29
Date: 2010-08-03
Time: 23:52
|
Re: call a php function in htmlHi Hozyali,
"onformat" and "ondata" parameter can receive a value which is a custom PHP function. Nevertheless, those custom function must follow the syntax described in the manual. You cannot add arguments to such functions, their purpose is to be called by TBS when appropriate, with convenient arguments. |
|||
By: hozyali
Date: 2010-08-04
Time: 00:22
|
Re: call a php function in htmlI understand, but I need to supply a field value type to the php function to run other php functions based on the parameter value.
Please advise with example how do I do that? thanks for your help. |
|||
By: Skrol29
Date: 2010-08-04
Time: 01:42
|
Re: call a php function in htmlThen use "onformat", the custom function can get the fields' parameters as an argument.
I insist you should read the manual. http://www.tinybutstrong.com/manual.php#html_field_prm_onformat |
|||
By: hozyali
Date: 2010-08-04
Time: 08:52
|
Re: call a php function in htmlI know onformat will work,
But I can't find an example to use for my code. that is all I need. |
|||
By: Skrol29
Date: 2010-08-04
Time: 15:30
|
Re: call a php function in html |
|||
By: hozyali
Date: 2010-08-04
Time: 15:36
|
Re: call a php function in htmlits really getting complicated but it is not in my actual case.
Please see my php function below what is actually doing.
above is the simple php function which returns the array of recordset. Can you be so kind to just convert the above function into how it is required for TBS ? also with the example of template HTML which will be needed to call the above function's data. I think this is all I need to get started with TBS. thanks again. Regards Ali |
|||
By: Skrol29
Date: 2010-08-04
Time: 17:53
|
Re: call a php function in htmlHi,
I'm sorry you seem to be far from the first topic of this thread. It seems you'd like to merge a full data set coming from a custom function. Since your function returns data as a PHP array, you can go to the inline examples, and see the examples named "Data -Array". They are both PHP script and template. The example gives 3 merges of array data, while you need only one. You can notice that you can avoid your PHP function and go directly with a MySQL merge. See the example named "Data -MySQL" |
|||
By: hozyali
Date: 2010-08-04
Time: 18:15
|
Re: call a php function in htmlI am asking because it is not working for me. I know I must be making a mistake or something wrong, and that is what I need help with.
The examples, I tried them and because they are not actually what I am doing its making trouble for me too. |
|||
By: hozyali
Date: 2010-08-04
Time: 20:46
|
Re: call a php function in htmlJust to clarify my question more,
Yes I need full data set coming from a custom php function. In the examples DATA - ARRAY, I studied it twice, it works itself fine, but its not working when I use MergeBlock in the php function. That is why I need a clear and basic example of what I need so I can move on with my project and I think this will become easier for me to just copy your sample for all my future functions in this project. Thanks again for your help. |