if($context['TPortal']['leftbar'])
{
echo '<td width="' ,$context['TPortal']['leftbar_width'], '" style="padding: ' , isset($context['TPortal']['padding']) ? $context['TPortal']['padding'] : '4' , 'px; padding-top: 4px;" valign="top">
<div id="leftbarHeader"', empty($options['collapse_leftbar']) ? '' : ' style="display: none;"', ' style="padding-top: 5px; width: ' ,$context['TPortal']['leftbar_width'], 'px;">';
TPortal_sidebar('left');
echo '</div></td>';
}When i place this in my custom page.
I don't see the Left Bar.
Instead i get an error saying TPortal_sidebar('left'); is an undefined function.
How to define it in my custom page. Or should i link to some other file.
Please Help.
Hello Darkman
This code is used in theme's index.template.php.
function TPortal_sidebar($side) is defined in TPortalBlocks.template.php.
I didn't understand what you mean by "custom page".
I made a file called home.php
http://gfxindia.com/home.php
I used the code in that page.
Could I suggest a different approach. Put what you want on your 'Home' page into an article.
"Tiny Portal - Settings - What to show on frontpage: Single page"
My South Gwent site (see sig) is set up as a welcome page and is the same version as yours.
I could very well do that.
But what i said could also be possible. Just want to know what i am doing wrong.
Why does that code work in a theme's template, but not in a stand-alone file in the same directory ?
I see now.
With TP 0.8.6 it will need quite some work and 0.8.6 is to be soon replaced. The best way is what nokonium suggested.
It will be quite easier with TP 0.9.x it is not far away and you have access in alpha version. So, I think it' s better to go this way. Bloc is aware of these needs and has included the necessary options.
By selecting a different theme and the new frontpage block and article options you can have what you want for home.
QuoteWhy does that code work in a theme's template, but not in a stand-alone file in the same directory ?
You are overriding index.php
Agridoc, Darkman have TP V95 on his forums i think ?
I am using 0.8.6 on my live site.
Quote from: agridoc on July 01, 2006, 08:55:34 AM
Bloc is aware of these needs and has included the necessary options.
I know that.
even i if i'll not be using this code now, i may use it in future.
So asking for Learning purpose and not else.
Please Teach me :D
Darkman, I think it's because all the proper files/variables aren't loaded. You'll notice since 0.86 I think Bloc added the TP initialization to the Load.php file. He used to do it from index.template.php I think. In order for you to be able to call TinyPortal functions TP has to be loaded. So if you're just trying to call TPortal_sidebar('left'); it doesn't know where to find it because those settings haven't been put in the php's memory for you to use. I know that's how it works, I just don't know how to load everything or what needs to be loaded for it to work. :)
If i load the Load.php, will the Blocks show ?
Thats a good question. The only way to know is if you try it.
Try something like require() or include() for load.php and see. I really don't know how it all works in detail.
OK
I'll try it ;)