View Full Version : Hidden [code] tags for guests
Synda
02-28-2007, 02:00 AM
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
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:
<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:
<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:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.