TinyPortal

Development => Support => Topic started by: Rock Lee on June 14, 2020, 10:35:46 PM

Title: Remove tp button from the menu
Post by: Rock Lee on June 14, 2020, 10:35:46 PM
 :hmm: :hmm: I am in charge of a small page for my university and I am simplifying to make it easier navigate. Among what they asked me was to edit the menu to put the download link directly but I can not apply, I do not know if it can or is complicated I can not find the line and I tried several things but without success. How can I edit it? Attached image to understand what I say.


Regards!
Title: Re: Remove tp button from the menu
Post by: tino on June 15, 2020, 09:46:16 AM
It's in tpassimilate, the bit where the menu list options are set. I'm not at a pc currently but can help later if that doesn't point you in the right direction
Title: Re: Remove tp button from the menu
Post by: @rjen on June 15, 2020, 11:00:43 AM
it's this code:

    // Add the admin button
if(allowedTo('tp_settings') || allowedTo('tp_articles') || allowedTo('tp_blocks') || allowedTo('tp_dlmanager') || allowedTo('tp_shoutbox') || allowedTo('tp_can_admin_shout') || allowedTo('tp_can_list_images')) {
    $buttons = array_merge(
            array_slice($buttons, 0, array_search('calendar', array_keys($buttons), true) + 1),
            array (
                'tpadmin' => array (
'icon' => 'tinyportal/menu_tp.png',
'title' => $txt['tp-tphelp'],
                    'href' => $scripturl.'?action=tpadmin',
                    'show' =>  TPcheckAdminAreas(),
                    'sub_buttons' => tp_getbuttons(),
                ),
            ),
            $buttons
    );
}
else {
    $buttons = array_merge(
            array_slice($buttons, 0, array_search('calendar', array_keys($buttons), true) + 1),
            array (
                'tpadmin' => array (
'icon' => 'tinyportal/menu_tp.png',
'title' => $txt['tp-tphelp'],
                    'href' => '#',
                    'show' =>  TPcheckAdminAreas(),
                    'sub_buttons' => tp_getbuttons(),
                ),
            ),
            $buttons
    );
}

Title: Re: Remove tp button from the menu
Post by: Rock Lee on June 16, 2020, 04:31:12 AM
Perfect, I already managed to modify it. Now it is only to modify some more buttons as I only use the download module I only change permissions :P  a not seen and ready! ;D


Regards!