PDA

View Full Version : Forum Home Enhancements - Dropdown Menubox for Links/Urls


UKBusinessLive
12-30-2008, 10:00 PM
As a result of this post https://vborg.vbsupport.ru/showthread.php?p=1697782#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.

https://vborg.vbsupport.ru/external/2009/08/24.png
https://vborg.vbsupport.ru/external/2009/01/57.png

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


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...

<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

<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

:D

*****************************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 :D)
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 :D
*****************************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 ;)

https://vborg.vbsupport.ru/external/2010/01/30.png

:D

UKBusinessLive
12-31-2008, 12:57 PM
:) Reserved :cool:

Please don't forget to click Installed, and if you use it, show us a link to your dropdown box ;)

TheLastSuperman
12-31-2008, 07:03 PM
Hmmm, going to test this for another purpose but thanks for the great idea UK, marked as installed just for helping out the community :D

(I'll pm you about it when done!)

Thanks!

S-MAN

UKBusinessLive
12-31-2008, 07:07 PM
Thanks Mike ;) Happy new year Buddy :D

Rene Kriest
12-31-2008, 07:14 PM
W00t! This is awesome. A very cool and indeed great idea to cope with the small things of every day's life in my forum.

Thank you for this kind of inspiration. Maybe this is a good solution to handle my arcade games section a little better. :)

UKBusinessLive
12-31-2008, 07:16 PM
W00t! This is awesome. A very cool and indeed great idea to cope with the small things of every day's life in my forum.

Thank you for this kind of inspiration. Maybe this is a good solution to handle my arcade games section a little better. :)

Thanks Rene,

They say the simple things are the best. Hope it works for you

Happy New Year :D

TheLastSuperman
12-31-2008, 08:14 PM
Thanks Mike ;) Happy new year Buddy :D

Same Here!

Do they have a thread up yet for wishing such? Let's go see and post if so!

:D

Edit: Found it ;)
https://vborg.vbsupport.ru/showthread.php?t=200124

nalexandre
01-01-2009, 01:42 AM
Fantastico!!!!!!! Thx for sharing.

Obrigado.

UKBusinessLive
01-02-2009, 01:51 AM
Fantastico!!!!!!! Thx for sharing.


Obrigado.

Thanks, Let us know how you got on ;)

UKBusinessLive
01-04-2009, 02:24 PM
*****************************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 :D)
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 :D
*****************************UPDATE*************** *******************

UKBusinessLive
01-12-2009, 08:39 PM
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 ;)

https://vborg.vbsupport.ru/external/2010/01/30.png

:D