Categories > TinyButStrong general >

Problem using $tbs_CurVal within sub script

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: $tbs_CurrVal problem
Date: 2005-04-04
Time: 21:26

Problem using $tbs_CurVal within sub script

I'm trying to use a sub script :

content of this script is :
<?php
    echo($tbs_CurrVal);
?>

When i execute  php throws error "Notice: Undefined variable: tbs_CurrVal"

What's wrong ?

I saw within tbs source file and i didn't find any variable as tbs_CurrVal.

How does it can work ??

I use tbs 2.01 fro php5

Thanks for response


By: Skrol29
Date: 2005-04-05
Time: 00:24

Re: Problem using $tbs_CurVal within sub script

Hi,

$tbs_CurrVal was a TBS global (and local for sub-script) variable available in versions 1.x. It doesn't exist onymore in versions 2.x, except in version 2.0c which is a special compatible version. The migration kit explain the differences and how to make the same differently with versions 2.x.

TBS now uses a local variable $CurrVal, but this is not documented. You can use it if you need, but this is an internal variable that may change in the futur.

If your a OOP developer, you can also use the local variable $this into your sub-script to reach the calling TBS instance.
By: Anonymous
Date: 2005-04-05
Time: 08:03

Re: Problem using $tbs_CurVal within sub script

Many thanks!!!

Croco