TinyPortal

Development => Support => Topic started by: Wichtlmex on October 17, 2019, 06:47:56 AM

Title: Double Menu for Downloads
Post by: Wichtlmex on October 17, 2019, 06:47:56 AM
TP 1.6.3


Hi,
in http://www.ecotec2000.de/forum/index.php
you can see the top menu as shown in the screenshot.

The Menu item "Descargas/Documentos" was generated by me and allows documents download.
Clicking on the Menu Item "TinyPortal" leads to the same download section.
This is a bit confusing for the user. He/she would not search downloadbles under "TinyPortal"....
Is this avoidable?
Can I remove the "TinyPortal" tab?
Or can I remove the "Downloads" from the TinyPortal tab?
Regards
Michael






Title: Re: Double Menu for Downloads
Post by: lurkalot on October 17, 2019, 07:58:07 AM
Well, you can hide the downloads link from that menu, but it will require a small manual edit to the code to do so. 

If you just want to hide that link from the TP menu.  Make a backup of your file as always.

In sources TPSubs.php find,

if(!empty($context['TPortal']['show_download']))
$buts['downloads'] = array(
'title' => $txt['tp-downloads'],
'href' => $scripturl . '?action=tpmod;dl',
'show' => true,
'active_button' => false,
'sub_buttons' => array(),
);


Change to.

if(!empty($context['TPortal']['show_download']))
$buts['downloads'] = array(
'title' => $txt['tp-downloads'],
'href' => $scripturl . '?action=tpmod;dl',
'show' => false,
'active_button' => false,
'sub_buttons' => array(),
);



Hiding the TinyPortal tab itself is possible, but only if you're not using the modules such as Downloads or Articles. So that's not really a option.   

It would be handy to have settings for this in TP admin, but I'm not sure how much work that would involve.
Title: Re: Double Menu for Downloads
Post by: Wichtlmex on October 17, 2019, 08:13:57 AM
Thanks, will try it!