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,972
  • Latest: Lineo
Stats
  • Total Posts: 196,101
  • Total Topics: 21,345
  • Online today: 1,178
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 237
  • Total: 237

Now here is a question for you coders :-)

Started by coldthunder, June 15, 2007, 11:57:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

coldthunder

I know i can turn off the "Show userinfo/news at the top" via the settings tab (which turns it off for the whole site) however...

Is there a way to turn it off just for the main portal tp page as i dont need it there as i have a user box already with that same info.. but have it on the forums page when a user clicks on the forum tab?

So basically id like it to not show on main tp page, but do show on forums page.

hmmmm.... good one hugh?

:-)

IchBin

Lets see if this will work.
Find this code in your index.template.php file
// TinyPortal
     if($context['TPortal']['showtop']==1)
     {
// TinyPortal end

Place before:
if(isset($context['TPortal']['is_front']))
$context['TPortal']['showtop']==1;
else
$context['TPortal']['showtop']==0;


If this works, the setting in your admin panel will not have an affect.

coldthunder

it didnt work, didnt see any change. Now i put that in the index.template.php file for my theme, that is correct right?

here is what looks like



if(isset($context['TPortal']['is_front']))
$context['TPortal']['showtop']==1;
else
$context['TPortal']['showtop']==0;

// TinyPortal

     if($context['TPortal']['showtop']==1)

     {

// TinyPortal end

IchBin

hmm... well at this point I'm not sure. Busy working on some TP errors. Will try to check on this later.

coldthunder

ok, np thanks for taking a quick look at it, but would appreciate if you can look at it some time in the future when you have some time. I know you are busy :-)

bloc

Its correct , but there is a typo...

Try:

if(isset($context['TPortal']['is_front']))
  $context['TPortal']['showtop']=1;
else
  $context['TPortal']['showtop']=0;


Basically..if you do == it means "compare variable to", while = means "set variable to". ;)

coldthunder

I tried it, still didnt work, here is what it looks like



if(isset($context['TPortal']['is_front']))
  $context['TPortal']['showtop']=1;
else
  $context['TPortal']['showtop']=0;
   
// TinyPortal
     if($context['TPortal']['showtop']==1)
     {
// TinyPortal end

   // display user name

bloc

yep, i see another error here.. try:

if(isset($context['TPortal']['is_front']) && context['TPortal']['is_front'])
  $context['TPortal']['showtop']=1;
else
  $context['TPortal']['showtop']=0;

DOOM666

#8
i tryed this and it wont show my forums it only showed me and highlighted this part as an error.

if(isset($context['TPortal']['is_front']) && context['TPortal']['is_front'])

bloc

a typo..sorry :P

if(isset($context['TPortal']['is_front']) && $context['TPortal']['is_front'])
  $context['TPortal']['showtop']=1;
else
  $context['TPortal']['showtop']=0;

coldthunder

:-) Well it worked great except backwards, it left the header stuff on the main tp page but removed it off the forum, worked that way. But i want it vice vers, remove it off the main tp page and leave on the forum page

coldthunder

I decided to just try and switch the 1 and 0 and it worked. Now the main user info is not on the tp main page but on any other page that a user clicks on like the forums. Great job, thank you very much. Exactly what i wanted

bloc


This website is proudly hosted on Crocweb Cloud Website Hosting.