Is there a way or tweak to have left or right block panels in different widths when viewing forum vs. when viewing frontpage?
I like my left panel on the front page stay kind of wide ~265px and have my forum panel narrow but on the left as well but around 160px .
Thanks, C.P.
The panels are built with one action for both borum and frontpage, so as is it's not possible. I dont know if it's hard to change the code to make it like you want it :-\
OK, I'm just being picky anyways ;D Thanks for the quick reply.
You could do it with some code. Open index.template.php and add this code before the <body> tag would be ok.
if ($context['TPoral']['is_front'] == 1){
$leftside = 1;
}
else{
$leftside = 0;
}
Then in your sidebar code you could find this code:
echo '<td width="' ,$context['TPortal']['leftbar_width'], '"
Change it with this:
echo '<td width="', ($leftside == 1) ? '265px' : $context['TPortal']['leftbar_width'],'"
This one i just have to try, it's a good feature IMO :D
Quote from: G6 on October 05, 2007, 06:33:59 AM
This one i just have to try, it's a good feature IMO :D
Yea that's awesome - just made a TP site that much more versatile. So the 265px for the front page is going to fixed but the left panel everywhere else will be adjustable through TP settings on the admin page? And if I undo the code mentioned above it would be back to normal?
Thanks,
C.P.
Did it work? It just popped in my head how to do it, so I wondered if it would work. lol
Not exactly. One page page would be parser error
line - if ($context['TPortal']['is_front'] == 1){
I would fiddle with the code and the closest I got it looked like a hybrid between my Mesh TP theme and the default. Both themes have their own index.template.php but the panel width settings stay the same when switching themes. Doesn't this mean it's getting the panel widths from a common php template? I tried just the default theme but it still wouldn't work.
BTW what's a Tporal? :2funny:
Well, show the code if you want help fixing it... lol Yes, it means you'd have to do this to each theme you want it to work in.
I'll probably try to tackle this in a week or so, thanks for the help.
Quote from: catchpen on October 06, 2007, 12:12:56 AM
Not exactly. One page page would be parser error
line - if ($context['TPortal']['is_front'] == 1){
I would fiddle with the code and the closest I got it looked like a hybrid between my Mesh TP theme and the default. Both themes have their own index.template.php but the panel width settings stay the same when switching themes. Doesn't this mean it's getting the panel widths from a common php template? I tried just the default theme but it still wouldn't work.
BTW what's a Tporal? :2funny:
It should get the panel width from TP itself, in Settings page.
But different panel widths for different pages..sounds like a useful function.