• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Hide BB Code Content FromUnregistered Users

Admin

Well-Known Member
Staff member
Administrator
I couldn't find any addon for vb 4 to hide the bbcode content from unregistered users and showing a register message instead as here on vbulletin.org,so i have just fixed manualy on my forum.
add a new phrase first from Admincp » Languages & Phrases » Phrase Manager » Add New Phrase

  • Phrase Type : GLOBAL
  • Product : vBulletin
  • Varname : hide_code
  • Text : Please Login or <a href="register.php">Register</a> to see codes

Go to your Admincp » Styles & Templates » Style Manager » Your Style » BB Code Layout Templates


Open the bbcode_code template and find:
HTML:
<div class="bbcode_description">{vb:rawphrase code}:</div>
add this below:
HTML:
<vb:if condition="$show['guest']"><pre class="bbcode_code">{vb:rawphrase hide_code}</pre><vb:else />
In the same template add above the last </div> :
HTML:
</vb:if>


Open the bbcode_html template and find:
HTML:
<div class="bbcode_description">{vb:rawphrase html_code}:</div>
add this below:
HTML:
<vb:if condition="$show['guest']"><pre class="bbcode_code">{vb:rawphrase hide_code}</pre><vb:else />
In the same template add above the last </div> :
HTML:
</vb:if>


Now Open the bbcode_php template and find:
HTML:
<div class="bbcode_description">{vb:rawphrase php_code}:</div>
add this below:
HTML:
<vb:if condition="$show['guest']"><pre class="bbcode_code">{vb:rawphrase hide_code}</pre><vb:else />
In the same template add above the last </div> :
HTML:
</vb:if>


LIVE DEMO
 

New posts New threads New resources

Back
Top