SimplePortal

Support => English Support => Topic started by: Crozz on November 28, 2012, 04:29:04 AM

Title: Putting a submenu in Home?
Post by: Crozz on November 28, 2012, 04:29:04 AM
I have SimplePortal 2.3.5 installed on SMF 2.0.2, this is not really a problem, I just want to put a submenu
in the Home (in this forum it would be - http://simpleportal.net/index.php), the button that usually shows when the portal is installed.
So I want to put two submenus, in Home and the Home button should be redirected to "#" or nothing.
I haven't gone over posting at SMF forum thought this would be a better place.

Thanks in advance.
Title: Re: Putting a submenu in Home?
Post by: TinMan on November 28, 2012, 11:50:00 AM
The menu button should be in your Sources/Subs.php

Find:
Code: [Select]
'home' => array(
'title' => $txt['home'],
'href' => $modSettings['sp_portal_mode'] == 3 && empty($context['disable_sp']) ? $modSettings['sp_standalone_url'] : $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),

To add sub buttons, an example may be something like:
Code: [Select]
'home' => array(
'title' => $txt['home'],
'href' => $modSettings['sp_portal_mode'] == 3 && empty($context['disable_sp']) ? $modSettings['sp_standalone_url'] : $scripturl,
'show' => true,
'sub_buttons' => array(
'some_button' => array(
'title' => 'Button Name',
'href' => $scripturl . '?action=profile',
'show' => true,
),
'another_button' => array(
'title' => 'Button Name 2',
'href' => $scripturl . '?action=help',
'show' => true,
'is_last' => true,
),
),
),

For more info about adding buttons, check out the SMF Wiki page for it Here (http://wiki.simplemachines.org/smf/Buttons_-_How_do_I_add_buttons_to_SMF_2.0).
Title: Re: Putting a submenu in Home?
Post by: Crozz on November 29, 2012, 10:18:19 AM
Thanks that worked, is it okay if I put like an "hxxp://www.somedomain.com/" link instead $scripturl?
Title: Re: Putting a submenu in Home?
Post by: TinMan on November 29, 2012, 10:47:00 AM
Yeah, just make it like...
Code: [Select]
'href' => 'hxxp://www.somedomain.com',and it should work fine.
Title: Re: Putting a submenu in Home?
Post by: AngelinaBelle on February 05, 2013, 04:09:19 PM
Crozz -- did that work for you?
I am glad you found the answer you needed right here. 

If this solved your problem, can you press the "topic solved" button below this topic?

Thanks!
SimplePortal 2.3.8 © 2008-2024, SimplePortal