Go Back   Webmaster Forum > Development > Programming > JavaScript
REMOVE the ads below !
Reply
 
LinkBack Thread Tools
  # 1 (permalink)
Old
Junior Geek
Posts: 65
Join Date: Feb 2007
iTrader: (0)
[ZB] add links to preferences - 12-03-2007

Written for zetaboards

A friend requested this to me at msn,
it basically adds links to the preferences at the top (next to the Welcome name [Sign out])
it works in both FF and IE and i don't think any other browser will have problems with this

Add it anywhere under the top menu
Quote:
<script>
/*Add links to preferences
by Godkillah from:
phantom-designs.net*/
var AddLinks=[];n=0
AddLinks[n++]=['My Link','http://www.MyLink.com']
AddLinks[n++]=['My 2nd Link','http://www.MyLink2.com']
AddLinks[n++]=['My Link 3','http://www.My3thLink.com']

Addmenu='';for(i=0;i<AddLinks.length;i++){
Addmenu+='<li><a href="'+AddLinks[i][1]+'">'+AddLinks[i][0]+'</a></li>'
}
if(document.getElementById("menu_ucp"))
document.getElementById("menu_ucp").getElementsByT agName("ul")[0].innerHTML+=Addmenu
</script>
i think how to edit it etc. should be quite easy,
to be sure everyone will understand it i colored it though and will give a small instruction.

this is what you can add/edit/remove in the code to make new links in the preferences
this is the name of the link, basically the text they will see
this is the URL they will got to when they click the link

enjoy
Reply With Quote
Reply


Thread Tools



Advertise Here for just $6 per month

vBulletin®, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. | SEO by vBSEO | Skin developed by vBStyles.com