SMF For Free Support Forum
Signup For Free Forum
January 09, 2009, 05:03:20 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: 1 [2]
  Print  
Author Topic: [request] Hidden class  (Read 983 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
*****
Offline Offline

Posts: 694


Do not PM me for Code Support or Request


View Profile
« Reply #15 on: October 29, 2007, 09:02:04 pm »

Correct.  That could be it, but I dought it because he used my codes before.
Logged



SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/cen
trevix
SMF For Free Sr. Member
*
Offline Offline

Posts: 303



View Profile WWW
« Reply #16 on: October 29, 2007, 10:33:16 pm »

ok well now i know its the code, i made a new test site and just added the code to the header and footer.  And again its not working, im using ff.  So maybe it dont work with ff?

This is the post im working off of...
Ah, I see...
Code:
<script>
var username = $('td.titlebg2 span b').not($("td.titlebg2 span b").contains("News")).html();
//Created by Agent Moose (smcodes.smfforfree3.com)
if(username){
document.write("<style> .guest {display:none;}</style>")
}else{
document.write("<style> .member {display:none;}</style>")
};
</script>
Place that in your footers.
Just place class='member' to only show to members, and place class='guest' to show only to guests.

did miss something in the code to change, and yes im using your jquery.

this is my header and footer
Code:
Header
<script src="http://trevixtests.smfforfree3.com/jquery.js"></script>


Footer
<a class="member" href="cow.com">cow</a>
<a class="guest" href="cow.com">cow</a>
<a class='member' href='cow.com'>cow</a>
<a class='guest' href='cow.com'>cow</a>

<script>
var username = $('td.titlebg2 span b').not($("td.titlebg2 span b").contains("News")).html();
//Created by Agent Moose (smcodes.smfforfree3.com)
if(username){
document.write("<style> .guest {display:none;}</style>")
}else{
document.write("<style> .member {display:none;}</style>")
};
</script>

Maybe im just stupid...
Logged


Ad Machine - Free advertising and tips on how to promote your board.
Omikron 9861
SMF For Free Full Member
*
Offline Offline

Posts: 230


High School Science.........


View Profile
« Reply #17 on: October 30, 2007, 07:46:23 am »

I saw the code and yes, the header code is needed.
Logged


You have no idea what you are missing out on. The best place to discuss Eragon, Eldest and Book 3
 is just a single click away. So click!

Want a spoiler tag on your forum? Click here!
Agent Moose
Moderator
*****
Offline Offline

Posts: 694


Do not PM me for Code Support or Request


View Profile
« Reply #18 on: October 30, 2007, 02:20:53 pm »

Duh!  I see what is wrong.  The code is using the old contain function.  Try this:
Code:
<script>
var username = $('td.titlebg2 span b').not($("td.titlebg2 span b:contains(News)")).html();
//Created by Agent Moose (smcodes.smfforfree3.com)
if(username){
document.write("<style> .guest {display:none;}</style>")
}else{
document.write("<style> .member {display:none;}</style>")
};
</script>
Logged



SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/cen
trevix
SMF For Free Sr. Member
*
Offline Offline

Posts: 303



View Profile WWW
« Reply #19 on: October 30, 2007, 05:17:12 pm »

now it works thx moose
Logged


Ad Machine - Free advertising and tips on how to promote your board.
kyledibiase
SMF For Free Member
*
Offline Offline

Posts: 77



View Profile
« Reply #20 on: November 01, 2007, 08:27:54 am »

moose always does good= he never lets us down because he rules!!!!!!!!
Logged

WANTED
SMF For Free - Like Him
LaundryLady
Crasy
And All the others Who helped Make My Time here A Pleasure

FOR

Helping Me through My time here

$2,500,000
REWARD


Pages: 1 [2]
  Print  
 
Jump to:  

cheap low cost web hosting reviews

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.392 seconds with 18 queries.