Simple Machine Codes

Forum Coding => SMF For Free Codes => Topic started by: Agent Moose on May 14, 2007, 08:24:13 pm



Title: Add More Tabs V1
Post by: Agent Moose on May 14, 2007, 08:24:13 pm
Footers:
Code:
<script>
function addlinks(){
//Created by Agent Moose
$(function() {
var links = new Array()
links[0] = ["LINKS NAME","URL FOR LINK"]

for(m=0;m<links.length;m++){
$(".maintab_last").before("<td valign='top' class='maintab_back'><a href='"+links[m][1]+"'>"+links[m][0]+"</a></td>");
};});}

addlinks();
</script>

Ok, LINKS NAME is where you put the links name, then in URL FOR LINK, you get the URL of the link and place it there.  If you want to add more links, just add more of these lines:
Code:
links[0] = ["LINKS NAME","URL FOR LINK"]
Make sure you change the 0 to a 1, then if you want to add another, you would change the 1 to a 2 and so on.


Title: Re: Add More Tabs
Post by: deathwilldie on May 18, 2007, 10:56:05 pm
This is really cool.


Title: Re: Add More Tabs
Post by: Littlekidder on May 26, 2007, 04:56:02 am
Question: I've got a site i want to put on which isn't a smf.

So it will come up with my url of forum/url of site

Any help with that?

I'm not good at coding and stff


Title: Re: Add More Tabs
Post by: Agent Moose on May 26, 2007, 11:40:46 am
do you have it like this?

Code:
http://www.siteurlhere.com

IF you don't it will do what your saying.


Title: Re: Add More Tabs V1
Post by: ¢ω on January 06, 2008, 11:32:21 pm
why aren't any of ur codes working?


Title: Re: Add More Tabs V1
Post by: Agent Moose Jr. on January 07, 2008, 05:22:43 am
they are working fine make sure you have this in your headers

Code:
<script src="jquery.js"></script>

if you need any more help just post or pm me O0 :D


Title: Re: Add More Tabs V1
Post by: mr burns on January 17, 2008, 10:10:38 am
when i use it,i click it and it becomes this survey thing


Title: Re: Add More Tabs V1
Post by: Agent Moose Jr. on January 17, 2008, 04:52:54 pm
you need to make sure the url is like this
Code:
http://www.url.com/


Title: Re: Add More Tabs V1
Post by: mr burns on January 18, 2008, 01:55:08 am
thanks!


Title: Re: Add More Tabs V1
Post by: Agent Moose Jr. on January 18, 2008, 02:11:38 pm
thats why im here! to help and serve! your very welcome :)


Title: Re: Add More Tabs V1
Post by: ¢ω on January 18, 2008, 10:44:34 pm
jr., is it suposed to look like this?


<script src="jquery.js"></script>http://www.gdhangout.smfforfree4.com/


Title: Re: Add More Tabs V1
Post by: Agent Moose on January 19, 2008, 11:28:47 am
Try this ;)

Code:
<script src="http://www.gdhangout.smfforfree4.com/jquery.js"></script>


Title: Re: Add More Tabs V1
Post by: Kalphiter on April 06, 2008, 04:09:48 pm
How do you put content in the tabs?


Title: Re: Add More Tabs V1
Post by: Agent Moose on April 06, 2008, 05:13:24 pm
Just put the content you want where it says LINK NAME


Title: Re: Add More Tabs V1
Post by: legend 1234 on April 07, 2008, 04:24:01 am
also april fools

there is now add a tab 2.5

so it looks better and is infront of logout button

legend 1234


Title: Re: Add More Tabs V1
Post by: Kalphiter on April 08, 2008, 11:07:06 am
How do you put content in the tabs?
Just put the content you want where it says LINK NAME

I meant how each tab contains information. The profile tab has information regarding your account, but I only want a tab to link to some text link in the forums. So how would I go upon doing this?


Title: Re: Add More Tabs V1
Post by: legend 1234 on April 09, 2008, 01:30:47 am
so do u mean

u want like a tab linking to this topic that were posting in atm ?

legend 1234


Title: Re: Add More Tabs V1
Post by: zecere on April 26, 2008, 07:53:22 pm
omg help me please.. my forum is www.ultimatescapev4.smfforfree2.com.
 I put this in Headers
<script src="jquery.js"></script>

 And this in Footers..

<script>
function addlinks(){
//Created by Agent Moose
$(function() {
var links = new Array()
links[1] = ["Watch vid here","http://www.youtube.com"]

for(m=0;m<links.length;m++){
$(".maintab_last").before("<td valign='top' class='maintab_back'><a href='"+links[m][1]+"'>"+links[m][0]+"[/url]</td>");
};});}

addlinks();
</script>

 And nothings happens Please help me !


Title: Re: Add More Tabs V1
Post by: legend 1234 on April 26, 2008, 08:05:43 pm
ok try this:

Code:

<script>
function addlinks(){
//Created by Agent Moose
$(function() {
var links = new Array()
links[0] = ["Watch vid here","http://www.youtube.com"]

for(m=0;m<links.length;m++){
$(".maintab_last").before("<td valign='top' class='maintab_back'><a href='"+links[m][1]+"'>"+links[m][0]+"[/url]</td>");
};});}

