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 (http://custom.simplemachines.org/themes/index.php?lemma=78) 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 . '"> </td>' : '<td class="maintab_off_' . $first . '"> </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 . '"> </td>' : '<td class="maintab_off_' . $last . '"> </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 . '"> </td>' : '<td class="maintab_off_' . $first . '"> </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 . '"> </td>' : '<td class="maintab_off_' . $last . '"> </td>';
//TP Tab Code End
// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '<td class="maintab_off_' . $first . '"> </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 . '"> </td>' : '<td class="maintab_off_' . $last . '"> </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.
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
Which TP version?
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.
Cool!
I will mark this solved then :up: