MyBB Community Forums

Full Version: Trying to customize the menu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My website is located at http://unforgettable.lights-awake.com.

I've been searching for hours now for a way to edit my menu. I want to remove the welcome block, and instead of a vertical menu in the top left of my site that scrolls with the page (like the cbox button does in the bottom right). I also want the menu to have sub-menus, so that I could have a parent item that says "PMs" and when you hover over it you get "No New Messages" and "Create New PM", for instance. I would also want a parent item that says something like "User Links" with sub-menus for the Member CP, Admin CP, and Mod CP depending on the member logged in.

If someone, or more than one person, could help me with this, I would greatly appreciate it. I know it's able to be done in CSS, and there are quite a few CSS menu generators out there. However, I'm not sure how to use them so that only certain people see the "Admin CP", for instance.

So all in all... I need the following lol

1) Remove the welcomeblock
2) Create a vertical CSS menu that scrolls with the page (I think this is called absolute positioning?)
3) Have sub-menus for some of the menu items
4) Have some of the items show for certain people only (like Admin CP for only Admins, etc)

Thank you. SO MUCH.
You can try adding a CSS drop down menu to your site, and edit it specifically for each welcomeblock for the guests, members, mods, etc.
I'm not exactly sure how to go about doing that, though.
Lol right now im working on integrating it into my site. Im pretty much done.
http://www.lwis.net/free-css-drop-down-menu/

You can download a pack of CSS menus. And open them in notepad, then go in your theme editor for your site, and copy and past the css stuff, and the html in a template. Then play around a bit with the styling and what not to suite your needs.
Alright, so I know how to do that. But I still don't know how to have the proper menus display for only certain people (admin cp for admin, mod cp for staff, etc). Could you give me a step by step for how to set that up?

Thank you, by the way. I appreciate your help Smile
Ok lets take that MTV drop down menu for example. The one that was in the pack of downloads.

This right here represent one part of the menu, a section:
<li><span class="dir">Music Videos</span>
				<ul>
					<li class="first"><a href="./">MTV.com Video Picks</a></li>
					<li><a href="./">Video Premieres</a></li>
					<li><a href="./">Most Popular Videos</a></li>
					<li><a href="./">Playlists</a></li>
					<li><a href="./">Top Videos by Year</a></li>
					<li><a href="./">Live Performances</a></li>
					<li><a href="./">The Big Ten</a></li>
					<li><a href="./">Headbangers Ball</a></li>
					<li><a href="./">Playlibs</a></li>
					<li><a href="./">Subterranean</a></li>
					<li><a href="./">Sucker Free</a></li>
					<li><a href="./">Video Remixer</a></li>
				</ul>
			</li>

The Music Videos part would represent "Admin CP", and all the other items below it would be links in the admin cp that you go.

So you would copy and paste this: (my custom code for the MTV drop down menu)
into Header > header_welcomeblock_member_admin template.
<li><a href="{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php" class="dir">Admin CP</a>
		<ul>
<li><a href="{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php?module=config">Configuration</a></li>
<li><a href="{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php?module=forum">Sections</a></li>
<li><a href="{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php?module=config-plugins">Plugins</a></li>
<li><a href="{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php?module=user-users" class="dir">Users</a>
<ul>
					<li class="first"><a href="{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php?module=user-banning">Bannings</a></li>
					<li><a href="{$mybb->settings['bburl']}/modcp.php?action=banuser">Ban a User</a></li>
									</ul>
</li>
			<li><a href="{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php?module=user-groups">Groups</a></li>
			<li><a href="{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php?module=style-themes">Themes</a></li>
<li><a href="{$mybb->settings['bburl']}/{$config['admin_dir']}/index.php?module=style-templates">Templates</a></li>
		</ul>
	</li>

Then you do the same for Mod CP.
Just paste this in Header > header_welcomeblock_member_moderator template:
<li><a href="{$mybb->settings['bburl']}/modcp.php" class="dir">Mod CP</a>
		<ul>
