Uutiset:

Wondering if this will always be free?  See why free is better.

Main Menu
Advertisement:

pnpn tabs

Aloittaja KiwiBlue, lokakuu 02, 2006, 12:39:16 AP

« edellinen - seuraava »

KiwiBlue

Thanks Juan.  I'm sure it's something very basic I have done or missed –just can't for the life of me see it!  Now I can't see where to attach a file... oh well, here's the code I've modified:

if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'gallery', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers', 'wiki')))
$current_action = 'admin';
if (in_array($context['current_action'], array('gallery', 'wiki', 'search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search')
$current_action = 'search';
if ($context['current_action'] == 'gallery')
$current_action = 'gallery';
if ($context['current_action'] == 'wiki')
$current_action = 'wiki';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0">
<tr>';

// Show the [home] button.
if (!empty($settings['pnpn_forum_button']))
echo '
<td class="maintab_off_first">&nbsp;</td>
<td valign="top" class="maintab_off_back">
<a href="', $settings['pnpn_forum_button'], '">' , $txt[103] , '</a>
</td>
<td class="maintab_off_last">&nbsp;</td>';

if (!empty($settings['pnpn_forum_button']))
{
// 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['pnpn_forum_button_forum'] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '<td class="maintab_off_' . $last . '">&nbsp;</td>';

}
else
{
// Show the [forum] 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>';

}
// Show the [gallery] button.
echo ($current_action=='gallery' || $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 == 'gallery' ? 'active_back' : 'off_back' , '">
<a href="', $http://my_domain/Gallery/main.php, '?action=gallery">Gallery</a>
</td>' , $current_action == 'gallery' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '<td class="maintab_off_' . $last . '">&nbsp;</td>';

}
// Show the [wiki] button.
echo ($current_action=='wiki' || $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 == 'wiki' ? 'active_back' : 'off_back' , '">
<a href="', $http://my_domain/wiki/index.php, '?action=wiki">Wiki</a>
</td>' , $current_action == 'wiki' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '<td class="maintab_off_' . $last . '">&nbsp;</td>';

}

JayBachatero

Ok here you go.  The peoblem was with the links on the wiki and gallery


if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'gallery', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers', 'wiki')))
$current_action = 'admin';
if (in_array($context['current_action'], array('gallery', 'wiki', 'search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search')
$current_action = 'search';
if ($context['current_action'] == 'gallery')
$current_action = 'gallery';
if ($context['current_action'] == 'wiki')
$current_action = 'wiki';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}

// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0">
<tr>';

// Show the [home] button.
if (!empty($settings['pnpn_forum_button']))
echo '
<td class="maintab_off_first">&nbsp;</td>
<td valign="top" class="maintab_off_back">
<a href="', $settings['pnpn_forum_button'], '">' , $txt[103] , '</a>
</td>
<td class="maintab_off_last">&nbsp;</td>';

if (!empty($settings['pnpn_forum_button']))
{
// 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['pnpn_forum_button_forum'] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '<td class="maintab_off_' . $last . '">&nbsp;</td>';

}
else
{
// Show the [forum] 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>';

}
// Show the [gallery] button.
echo ($current_action=='gallery' || $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 == 'gallery' ? 'active_back' : 'off_back' , '">
<a href="http://my_domain/Gallery/main.php?action=gallery">Gallery</a>
</td>' , $current_action == 'gallery' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '<td class="maintab_off_' . $last . '">&nbsp;</td>';

}
// Show the [wiki] button.
echo ($current_action=='wiki' || $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 == 'wiki' ? 'active_back' : 'off_back' , '">
<a href="http://my_domain/wiki/index.php?action=wiki">Wiki</a>
</td>' , $current_action == 'wiki' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '<td class="maintab_off_' . $last . '">&nbsp;</td>';

}
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

KiwiBlue

You deserve all the gold stars man, thanks :)  I was pretty sure it would have something to do with that, was just not sure what!  Thanks for your time & patience !

JayBachatero

No problem.   Also if the gallery and wiki are mods you can use $scripturl.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Advertisement: