vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Forum Home Enhancements - Dropdown Menu box for Links/Urls (https://vborg.vbsupport.ru/showthread.php?t=200283)

UKBusinessLive 12-30-2008 10:00 PM

Dropdown Menu box for Links/Urls
 
1 Attachment(s)
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.

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

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

: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:51 PM

:D Reserved :cool:

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

Stromba 01-01-2009 05:05 PM

well thank you verry much i love it :)

UKBusinessLive 01-01-2009 05:47 PM

Quote:

Originally Posted by Stromba (Post 1698653)
well thank you verry much i love it :)

Thank you Sir, Hope it works for you :D

lenzo 01-03-2009 08:37 AM

1 Attachment(s)
Can you take this one step further and set up user defined links that you add to the drop down menu?

I tried getting someone to do this before with no luck (see the link below).

http://www.vbadvanced.com/forum/showthread.php?t=30095

I enclosed the same file, so you can try it out. If you can get it working properly, you can release it as a mod with my permission. I just need someone to take it to the next step. Anybody out there that can do it...

UKBusinessLive 01-03-2009 09:19 AM

Quote:

Originally Posted by lenzo (Post 1700123)
Can you take this one step further and set up user defined links that you add to the drop down menu?

I tried getting someone to do this before with no luck (see the link below).

http://www.vbadvanced.com/forum/showthread.php?t=30095

I enclosed the same file, so you can try it out. If you can get it working properly, you can release it as a mod with my permission. I just need someone to take it to the next step. Anybody out there that can do it...

I'll take a look for you lenzo, but i've not had much experiance with vbadvanced, bear with me :cool:

UKBusinessLive 01-04-2009 02:21 PM

1 Attachment(s)
*****************************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*************** *******************

RedeemedWarrior 01-07-2009 04:54 AM

excellent!

UKBusinessLive 01-07-2009 05:07 AM

Quote:

Originally Posted by RedeemedWarrior (Post 1703887)
excellent!

Thanks:D

RedeemedWarrior 01-07-2009 05:22 AM

anyway this could be used to allow multiple dropdowns?

like for several sections


All times are GMT. The time now is 01:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01153 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete