The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
Hello how do I make it where you HAVE to be registered in order to view the html, php, quote & code boxes like it is here on vb.org? Is there a setting i can set or a mod out there already?
|
|
#2
|
||||
|
||||
|
One way would be to use a vb conditional in the respective templates. For example in the template "bbcode_code" replace:
HTML Code:
{vb:raw code}
HTML Code:
<vb:if condition="$show['guest']">You must be registered and logged in to view code contents.<vb:else />{vb:raw code}</vb:if> HTML Code:
<vb:if condition="$show['member']">Pre-existing template HTML in here</vb:if> |
| Благодарность от: | ||
| HM666 | ||
|
#3
|
||||
|
||||
|
Yeah gotcha will give that a try later on after some sleep
![]() --------------- Added [DATE]1421380866[/DATE] at [TIME]1421380866[/TIME] --------------- Hmmmmmm did not work. It shows this message to everyone not just guests. And there was one that it did not work on at all. One thread/post it worked too well and will not show it to anyone and another thread/post ir did not do anything at all. Here's my code for the bbcode_code template please see if I missed something. Code:
<div class="code_box_wrapper MHB_wrappers">
<div class="code_box_description">{vb:rawphrase code}:</div>
<div class="code_box"><pre id="code_select" class="code_box_text" ondblclick="selectText(this.id)" title="Double-Click To Select All Text."><vb:if condition="$show['guest']">You must be <a href="signup.php">registered</a> and logged in to view code contents.<vb:else />{vb:raw code}</vb:if></pre></div>
</div>
<script type="text/javascript">
var newid = GetNewId("code_select");
var el = document.getElementById(newid).parentNode;
el.style.maxHeight = code_height + 'px';
maxMinButton(newid,code_height,0);
</script>
|
| Благодарность от: | ||
| MarkFL | ||
|
#4
|
||||
|
||||
|
Revisiting this, I have noticed that on the CMS I have a problem. The code shows fine elsewhere but on the CMS the "CODE:" part is missing.
The code for my code box is... Code:
<div class="code_box_wrapper MHB_wrappers">
<div class="code_box_description">{vb:rawphrase code}:</div>
<div class="code_box"><pre id="code_select" class="code_box_text" ondblclick="selectText(this.id)" title="Double-Click To Select All Text."><vb:if condition="$show['guest']">You must be <a href="signup.php">registered</a> and logged in to view code contents.<vb:else />{vb:raw code}</vb:if></pre></div>
</div>
<script type="text/javascript">
var newid = GetNewId("code_select");
var el = document.getElementById(newid).parentNode;
el.style.maxHeight = code_height + 'px';
maxMinButton(newid,code_height,0);
</script>
|
|
#5
|
||||
|
||||
|
I would guess the CSS might have to be adjusted for the CMS.
|
|
#6
|
||||
|
||||
|
Yeah I tried a few adjustments. Its kinda weird and only happens in a few areas of the CMS I noticed upon more inspection. *SIGH*
|
|
#8
|
||||
|
||||
|
I would but now it seems to not be doing it. Maybe one of the things I did worked.....eventually LOL.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|