Categories > TinyButStrong general >

HTML in variables

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: tdh
Date: 2003-09-28
Time: 12:49

HTML in variables

I have the PHP file:

<?
include_once("tbs_class.php") ;

$loginForm = ""
."<p><table border=1 cellpadding=0 cellspacing=0>"
."<tr>"
."<td>"
."<form method=\"post\" action=\"members.php\">"
."<table border=0 cellpadding=3 cellspacing=0 bgcolor=\"#DDDDDD\">"
."<tr>"
."<td align=left valign=top>Username:</td>"
."<td align=left><input type=\"text\" size=\"15\" name=\"username\"></td>"
."</tr><tr>"
."<td align=left valign=top>Password:</td>"
."<td align=left><input type=\"password\" size=\"15\" maxlength=\"30\" name=\"password\"></td>"
."</tr><tr>"
."<td></td>"
."<td align=left valign=top><input type=\"submit\" value=\"Login\" name=\"submit\"></td>"
."</tr>"
."</table>"
."</td>"
."</tr>"
."</table></p></form>";

$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate("tpl/index.htm") ;
$TBS->Show() ;

?>

And on the tpl/index.htm file i have the variable [var.loginForm].

The Problem i am having is that it changes the <'s into the codes so on the page itself it displays the <'s and >'s and is not actually using them as HTML, which is what i want them to do.
(outcome: http://clone.wdtec.net/test/tdh/com/index.php)

Could someone please tell me how to stop it from changing the < and >? Thanks for any help.
By: Skrol29
Date: 2003-09-28
Time: 12:54

Re: HTML in variables

Hello Thd,

By default, TBS convert values to HTML before to display them.
You can manage the convertion using the 'htmlconv' parmeter.

In your case, use:
[var.loginForm;htmlconv=no]
By: tdh
Date: 2003-09-28
Time: 13:55

Re: HTML in variables

wow thanks man. How did you know that?
By: Skrol29
Date: 2003-09-28
Time: 13:57

Re: HTML in variables

I coded it :)
By: tdh
Date: 2003-09-28
Time: 14:05

Re: HTML in variables

cool. You must be pretty good with PHP. How long have you been coding?
By: Skrol29
Date: 2003-09-28
Time: 14:11

Re: HTML in variables

2 years now.
By: tdh
Date: 2003-09-28
Time: 14:23

Re: HTML in variables

check out:
www.avidgamers.com

Its what has inspired me to do what im doing now. Make sure you sign up for a comunity and check everything out. Its such a great site.
By: Skrol29
Date: 2003-09-29
Time: 16:06

Re: HTML in variables

It seems interesting at first view.
I gonna visit it deeper.
Thanks for the link.