Advertise Here

Author Topic: [Code] Add More Tabs  (Read 31509 times)

0 Members and 1 Guest are viewing this topic.

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
[Code] Add More Tabs
« on: May 14, 2007, 04:46:39 pm »
This add more tabs uptop, basicly, just adds more links.

Add this to your Headers if you don't have it already.  If you already have it, don't add it:
Code: [Select]
<script src="/jquery.js"></script>
Now, I found out that you can add my codes to the Headers or Footers, it doesn't matter, they will still work, so you can add this in either your headers or footers...
Code: [Select]
<script>
function addlinks(){
//Created by Agent Moose (smcodes.smfforfree3.com)
$(function() {
var links = new Array()
links[links.length] = ["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>

LINKS NAME is where you put the links name
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:

Will open the url in the same window:

Code: [Select]
links[links.length] = ["LINKS NAME","URL FOR LINK"]
Will open the url in a new window/tab:

Code: [Select]
links[links.length] = ["LINKS NAME","URL FOR LINK' target='_blank"]
« Last Edit: May 09, 2008, 02:28:42 pm by Agent Moose »
Check out Revolution X's Brand new Code Index!

Offline Hurricane47

  • SMF For Free Master
  • *
  • Posts: 1108
    • View Profile
    • My Graphics Forum!

  • Total Badges: 27
    Badges: (View All)
    Windows User Poll Starter Poll Voter Level 5 Webmaster
Re: Add More Tabs
« Reply #1 on: May 14, 2007, 05:43:08 pm »
OK, when I added the tab, the tab came up ok.

When I clicked on it, it went to
http://runescapejaja.smfforfree2.com/www.youtube.com/hurrican47

I wanted it to go to www.youtube.com/hurrican47

Can you help?

Offline Crasy

  • Global Moderator
  • *
  • Posts: 3960
  • Semi-Retired ;)
    • View Profile

  • Total Badges: 29
    Badges: (View All)
    Poll Starter Poll Voter Seventh year Anniversary Arcade Highscore Windows User
Re: Add More Tabs
« Reply #2 on: May 14, 2007, 06:04:21 pm »
Change the link to http://www.youtube.com/hurrican47

You have to have the http:// on it..or it thinks it's going to some subfolder that isn't there.
Did my answer help you? Want to help out hosting costs?


Every donation counts.

Offline Hurricane47

  • SMF For Free Master
  • *
  • Posts: 1108
    • View Profile
    • My Graphics Forum!

  • Total Badges: 27
    Badges: (View All)
    Windows User Poll Starter Poll Voter Level 5 Webmaster
Re: Add More Tabs
« Reply #3 on: May 14, 2007, 08:40:23 pm »
Thanx

I added http:// to it and it worked! tyvm

Offline Hurricane47

  • SMF For Free Master
  • *
  • Posts: 1108
    • View Profile
    • My Graphics Forum!

  • Total Badges: 27
    Badges: (View All)
    Windows User Poll Starter Poll Voter Level 5 Webmaster
Re: Add More Tabs
« Reply #4 on: May 15, 2007, 04:54:28 pm »
i put that and it doesnt make a new tab and it says 404 not found.
I put in th link with it when I put it in

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: Add More Tabs
« Reply #5 on: May 15, 2007, 04:59:29 pm »
i put that and it doesnt make a new tab and it says 404 not found.
I put in th link with it when I put it in

I checked your source code.. looks like you put it in correctly..  hmm

try this

http://www.youtube.com/hurrican47 target='_blank'

if it doesnt work hopefully Moose can help ya :)

Offline Hurricane47

  • SMF For Free Master
  • *
  • Posts: 1108
    • View Profile
    • My Graphics Forum!

  • Total Badges: 27
    Badges: (View All)
    Windows User Poll Starter Poll Voter Level 5 Webmaster
Re: Add More Tabs
« Reply #6 on: May 15, 2007, 05:02:23 pm »
Nope still doesnt work

Can you help me agent moose?

Offline LaundryLady

  • Helpers
  • *
  • Posts: 3253
  • Internet Challenged
    • View Profile

  • Total Badges: 26
    Badges: (View All)
    Seventh year Anniversary Sixth year Anniversary Search Poll Voter Level 5
Re: Add More Tabs
« Reply #7 on: May 20, 2007, 10:19:04 am »
Forum Url: http://thelaundryroom.smfforfree2.com
I noticed something interesting when I went to work on my membergroups and permissions.  The new link/menu tab I made also shows up in those sections as an additional tab.  Is it supposed to do that?


And I Play:  Mafia-Mandemz

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: Add More Tabs
« Reply #8 on: May 20, 2007, 10:20:43 am »
Forum Url: http://thelaundryroom.smfforfree2.com
I noticed something interesting when I went to work on my membergroups and permissions.  The new link/menu tab I made also shows up in those sections as an additional tab.  Is it supposed to do that?

the code is in your header or footer so yes it will show on all pages

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: Add More Tabs
« Reply #9 on: May 20, 2007, 10:36:30 am »
humm..  i just realized which code you were referring to Laundry (as we have a couple similar ones here)   
I dont think it was meant to show up in those areas, but there is probably nothing that can be done about that.

Offline Agent Moose

  • Moderator
  • *****
  • Posts: 836
  • Do not PM me for Code Support or Request
    • View Profile

  • Total Badges: 32
    Badges: (View All)
    Search Level 6 Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary
Re: Add More Tabs
« Reply #10 on: May 20, 2007, 12:06:40 pm »
There is nothing you can do about it.  the code just does that.
Check out Revolution X's Brand new Code Index!

Offline LaundryLady

  • Helpers
  • *
  • Posts: 3253
  • Internet Challenged
    • View Profile

  • Total Badges: 26
    Badges: (View All)
    Seventh year Anniversary Sixth year Anniversary Search Poll Voter Level 5
Re: Add More Tabs
« Reply #11 on: May 20, 2007, 12:54:16 pm »
And it is such a lovely code also


And I Play:  Mafia-Mandemz

Offline † Java †

  • SMF For Free Full Member
  • *
  • Posts: 183
    • View Profile
    • Moparscape Help

  • Total Badges: 16
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: Add More Tabs
« Reply #12 on: May 27, 2007, 08:28:21 pm »

Offline Crasy

  • Global Moderator
  • *
  • Posts: 3960
  • Semi-Retired ;)
    • View Profile

  • Total Badges: 29
    Badges: (View All)
    Poll Starter Poll Voter Seventh year Anniversary Arcade Highscore Windows User
Re: Add More Tabs
« Reply #13 on: May 27, 2007, 08:30:23 pm »
Put http://www.cellscape.co.nr

If you don't put http:// before a URL it assumes that you're trying to go to a folder in that directory.
Did my answer help you? Want to help out hosting costs?


Every donation counts.

Offline † Java †

  • SMF For Free Full Member
  • *
  • Posts: 183
    • View Profile
    • Moparscape Help

  • Total Badges: 16
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: Add More Tabs
« Reply #14 on: May 27, 2007, 08:37:50 pm »
ok thanks

 

Related Topics

  Subject / Started by Replies Last post
22 Replies
7185 Views
Last post January 29, 2009, 07:59:16 pm
by s3xy v0id
1 Replies
2035 Views
Last post November 12, 2008, 07:59:32 am
by simply sibyl
0 Replies
1641 Views
Last post January 26, 2011, 05:53:59 pm
by Arekay