vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Hide c-box from guests (https://vborg.vbsupport.ru/showthread.php?t=197666)

pigpog 11-30-2008 01:49 PM

Hide c-box from guests
 
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....

Code:

<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.display = '';
//-->
</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

HTML Code:

<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.

Code:

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

Is the above code correct?

Thanks! :)

Dismounted 02-18-2009 10:29 AM

Code:

<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


All times are GMT. The time now is 08:22 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01051 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete