Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Hide Content
Topic Started: Dec 10 2008, 12:01 AM (404 Views)
Chris Giliphry
Member
 *  
Okay, I think I would post this topic here, since I couldn't see another place for it, so here I go.

I have searched for this for a long time and I cannot find the code I am looking for. I have seen it once before, but now I can't find it.

I'm looking for a code that will hide content to certain user groups. For example, perhaps I would like to hide a c-box from guests, so only members can use it, or there is a news box I want only guests to see, etc.

If anyone could find this code for me, please let me know.

(I know it has to be on here somewhere)
Offline Profile Quote Post Goto Top
 
Precious4ngeL
Member
 *  
try this, but it's for members only code....
i've been using that in my forum and it works perfectly.... it hides my announcements to the guests and instead of announcement u can use that for your cbox too....




Quote:
 
<div id="guest" style="display:none">
<div id='index'><div class="none" align="middle" style='width:100%!important;'>
<div class="maintitle">
<center><MARQUEE BEHAVIOR=ALTERNATE WIDTH=500><b><font color="white" size="5"> Members Only </font></b></MARQUEE><br></center>
</div>
<table border="0" cellspacing="1" cellpadding="4" style='width:100%!important;'>
<tr>

<td class="row4" align="left" width="80%" height="50" valign="middle">


put anything here.. for members only......


</td>

</tr>
<tr>
<th align="center" class="titlemedium" colspan="3"></th>
</tr>
</table>
</div>
</div>
</div>


<script type="text/javascript">
if(document.getElementById("navstrip").lastChild.href.match(/act=idx/i)) {
document.write("<style type='text/css'> #index { display: block; } </style>");
}
</script>
<script>
var ismember=0;
var memberonly = document.getElementById('memberonly');
if(document.getElementById('userlinks').innerHTML.match('Log Out')!=null){var ismember=1;}
if(ismember==1){memberonly.style.display='block';}
else{memberonly.innerHTML='';}
</script>
Edited by Precious4ngeL, Dec 10 2008, 01:14 AM.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · zIFBoards - Skinning & Code Support · Next Topic »
Add Reply