TinyPortal
Development => Support => Topic started by: houston on January 30, 2006, 03:07:15 AM
Adding this to the Babylon theme is quite easy. Unfortunately, adding it to the default theme in SMF 1.1 RC2 is not as easy. Has anybody been able to accomplish this task. I have gone through the code and have a pretty good idea how, but there is more information required than I know how to input.
Any help would be greatly appreciated.
Thanks
Open the default index.template.php and find the following code (approximately line 563 or so):
if (isset($_GET['dl']))
$current_action = 'dlmanager';
Directly beneath it add the following code:
if ($context['current_action'] == 'tpmod')
$current_action = 'tpmod';
Then scroll down a little bit to the button definitions. Each one has a small comment before it to say what button the following snippet of code is for. I placed the following code between the Search and Admin buttons
// How about the [Downloads] button?
if($context['TPortal']['show_download']=='1')
echo ($current_action == 'tpmod' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'tpmod' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=tpmod;dl=0">' , $txt['tp-dldownloads'] , '</a>
</td>' , $current_action == 'tpmod' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
But you can place it almost anywhere in the line of buttons, I would think.
This gives me a button as shown in the following screenshots:
[attachment deleted by admin]
[attachment deleted by admin]
Thanks you very much. It worked great.
Cheers, :2funny:
how do I go about installing the download manager? is it in TP .75?
DL manager will be released in the next version 0.85 which is coming very soon.