Hi
I am using the latest tinyportal and wanting to use the download system which is included with this. What would I put so it showed up as a tab, Downloads?
Thanks :up:
See these topics:
Please read and follow the Posting Guidelines.html (http://www.tinyportal.net/index.php/topic,581)
In particular, Theme, Theme Author and possibly a sample of the menu code from the theme index.template.php file.
A general guide:
How to add a Home button or a new tab? (http://docs.tinyportal.co.uk/index.php?topic=30)
Tat is for a FORUM tab. What would it be for a downloads tab leading to the tinyportal downloads? ???
Quote from: WBA Dude on June 13, 2009, 05:23:44 PM
Tat is for a FORUM tab. What would it be for a downloads tab leading to the tinyportal downloads? ???
No, it's a general guide on how to add a Home button, or any other tab. You need to adapt it for a Download tab. The principle is the same. If you get stuck, then post the code with the details requested in the Posting Guide.
If you are willing to make an effort, people are usually more willing to help if you do get stuck :)
Quote from: Zetan on June 13, 2009, 05:32:38 PM
Quote from: WBA Dude on June 13, 2009, 05:23:44 PM
Tat is for a FORUM tab. What would it be for a downloads tab leading to the tinyportal downloads? ???
No, it's a general guide on how to add a Home button, or any other tab. You need to adapt it for a Download tab. The principle is the same. If you get stuck, then post the code with the details requested in the Posting Guide.
If you are willing to make an effort, people are usually more willing to help if you do get stuck :)
I am stuck. lol.
Me too, because you still haven't followed the posting guide.
Yep, until you provide the data requested as Zetan has requested we will continue to be stuck.
Ok. I am using these mods.
Modification Packages
Mod Name Version
1. SMF File Manager 2.1.3 [ Uninstall ] [ List Files ] [ Delete ]
2. Website Button 1.1.4 [ Uninstall ] [ List Files ] [ Delete ]
3. Highlight Message Backgrounds 1.12 [ Uninstall ] [ List Files ] [ Delete ]
4. Skype Integration 1.0 [ Uninstall ] [ List Files ] [ Delete ]
5. SMF 1.0.16 / 1.1.8 Update 1.0 [ Uninstall ] [ List Files ] [ Delete ]
6. Aeva ~ Auto-Embed Video & Audio 5.2.56 [ Uninstall ] [ List Files ] [ Delete ]
7. SMFShop 3.0 [ Uninstall ] [ List Files ] [ Delete ]
8. TinyPortal 1.075 [ Uninstall ] [ List Files ] [ Delete ]
9. User Control Panel By Alan S 2.0 [ Uninstall ] [ List Files ] [ Delete ]
SMF SHOP Packages
Mod Name Version
1. SMFShop Inventory Post Mod 0.2 [ Uninstall ] [ List Files ] [ Delete ]
2. SMFShop Stats Mod 0.1
At the moment, the first bit of the add a custom tab in the docs on this site in my index.template.php is:
if (in_array($context['current_action'], array('usercp','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
I really don't understand what to put for a download tab :'(
THEME?
All themes are different.
I asked this in my first post.
Default. Sorry :)
You know.. these are getting tiring.
ALL themes are DIFFERENT, they have Different menus. Are you going to use the Default theme?
Or, are you going to install a custom theme, you know, for your band? The default theme does what it does, but it's bland and not really eye candy for a music site.
I am using the default theme! I won't change!
Righty then.. Give me 5 - 10 mins...
Ok.
in the Default Theme index.template.php file:
// 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', )))
// 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', 'downloads')))
// The end of tab section.
echo '
<td class="maintab_' , $last , '"> </td>
// Show the [downloads] button.
echo ($current_action == 'tpmod;dl' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'tpmod;dl' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=tpmod;dl">' , $txt[downloads] , '</a>
</td>' , $current_action == 'tpmod;dl' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
Open: /Themes/default/languages/index.english.php
$txt['attach_times'] = 'times';
$txt['downloads'] = 'downloads';
Let me know if it works :)
IT WORKS! Thank You So Much!
www.chillbandforum.tk
Great :up:
Please, in future.. follow the posting guide and be descriptive. It helps us to help you :)
Thanks
Ok, it's not working quite right as the tab isn't staying highlighted, I'll get back with a fix.
ok. I moved the tab so it was in the middle. Not at the end
:) cool.
I have to go out for a while, lunch with some friends. I'll be back to take a look at the tab highlight later.
Okay
The reason it is not highlighted is because "downloads" in the array does not exist. You'll need to add a bit of custom code to make this work. Add this code after the line $current_action='home';
if (isset($_GET['dl']))
$current_action='downloads';
That should highlight the button code while in the downloads section. Let me know if it does not work. If it does not, please post the code along with the 5 lines of code above an below. Thanks.
is this in index.template.php
Yes
Thanks. Will do it tomorrow. Going to bed. Been up all night!!
Quote from: IchBinâ„¢ on June 14, 2009, 06:53:01 PM
The reason it is not highlighted is because "downloads" in the array does not exist. You'll need to add a bit of custom code to make this work. Add this code after the line $current_action='home';
if (isset($_GET['dl']))
$current_action='downloads';
That should highlight the button code while in the downloads section. Let me know if it does not work. If it does not, please post the code along with the 5 lines of code above an below. Thanks.
Ok. Doesn't highlight
Attached my index.template.php
Quote from: WBA Dude on June 18, 2009, 06:16:37 PM
Ok. Doesn't highlight
Attached my index.template.php
I had tried that already, thought I may have missed something. I'll have another look later, or if IchBin has a solution. I'm a bit busy at the mo.
Quote from: Zetan on June 18, 2009, 06:25:33 PM
Quote from: WBA Dude on June 18, 2009, 06:16:37 PM
Ok. Doesn't highlight
Attached my index.template.php
I had tried that already, thought I may have missed something. I'll have another look later, or if IchBin has a solution. I'm a bit busy at the mo.
That was for IchBin
Sorry :)
Quote from: WBA Dude on June 18, 2009, 06:31:15 PM
Quote from: Zetan on June 18, 2009, 06:25:33 PM
Quote from: WBA Dude on June 18, 2009, 06:16:37 PM
Ok. Doesn't highlight
Attached my index.template.php
I had tried that already, thought I may have missed something. I'll have another look later, or if IchBin has a solution. I'm a bit busy at the mo.
That was for IchBin
Sorry :)
lol, why? we're all on the same team. No worries though :)
Oh ok. He seemed to know how to do it.
Use this instead, just a slight change from what IchBin posted:
if (isset($_GET['dl']))
$current_action='tpmod;dl';
You needed to change the current_action in the button code too.
Ok.
I added the if (isset($_GET['dl']))
$current_action='tpmod;dl';
Still doesn't highlight :-\
Quote from: WBA Dude on June 21, 2009, 07:39:51 PM
Ok.
I added the if (isset($_GET['dl']))
$current_action='tpmod;dl';
Still doesn't highlight :-\
Then perhaps you should try the file I attached in my last post above...
Quote from: IchBinâ„¢ on June 21, 2009, 11:25:30 PM
Quote from: WBA Dude on June 21, 2009, 07:39:51 PM
Ok.
I added the if (isset($_GET['dl']))
$current_action='tpmod;dl';
Still doesn't highlight :-\
Then perhaps you should try the file I attached in my last post above...
It works finally. Thank You All!
Marked solved then :up: