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,970
  • Latest: bynw
Stats
  • Total Posts: 196,046
  • Total Topics: 21,335
  • Online today: 319
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 186
  • Total: 186

SOLVED - [SMF] Hide right panel when in thread?

Started by Omala, May 02, 2008, 10:27:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Omala

#10
Quote from: G6 on May 08, 2008, 05:44:11 AM
Please dont call it issues when it's not even a feature to start with  ;)
It's an issue if it's not working... which it isn't   ;)


Quote from: IchBinâ,,¢ on May 08, 2008, 02:53:12 PM
Its not a theme issue. The problem is that the tp_hidebar function isn't being called soon enough. Thats why I said I would know where to put it to make it work right away.

When you say, soon enough, are you saying that the show is being called before the hide when it's loading the page?

If this is the case, where is the show called and is the show site wide? I'm thinking if the show sidebar were hard coded into the forum index and the tp index but not into show thread that it would solve my problem.

I'm used to vBulletin where each page is it's own php file. So, if I wanted to adjust the "show_thread", I could separately from the "forum_index". I was curious to know if SMF operates the same way and if it does, possibly I could modify the show_thread to have the tp_hidebar to load there.

G6Cad

 That question is for the SMF to answer, you have to code to hide the panels and blocks in the function, but to get help WHAt function, you need to ask that on simplemachines as the forum and the forum functions are their code and department.

Omala

Quote from: G6 on May 09, 2008, 10:03:00 AM
That question is for the SMF to answer, you have to code to hide the panels and blocks in the function, but to get help WHAt function, you need to ask that on simplemachines as the forum and the forum functions are their code and department.
sweet. Thanks for the heads up.

that sucks =*(

IchBin

There's probably an easier way to do this, but this is the only way that comes to mind for me. But I found a place you can put it in the TPortal.php file in the Sources directory.

Find this code.
if($in_forum && $context['TPortal']['hide_lowerbar_forum']==1)
tp_hidebars('lower');


Add after this code:

if (isset($_GET['topic']))
tp_hidebars('all');

Omala

Thanks IchBin, by the responses G6 was giving, I was beginning to think that this would be impossible.

I did a search for the top snipet of code you provided and couldn't find it. Seems we may be on a different version of TP. However, I've been sifting through that file you pointed me to and it seems that it's doing a check for each set of bars, weather it's the center bar, right bar, etc..

Since I only use the right blocks on my forums, would I modify this somewhere?

}

elseif(($row['bar']=='2' && $context['TPortal']['hide_rightbar_forum']!='1') || ($row['bar']=='2' && $context['TPortal']['hide_rightbar_forum']=='1' && $in_forum==1 && $row['access2']!='') || ($row['bar']=='2' && $context['TPortal']['hide_rightbar_forum']=='1' && $in_forum==0))

{

if($row['type']==5 || $row['type']==11)

$body=html_entity_decode($row['body']);

else

$body=$row['body'];



$context['TPortal']['rightblock']['blocks'][$rcount]=array(

'frame' => $row['frame'],

'title' => $row['title'],

'type' => $blocktype[$row['type']],

'body' => $body ,

'visible' => $row['visible'],

'var1' => $row['var1'],

'var2' => $row['var2'],

'id' => $row['id'],

'lang' => $row['lang'],

'access2' => $row['access2'],

'can_edit' => $can_edit,

'can_manage' => $can_manage,

);

$rcount++;

}


Omala

This thread has been getting a lot of views. Maybe this would be a good feature when it's figured out for future releases?

Zetan

Quote from: Omala on May 10, 2008, 03:28:00 AM
This thread has been getting a lot of views. Maybe this would be a good feature when it's figured out for future releases?

It's been suggested often. As for the amount of views, a lot of threads get this many views.. much of which are spiders.

IchBin

Open TPortal.php and find:
if($context['TPortal']['hidebars_profile']=='1' && $context['TPortal']['action']=='profile')
tp_hidebars('all');
elseif($context['TPortal']['hidebars_pm']=='1' && $context['TPortal']['action']=='pm')
tp_hidebars('all');
elseif($context['TPortal']['hidebars_memberlist']=='1' && $context['TPortal']['action']=='mlist')
tp_hidebars('all');


Put the other code I have you right after that.

Omala

#18
BINGO!!!!

I'll edit my first post for people who want an answer to this!

You rock!

On another note...

Not to start drama or issues, but G6, your posts weren't very friendly or helpful. I've done a search of your posts on this site and it seems you have extensive knowledge of the software and it's back end coding. Its obvious that I'm not familiar with the coding or terminology yet all your responses are either combative or evasive to the point where you suggest I go to SMF forums for code which is obviously not theirs.

For a software package which is free to download and relies on it's community for it's support, you should really address how you treat the customers who are using it.

I could be a billionaire with deep pockets with a hole burning in them. .

G6Cad

Simply easy for most people to use, for some it's not, most questions have been answerd, we want them to start using that function for the things they want to have, we do not babysit members, we want to guide them, and that is exactly what we try to do. Some members see this right away and they do use the search and they do browse to the sites they get support from for the things they need.
Your question were a function for SMF, you got the code from IchBin, he was nice to follow through this time even if it actually was something you should have proceeded to SMF to get support on with the code he cave you.
And billionare or not, you got the help from IchBin you needed, you even got bingo, so now i think you CAN take and fill up the hole you were nagging me about by make a BIG donation to Bloc  and all his work he does for free on this site. You have the money, now show us you meant what you said with filling holes with them, TP and Bloc is definatly one of them as we dont charge a thing for what you get from us. Should be interesting enough to see if Bloc tell us he got that big donation of from you.

And as a side note, i dont know a lot of coding,m but i do know how to use the search, google and also i know that if i need anything, i go to when i can find the ansers i need to learn how to use it  ;)  ;D

This website is proudly hosted on Crocweb Cloud Website Hosting.