menu dropdown
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #1
menu dropdown
does anyone have a good method for a menu drop down that'll work in all browsers..ie6, 7, 8, firefox, safari & google chrome.  I use a drop down now, but it doesn't work properly in chrome.
08-08-2010 10:18 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #2
RE: menu dropdown
I have a really simple little drop down on LeeFish. Its only one level deep, but its ok in all IE6, Opera, Safari, FireFox and Chrome.

If its what you want I can tell you how I made it. Its mainly template edits ....

http://www.leefish.nl/mybb/portal.php


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 08-09-2010 12:50 AM by leefish.)
08-09-2010 12:49 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #3
RE: menu dropdown
(08-09-2010 12:49 AM)leefish Wrote:  I have a really simple little drop down on LeeFish. Its only one level deep, but its ok in all IE6, Opera, Safari, FireFox and Chrome.

If its what you want I can tell you how I made it. Its mainly template edits ....

http://www.leefish.nl/mybb/portal.php

that's exactly what I'm looking for...
08-09-2010 05:15 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #4
RE: menu dropdown
Its using the built in mybb popup menu code: RateU showed me how to do it. I am busy with another thing right now, but I will post the template edits for you tomorrow if that is ok.


[Image: leelink.gif]
MYBB1.6 & XThreads
08-09-2010 07:17 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #5
RE: menu dropdown
(08-09-2010 07:17 AM)leefish Wrote:  Its using the built in mybb popup menu code: RateU showed me how to do it. I am busy with another thing right now, but I will post the template edits for you tomorrow if that is ok.

no worries...

if he helped you on here and you got a link where he helped you..link me to it and I'll try to figure it out.
08-09-2010 08:54 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #6
RE: menu dropdown
Hi there, this is the code I use in my dropdown menu:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<br />
<div>
			<strong><span><a href="#" id="forumlink_{$memprofile['uid']}">Site Areas&nbsp;<img src="{$mybb->settings['bburl']}/mybb/images/NewFish/thing.gif" alt="Click to View Site Links"/></a></span></strong>
				<div id="forumlink_{$memprofile['uid']}_popup" class="popup_menu" style="display: none;"><span></span>				
					<div class="popup_item_container">
						<a href="{$mybb->settings['bburl']}/mybb/portal.php" class="popup_item"><span class="smalltext">Home Page</span></a>
					</div>
			                <div class="popup_item_container">
						<a href="{$mybb->settings['bburl']}/mybb/index.php" class="popup_item"><span class="smalltext">All Areas</span></a>
					</div>
                                        <div class="popup_item_container">
						<a href="{$mybb->settings['bburl']}/mybb/forumdisplay.php?fid=1" class="popup_item"><span class="smalltext">The Bowl</span></a>
					</div>

					<div class="popup_item_container">
						<a href="{$mybb->settings['bburl']}/mybb/forumdisplay.php?fid=6" class="popup_item"><span class="smalltext">SimFish</span></a>
					</div>

					<div class="popup_item_container">
						<a href="{$mybb->settings['bburl']}/mybb/forumdisplay.php?fid=3" class="popup_item"><span class="smalltext">Random Fish</span></a>
					</div>

					<div class="popup_item_container">
						<a href="{$mybb->settings['bburl']}/mybb/forumdisplay.php?fid=9" class="popup_item"><span class="smalltext">Code Fish</span></a>
					</div>
					<div class="popup_item_container">
						<a href="{$mybb->settings['bburl']}/mybb/games.php" class="popup_item"><span class="smalltext">Games Section</span></a>
					</div>
						
	        		</div>
					<script type="text/javascript">

					<!--

					new PopupMenu("forumlink_{$memprofile['uid']}");

					// -->

					</script>
			</div>


You will see that I use "forumlink" 3 times in this code; you can call your link whatever you like, but it must be called the same in all 3 instances.

I have this as a separate template which is linked to my header. If you wanted it in the default header you would have this:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<div id="container">
		<a name="top" id="top"></a>
		<div id="header">
			<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>
			<div class="menu">
				<ul>
					<li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/search.gif" alt="" title="" />{$lang->toplinks_search}</a></li>
					<li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="" />{$lang->toplinks_memberlist}</a></li>
					<li><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/calendar.gif" alt="" title="" />{$lang->toplinks_calendar}</a></li>
					<li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />{$lang->toplinks_help}</a></li>
				</ul>
			</div>
			<hr class="hidden" />
			<div id="panel">
				{$welcomeblock}
			</div>
		</div>
<table><tr>
	<td>{$site_links}</td>
	<td>{$help_links}</td>
</tr></table>
		<hr class="hidden" />
		<br class="clear" />
		<div id="content">
			{$pm_notice}
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
			<navigation>
			<br />


By adding more templates and linking to them then you can have a list across your header like mine.

I use the global templates plugin for this (I think you can do it with php in templates and template conditionals but I can't work that out). The global templates plugin does work with 1.6. Alternatively you can just put the code in from the first codeblock I posted where it says {$site_links} in the second codeblock.

I was typing - sadly, RateU closed the forum where his neat tutorial for this was posted - maybe he has a copy of it. He explains better than me.

Hmm, I should add that you can have multiple drop downs on the pages etc but each one must have its own name - so once you have used forumlink you cant use that one again. Call the next one helplink (use helplink in all three instances), then memberlink etc etc.



[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 08-09-2010 01:43 PM by leefish.)
08-09-2010 09:05 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #7
RE: menu dropdown
I'll give that a try tonight, leefish..thanks!
08-09-2010 09:13 AM
Find all posts by this user Quote this message in a reply
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #8
RE: menu dropdown
Lee,

how would I get the 'drop down' on the same row as the standard top links like search, help, memberlist, etc..
08-09-2010 02:34 PM
Find all posts by this user Quote this message in a reply
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #9
RE: menu dropdown
(08-09-2010 02:34 PM)Shemo Wrote:  Lee,

how would I get the 'drop down' on the same row as the standard top links like search, help, memberlist, etc..

You have to add the same code (provided by Lee above ^) in header template.

[Image: logo.png]

[Image: twitter.png]
08-09-2010 05:11 PM
Visit this user's website Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #10
RE: menu dropdown
Hi Shemo, you can do it like this, but in my layout I got rid of the standard links:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<div id="container">
		<a name="top" id="top"></a>
		<div id="header">
			<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>
<table><tr>
	<td>{$site_links}</td>
	<td>{$featured}</td>
	<td>{$dl_links}</td>
	<td>{$help_link}</td>
	<td><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />{$lang->toplinks_help}</a></td>
	<td><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/calendar.gif" alt="" title="" />{$lang->toplinks_calendar}</a></td>
	<td><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="" />{$lang->toplinks_memberlist}</a></td>
	<td><a href="{$mybb->settings['bburl']}/search.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/search.gif" alt="" title="" />{$lang->toplinks_search}</a></td>				
</tr></table>
			<hr class="hidden" />
			<div id="panel">
				{$welcomeblock}
			</div>
		</div>
		<hr class="hidden" />
		<br class="clear" />
		<div id="content">
			{$pm_notice}
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
			<navigation>
			<br />



[Image: leelink.gif]
MYBB1.6 & XThreads
08-09-2010 11:15 PM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: