News: TinyPortal Release Schedule. Please read this update for More Info.

Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

December 11, 2019, 03:46:35 PM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 189280
  • Total Topics: 20775
  • Online Today: 86
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 0
Guests: 43
Total: 43

Author Topic: [Upgraded to 1.0 Beta 4] Download button disappeared  (Read 1762 times)

0 Members and 1 Guest are viewing this topic.

smartmouse

  • Guest
[Upgraded to 1.0 Beta 4] Download button disappeared
« on: January 24, 2010, 01:51:46 PM »
After the upgrade to TP v1.0 Beta 4 the "Download" button does not appear anymore. What could be the problem?

In index.template.php of my template (Black14K by Crip) i have this code:

Code: [Select]
// 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('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('search', '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 (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: 0px;">
<tr><td class="post-buttons">';
if($context['TPortal']['leftbar'])
echo '<a href="javascript:void(0);" onclick="shrinkHeaderLeftbar(!current_leftbar); return false;"><img id="upshrinkLeftbar" src="', $settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 0px 0;" border="0" /></a><img id="upshrinkTempLeftbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
// Show the [home] button.
  echo '&nbsp;<a href="', $scripturl, '">' , $txt[103] , '</a> &nbsp; &nbsp; &nbsp;';
  if($settings['TPortal_front_type']!='boardindex')
// Show the [forum] button.
echo '<a href="', $scripturl, '?action=forum">'.$txt['tp-forum'].'</a> &nbsp; &nbsp; &nbsp;';

// Show the [download] button.
echo '<a href="', $scripturl, '?action=tpmod;dl">'.$txt['tp-download'].'</a> &nbsp; &nbsp; &nbsp;';

// How about the [search] button?
if ($context['allow_search'])
echo '<a href="', $scripturl, '?action=search">' , $txt[182] , '</a> &nbsp; &nbsp; &nbsp;';
// Show the [help] button.
echo '<a href="', $scripturl, '?action=help">' , $txt[119] , '</a> &nbsp; &nbsp; &nbsp;';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<a href="', $scripturl, '?action=admin">' , $txt[2] , '</a> &nbsp; &nbsp; &nbsp;';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a> &nbsp; &nbsp; &nbsp;';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a> &nbsp; &nbsp; &nbsp;';
// The [calendar]!
if ($context['allow_calendar'])
echo '<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a> &nbsp; &nbsp; &nbsp;';
// the [member] list button
if ($context['allow_memberlist'])
echo '<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a> &nbsp; &nbsp; &nbsp;';
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<a href="', $scripturl, '?action=login">' , $txt[34] , '</a> &nbsp; &nbsp; &nbsp;';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<a href="', $scripturl, '?action=register">' , $txt[97] , '</a> &nbsp; &nbsp; &nbsp;';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a> &nbsp; &nbsp; &nbsp;';
if($context['TPortal']['rightbar'])
echo '<a href="javascript:void(0);" onclick="shrinkHeaderRightbar(!current_rightbar); return false;"><img id="upshrinkRightbar" src="', $settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 0px 0;" border="0" /></a><img id="upshrinkTempRightbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
  echo '</tr></td></table>';
}

It appears only if i go to Download section! Why?

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: [Upgraded to 1.0 Beta 4] Download button disappeared
« Reply #1 on: January 24, 2010, 05:01:11 PM »
Probably because '.$txt['tp-download'].' does not exist unless you are in the download section. Change that part to just say downloads and see if it does.

   echo '<a href="', $scripturl, '?action=tpmod;dl">Download[/url] &nbsp; &nbsp; &nbsp;';

smartmouse

  • Guest
Re: [Upgraded to 1.0 Beta 4] Download button disappeared
« Reply #2 on: January 25, 2010, 07:09:44 AM »
It worked ;)

But what's happened? It worked with old versione, why after upgrade it stops to work?

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: [Upgraded to 1.0 Beta 4] Download button disappeared
« Reply #3 on: January 25, 2010, 07:54:24 AM »
Because has moved the downloads manager to be a module. Which means he has moved code out of some files and into other files. So that piece of code is just not loaded on other pages anymore.

smartmouse

  • Guest
Re: [Upgraded to 1.0 Beta 4] Download button disappeared
« Reply #4 on: January 26, 2010, 05:35:57 AM »
Ok, thank you ;)