Author Topic: dropdown menu  (Read 4512 times)

0 Members and 1 Guest are viewing this topic.

Offline Smoky

  • who, me?
  • Guru
  • *
  • Posts: 3980
  • Karma: 1450
  • Gender: Female
  • It's all in your HEAD!
    • HangOutSpot
  • SMF Version: 2.0 ??
Re: dropdown menu
« Reply #15 on: May 09, 2008, 04:51:07 PM »
should be the same way, Wayne.. might want to check the subs.php file for it tho.. post back with any problems ;)
Oh wow, guess who dropped by! Im still on secondlife.. but will respond to im's *waves

Offline antechinus

  • Hero Member
  • *
  • Posts: 445
  • Karma: 65
Re: dropdown menu
« Reply #16 on: May 09, 2008, 06:23:21 PM »
Bikken and MaYday have been using dropdowns on the latest DzinerStudio themes and there's some tips over at their place for getting the things to work. I'll dig up some more links. I'm very interested in setting up drop downs as I think they're going to be de rigeur in future. They allow a much better layout than the standard menu options.

Offline antechinus

  • Hero Member
  • *
  • Posts: 445
  • Karma: 65
Re: dropdown menu
« Reply #17 on: May 10, 2008, 08:20:31 AM »
Just found this link. Looks useful.

http://pixopoint.com/suckerfish_css/

Offline dodge

  • New Member
  • *
  • Posts: 14
  • Karma: 1
  • SMF Version: SMF 2.0 Beta 3.1 Public
Re: dropdown menu
« Reply #18 on: May 10, 2008, 02:40:48 PM »
A long time back I implemented a Milonic menu into a forum and played around with
the default them a little.
 
It's still there today
 

Removed by request
« Last Edit: May 25, 2008, 08:53:54 PM by bigguy »

Offline qubbah

  • Hero Member
  • *
  • Posts: 381
  • Karma: 15
  • Gender: Male
  • Thinking To Move Effectively
Re: dropdown menu
« Reply #19 on: May 18, 2008, 08:19:52 AM »
A long time back I implemented a Milonic menu into a forum and played around with
the default them a little.
 
It's still there today
 

how did u make it...?
« Last Edit: May 25, 2008, 08:54:11 PM by bigguy »

Offline dodge

  • New Member
  • *
  • Posts: 14
  • Karma: 1
  • SMF Version: SMF 2.0 Beta 3.1 Public
Re: dropdown menu
« Reply #20 on: May 25, 2008, 05:43:57 PM »
In what respect do you mean how did I make it?
 
Incidentally the new owners of the site have now removed the menu.
 
But once you acclimatise yourself to the menu it's incredibly easy to get on with including
inserting it into an smf template.
 
 

Offline wdm2005

  • Addicted Coder
  • Full Member
  • *
  • Posts: 203
  • Karma: 30
  • Gender: Male
    • SA Mod Developemt
  • SMF Version: SMF 2.0 RC2
Re: dropdown menu
« Reply #21 on: May 26, 2008, 02:28:27 PM »
should be the same way, Wayne.. might want to check the subs.php file for it tho.. post back with any problems ;)

 
 
still havent manged to do this so i did it antherway i just dleted the menu from index template then just added the code to my header insted and it works good proberly not the best way to do it but it works for me you can see here
http://waynesworld.kicks-ass.net/

Offline Toups

  • New Member
  • *
  • Posts: 3
  • Karma: 1
  • Gender: Male
    • Open-Designs
  • SMF Version: 1.15
Re: dropdown menu
« Reply #22 on: July 15, 2008, 09:54:55 AM »
Well I've been trying this for a bit and can't get it to work.. I have everything and understand everything except the whole adding the buttons in part (where you said: then near the bottom where it calls for the actual menu it would look like this.)

Here's what my index.template.php looks like from the point it says there, so how would I add a dropdown to say.. shop with 5 dropdown selections to use as an example so I could just copy & modify that to use for others

If someone could help me with this or edit the code below adding that so I could use.. that would be amazing.


:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
    global $context, $settings, $options, $scripturl, $txt;

    // Work out where we currently are.
    $current_action = 'home';
    if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
        $current_action = 'admin';
    if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'shop','arcade', 'pm', 'gallery')))
        $current_action = $context['current_action'];
    if ($context['current_action'] == 'search2')
        $current_action = 'search';
    if ($context['current_action'] == 'theme')
        $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

     if ($context['current_action'] == 'chat') $current_action = 'chat';
   
    // Are we using right-to-left orientation?
    if ($context['right_to_left'])
    {
        $first = 'last';
        $last = 'first';
    }
    else
    {
        $first = 'first';
        $last = 'last';
    }

    // Show the start of the tab section.
    echo '
        <div id="topmenu">
            <ul>';
                // Show the [home] button.
                    echo '<li><a' , $current_action=='home' ? ' class="current"' : '' , ' href="', $scripturl, '"><span>' , $txt[103] , '</span></a></li>';
                   
                    // SMF Arcade
               echo '<li><a' , $current_action=='arcade' ? ' class="current"' : '' , ' href="', $scripturl, '?action=arcade"><span>' , Arcade , '</span></a></li>';
                   
                // SMF Shop
               echo '<li><a' , $current_action=='shop' ? ' class="current"' : '' , ' href="', $scripturl, '?action=shop"><span>' , Shop , '</span></a></li>';
               
               // SMF Gallery
               echo '<li><a' , $current_action=='gallery' ? ' class="current"' : '' , ' href="', $scripturl, '?action=gallery"><span>' , Gallery , '</span></a></li>';

                // Show the Chat button.
                    echo '<li><a' , $current_action=='chat' ? ' class="current"' : '' , ' href="', $scripturl, '?action=chat"><span>' , Chat , '</span></a></li>';

                // How about the [search] button?
                if ($context['allow_search'])
                    echo '<li><a' , $current_action=='search' ? ' class="current"' : '' , ' href="', $scripturl, '?action=search"><span>' , $txt[182] , '</span></a></li>';

                // The [calendar]!
                if ($context['allow_calendar'])
                    echo '<li><a' , $current_action=='calendar' ? ' class="current"' : '' , ' href="', $scripturl, '?action=calendar"><span>' , $txt['calendar24'] , '</span></a></li>';
                // Is the user allowed to administrate at all? ([admin])
                if ($context['allow_admin'])
                    echo '<li><a' , $current_action=='admin' ? ' class="current"' : '' , ' href="', $scripturl, '?action=admin"><span>' , $txt[2] , '</span></a></li>';

                // Edit Profile... [profile]
                if ($context['allow_edit_profile'])
                    echo '<li><a' , $current_action=='profile' ? ' class="current"' : '' , ' href="', $scripturl, '?action=profile"><span>' , $txt[79] , '</span></a></li>';

                // Go to PM center... [pm]
                if ($context['user']['is_logged'] && $context['allow_pm'])
                    echo '<li><a' , $current_action=='pm' ? ' class="current"' : '' , ' href="', $scripturl, '?action=pm"><span>' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span></a></li>';

                // the [member] list button
                if ($context['allow_memberlist'])
                    echo '<li><a ' , $current_action=='mlist' ? ' class="current"' : '' , ' href="', $scripturl, '?action=mlist"><span>' , $txt[331] , '</span></a></li>';

                // If the user is a guest, show [login] button.
                if ($context['user']['is_guest'])
                    echo '<li><a ' , $current_action=='login' ? ' class="current"' : '' , ' href="', $scripturl, '?action=login"><span>' , $txt[34] , '</span></a></li>';

                // If the user is a guest, also show [register] button.
                if ($context['user']['is_guest'])
                    echo '<li><a ' , $current_action=='register' ? ' class="current"' : '' , ' href="', $scripturl, '?action=register"><span>' , $txt[97] , '</span></a></li>';

                // Otherwise, they might want to [logout]...
                if ($context['user']['is_logged'])
                    echo '<li><a ' , $current_action=='logout' ? ' class="current"' : '' , 'href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><span>' , $txt[108] , '</span></a></li>';

    echo '
            </ul>
        </div>';

}

// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
    global $settings, $buttons, $context, $txt, $scripturl;

    // Create the buttons...
    foreach ($button_strip as $key => $value)
    {
        if (isset($value['test']) && empty($context[$value['test']]))
        {
            unset($button_strip[$key]);
            continue;
        }
        elseif (!isset($buttons[$key]) || $force_reset)
            $buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';

        $button_strip[$key] = $buttons[$key];
    }

    if (empty($button_strip))
        return '<td>&nbsp;</td>';

    echo '
        <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
        <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;|&nbsp; ', $button_strip) , '</td>
        <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}


