SMF For Free Support Forum

SMF For Free Support => SMF For Free Codes and Support => Topic started by: guest1608 on November 07, 2007, 10:40:16 pm

Title: [Code] Hide Tabs
Post by: guest1608 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>
Title: Re: [Code] Hide Tabs
Post by: legend 1234 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
Title: Re: [Code] Hide Tabs
Post by: Celebrus 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.
Title: Re: [Code] Hide Tabs
Post by: legend 1234 on March 27, 2008, 03:01:26 am
oo yeap it worked

thank you very much mate

legend 1234
Title: Re: [Code] Hide Tabs
Post by: Sparkwattclock 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?
Title: Re: [Code] Hide Tabs
Post by: simply sibyl 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)
Title: Re: [Code] Hide Tabs
Post by: Sparkwattclock 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.
Title: Re: [Code] Hide Tabs
Post by: simply sibyl 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)
Title: Re: [Code] Hide Tabs
Post by: Sparkwattclock 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.
Title: Re: [Code] Hide Tabs
Post by: loogiesquared 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.
Title: Re: [Code] Hide Tabs
Post by: LaundryLady 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.

Title: Re: [Code] Hide Tabs
Post by: Shimmy Shabby 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".
Title: Re: [Code] Hide Tabs
Post by: Celebrus 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>
Title: Re: [Code] Hide Tabs
Post by: simply sibyl on September 05, 2008, 01:18:56 am
Celebrus - took care of it for you
Title: Re: [Code] Hide Tabs
Post by: thejudge 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
Title: Re: [Code] Hide Tabs
Post by: thejudge on September 14, 2008, 02:15:03 pm
I got it fixed to the way i want it thanks
Title: Re: [Code] Hide Tabs
Post by: Celebrus on September 15, 2008, 02:06:50 am
Code: [Select]
function show_me_the_tabz(tabb)
{
$("table tbody tr td.maintab_back:contains("+tabb+")").style.display="block";
}

Does that work? Call the function
show_me_the_tabz('Tab Name');
onclick or something.

Code: [Select]
<a href="javascript:void(0)" onclick="show_me_the_tabz('Tab name')">Show ____ tab</a>
Title: Re: [Code] Hide Tabs
Post by: Jack Sparrow on September 27, 2008, 04:19:47 pm
can you explain where i put it in the admin panel?
Title: Re: [Code] Hide Tabs
Post by: simply sibyl on September 27, 2008, 06:49:10 pm
can you explain where i put it in the admin panel?

Admin > Manage Styles > Edit Header/Footer
Be sure to follow what he said in the directions and put the code(s) in the correct place (header & footer)
Title: Re: [Code] Hide Tabs
Post by: ishybadboy on October 31, 2008, 07:35:41 pm
Great job.
I'm going to use this.

Edit: Can anyone help me find how to ADD more tabs?
I've lost the post :/
Title: Re: [Code] Hide Tabs
Post by: simply sibyl on October 31, 2008, 07:47:31 pm
Great job.
I'm going to use this.

Edit: Can anyone help me find how to ADD more tabs?
I've lost the post :/

Admin > Manage Styles > Custom Tabs
Title: Re: [Code] Hide Tabs
Post by: ishybadboy on October 31, 2008, 08:02:08 pm
Thanks Sibyl.
I was ALL OVER Manage Styles.
How did I forget where they were..
Better yet, How stupid am I to have not seen them.

Thanks, Again.
~Ricky.
Title: Re: [Code] Hide Tabs
Post by: simply sibyl on October 31, 2008, 08:03:46 pm
Thanks Sibyl.
I was ALL OVER Manage Styles.
How did I forget where they were..
Better yet, How stupid am I to have not seen them.

Thanks, Again.
~Ricky.

do you really want me to answer that?

(just kidding)    :2funny:
Title: Re: [Code] Hide Tabs
Post by: ishybadboy on October 31, 2008, 08:07:34 pm
Rofl, Wow.
That was pleasant.  :knuppel2:

Ok, Anyways.
I'm going to like.
Stop spamming now. :]
Have a good weekend guys and..
I'm going to use this code. Like I said earlier.
Before Sibyl called me dumb.
 :laugh:

Edit:
Cough cough.
 :idiot2:

No, I mean..
 :angel: ::)
Title: Re: [Code] Hide Tabs
Post by: simply sibyl on October 31, 2008, 08:08:50 pm
hahahahahaha
Title: Re: [Code] Hide Tabs
Post by: nondier on November 11, 2008, 06:23:19 pm
Forum Url: http://synysterscape.tk/
it's still there :(
Title: Re: [Code] Hide Tabs
Post by: - Lawrence - on December 10, 2008, 01:36:25 pm
Wow, this is a really useful code, thanks.
Title: Re: [Code] Hide Tabs
Post by: Celebrus on December 13, 2008, 02:40:29 am
Forum Url: http://synysterscape.tk/
it's still there :(

