PDA

View Full Version : Adding another dropdown menu



Doug Nelson
Wed 14th Jan '04, 6:20pm
I'm using VB3rc2. I'd like to add another dropdown menu like the one used for Quick Links. I know about editing the navbar template. What I don't know about is ID naming. I notice both dropdown menus have a unique ID. Is this necessary for other dropdowns, and where would it be referenced?

Thank you.

Mirical Bernd
Wed 14th Jan '04, 6:37pm
I can show how we did it:

Search for:

<if condition="$bbuserinfo['userid']">
<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout" onclick="return log_out()">$vbphrase[log_out]</a></td>
</if>
</tr>
</table>

replace with:

<if condition="$bbuserinfo['userid']">
<td class="vbmenu_control"><a href="$vboptions[homeurl]/login.php?$session[sessionurl]do=logout" onclick="return log_out()">$vbphrase[log_out]</a></td>
</if>
<td id="comicforum" class="vbmenu_control"><a href="#comicforum">$vbphrase[additional_links]</a> <script type="text/javascript"> vbmenu_register("comicforum"); </script></td>
</tr>
</table>

Search for:

<!-- / NAVBAR POPUP MENUS -->
</if>

replace with:

<!-- Comicforum menu -->
<div class="vbmenu_popup" id="comicforum_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[additional_links]</td></tr>
<tr><td class="vbmenu_option"><a href="http://www.spreadshirt.de/shop.php?sid=6475">$vbphrase[cf_shop]</a></td></tr>
</table>
</div>
<!-- / Comicforum Menu -->


<!-- / NAVBAR POPUP MENUS -->
</if>

As you can see, "comicforum" was used in the IDs, and in vb_register. It works perfectly. If you have any more question, just ask :)

Doug Nelson
Wed 14th Jan '04, 6:42pm
Oy! It looks kind of scary :)

But thank you, and I'll study this.

Mirical Bernd
Wed 14th Jan '04, 6:43pm
ah forgot it: You need to do that in the navbar-template of course :)

walkingthepath
Thu 15th Jan '04, 10:01am
is there a way to make this an ADMIN CPANEL feature? Like... add your own popup menues? That would be a great HACK/CODE MOD!! :)

Doug Nelson
Thu 15th Jan '04, 7:38pm
Mirical:

Thanks to your example, I was able to do what I needed.

Thanks again.

symbian.info
Wed 21st Jan '04, 4:38pm
Got a strange problem I use Vbadvanced portal, there is the drop down menu visible but in the forum it self is nothing to see! (only the pointer)
Very change..

malljack
Mon 26th Jan '04, 11:52pm
How do you actually change a nav bar link? I see where the template is but I do not understand how to change them?

Mirical Bernd
Wed 28th Jan '04, 5:55pm
How do you actually change a nav bar link? I see where the template is but I do not understand how to change them?
I guess you don't know anything about HTML? I would give you the advice to learn HTML first. Everything else is easy when done that...

Mirical Bernd
Wed 28th Jan '04, 5:57pm
Got a strange problem I use Vbadvanced portal, there is the drop down menu visible but in the forum it self is nothing to see! (only the pointer)
Very change..
Might be a conditional not set right. But to know exactly why it doesn't work, I would need to see your code in the navbar-template. Can you please post it here?

Gary King
Wed 28th Jan '04, 11:10pm
Might be a conditional not set right. But to know exactly why it doesn't work, I would need to see your code in the navbar-template. Can you please post it here?
It's probably because of the $vbphrase's that aren't created yet ;)