Online bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13222
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: dropdown menu
« Reply #23 on: July 15, 2008, 04:48:09 PM »
You want a drop down menu in the tab area is that what you mean. ??? Welcome to the site btw. :)

Offline Toups

  • New Member
  • *
  • Posts: 3
  • Karma: 1
  • Gender: Male
    • Open-Designs
  • SMF Version: 1.15
Re: dropdown menu
« Reply #24 on: July 15, 2008, 05:04:02 PM »
You want a drop down menu in the tab area is that what you mean. ??? Welcome to the site btw. :)
Thanks :P
and no my menu.. I have several buttons would like to add a dropdown to most of them.. see here: www.open-designs.org
Just not sure how to go about using that last part to add the dropdown to my buttons.. not really that experienced with php  :embrsd

Online bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13222
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: dropdown menu
« Reply #25 on: July 16, 2008, 10:16:17 AM »
Ah I see. Have you tried here for the right code to use. I have never replaced them but I have put additional row of tabs across the top of the forum:

http://www.dynamicdrive.com/dynamicindex1/index.html

This is a great place to pick a menu and get all the stuff you need for it; then all we have to do is impliment it.

Offline Toups

  • New Member
  • *
  • Posts: 3
  • Karma: 1
  • Gender: Male
    • Open-Designs
  • SMF Version: 1.15
Re: dropdown menu
« Reply #26 on: July 16, 2008, 10:33:11 AM »
Ah I see. Have you tried here for the right code to use. I have never replaced them but I have put additional row of tabs across the top of the forum:

http://www.dynamicdrive.com/dynamicindex1/index.html

This is a great place to pick a menu and get all the stuff you need for it; then all we have to do is impliment it.


tried implementing http://www.dynamicdrive.com/dynamicindex1/dropdowncontrol.htm
couldn't do it.. not that great with php

I actually got it to put the buttons in and such.. but my entire nav menu bar went all over the place.. like Home was in the middle of my board with 2 dropdowns being in the news box etc.. lol.. so.. yeah..

Online bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13222
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: dropdown menu
« Reply #27 on: July 16, 2008, 10:53:21 AM »
I might be able to take a look for you in a bit and see what I can do. I won't promise anything but I should have some time later.

Offline antechinus

  • Hero Member
  • *
  • Posts: 445
  • Karma: 65
Re: dropdown menu
« Reply #28 on: August 03, 2008, 06:08:07 AM »
Bumpety.

I've decided to have a serious go at getting drop menus sorted for Outline.
So far I've got them working but not glitch free.
I've put up a demo here for anyone who wants to take a look and have a think about it.

The theme is selectable in the theme changer as OutlineDropTest_TP.
Logins are Demo1 (same password) and Demo2 (ditto).

There's also a zip in the download manager if anyone wants to play with it.
Haven't bothered with context settings on the buttons yet since it's just extra scope for parse errors while doing testing.
Any and all feedback is welcome.

Offline damnitmike

  • Jr. Member
  • *
  • Posts: 145
  • Karma: 45
  • Gender: Male
    • Tribe Town
  • SMF Version: 1.16
Re: dropdown menu
« Reply #29 on: October 22, 2008, 10:00:13 PM »
I'm really starting to get an interest in this....I think I have simplified it for my own ability.....
 
Plus it should help me (or anyone else) further their learning and understanding of mods if they wish to give it a go too...
 
I simply do not think the search box is needed on the (default theme).....since it has its own tab.....
 
For that matter, it could be added to the dropdown.... :lmao
 
I want to put a drop down menu there instead, which would be named something like, Oh, I don't know.....Cool Stuff......
 
Eh, the name could come later...... :grin
 
 
I believe the Dynamic Drive dropdowns, a few use an html page, which would be good....
 
The problem, the learning part,  and test for me is this part....
 
I want to be able to add the links from the admin section......
 
I'm looking at the Affiliates mod, for educational purposes, and because it seems to fall in line with what I need to do...
 
Here's a good candidate for the dropdown...
 
http://www.dynamicdrive.com/dynamicindex1/dropdowncontrol.htm
 
 
Anyone  able to steer me in the right direction here, I'd be thrilled....Anyone want to partner up, that would be cool also....
 
I've seen so many 'demands' for something like this, I think its time......
 
This one uses the DIV controls, and SMF seems to like them...
 
The CSS also already has the colors comparible to default themes..
 
 
 
 
 
 
 
« Last Edit: October 22, 2008, 10:02:58 PM by damnitmike »