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,240
  • Total Topics: 21,353
  • Online today: 722
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 246
  • Total: 247
  • @rjen

Download link in top menu

Started by gffb, May 27, 2007, 03:41:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Porky

Ok this has me completely stumped, never ran into this before, I am going to shift someone else to this to help you out.


G6Cad

In the array, try and change the action from 'downloads', to 'tpmod;dl', and if that doesent work just set it to 'download', (remove the s )

gffb

renamed all the downloads to download still not luck.
also changed download to tpmod;dl in the correct place i think
$current_action = 'admin';
if (in_array($context['current_action'], array('contact','gallery','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin', 'tpmod;dl')))

IchBin

Actually all you need to do is change the $current_action=download parts in your button to say $current_action=dlmanager

gffb

that was it here is the owrking code
// Show the [download] button.
if ($context['allow_search'])
echo ($current_action == 'dlmanager' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'dlmanager' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=tpmod;dl=0">download</a>
</td>' , $current_action == 'dlmanager' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Thanks to all......

IchBin

Post your whole menu_template code again. The code you posted at this post did not have what you say you have.
http://www.tinyportal.net/index.php?topic=16263.msg134700#msg134700

gffb

// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', '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('contact','gallery','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin', 'download')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';

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

if (isset($_GET['board']) || isset($_GET['topic']))
$current_action = 'forum';

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" style="margin-left: 10px;">
<tr>
<td class="maintab_' , $first , '">&nbsp;</td>';

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

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 valign="top" class="maintab_' , $current_action=='forum' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=forum">'.$txt['tp-forum'].'</a>
</td>' , $current_action=='forum' ? '<td class="maintab_active_last">&nbsp;</td>' : '';
// Show the [download] button.
if ($context['allow_search'])
echo ($current_action == 'dlmanager' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'dlmanager' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=tpmod;dl=0">download</a>
</td>' , $current_action == 'dlmanager' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

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

IchBin

You have an admin test account that you wouldn't mind sharing with me so I can look at it?

gffb

sure shall I pm you details?

It all seems working fine no though but you are welcome to have a peek?

This website is proudly hosted on Crocweb Cloud Website Hosting.