Sorry I didn't respond earlier, I must have missed that.
Direct link to your forum? (not the .tk one) Maybe post the code you used here? What browser do you use?
Title: Re: [Code] Hide Tabs
Post by: - Lawrence - on December 31, 2008, 06:35:30 pm
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.
Title: Re: [Code] Hide Tabs
Post by: Celebrus on December 31, 2008, 11:21:41 pm
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?
Title: Re: [Code] Hide Tabs
Post by: - Lawrence - 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 (http://www.Antifakers.com)
Title: Re: [Code] Hide Tabs
Post by: Celebrus on January 01, 2009, 11:19:12 am
It works for me. What browser are you using? Have you disabled javascript?
Title: Re: [Code] Hide Tabs
Post by: - Lawrence - 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.
Title: Re: [Code] Hide Tabs
Post by: Weegee on January 01, 2009, 07:18:24 pm
The Code Doesn't Always Work...
Why Is That?
Title: Re: [Code] Hide Tabs
Post by: simply sibyl 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
Title: Re: [Code] Hide Tabs
Post by: Celebrus 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.
Title: Re: [Code] Hide Tabs
Post by: - Lawrence - on January 02, 2009, 01:14:23 pm
I am using Firefox, and it doesn't work.
Title: Re: [Code] Hide Tabs
Post by: WBA Dude 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?
Title: Re: [Code] Hide Tabs
Post by: simply sibyl on January 03, 2009, 10:00:18 am
Add more of these lines:

$("table tbody tr td.maintab_back:contains(Help)").hide();
Title: Re: [Code] Hide Tabs
Post by: WBA Dude on January 03, 2009, 10:01:45 am
Add more of these lines:

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

Thanks
Title: Re: [Code] Hide Tabs
Post by: Weegee 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?
Title: Re: [Code] Hide Tabs
Post by: Celebrus 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.
Title: Re: [Code] Hide Tabs
Post by: Weegee on January 06, 2009, 10:36:47 am
http://weegeesboards.freesmfhosting.com/index.php (http://weegeesboards.freesmfhosting.com/index.php)
I wait for the page to load, but they still remain visible.
Title: Re: [Code] Hide Tabs
Post by: - Lawrence - on January 07, 2009, 11:21:41 am
When I visit your site some of the tabs hide. ;)
Title: Re: [Code] Hide Tabs
Post by: Weegee 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.
Title: Re: [Code] Hide Tabs
Post by: - Lawrence - on January 07, 2009, 01:02:07 pm
Did you go into one of the forums though?  That's where my problem seems to be occurring.
I see what you mean, I can see them in board view. ??? I don't know why that is. ;)
Title: Re: [Code] Hide Tabs
Post by: xboi209 on January 11, 2009, 01:28:30 am
The problem is, the hide tab code only works with some parts of your site.
Title: Re: [Code] Hide Tabs
Post by: Weegee on January 12, 2009, 01:24:05 pm
Is there any way it can be modified so that it can work on all parts of my site?
Title: Re: [Code] Hide Tabs
Post by: xboi209 on January 12, 2009, 08:57:58 pm
Not sure some code expert needs to modify it
Title: Re: [Code] Hide Tabs
Post by: Celebrus on January 12, 2009, 09:48:22 pm
Just try adding this somewhere inside the code tags.

Code: [Select]
$("table tbody tr td.maintab_active_back:contains(Help)").hide();
Title: Re: [Code] Hide Tabs
Post by: Weegee on January 13, 2009, 12:33:29 pm
Sorry, but that doesn't seem to be helping...
Title: Re: [Code] Hide Tabs
Post by: Celebrus on January 13, 2009, 10:24:28 pm
Could you give me a link to a page on your forum where it doesn't work?
Title: Re: [Code] Hide Tabs
Post by: Johnnypker on January 15, 2009, 12:27:59 pm
How Do I Hide The Staff List It Dosent Work I Tryed
Title: Re: [Code] Hide Tabs
Post by: simply sibyl on January 15, 2009, 12:30:42 pm
How Do I Hide The Staff List It Dosent Work I Tryed

When asking for help with a code we need:

1.  Your forum url
2.  The code you put in
Title: Re: [Code] Hide Tabs
Post by: Weegee on January 15, 2009, 04:48:04 pm
It doesn't work on any of the forums.  Click this (http://www.weegeesboards.freesmfhosting.com/index.php/board,2.0.html) to see an example.  This (http://weegeesboards.freesmfhosting.com/) is where it does work...
Title: Re: [Code] Hide Tabs
Post by: Celebrus on January 17, 2009, 06:32:49 am
It doesn't work on any of the forums.  Click this (http://www.weegeesboards.freesmfhosting.com/index.php/board,2.0.html) to see an example.  This (http://weegeesboards.freesmfhosting.com/) is where it does work...

I don't see the code in the headers or footers. Are you sure you have added it?
Title: Re: [Code] Hide Tabs
Post by: Mad Gamer2 on May 29, 2009, 08:25:37 pm
How can i add another code in the footer and i hve a code there?

guys if u ask a question and i dont answer that means i am still not home.
Title: Re: [Code] Hide Tabs
Post by: simply sibyl on May 29, 2009, 08:47:55 pm
Just space down a few spaces and past the code under the current one. 
Title: Re: [Code] Hide Tabs
Post by: kaizie_ru09 on April 25, 2010, 03:30:40 pm
If I hide all the tabs, it also hides the 'admin' tab.. errr
Title: Re: [Code] Hide Tabs
Post by: Seldom Fail on April 25, 2010, 03:54:15 pm
You can hide all but the admin tab. Just use the hide tabs code and hide everything but the admin one.