TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 28, 2024, 10:10:12 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,173
  • Total Topics: 21,219
  • Online today: 130
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 113
  • Total: 113

Remove tp button from the menu

Started by Rock Lee, June 14, 2020, 10:35:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rock Lee

 :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!

tino

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

@rjen

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
    );
}

Running Latest TP on SMF2.1 at: www.fjr-club.nl

Rock Lee

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!