Categories > TinyButStrong general >

something seems crazy

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: mrvanhieu
Date: 2004-05-07
Time: 21:18

something seems crazy

I wanna check variable "box" before display "Go to Inbox" as a link or not:
<a ref="gosomewhere.htm" [[tbs_check;if [var.box;noerr]=1;then 'pass'; else ''];friend2=a;noerr]>Go to Inbox</a>

I've tested this case, but it failed :D, can you give me some solutions?
By: RwD
Date: 2004-05-09
Time: 08:48

Re: something seems crazy

Sorry, I'm a bit sleepy, bu here is the most crappy solution I could think off:

HTML:
test: <a href[var.box;friend2=a]"gosomewhere.htm">Go to Inbox</a>
and in the PHP do this:
$box     = '=';

$tbs->LoadTemplate('templates/test.htm') ;
$tbs->Show();
The solution is rappy, but it works :P

So what I did is have the box var be '=' and insert that character in the html, otherwise leave the tag out...

A better/good solution would be if you do this:
HTML:
test: <a href="[var.address;friend2=a]">Go to Inbox</a>
and in the PHP do this:
$address     = 'http://www.tinybutstrong.com';

$tbs->LoadTemplate('templates/test.htm') ;
$tbs->Show();