Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
Add To Topmenu; Add a new drop-down box
Topic Started: Nov 30 2007, 01:48 PM (3,157 Views)
Mwr247
Member Avatar
Cæsaris Salutis!
[ *  * ]
Name:
Add To Topmenu (By Mwr247)

Description:
Adds a new box to the topmenu (after the Inbox). Lets you add as many links below it as you want, and the text, images, and links are customizable. Tested in IE, Firefox, Mozilla, and Opera.

Browser compatibility:
Tested to work in IE, FireFox, Mozilla, Opera, and Safari.

Preview:
ZetaBox

Installation:
Place this in your board template in the box titled "Above the Board":
Quote:
 
<script type="text/javascript">
// Add To Topmenu (By Mwr247)

// New Section (Title,Link,Image)
var addtmt=['Section Title','Section_Link','http://209.85.62.24/static/1/m_ucp.png'];

//Add Links (Title,Link)
var t=0;
var addtml=[];
addtml[t++]=['Link Title 1','Link_1'];
addtml[t++]=['Link Title 2','Link_2'];
</script>
<script name="A.T.M." src="http://209.85.62.24/1/22/0/p242/zetatopmenu.ibf"></script>

The text in green is for what you want the title of the new box to be.

The text in orange is for what you want the section title to link to when you click it.

The text in purple is for what you want the image next to the title to be. It's set to default as the "Preferences" image.

The text in red is for the text for each box.

The text in blue is for the link for each box

Now, to add new links, simple copy and paste the line of text for the last one right below it. For example, if I wanted to add a 3rd link, I would paste the following below the second one:
Quote:
 
addtml[t++]=['Link Title 3','Link_3'];

To add another section, simply paste another copy of the entire code below the previous one, and edit the stuff in it accordingly.
Edited by Mwr247, Feb 3 2008, 04:28 PM.
Offline Profile Quote Post Goto Top
 
Whoa07
Member
[ * ]
Good code, but it stops the Spoiler Tag working in IE. (it doesn't drop down)

Could this be fixed?
Offline Profile Quote Post Goto Top
 
JoshL
Member Avatar
Member
[ * ]
It won't let me change the link titles. I've tried a dozen times and it won't let me. I really need this code.
Offline Profile Quote Post Goto Top
 
Mwr247
Member Avatar
Cæsaris Salutis!
[ *  * ]
Make sure the titles don't contain any ' characters. PM me a link to your board with the code how you say won't work and I'll take a look and figure it out.
Offline Profile Quote Post Goto Top
 
JoshL
Member Avatar
Member
[ * ]
Ah. That's probably my problem. I keep putting the ' character in some of my titles. I'll try the code without them and see if it works or not.

Edit: taking the ' characters out worked. This is a great code! Thanks, Mwr :D
Edited by JoshL, Feb 18 2008, 01:34 PM.
Offline Profile Quote Post Goto Top
 
Mwr247
Member Avatar
Cæsaris Salutis!
[ *  * ]
Glad to hear it :)

In other news concerning all, I've recently completed one of the most sought after codes for invisionfree, and I'm working on a ZB conversion :) What could it be? We'll just have to see...
Offline Profile Quote Post Goto Top
 
salocin
Member
[ * ]
just a quick question, how do you remove the other links?

like the default ones
Offline Profile Quote Post Goto Top
 
Mwr247
Member Avatar
Cæsaris Salutis!
[ *  * ]
Remove the default top menu links? Can't do that with this code, but one could be easily made.
Offline Profile Quote Post Goto Top
 
salocin
Member
[ * ]
Mwr247
Feb 23 2008, 01:33 AM
Remove the default top menu links? Can't do that with this code, but one could be easily made.
i think thats what i mean

the original ones that say search, members, calendar, portal and faq

if there is an easy code, can you post it?
Offline Profile Quote Post Goto Top
 
Soloc
Member
[ * ]
How can I make these links open up in a new window?
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · User Created Codes · Next Topic »
Add Reply