PDA

View Full Version : DHTML menu in CSS menu problem!!!


Oyabun
12-28-2008, 01:34 AM
Hi guys
I was just about to use this menu (http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/) as my new navbar.

I deleted most of the code in the navbar template.
The breadcrumb and username/welcomemessage/private messages and notifications are still left.

Now i put the entire code (from dynamic drive) into the header template to the head and html section. It works perfect but there is one problem! I can't get the old DHTML Menus into the new navbar menu...

I tried to put in
<li><div id="navbar_search" align="left" class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a>
<if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search"); </script></if></div>
</li> for the search DHTML menu. It worked but it looked messed up....



Excuse my english. Hope someone helps me out :)

KevinL
12-28-2008, 01:41 AM
maybe a link or a picture? "messed up" doesn't really help at all...

Oyabun
12-28-2008, 02:26 AM
I added an attachment to my post...
If I can't change it in the css menu i'll just link to search.php :(

KevinL
12-28-2008, 02:48 AM
In your css for your board it must be set to bold for vbmenu_control

look here "Popup Menu Controls" ...it might be set to bold change that to what you want.

Oyabun
12-28-2008, 03:05 AM
In your css for your board it must be set to bold for vbmenu_control

look here "Popup Menu Controls" ...it might be set to bold change that to what you want.

There is nothing set to bold :confused:

Also i want the arrow to be removed and the navigation back to the normal layout (NORMALLY ENDS HERE line in my animated gif)

KevinL
12-28-2008, 03:17 AM
It has to be set to bold someplace haha and it most likely has to do with class="vbmenu_control" The css for that has to be set to bold somewhere or in the css for the navbar --> jqueryslidemenu.css

And as for the layout that should be set in the css layout I thought it was already set. The attributes like hight and width of the boxes...hmmm

Oyabun
12-28-2008, 03:19 AM
Can you just tell me what you'd change in the code? :confused: I searched everything^^

KevinL
12-28-2008, 03:23 AM
haha well...with what you gave me I have no idea! You gave me a picture and a snip of vb code! Maybe a link to your site? And hopefully guests can see the skin in question?

Taragon
12-28-2008, 04:18 AM
thanks, by looking for an answer I just found a relating error at my own forums :p

this should do the trick:
<div id="myslidemenu" class="jqueryslidemenu">
<ul>
<if condition="$show['member']">
<li><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></li>
</if>
<if condition="$show['registerbutton']">
<li><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></li>
</if>
$template_hook[navbar_buttons_left]
<li><a rel="help" href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></li>
<if condition="$show['communitylink'] AND $show['popups']">
<li><a id="community" href="$show[nojs_link]#community" rel="nofollow" accesskey="6">$vbphrase[community]</a> <script type="text/javascript"> vbmenu_register("community"); </script></li>
<else />
<if condition="$vboptions['enablememberlist']">
<li><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></li>
</if>
<if condition="$show['quick_links_groups']">
<li><a href="group.php?$session[sessionurl]">$vbphrase[social_groups]</a></li>
</if>
</if>
<li><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></li>
<if condition="$show['popups']">
<if condition="$show['searchbuttons']">
<if condition="$show['member']">
<li><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></li>
<else />
<li><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></li>
</if>
<li><a id="navbar_search" href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search"); </script></if></li>
</if>
<if condition="$show['member']">
<li><a id="usercptools" href="$show[nojs_link]#usercptools" accesskey="3">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></li>
</if>
<else />
<if condition="$show['searchbuttons']">
<li><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></li>
<if condition="$show['member']">
<li><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></li>
<else />
<li><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></li>
</if>
</if>
<li><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></li>
<if condition="$show['member']">
<li><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_contacts]</a></li>
</if>
</if>
$template_hook[navbar_buttons_right]
<if condition="$show['member']">
<li><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></li>
</if>
</ul>
<br style="clear: left" />
</div>

--------------- Added 1230445289 at 1230445289 ---------------

some reading material: http://css.maxdesign.com.au/listamatic/

Oyabun
12-28-2008, 06:06 PM
MAN thank you so much. It works :D

I could make a modification out of it^^

Edit: Now i just have to figure out how to make the other menu buttons open by click

EWGF
12-28-2008, 07:36 PM
Thanks for mentioning this menu. I was struggeling with a YUI menu of Yahoo with a size of 100kb+ :o

Taragon
12-28-2008, 09:18 PM
MAN thank you so much. It works :D

I could make a modification out of it^^

Edit: Now i just have to figure out how to make the other menu buttons open by click
If that's the case, and you aren't going to use the sub menus and dropdown menus, why are you trying to implement the YUI code instead of going for a CSS menu alone? (including some IE bugfixes)

Basically it's nothing more than a horizontal list you've created, similar to the list feature from the vB text editor (also pointing to the link above)

https://vborg.vbsupport.ru/external/2011/08/28.gif

--------------- Added 1230517165 at 1230517165 ---------------

As I'm receiving this notice when trying to reply a pm I guess this would be the best place to post it.
x has chosen not to receive private messages or may not be allowed to receive private messages. Therefore you may not send your message to him/her.
First I'll have to admit I'm not a coder, nor am I a designer and therefore I can't tell this to be a 100% correct.

YUI, CSS, and Javascript are 3 seperate things.
CSS does the styling, whilst YUI and Javascript (in this case) manage the way how things are being displayed.
In this case YUI manages how how the dropdown menus fold down, or how the sub menus would open.
Javascript could be used to fixed the IE bug with some browsers.

When using a CSS menu using the vBulletin dropdown menus and using the Javascript IE bugfix the worst thing that could happen is, when a user would disable the use of Javascript, that a user complains they're seeing your navbar as a list
- test1.html
- test2.html
- test3.html

instead of
- test1.html - test2.html - test3.html

Or the dropdown menu would simply not work at all and you'd be directly linked to the main page ie. search.php
This however goes for the stock vB style as well, and therefore I don't really see a big difference.

As mentioned at the beginning, I'm not a designer, therefore feel free to confirm my reply before implementing it into your own board.