By: OoMyGod
Date: 2004-12-11
Time: 05:33
|
TBS questions
hi,
i'm developing new blogging apps and gladly i choose TBS for the template engine :) .
i have several questions on following:
1. my blog stored in mySQL data, the blogs contains normal blogs which may include some html tags like <img> and as well as php tags or other non html taggs. The html tags i can display properly when i use htmlconv=no. example the images will be shown correctly, howeve when i use htmlconv=no but the data contains php tags the data wont be displayed (but viewable in html source). if i omit the htmlconv the php tags will be displayed properly but other html tags will not.
2. Can TBS have create rules? i mean those variables we have set in PHP script we only allowed some of the variables able to modify the htmlconv value while others cant set the htmlconv.
3. For security reason, does TBS allow designers to view wat are available php variable using TBS tagging??
thanks a lot for ur help, looking forward for the reply :)
anyway u should make it as Super Tiny AND Strong :)
|
By: Skrol29
Date: 2004-12-12
Time: 13:46
|
Re: TBS questions
Hi,
Q1/
PHP tags you add in you template are not processed and this is normal. Otherwise it would be very unsecure. The template result is not a script given to the PHP engine. It is simple string/file output.
If you whant pieces of <?php ... ?> to be executed as PHP script, you have to write un function that does search those tags in a string, and that use the Eval() function to process the embeded piece of script. Such a function can be called for you merged values using parameter 'onformat'.
Q2/
Rules such as BBcode have to be coded in a PHP function which replaces all personal tags by corresonding Html tags..
This is usually done using regexp.
Since you have your function, you just have to use is with a parameter 'onformat' on the fields you whant to be converted.
This Forum has only one special tag for posts. The source of the template is availbale at the Download page.
Q3/
By default all Php variables are allowed in a TBS template. So a designer can see all of them. But you can limit the Var fields usage by a prefix. This is described in the manual at the "Var fields" section.
|