News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

quick question.

Started by wtfgfrofl, December 19, 2010, 07:32:22 AM

Previous topic - Next topic

wtfgfrofl

well, i was trying to make as little as possible of tabs.. so i made the PM's tab with the Profile tab..

heres a pic:



the code that i am currently using to try making it work in subs.php is

'profile' => array(
	
	
	
	
'title' => $txt['profile'],
	
	
	
	
'href' => $scripturl '?action=profile',
	
	
	
	
'show' => $context['allow_edit_profile'],
	
	
	
	
'sub_buttons' => array(
	
	
	
	
	
'summary' => array(
	
	
	
	
	
	
'title' => $txt['summary'],
	
	
	
	
	
	
'href' => $scripturl '?action=profile',
	
	
	
	
	
	
'show' => true,
	
	
	
	
	
),
	
	
	
	
	
'account' => array(
	
	
	
	
	
	
'title' => $txt['account'],
	
	
	
	
	
	
'href' => $scripturl '?action=profile;area=account',
	
	
	
	
	
	
'show' => allowedTo(array('profile_identity_any''profile_identity_own''manage_membergroups')),
	
	
	
	
	
),
	
	
	
	
	
'profile' => array(
	
	
	
	
	
	
'title' => $txt['forumprofile'],
	
	
	
	
	
	
'href' => $scripturl '?action=profile;area=forumprofile',
	
	
	
	
	
	
'show' => allowedTo(array('profile_extra_any''profile_extra_own')),
	
	
	
	
	
),
                                
'pm' => array(
	
	
	
	
'title' => $txt['pm_short'],
	
	
	
	
'href' => $scripturl '?action=pm',
	
	
	
	
'show' => $context['allow_pm'],
	
	
	
	
'is_last' => true,
	
	
	
	
'subsections' => array(
                                
'pm_read' => array($txt['pm_menu_read']),
	
	
	
	
'pm_send' => array($txt['pm_menu_send']),
	
	
	
	
),
	
	
	
),
	
	
	
	
),
	
	
	
),


Thanks.

Illori

and what is your question?

wtfgfrofl

see the tab that i made in red in the picture? i want it.

Suki

use 'sub_buttons' => array(   instead of   'subsections' => array(


it would be like this:

'pm' => array(
'title' => $txt['pm_short'],
'href' => $scripturl . '?action=pm',
'show' => $context['allow_pm'],
'sub_buttons' => array(
'pm_read' => array(
'title' => $txt['pm_menu_read'],
'href' => $scripturl . '?action=pm',
'show' => allowedTo('pm_read'),
),
'pm_send' => array(
'title' => $txt['pm_menu_send'],
'href' => $scripturl . '?action=pm;sa=send',
'show' => allowedTo('pm_send'),
'is_last' => true,
),
),
),
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

wtfgfrofl

it is already in a subbutton of the profile array..

but if i make it like u said, nothing happens.

wtfgfrofl

-bump-
sorry to bump this within 24 hours, but it went doooown in the lost.. many support topics today..

Suki

I have the exact code in my forum and its working...  can you plase attach your Sources/Subs.php

and in the coe you provide it says:   'subsections' => array

when it should be

'sub_buttons' => array(
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

wtfgfrofl

i am trying to "customize" it so it could be like in the photo.. u see?

Suki

its the same code, its just upsidedown, change this:

'pm_read' => array(
                  'title' => $txt['pm_menu_read'],
                  'href' => $scripturl . '?action=pm',
                  'show' => allowedTo('pm_read'),
               ),
               'pm_send' => array(
                  'title' => $txt['pm_menu_send'],
                  'href' => $scripturl . '?action=pm;sa=send',
                  'show' => allowedTo('pm_send'),
                  'is_last' => true,
               ),



for this: 


  'pm_send' => array(
                  'title' => $txt['pm_menu_send'],
                  'href' => $scripturl . '?action=pm;sa=send',
                  'show' => allowedTo('pm_send'),
                  'is_last' => true,
               ),
            'pm_read' => array(
                  'title' => $txt['pm_menu_read'],
                  'href' => $scripturl . '?action=pm',
                  'show' => allowedTo('pm_read'),
               ),
               
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: