TinyPortal

Development => Support => Topic started by: Miker2006 on April 14, 2009, 02:34:28 PM

Title: Menu item in theme Aurora
Post by: Miker2006 on April 14, 2009, 02:34:28 PM
I keep getting the "assumed error website" on line 605 of my index.template.php so I was hoping if I posted the error here someone could help me out with it. I am NOT running TP with this theme, hope thats not an issue. 

SMF 1.1.8
gmpowertrain.ca


here is the code:

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('website','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('website','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';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

if (isset($_GET['dl']))
$current_action = 'dlmanager';

if ((isset($_GET['board']) || isset($_GET['topic'])) && empty($settings['use_tp']))
$current_action = 'home';
elseif ((isset($_GET['board']) || isset($_GET['topic'])) && !empty($settings['use_tp']))
$current_action = 'forum';

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

  // Show the start of the tab section.
echo '
<div id="menudiv">
<div id="menuinner">
<ul id="menubox">
<li' , $current_action=='home' ? ' class="chosen"' : '' , '><a href="', $scripturl, '"><span>' , $txt[103] , '</span></a></li>';
// Show the [website] button.
echo '<li', $current_action == 'website' ? ' class="chosen"' : '', '><a href="http://www.gmpowertrain.ca/">' , 'Website' , '</a></li>';

Title: Re: Menu item in theme Aurora
Post by: IchBin on April 14, 2009, 02:57:54 PM
This code does not need any of the single apostrophe's or the comma's:
' , 'Website' , '

Title: Re: Menu item in theme Aurora
Post by: Miker2006 on April 14, 2009, 04:37:59 PM
Thank you!!  Now on to my next error...lol