<li><a href="{$mybb->settings['bburl']}/modcp.php?action=reports">Reported Posts</a></li>
<li><a href="{$mybb->settings['bburl']}/modcp.php?action=modlogs">Moderator Logs</a></li>
<li><a href="{$mybb->settings['bburl']}/modcp.php?action=finduser">Profile Editor</a></li>
<li><a href="{$mybb->settings['bburl']}/modcp.php?action=banning" class="dir">Bannings</a>
<ul>
		<li class="first"><a href="{$mybb->settings['bburl']}/modcp.php?action=banuser">Ban a User</a></li>
</ul>
</li>
			<li><a href="{$mybb->settings['bburl']}/modcp.php?action=warninglogs">Warning Logs</a></li>
			<li><a href="{$mybb->settings['bburl']}/modcp.php?action=ipsearch">IP Search</a></li>
		</ul>
	</li>

Now, Put this in your Header > header_welcomeblock_member_member template:
<table align="left">
<tr>
<td>
 <ul id="nav" class="dropdown dropdown-horizontal">
	<li><a href="./">Home</a></li>
	<li><a href="{$mybb->settings['bburl']}/usercp.php" class="dir">User CP</a>
		<ul>
<li><a href="member.php?action=profile&uid={$mybb->user['uid']}"><center><img src="{$mybb->user['avatar']}" height="100px" width="100px"></center></a></li>
<li><a href="{$mybb->settings['bburl']}/usercp.php?action=avatar">Change Avatar</a></li>
			<li><a href="{$mybb->settings['bburl']}/usercp.php?action=changename">Change Username</a></li>
			<li><a href="{$mybb->settings['bburl']}/usercp.php?action=password">Change Password</a></li>
<li><a href="{$mybb->settings['bburl']}/usercp.php?action=email">Edit Email</a></li>
	<li><a href="{$mybb->settings['bburl']}/usercp.php?action=editsig">Edit Signature</a></li>
<li><a href="{$mybb->settings['bburl']}/usercp.php?action=options">Miscellaneous</a></li>
		</ul>
	</li>
{$modcplink}
{$admincplink}
<li><span class="dir">Private Messages</span>
		<ul>
			<li><a href="private.php">Inbox(<b>{$mybb->user['pms_unread']}</b>)</a></li>
			<li><a href="private.php?action=send">Compose New</a></li>
<li><a href="private.php?fid=2">Sent Messages</a></li>
<li><a href="private.php?fid=4">Trash Can</a></li>
		</ul>
	</li>
<li><span class="dir"> Latest Topics</span>
		<ul>
			<li><a href="search.php?action=finduserthreads&uid={$mybb->user['uid']}">Your Threads</a></li>
			<li><a href="search.php?action=finduser&uid={$mybb->user['uid']}">Your Posts</a></li>
	<li><a href="search.php?action=getnew" class="dir">New Posts</a></li>
<li><a href="search.php?action=getdaily" class="dir">Today's Posts</a></li>
		</ul>
	</li>

	</ul>
 </td>
</tr>
</table>
<div style="margin-top:3px;float: right;margin-right:3px;"><span style="font-family: arial,sans-serif;font-size: 17px;color:white;">{$lang->welcome_current_time}</span> <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">Log Out Now!</a></div>

Ok lastly, go into your Header template, and put this at the very top:
<div id="wpadminbar">
{$welcomeblock}
</div>

Then get rid of
<div id="panel">
{$welcomeblock}
</div>

Now, to be sure this all works properly. Look in CSS > Dropdown > themes > MTV.com. And upload
default.css
default.ultimate.css

to any folder on your site.
Go back and look for dropdown.css in CSS > Dropdown.

After they've all been uploaded. Go to your headerinclude template. Located in "Ugrouped Templates". Right before {$stylesheet} paste this:
<link href="FILE PATH WHERE YOU UPLOADED IT/dropdown.css" media="screen" rel="stylesheet" type="text/css" />
<link href="FILE PATH WHERE YOU UPLOADED IT/default.ultimate.css" media="screen" rel="stylesheet" type="text/css" />

Now, it should all be working. If anything looks awkward or w.e. Let me know and ill be happy to help :3
Thank you SO much for this guide! I'm going to try to create my own custom menu now, following what you did. I'll reply to this thread again once I'm finished so that you can check over it, if that's alright with you? <3 And just to make sure I'm understanding... you're technically making a new menu for each template (one for welcomeblock_admin, one for welcomeblock_mod, and one for welcomeblock_member)?
No problem, its cool with me. And yea something like that lol.