Back to vBulletin 3.8 Template Modifications

Dropdown Menu box for Links/Urls
Mod Version: 1.00, by UKBusinessLive

vB Version: 3.8.0 RC 2 Rating: (3 votes - 4.67 average) Installs: 28
Released: 31 Dec 2008 Last Update: 04 Jan 2009 Downloads: 274
Not Supported Template Edits Re-usable Code Translations  

As a result of this post

Spoiler (click to open)


Quote by lingstar
Thanks so much! I really appreciate your investigation.

Best wishes,

Barbara
Just made it Barbara, Its about half way down my forum, Just testing at the moment, take a look and let me know what you think

http://www.ukbusinesslive.co.uk/forum/index.php

Will release it as a template edit later this afternoon for all

Close


I've come up with a small modification that will allow admins to include a small dropdown box in the forum discription. With this mod you will be able to add a few or hundreds of urls and links without filling up your forum.




This is really easy, all you need to do is to copy the following code to notepad on your PC and save it as subnav.js

Code:
function go_nav() {
  if (document.getElementById && document.createTextNode) {	
	var user_link = document.getElementById("my_links").value;	
	window.location = user_link;
	return false;
  }
}
or you can just download the zip file

then you need to upload the subnav.js file to your forums root directory.

The next stage is the code where you edit your urls etc...

Code:
<div id="drop_box_nav">
<form action="#" onsubmit="return go_nav();">
<select name="my_links" id="my_links">
  <option value="http://www.ukbusinesslive.co.uk">UKBusinesslive Store</option>
  <option value="http://www.ukbusinesslive.co.uk/topsite">Topsite</option>
  <option value="http://www.google.com">Google</option>
  <option value="http://www.ukbusinesslive.co.uk/links/">UKBL Links</option>
</select>
&nbsp;&nbsp;
<input type="submit" name="sub_nav" id="sub_nav" value="Go to URL" />
</form>
</div>
<script type="text/javascript" src="subnav.js"></script>
Within that code you need to edit your urls and description in the option values

Code:
 <option value="http://www.ukbusinesslive.co.uk">UKBusinesslive Store</option>
I've only done 4 in the above but you can add as little or as many as you need by simply adding more option values as in the code above.

Once you've saved your edit, you can upload it to a forum, what i did was to create a new forum called "Quick Links" and then paste all of that code into the Forum Description.

Thats all there is to it, Feel free to experiment with this and remember to post a link here if you want to show off your new dropbox.

Enjoy



*****************************UPDATE**********************************
4th Jan 2009

Please find below an .xml file, This is the Menubox done within a Module for vBa

It's the actual module with the default url still in place. (You need to edit these - Unless you want a link to my site )
Anyone with vBa3 can upload it via the vBa control panel.
Lower versions of vBa may need to edit the .xml file.
REMEMBER you still need to upload the subnav.js file to your forum root

Many Thanks to Mal for this Code

Enjoy
*****************************UPDATE**********************************

12 January 2009

To Open in new Browser Window

To get the link to open in a new browser window, what you do is add the target="_blank" attribute to your link tag, like this in your Menu Links area

<option value="http://www.ukbusinesslive.co.uk" target="_blank">UKBusinesslive Store</option>

If you do that to the ones that you want to open in a new window, then you don't navigate away from your site



Download

File Type: %1$s subnav.zip (270 Bytes, 166 downloads)
File Type: %1$s quicklinks-VBA Module.xml (1.0 KB, 112 downloads)

Screenshots

Click image for larger version
Name:	page22.png
Views:	120
Size:	47.8 KB
ID:	91483   Click image for larger version
Name:	page23.png
Views:	202
Size:	65.8 KB
ID:	91484  

Similar Mods

Moderation Menu in Quick Links dropdown vBulletin 3.6 Template Modifications
Removing arrows from dropdown menu links vBulletin 3.6 Template Modifications

vblts.ru supports vBulletin®, 2022-2024