PDA

View Full Version : Hide c-box from guests


pigpog
11-30-2008, 01:49 PM
Hi everyone. :)

We're using a c-box for our chatbox which we've been using for a while and I've transplanted it over into my footer template, which is great. However, is there a code that I can use to hide it from the guest group? This is what I use to hide it from guests on my previous forum....


<span id="hidden_content" style="display: none;">
c-box code goes in here
</span>
<script type="text/javascript">
<!--
if(pb_username != 'Guest')
document.getElementById('hidden_content').style.di splay = '';
//-->
</script>


I was hoping it's a simple modification of the bottom part to replace "if(pb_username != 'Guest')" with a variable for the guest group on vbulletin. If there's another code I can use altogether, then I'll take that! :D

So if anyone can help, it's much appreciated!

Thanks! :)

Lynne
11-30-2008, 03:13 PM
<if condition="$show['member']">
stuff to only show logged in members
</if>

pigpog
11-30-2008, 03:45 PM
Thank you Lynne, you are a complete star as usual. :up:

jalmz
12-13-2008, 10:06 PM
what about outside in the forum directory?

pigpog
02-18-2009, 10:20 AM
Hi everyone! :)

I'm now looking to do the opposite, and hide a c-box from everyone except admin and mods.


<if condition="$show['administrator,moderator']">
</if>


Is the above code correct?

Thanks! :)

Dismounted
02-18-2009, 10:29 AM
<if condition="is_member_of($bbuserinfo, 5, 6)">HTML HERE</if>
Check those usergroup IDs.

pigpog
02-18-2009, 10:35 AM
Thank you Dismounted, you're a star. :D