Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: $p00ky on February 23, 2009, 07:30:13 AM

Title: Dropmenu for main menu too?
Post by: $p00ky on February 23, 2009, 07:30:13 AM
Hello everybody,

I was wondering how can I have a main menu with sub buttons like the new admin menu?
We can define 'sub_buttons' to the main menu too, but how can we see them in the main menu?

Thanks in advance.


PS: I tried to add manually to the template_menu() function in index.template.php something like:
<?php
if (count($button['sub_buttons'])>0) {
echo '<ul>';
foreach($button['sub_buttons'] as $sub_button) {
echo '<li><a title="'$act'" href="'$sub_button['href'], '">'.$sub_button['title'].'</a></li>';
}
echo '</ul>';
}
?>

But as it's a "clearfix" menu, the result is not as desired at all...
Title: Re: Dropmenu for main menu too?
Post by: Marcus Forsberg on February 23, 2009, 12:42:05 PM
Hello.

This might do it:
http://custom.simplemachines.org/mods/index.php?mod=1508

I'm not sure if it will work for the latest 20 verison though.
Title: Re: Dropmenu for main menu too?
Post by: $p00ky on February 23, 2009, 10:43:23 PM
Oh, thanks for the link, that's what I was looking for :)

But the problem is the template_menu() function changed in 2.0RC1 since 2.0b4, so this mod is not working on 2.0RC1 for the moment.
I'm waiting for an update, thank you ;)
Title: Re: Dropmenu for main menu too?
Post by: 6aro on February 24, 2009, 12:58:50 PM
$p00ky look Manual Install Instructions for SMF 2.0RC1
Title: Re: Dropmenu for main menu too?
Post by: Marcus Forsberg on February 24, 2009, 12:59:59 PM
That link doesn't work I'm afraid.
Title: Re: Dropmenu for main menu too?
Post by: 6aro on February 24, 2009, 01:02:41 PM
I'm remove the link. Sory!
Title: Re: Dropmenu for main menu too?
Post by: Marcus Forsberg on February 24, 2009, 01:05:11 PM
FYI the link didn't work because the form uses POST instead of GET. it can use get (ie have the information such as mod, package and version in the URL) but I don't remember the syntax :P
Title: Re: Dropmenu for main menu too?
Post by: $p00ky on February 25, 2009, 09:29:10 PM

Like this: http://custom.simplemachines.org/mods/index.php?action=parse;mod=1508;attach=83198;smf_version=2.0_RC1 ?

Thank you so much!