Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Mati1300 on March 30, 2012, 08:51:24 AM

Title: How to add sub-menu 1.1 HELP!
Post by: Mati1300 on March 30, 2012, 08:51:24 AM
Hey...  8)

Soo, im trying to make a sub-menu 1.1 like showed on the image. But I dont know how to do it?

I know how to make sub-menus. But not so when you hold the mouse cursor over a menu in the sub-menu it's opening a new menu?

Please help?!  :D

**Look the image if you dont know what i mean..**
Title: Re: How to add sub-menu 1.1 HELP!
Post by: kat on March 30, 2012, 08:52:40 AM
/me tries to guess what version of SMF this is for...



...and fails, miserably. :(
Title: Re: How to add sub-menu 1.1 HELP!
Post by: NanoSector on March 30, 2012, 08:52:45 AM
Hi there,

Sadly you can't in 1.1. Sub menus are new to SMF 2.0.

@ K@: I guess it's for version 1.1.
Title: Re: How to add sub-menu 1.1 HELP!
Post by: kat on March 30, 2012, 08:53:59 AM
Oh, was 1.1 the SMF version?

I thought he was referring to the sub-menu.

/me goes and hides in Yoshi's wardrobe...
Title: Re: How to add sub-menu 1.1 HELP!
Post by: NanoSector on March 30, 2012, 08:56:27 AM
Quote from: K@ on March 30, 2012, 08:53:59 AM
Oh, was 1.1 the SMF version?

I thought he was referring to the sub-menu.

/me goes and hides in Yoshi's wardrobe...
You've got me thinking, now.. :P

/me wonders what K@'s doing in his wardrobe
Title: Re: How to add sub-menu 1.1 HELP!
Post by: kat on March 30, 2012, 08:59:50 AM
I jumped out, coz the smell from your socks was a bit powerful, mate. ;)
Title: Re: How to add sub-menu 1.1 HELP!
Post by: Mati1300 on March 30, 2012, 09:50:35 AM
Uuuups. Sorry guys...

Im using the version 2.0.2 of SMF.

Nevermind forget the "1.1"...

- Someone know how to do this?
Title: Re: How to add sub-menu 1.1 HELP!
Post by: Mati1300 on March 31, 2012, 07:29:30 PM
I search around on google. But I can't find anything?

Any idears how to do this?
Title: Re: How to add sub-menu 1.1 HELP!
Post by: NanoSector on April 01, 2012, 05:28:58 AM
Sorry for my late response.

Try something like this:
        'mybutton1' => array(
                'title' => 'My button title',
                'href' => 'http://my.button.url/',
                'show' => true,
                'sub_buttons' => array(
                        'mysubbutton1' => array(
                                'title' => 'My subbutton title',
                                'href' => 'http://my.button.url/2/',
                                'show' => true,
                                'sub_buttons' => array(
                                        'mysubbutton1.1' => array(
                                                'title' => 'My extra subbutton title',
                                                'href' => 'http://my.button.url/1.1/',
                                                'show' => true,
                                        ),
                                ),
                        ),
                ),
        ),
Title: Re: How to add sub-menu 1.1 HELP!
Post by: Mati1300 on April 01, 2012, 10:50:09 AM
Thanks! :).

It's working! :)
Title: Re: How to add sub-menu 1.1 HELP!
Post by: NanoSector on April 01, 2012, 10:55:38 AM
Great :)

Good luck with your forum :)
Title: Re: How to add sub-menu 1.1 HELP!
Post by: Mati1300 on April 01, 2012, 12:09:41 PM
Do you know how to add more then one? or to end one?

I do like this, and when I make 2 "'sub_buttons' => array(" it won't load my site??

'test1' => array(
                                'title' => 'Test1',
                                'href' => '/',
                                'show' => true,
                                'sub_buttons' => array(
                                        'test1' => array(
                                                'title' => 'server1',
                                                'href' => '?page=server1',
                                                'show' => true,
),
'test2' => array(
'title' => 'server2',
                                                'href' => '?page=server2',
                                                'show' => true,
),
'test3' => array(
        'title' => 'server3',
                                                'href' => '?page=server3',
                                                'show' => true,
                                                 ),
              '2test1' => array(
                                'title' => '2test1',
                                'href' => '/',
                                'show' => true,
                                'sub_buttons' => array(
                                        '2test1' => array(
                                                'title' => '2test1',
                                                'href' => '?page=2test1',
                                                'show' => true,
),
'2test2' => array(
'title' => '2test2',
                                                'href' => '?page=2test2',
                                                'show' => true,
),
'2test3' => array(
'title' => '2test3',
                                                'href' => '?page=2test3',
                                          'show' => true,
                                        ),
                                ),
                        ),
                ),
        ),


This is only the submenus not the *button*
Title: Re: How to add sub-menu 1.1 HELP!
Post by: NanoSector on April 01, 2012, 02:28:45 PM
Do you get any errors?

Tip: Keep your code organized. When I added all tabs and stuff I got this:
                        'test1' => array(
                                'title' => 'Test1',
                                'href' => '/',
                                'show' => true,
                                'sub_buttons' => array(
                                        'test1' => array(
                                                'title' => 'server1',
                                                'href' => '?page=server1',
                                                'show' => true,
),
'test2' => array(
'title' => 'server2',
                                                'href' => '?page=server2',
                                                'show' => true,
),
'test3' => array(
        'title' => 'server3',
                                                'href' => '?page=server3',
                                                'show' => true,
                                        ),
                                        '2test1' => array(
                                                'title' => '2test1',
                                                'href' => '/',
                                                'show' => true,
                                                'sub_buttons' => array(
                                                        '2test1' => array(
                                                                'title' => '2test1',
                                                                'href' => '?page=2test1',
                                                                'show' => true,
                                                        ),
                                                        '2test2' => array(
                                                                'title' => '2test2',
                                                                'href' => '?page=2test2',
                                                                'show' => true,
                                                        ),
                                                        '2test3' => array(
                                                                'title' => '2test3',
                                                                'href' => '?page=2test3',
                                                        'show' => true,
                                                        ),
                                                ),
                                        ),
                                ),
                        ),
Title: Re: How to add sub-menu 1.1 HELP!
Post by: Mati1300 on April 01, 2012, 06:41:14 PM
Nop. It just won't load the site?

Okay thanks for the tip! :)
Title: Re: How to add sub-menu 1.1 HELP!
Post by: Mati1300 on April 02, 2012, 05:51:24 PM
Sooo? I can't add any new menus under this? double menu?

wtf?

Do I need to end it on some how or?
Title: Re: How to add sub-menu 1.1 HELP!
Post by: NanoSector on April 03, 2012, 09:05:00 AM
Guess not, I think that's the most you can have.

Sorry for replying so late again, my list of unread topics is huuuge.
Title: Re: How to add sub-menu 1.1 HELP!
Post by: Mati1300 on April 03, 2012, 07:03:48 PM
Okay, thank you anyways :)