Simple Machine Codes
November 07, 2009, 03:26:40 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Affiliates Code Index Staff List Calendar Members Login Register  

Member/Guest Class


Pages: [1]   Go Down
  Print  
Author Topic: Member/Guest Class  (Read 422 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,663



View Profile WWW
« on: May 11, 2008, 08:00:47 am »

Footers:
Code:
<script>
if(document.getElementById("bodyarea").innerHTML.match(/Login /i)){
//Created by Agent Moose (smcodes.smfforfree3.com)
document.write("<style>.Member{display:none};</style>");
}else{
document.write("<style>.Guest{display:none};</style>");
};
</script>
Just like the Index Only Code, this makes a class for Members and Guests.

Just put the class of an element to Member to show only for Members, or put it for Guest to only show for guests.

Enjoy Smiley
Report Spam   Logged

Mr_smith
The Only One
100 Club Member

Offline Offline

Gender: Male
Posts: 153



View Profile WWW
« Reply #1 on: May 11, 2008, 01:35:07 pm »

Lol, I did not understand this code.. Huh?
Report Spam   Logged

Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,663



View Profile WWW
« Reply #2 on: May 11, 2008, 03:04:10 pm »

Say you put something in your headers like this:
Code:
<div class="Member">Text</div>
That would only show to the members, and not the guests.
Report Spam   Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2006, Simple Machines LLC
ServerBeach Coupon