The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Dropdown Menu box for Links/Urls Details »» | |||||||||||||||||||||||||||||||||
As a result of this post https://vborg.vbsupport.ru/showthrea...82#post1697782
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; } } 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> <input type="submit" name="sub_nav" id="sub_nav" value="Go to URL" /> </form> </div> <script type="text/javascript" src="subnav.js"></script> Code:
<option value="http://www.ukbusinesslive.co.uk">UKBusinesslive Store</option> 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 Now
Screenshots
Show Your Support
|
Comments |
#42
|
|||
|
|||
Quote:
|
#43
|
|||
|
|||
UK - any thoughts on why I'm still not able to get the links to open to a new browser window? Thanks in advance...
|
#44
|
|||
|
|||
Hi Mate, I'm looking into this, seems strange, will post back here when i've done my testing
|
#45
|
|||
|
|||
Quote:
If it helps, I'm using this code in a 'BB Code' module on the CMPS homepage of my forum. For whatever reason, it isn't working. |
#46
|
||||
|
||||
This is just what I need! Thanks--Installing it right now..
Rich webdevoman |
#47
|
||||
|
||||
UK - I've got 4 different modules set up on my CMPS page using your mod here - it's great, but the code snippet still isn't resulting in url's opening in a separate window. I know it should, but it doesn't. I thought maybe because I had them set up as 'bb modules' that this might be the issue, but even when I convert them to 'php modules', the result is the same, clicking on a url takes me away from my site, it does not open a new browser window.
Help |
#48
|
|||
|
|||
This is a very nice mod. Thank you!
|
#49
|
||||
|
||||
I need one of you javascript experts to help figure out how to get the urls to open in a new window in this mod! I've done some google-hunting, and found lots of info, but it's mind-boggling to someone not javascript savvy...
|
#50
|
||||
|
||||
i have installed as you posted,tried without the / at the end of the links but when any members tried to click the url it just reloads my forum page ?
any ides ? |
#51
|
|||
|
|||
Installed, but also NOT open link in new tab.
Tried with and without / in the end of link, but it is same...link open in same window. I think that is something within javascript where should be fix that. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|