Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Hide BB Code Content From Unregistered Users Details »»
Hide BB Code Content From Unregistered Users
Version: 1.00, by ALBCODERS ALBCODERS is offline
Developer Last Online: Dec 2014 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.x.x Rating:
Released: 06-11-2011 Last Update: Never Installs: 23
Template Edits
Re-useable Code  
No support by the author.

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

Screenshots

File Type: jpg hide_codes.jpg (73.9 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-12-2011, 09:29 AM
AttalaEA AttalaEA is offline
 
Join Date: Apr 2011
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this nice addon. I was looking for that.
Reply With Quote
  #3  
Old 06-13-2011, 10:56 PM
ellovo ellovo is offline
 
Join Date: May 2010
Location: San Francisco California
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Bro great job.....
Reply With Quote
  #4  
Old 06-16-2011, 04:34 AM
hiker's Avatar
hiker hiker is offline
 
Join Date: Sep 2009
Posts: 221
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do you decide which content to hide? Which bbcode do you use?
Reply With Quote
  #5  
Old 07-09-2011, 10:08 PM
nacaruncr nacaruncr is offline
 
Join Date: Nov 2010
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

installed + MOTM + 5 stars
Reply With Quote
  #6  
Old 07-12-2011, 05:28 PM
as7apcool as7apcool is offline
 
Join Date: Feb 2009
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot for This
Reply With Quote
  #7  
Old 07-30-2011, 09:34 PM
ngocol ngocol is offline
 
Join Date: Jul 2011
Location: Indonesia
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?
Reply With Quote
  #8  
Old 07-30-2011, 11:15 PM
nacaruncr nacaruncr is offline
 
Join Date: Nov 2010
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #9  
Old 08-10-2011, 12:17 PM
ALBCODERS ALBCODERS is offline
 
Join Date: Apr 2009
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 08-10-2011, 08:26 PM
nacaruncr nacaruncr is offline
 
Join Date: Nov 2010
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

thanks anyway
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:03 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.05574 seconds
  • Memory Usage 2,312KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (9)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete