News:

Wondering if this will always be free?  See why free is better.

Main Menu

Menu Buttons "InsidiousII

Started by Airborne328, January 16, 2012, 03:59:22 PM

Previous topic - Next topic

Airborne328

Afternoon all,  I searched and found nothing specific to my issues.

1.  I am trying to simply remove some of the menu buttons, i.e. help etc, so they are not making double rows to fit.  For the life of me I cannot find where they are within the "index.template.php.

I removed the file and refreshed page and they were gone, so I know there on there some wheres.

I cannot find support for this theme, so I was wondering if I could ask for some assistance in locating these edits.  index.template attached.

Thanks in advance for any help.

smf version 2.0.2
ezportal 0.6.0
http://www.combatlifesavers.us


The Craw

In 2.0, the menu is controlled by an array in Subs.php, toward the bottom of the file.

Search and Destroy

'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),

Matthew K.

Here's a better approach...

./Sources/Subs.php:
Code (Find) Select
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),

Code (Replace) Select

'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => $user_info['theme'] == 0 ? true : '',
'sub_buttons' => array(
),
),

That will only show the 'help' button in the SMF Curve (default) theme.

Airborne328

Guess I have been out of the loop.  These things used to be in the index.template.  Much thanks for the assistance, and the edit affected ALL themes, which is what I needed.

Matthew K.

The best way to hide a menu button is to change 'show' => true, to 'show' => '', so that you don't lose the code if you ever need to add it back. :)


Matthew K.


Advertisement: