vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Hidden [code] tags for guests (https://vborg.vbsupport.ru/showthread.php?t=140670)

Synda 02-28-2007 02:00 AM

Hidden [code] tags for guests
 
Hey guys how do i make it to where guests can not see what is in [code] tags? Because I still want to keep the forums open to every one but I want them to register to see what is in this tag...

ShatterStudios 02-28-2007 12:26 PM

Quote:

Originally Posted by Synda (Post 1192333)
Hey guys how do i make it to where guests can not see what is in [code] tags? Because I still want to keep the forums open to every one but I want them to register to see what is in this tag...

I'm also wondering how this needs to be done for my forum, anyone at all?

Pete C 03-05-2007 08:50 PM

Yeh - me too guys. The code that hides actual code from guests has been used on this very site for as long as I can remember. Could someone please tell me if it's a hack or something we can enable on the default vB?

I tried searching, and it bought me to this thread - so please, where is it, or what should I be searching for? Thanks in advance :)

Gray Matter 03-05-2007 08:57 PM

You could always use a template conditional.

In template "bbcode_code,"

Find:

Code:

<pre class="alt2" style="margin:0px; padding:$stylevar[cellpadding]px; border:1px inset; width:$stylevar[codeblockwidth]; height:{$blockheight}px; overflow:auto"><div dir="ltr" style="text-align:left;">$code</div></pre>
and replace it with:

Code:

<pre class="alt2" style="margin:0px; padding:$stylevar[cellpadding]px; border:1px inset; width:$stylevar[codeblockwidth]; height:{$blockheight}px; overflow:auto"><div dir="ltr" style="text-align:left;"><if condition="$show['member']">$code<else />Please register to view code.</if></div></pre>
Change the red to the text that is displayed to guests instead of the code.

Pete C 03-05-2007 09:07 PM

Thank you. I've just discovered calorie's hack: Hide Various BB Code Content From Users which appears to be plug-in that can be used for specific user groups. Not sure which is best for what I have in mind, but the conditional is an excellent and simple answer which never occured to me. I'll try it both ways and see which suits us best. :up:


All times are GMT. The time now is 08:16 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.00996 seconds
  • Memory Usage 1,720KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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