vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Hide BB Code Content From Unregistered Users (https://vborg.vbsupport.ru/showthread.php?t=265063)

ALBCODERS 06-11-2011 10:00 PM

Hide BB Code Content From Unregistered Users
 
1 Attachment(s)
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 Code:

<div class="bbcode_description">{vb:rawphrase code}:</div>
add this below:
HTML Code:

<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 Code:

</vb:if>
Open the bbcode_html template and find:
HTML Code:

<div class="bbcode_description">{vb:rawphrase html_code}:</div>
add this below:
HTML Code:

<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 Code:

</vb:if>
Now Open the bbcode_php template and find:
HTML Code:

<div class="bbcode_description">{vb:rawphrase php_code}:</div>
add this below:
HTML Code:

<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 Code:

</vb:if>
LIVE DEMO

AttalaEA 06-12-2011 09:29 AM

Thanks for this nice addon. I was looking for that. :)

ellovo 06-13-2011 10:56 PM

Thanks Bro great job.....

hiker 06-16-2011 04:34 AM

How do you decide which content to hide? Which bbcode do you use?

nacaruncr 07-09-2011 10:08 PM

I used a hack for 3.8 or 3.5 (I don't remember XD) but this, is the same :D awesome men :D thanks :D

installed + MOTM + 5 stars :D

as7apcool 07-12-2011 05:28 PM

Thanks a lot for This

ngocol 07-30-2011 09:34 PM

can I change the word ? "Please Login or <a href="register.php">Register</a> to see codes" i try but it didnot change any suggestion ?

nacaruncr 07-30-2011 11:15 PM

I've a little problem... sometimes when I put my codes in the bbc tags , or even the registers users it appear the message "Please Login or Register to see the code"

How I can fix it?

ALBCODERS 08-10-2011 12:17 PM

Sorry but I can't check the codes now because I'm not in my Home these days, and this needs some php functions you can use this other one coded by nhawk

nacaruncr 08-10-2011 08:26 PM

ok :)...... I'm using other style, I'm going to try if continue this problem or not ;)

thanks anyway :D


All times are GMT. The time now is 03: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.01044 seconds
  • Memory Usage 1,738KB
  • 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
  • (9)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete