Advertise Here

Author Topic: [Code] Hide Tabs  (Read 23048 times)

0 Members and 1 Guest are viewing this topic.

Offline - Lawrence -

  • SMF For Free Hero
  • *
  • Posts: 549
    • View Profile

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #30 on: January 01, 2009, 07:25:02 am »
As I already said these are really cool codes, but what would be even better, was if you could set it for only certain membergroups to view the tab.

Also I can't get the second code to work...?
Now this is wierd I have tried the exact same code in a different forum and it worked.

Link to the forum where it isn't working?

http://www.Antifakers.com

Offline Celebrus

  • SMF For Free Hero
  • *
  • Posts: 941
    • View Profile
    • Vikhyat Korrapati

  • Total Badges: 16
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #31 on: January 01, 2009, 11:19:12 am »
It works for me. What browser are you using? Have you disabled javascript?

Offline - Lawrence -

  • SMF For Free Hero
  • *
  • Posts: 549
    • View Profile

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #32 on: January 01, 2009, 11:24:15 am »
It works for me. What browser are you using? Have you disabled javascript?
No, I have got javascript enabled. It is the CHAT tab I am trying to hide from guests.

Offline Weegee

  • SMF For Free Full Member
  • *
  • Posts: 101
    • View Profile

  • Total Badges: 11
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 100 Posts
Re: [Code] Hide Tabs
« Reply #33 on: January 01, 2009, 07:18:24 pm »
The Code Doesn't Always Work...
Why Is That?

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: [Code] Hide Tabs
« Reply #34 on: January 01, 2009, 09:08:40 pm »
It works for me. What browser are you using? Have you disabled javascript?
No, I have got javascript enabled. It is the CHAT tab I am trying to hide from guests.

Make sure to put it in as "Chat" in the code ... not "CHAT"       It wont work if you use all capital letters for the tab name for the one you want to hide

Offline Celebrus

  • SMF For Free Hero
  • *
  • Posts: 941
    • View Profile
    • Vikhyat Korrapati

  • Total Badges: 16
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #35 on: January 02, 2009, 03:20:09 am »
The Code Doesn't Always Work...
Why Is That?

It should work on almost every modern browser with javascript enabled. If you mean the slight delay before the tab is hidden, nothing can be done about that afaik.

Offline - Lawrence -

  • SMF For Free Hero
  • *
  • Posts: 549
    • View Profile

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #36 on: January 02, 2009, 01:14:23 pm »
I am using Firefox, and it doesn't work.

Offline WBA Dude

  • SMF For Free Full Member
  • *
  • Posts: 105
    • View Profile

  • Total Badges: 13
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #37 on: January 03, 2009, 09:56:19 am »
This code will hide tabs you choose to hide under the users area.

This code uses JQuery so you need to have the JQuery include in your headers.

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

Replace Help with the name of the tab you want to hide.

Add this code to your footers:

Code: [Select]
<script>
//Made by Omikron 9861
$("table tbody tr td.maintab_back:contains(Help)").hide();
</script>




Hiding tabs only for guests

Replace Help with the name of the tab you want to hide.

Add this code to your footers:

Quote
<script>
if(!$('td.titlebg2 span b').not($("td.titlebg2 span b:contains(News)")).html())
{
$("table tbody tr td.maintab_back:contains(Help)").hide();
}
</script>

Is there a way to do it so you can hide more than 1 tab?
I am leaving SMF For Free Forums. Have loved every second but sadly, I am using paid hosting. Good Bye!

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: [Code] Hide Tabs
« Reply #38 on: January 03, 2009, 10:00:18 am »
Add more of these lines:

$("table tbody tr td.maintab_back:contains(Help)").hide();

Offline WBA Dude

  • SMF For Free Full Member
  • *
  • Posts: 105
    • View Profile

  • Total Badges: 13
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #39 on: January 03, 2009, 10:01:45 am »
Add more of these lines:

$("table tbody tr td.maintab_back:contains(Help)").hide();

Thanks
I am leaving SMF For Free Forums. Have loved every second but sadly, I am using paid hosting. Good Bye!

Offline Weegee

  • SMF For Free Full Member
  • *
  • Posts: 101
    • View Profile

  • Total Badges: 11
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 100 Posts
Re: [Code] Hide Tabs
« Reply #40 on: January 06, 2009, 10:01:25 am »
Problemo...
I got it to work, but when I enter a forum, they don't dissapear.
What's wrong?

Offline Celebrus

  • SMF For Free Hero
  • *
  • Posts: 941
    • View Profile
    • Vikhyat Korrapati

  • Total Badges: 16
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #41 on: January 06, 2009, 10:09:22 am »
URL? Also, they don't disappear immediately. You need to wait for the page to load completely.

Offline Weegee

  • SMF For Free Full Member
  • *
  • Posts: 101
    • View Profile

  • Total Badges: 11
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 100 Posts
Re: [Code] Hide Tabs
« Reply #42 on: January 06, 2009, 10:36:47 am »
http://weegeesboards.freesmfhosting.com/index.php
I wait for the page to load, but they still remain visible.

Offline - Lawrence -

  • SMF For Free Hero
  • *
  • Posts: 549
    • View Profile

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #43 on: January 07, 2009, 11:21:41 am »
When I visit your site some of the tabs hide. ;)

Offline Weegee

  • SMF For Free Full Member
  • *
  • Posts: 101
    • View Profile

  • Total Badges: 11
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 100 Posts
Re: [Code] Hide Tabs
« Reply #44 on: January 07, 2009, 12:55:54 pm »
Did you go into one of the forums though?  That's where my problem seems to be occurring.

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
2058 Views
Last post November 12, 2008, 07:59:32 am
by simply sibyl
2 Replies
2121 Views
Last post September 16, 2009, 08:51:31 pm
by Simply1Nick