addlinks();
</script>


although after the tab it has [url] which im not sure y ? maybe its auto coz i searched through theres nothing saying that

legend 1234


Title: Re: Add More Tabs V1
Post by: Agent Moose on April 28, 2008, 02:35:35 pm
Try this:

Code:
<script>
function addlinks(){
//Created by Agent Moose
$(function() {
var links = new Array()
links[1] = ["Watch vid here","http://www.youtube.com"]

for(m=0;m<links.length;m++){
$(".maintab_last").before("<td valign='top' class='maintab_back'><a href='"+links[m][1]+"'>"+links[m][0]+"</a></td>");
};});}

addlinks();
</script>


Title: Re: Add More Tabs V1
Post by: silent on June 10, 2008, 06:59:35 am
Footers:
Code:
<script>
function addlinks(){
//Created by Agent Moose
$(function() {
var links = new Array()
links[0] = ["LINKS NAME","URL FOR LINK"]

for(m=0;m<links.length;m++){
$(".maintab_last").before("<td valign='top' class='maintab_back'><a href='"+links[m][1]+"'>"+links[m][0]+"</a></td>");
};});}

addlinks();
</script>

Ok, LINKS NAME is where you put the links name, then in URL FOR LINK, you get the URL of the link and place it there.  If you want to add more links, just add more of these lines:
Code:
links[0] = ["LINKS NAME","URL FOR LINK"]
Make sure you change the 0 to a 1, then if you want to add another, you would change the 1 to a 2 and so on.





Where do you place this code at? (I'm new to html coding)


Title: Re: Add More Tabs V1
Post by: tonypker13 on June 10, 2008, 02:25:47 pm
omg help me please.. my forum is www.ultimatescapev4.smfforfree2.com.
 I put this in Headers
<script src="jquery.js"></script>

 And this in Footers..

<script>
function addlinks(){
//Created by Agent Moose
$(function() {
var links = new Array()
links[1] = ["Watch vid here","http://www.youtube.com"]

for(m=0;m<links.length;m++){
$(".maintab_last").before("<td valign='top' class='maintab_back'><a href='"+links[m][1]+"'>"+links[m][0]+"[/url]</td>");
};});}

addlinks();
</script>

 And nothings happens Please help me !

I'll help you. I just joined make me your forum admin for a sec and ill make the code work.


Title: Re: Add More Tabs V1
Post by: legend 1234 on June 11, 2008, 01:14:37 am
SILENT

you place this code into your footers which can be found at admin cp - manage styles - headers and footers.

TONYPKER

that was over a month ago lol

legend 1234


Title: Re: Add More Tabs V1
Post by: Agent Moose on June 11, 2008, 10:17:39 am
Accully, there is no use for this code anymore, you can now add your own tabs:
Admin >> Manage Styles >> Custom Tabs.


Title: Re: Add More Tabs V1
Post by: CodeLover on June 11, 2008, 07:14:21 pm
Yeah I realised that awhile ago. :P


Title: Re: Add More Tabs V1
Post by: silent on June 28, 2008, 07:28:32 pm
wow I love this one. Its very cool and useful for many.

thanks for posting it.


Title: Re: Add More Tabs V1
Post by: Brendan on June 30, 2008, 07:37:03 am
Hey, Im a coder in training ;) But eh, You don't need this code anymore right, umm I make a tab but i want it like yours Home then Forum but mine goes right after My messages...and i try changing position and what url would i put in because if i use my Forum url it goes to the home page, so what url would i put in the url spot? and when it works how would i get home eh nvm look at pick ;)

This is home and i want it like this (someone else did it for me on these forums):

(http://i25.tinypic.com/24655ib.jpg) I want mine like that and here is the forums tab:

(http://i31.tinypic.com/deohtc.jpg) So i want to know how to make mine like that please someone i really need help atm :)


Title: Re: Add More Tabs V1
Post by: Kalphiter on June 30, 2008, 10:46:31 am
Hey, Im a coder in training ;) But eh, You don't need this code anymore right, umm I make a tab but i want it like yours Home then Forum but mine goes right after My messages...and i try changing position and what url would i put in because if i use my Forum url it goes to the home page, so what url would i put in the url spot? and when it works how would i get home eh nvm look at pick ;)

(half-quoted)
Go to portal settings -> Enable -> choose your widths of blocks -> Add block(towards bottom)

All you need to know is how to copy and paste embed codes, or HTML if you wanted anymore.


Title: Re: Add More Tabs V1
Post by: Brendan on July 09, 2008, 08:18:55 am
I found out that day how to add them...but Thank you anyway :)


Title: Re: Add More Tabs V1
Post by: Kalphiter on July 09, 2008, 12:30:01 pm
I found out that day how to add them...but Thank you anyway :)
You're very welcome visitor.


Title: Re: Add More Tabs V1
Post by: Kalphiter on July 09, 2008, 12:41:00 pm
Just put the content you want where it says LINK NAME
Yes I really meant the web page editor but I said that before that.

And.. this topic is useless now :(