Categories > TinyButStrong general >

E-Error

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: handoko
Date: 2009-11-07
Time: 00:15

E-Error

Hi...

i got an error
error: E_ERROR
Call to undefined method clsTinyButStrong::Render() at header.php line 5

this is header.php file

<?

$header =& new clsTinyButStrong;
$header->LoadTemplate(THEMES_DIR.'header.html');
$htmlTop = $header->Render();

?>


Is there wrong code? please help me
By: handoko
Date: 2009-11-08
Time: 13:41

Re: E-Error

this error has been resolved by replacing this code

$htmlTop = $header->Render();

with these code:

$header->Show(TBS_NOTHING);
$htmlTop = $header->Source; 

How ever, i still don't know why.

On the first code i use TBS ver 2.02.4
and on the second i use TBS ver 3.5
By: Skrol29
Date: 2009-11-09
Time: 00:21

Re: E-Error

Hi,

The error is quite explicit: Render is not a method, it is a property.

see:
http://www.tinybutstrong.com/manual.php#php_render
By: handoko
Date: 2009-11-09
Time: 04:43

Re: E-Error

Hi Skril29.

What is the different between $htmlTop = $header->render() on TBS 2.02.4 with

$header->Show(TBS_NOTHING);
$htmlTop = $header->Source; 

on TBS 3.4

By: Skrol29
Date: 2009-11-09
Time: 15:46

Re: E-Error

There was no method ->render() in TBS 2.02. It seems to be a user customization of the class.

$header->Show(TBS_NOTHING);
is equivalent to
$header->Render = TBS_NOTHING;
$header->Show();