vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Database of Codes/Hacks/Mods :: Add Menu Buttons - View Topic
Topic Rating: *****
Printable View
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Add Menu Buttons (30th Dec 07 at 3:05am UTC)
Global Header

Adds as many menu buttons as you want...

just repeat:
do_menu('Image Link','Link to page');

Code:
 
  1. <script>
  2. /*Add Menu Buttons
  3. Created By Wrighty
  4. support.virtualforums.co.uk*/
  5.  
  6. var menu = get('menu_buttons','id').getElementsByTagName('font')[0];
  7.  
  8. function do_menu(img_src,link){
  9. menu.innerHTML+= " :: <a href="+link+"><img src='"+img_src+"' border=0></a>";
  10. }
  11.  
  12. do_menu('Image Link','Link to page');
  13. </script>
 
Jake
Junior Member
**

<(o.O<) (>O.o)>

Posts: 127
Status: Offline
Gender: Male
Location: United States
Joined:  
Reputation: 0%  


pmwwwmsn
Re: Add Menu Buttons (16th Feb 08 at 3:10pm UTC)
I'm sorry but what if you wan't it to be text instead of an image?

Image
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Add Menu Buttons (16th Feb 08 at 4:00pm UTC)
I'll code one up in a minute! {Smile}
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Add Menu Buttons (16th Feb 08 at 4:12pm UTC)
Code:
 
  1. <script>
  2. /*Add Menu Buttons
  3. Created By Wrighty
  4. support.virtualforums.co.uk*/
  5.  
  6. var menu = document.getElementById('welcome_table').getElementsByTagName('td')[2];
  7.  
  8. function do_menu(a_text,link){
  9. menu.innerHTML+= " :: <a href="+link+">"+a_text+"</a>";
  10. }
  11.  
  12. do_menu('Text To Display','Link to page');
  13. </script>
 


{Smile}

rroll.to— Shorten a link, rickroll your friends.
Jake
Junior Member
**

<(o.O<) (>O.o)>

Posts: 127
Status: Offline
Gender: Male
Location: United States
Joined:  
Reputation: 0%  


pmwwwmsn
Re: Add Menu Buttons (17th Feb 08 at 4:09pm UTC)
Thank-you much!

Image
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: Add Menu Buttons (17th Feb 08 at 4:15pm UTC)
 
Thank-you much!


No problem. {Smile}

rroll.to— Shorten a link, rickroll your friends.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Add Menu Buttons (17th Feb 08 at 4:20pm UTC)
Thanks Marc! {Smile}
Jake
Junior Member
**

<(o.O<) (>O.o)>

Posts: 127
Status: Offline
Gender: Male
Location: United States
Joined:  
Reputation: 0%  


pmwwwmsn
Re: Add Menu Buttons (17th Feb 08 at 4:27pm UTC)
Hey, is there any way to make the text the same as the links on the nav bar.. (like on my site, the "Website" text is a bit smaller than the other links, I don't think this is considered advertising, but it's http://gfx.vforums.co.uk/

Image
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Add Menu Buttons (17th Feb 08 at 4:43pm UTC)
Code:
 
  1. <script>
  2. /*Add Menu Buttons
  3. Created By Wrighty
  4. support.virtualforums.co.uk*/
  5.  
  6. var menu = document.getElementById('menu_buttons').getElementsByTagName('font')[0];
  7.  
  8. function do_menu(a_text,link){
  9. menu.innerHTML+= " :: <a href="+link+">"+a_text+"</a>";
  10. }
  11.  
  12. do_menu('Text To Display','Link to page');
  13. </script>
 
Jake
Junior Member
**

<(o.O<) (>O.o)>

Posts: 127
Status: Offline
Gender: Male
Location: United States
Joined:  
Reputation: 0%  


pmwwwmsn
Re: Add Menu Buttons (17th Feb 08 at 4:48pm UTC)
THANKS =]

Image
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Add Menu Buttons (17th Feb 08 at 4:48pm UTC)
No problem! {Grin}
dog199200
Guest
Re: Add Menu Buttons (18th Feb 08 at 3:11am UTC)
just wondering is there a way to get it so that the button is on the right side of the page and the normal buttons are on the left, like on here?
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Add Menu Buttons (18th Feb 08 at 7:45am UTC)
http://support.virtualforums.co.uk/board/codesubmit/topic/2238/action/view_topic/page/1/add-website-link-to-right-of-menu/
dog199200
Guest
Re: Add Menu Buttons (24th Feb 08 at 9:14am UTC)
ok heres another one, can you get it so that guests can't see it only logged in members?
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Add Menu Buttons (24th Feb 08 at 12:10pm UTC)
Go to the requests board please! {Smile}
 Printable View

All times are GMT+0 :: The current time is 12:01pm
Page generated in 0.3046 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums