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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 559
  • Total: 559

So I got TP working with 1.1.7... but...

Started by bigsimon, January 26, 2009, 10:28:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bigsimon

Yeah.  Piece of cake.  TP seems to have come a long way since I tried (and failed) installing it a couple years back.  I'm having a minor problem, however, and was wondering if someone could lend me a hand.

I'm using the wow-DK theme, and have added in the Forum tab at the top.  Problem is, I can't get its background to change like the other tabs when they're selected.

Here's the code I've got for that tab, along with the code of the two tabs to either side of it.

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '<td class="maintab_off_' . $first . '">&nbsp;</td>' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '<td class="maintab_off_' . $last . '">&nbsp;</td>';

}

//TP Tab Code Begin

if($settings['TPortal_front_type']!='boardindex')
// Show the [forum] button.
echo ($current_action=='forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '<td class="maintab_off_' . $first . '">&nbsp;</td>' , '
<td valign="top" class="maintab_' , $current_action == 'forum' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=forum">' , $txt['tp-forum'].'</a>
</td>' , $current_action == 'forum' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '<td class="maintab_off_' . $last . '">&nbsp;</td>';

//TP Tab Code End


// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '<td class="maintab_off_' . $first . '">&nbsp;</td>' , '
<td valign="top" class="maintab_' , $current_action == 'help' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
</td>' , $current_action == 'help' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '<td class="maintab_off_' . $last . '">&nbsp;</td>';


You can see that I've modified the tab code to include the tab background CSS, but for some reason when I click the Forum tab, the Admin tab stays active, in appearance only.  In other words, an active tab should be red, but when the Forum tab is active, the Admin tab is red.  Make sense?

Lemme know if you need any more code.  I'd appreciate any help I can get.

G6Cad

Did you add the 'forum', to the array ?   
Just over the button code you have a long row "if in array" ( 'admin', 'bla', 'bla' etc ) 
Add in the forum there and see if it helps

Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



bigsimon

Ah!  There were two areas with "if {in_array".  I had only added 'forum' to one of them.

Thank you.  That fixed it.

Oh... and 1.06beta2, working with SMF1.1.7.

Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



G6Cad


This website is proudly hosted on Crocweb Cloud Website Hosting.