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,973
  • Latest: NonStop
Stats
  • Total Posts: 196,245
  • Total Topics: 21,354
  • Online today: 565
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 157
  • Total: 157

menu items not showing active state

Started by Riot, April 17, 2008, 06:48:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Riot

Not sure if this is theme related or general support, I found this "Active Tab" after searching but instead of re-activating a long dead thread I started a new one.

I am running SMF 1.14 & TP v0.9.8
http://rightcoastracing.com/SMF/index.php

I have added new items to the menu via the Extra buttons in the theme settings, they are in the menu, they take you to the right place but they don't keep there active state.

here is the code from my index.template.php
// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('video','links','downloads','gallery','admin', 'managegames', 'arcadesettings', 'arcadecategory', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('video','links','downloads','gallery','search', 'arcade', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'globalAnnouncementsAdmin')
$current_action = 'admin';

if ($context['current_action'] == 'search2')
$current_action = 'search';

// Additional buttons
if ($context['current_action'] == 'video')
$current_action = 'video';
if ($context['current_action'] == 'links')
$current_action = 'links';
if ($context['current_action'] == 'downloads')
$current_action = 'downloads';

if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';


This is what I have them set as in the theme.settings



If there is any other info you need I will try and get it asap for you thanks! 
No huge rush as the site is still in development.


IchBin

You shouldn't need to alter the code in the index. You added all 3 of your links active state (current_action) to the home array and admin array. Remove your coding from the index.template.php.

Riot

Removed all code that I had put in the index.template.php  still no active states

Just to verify, you wanted everything out, even the additions I did to the arrays?

IchBin

Yes, I wanted you to remove your code from the array.

Riot


IchBin

Seems your site is down, so I can't look at it.

Riot


IchBin

Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.

Riot

Really?  I just cleared my cache and it is still fine, I will check when I get to the office.

http://rightcoastracing.com/SMF/index.php

G6Cad

QuoteTemplate Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.

This website is proudly hosted on Crocweb Cloud Website Hosting.