Advertise Here

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

0 Members and 1 Guest are viewing this topic.

guest1608

  • Guest
[Code] Hide Tabs
« on: November 07, 2007, 10:40:16 pm »
There are 3 versions of the Hide Tab Code:    Hide Specific Tabs,  Hide Tabs From Guests,  Hide All Tabs

If you do not already have it add the JQuery include to your headers.

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

1.  TO HIDE SPECIFIC TABS
* The Code goes in your Footer

Code: [Select]
<script>
//Made by Omikron 9861
$("table tbody tr td.maintab_back:contains(Help)").hide();
</script>
Replace Help with the name of the tab you want to hide.
Add/edit more of these lines if you need them:
Code: [Select]
$("table tbody tr td.maintab_back:contains(Help)").hide();


2.  TO HIDE TABS FROM GUESTS
* The Code goes in your Footer

Code: [Select]
<script>
if(!$('td.titlebg2 span b').not($("td.titlebg2 span b:contains(News)")).html())
{
$("table tbody tr td.maintab_back:contains(Help)").hide();
}
</script>
Replace Help with the name of the tab you want to hide.
Add/Edit more of these lines if you need them:
Code: [Select]
$("table tbody tr td.maintab_back:contains(Help)").hide();


3. To Hide ALL Tabs:
* The Code goes in your Footer

Code: [Select]
<script>
$("table tbody tr td.maintab_back:contains(Help)").parent().parent().hide();
$("table tbody tr td.maintab_active_back:contains(Help)").parent().parent().hide();
</script>

Offline legend 1234

  • SMF For Free Full Member
  • *
  • Posts: 222
  • Legend 1234
    • View Profile
    • XxownxX

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #1 on: March 27, 2008, 02:25:57 am »
very nice mate thanks alot

now i can hide that annoying help and search tabs lol

legend 1234
Need help with something ? General support l Guides and tuts l codes

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 #2 on: March 27, 2008, 02:47:43 am »
Code: [Select]
<script>
//Made by Omikron 9861
$("table tbody tr td.maintab_back:contains(Search)").hide();
</script>

See if that works.

Offline legend 1234

  • SMF For Free Full Member
  • *
  • Posts: 222
  • Legend 1234
    • View Profile
    • XxownxX

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #3 on: March 27, 2008, 03:01:26 am »
oo yeap it worked

thank you very much mate

legend 1234
Need help with something ? General support l Guides and tuts l codes

Offline Sparkwattclock

  • SMF For Free Member
  • *
  • Posts: 92
  • The leader of the GWC here!
    • View Profile
    • Sparkwattclock@newgrounds.com

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #4 on: April 14, 2008, 08:12:56 pm »
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>

This code will hide tabs you choose to hide under the users area.
Can you hide tabs to guests only?

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 #5 on: April 14, 2008, 08:17:56 pm »
Can you hide tabs to guests only?

With that code no.
Guest WILL though only see things they do have access to see (permissions settings)

Offline Sparkwattclock

  • SMF For Free Member
  • *
  • Posts: 92
  • The leader of the GWC here!
    • View Profile
    • Sparkwattclock@newgrounds.com

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #6 on: April 14, 2008, 08:23:21 pm »
well my problem is that i want to make a flash portal, but i don't want anyone to see it except our members.  The reason i don't want them to see that is because they'll decompile our flashes and steal them.

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 #7 on: April 14, 2008, 08:28:04 pm »
well my problem is that i want to make a flash portal, but i don't want anyone to see it except our members.  The reason i don't want them to see that is because they'll decompile our flashes and steal them.

You'll more then likely need to do it another way then.
Maybe someone else knows of a code  that would be of help  (sorry.. I dont know myself)

Offline Sparkwattclock

  • SMF For Free Member
  • *
  • Posts: 92
  • The leader of the GWC here!
    • View Profile
    • Sparkwattclock@newgrounds.com

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #8 on: April 14, 2008, 08:30:59 pm »
well my problem is that i want to make a flash portal, but i don't want anyone to see it except our members.  The reason i don't want them to see that is because they'll decompile our flashes and steal them.

You'll more then likely need to do it another way then.
Maybe someone else knows of a code  that would be of help  (sorry.. I dont know myself)


It would be cool if smf had a movie system like invision free boards.  In which you don't have to make it not avaible to guests, because it automatically is.  Trust me i would never move my boards to invision just because of that.  I love smf's  because they're easy.

Offline loogiesquared

  • SMF For Free Member
  • *
  • Posts: 50
    • View Profile

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #9 on: May 24, 2008, 09:02:58 am »
i want to remove "gallery" and "search"

i did this:

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

<script>
//Made by Omikron 9861
$("table tbody tr td.maintab_back:contains(Search)").hide();
</script>

i have jquery and it still doesn't work.

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: [Code] Hide Tabs
« Reply #10 on: May 24, 2008, 09:52:16 am »
Make sure you have the latest jquery.  http://www.smfsupport.com/support/smf_for_free_codes/uploaded_jquery_to_the_smf_for_free_forums-t6578.0.html

and put it at the top of your headers.

The rest of the code goes in your footers.  Please re-read the first post for clarification.



And I Play:  Mafia-Mandemz

Offline Shimmy Shabby

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

  • Total Badges: 15
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Hide Tabs
« Reply #11 on: June 20, 2008, 01:16:41 pm »
loogie, instead of removing the gallery tab, if you just dont want the gallery anymore, uninstall that mod. Admin < Gallery Configuration < Settings. Towards the bottom, there is something that says "If you wish to uninstall click uninstall now" So click "uninstall now".


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 #12 on: September 05, 2008, 01:11:32 am »
Hiding tabs only for guests
(Would appreciate it if this were added to the first post)
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>

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 #13 on: September 05, 2008, 01:18:56 am »
Celebrus - took care of it for you

Offline thejudge

  • SMF For Free Member
  • *
  • Posts: 41
    • View Profile
    • http://countrysideforum.smfforfree2.com/index.php

  • Total Badges: 18
    Badges: (View All)
    Level 4 Webmaster Sixth year Anniversary Windows User Topic Starter
Re: [Code] Hide Tabs
« Reply #14 on: September 14, 2008, 12:22:00 pm »
Now how do we and our members see the tabs that we have hidden be cause I would like to put a thing up were we only see the tabs when we click on a button or something.Thanks

 

Related Topics

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