TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,993
  • Total Topics: 21,324
  • Online today: 296
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 282
  • Total: 282

Same side block panel width in forum vs frontpage

Started by catchpen, October 04, 2007, 08:59:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

catchpen

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.

G6Cad

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  :-\

catchpen

OK, I'm just being picky anyways ;D Thanks for the quick reply.

IchBin

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'],'"

G6Cad

This one i just have to try, it's a good feature IMO  :D

catchpen

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.

IchBin

Did it work? It just popped in my head how to do it, so I wondered if it would work. lol

catchpen

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:

IchBin

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.

catchpen

I'll probably try to tackle this in a week or so, thanks for the help.

This website is proudly hosted on Crocweb Cloud Website Hosting.