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
  #12  
Old 08-12-2011, 10:59 AM
bumbo bumbo is offline
 
Join Date: Jun 2011
Location: Bosnia
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All I did as you wrote. However, when I wanted to edit bbcode_php, I got the following message:

"1||1313150055||80.65.85.121||s=&do=add&dostyleid= 41&title=bbcode_php&group=bbcode&searchstring=&exp andset=41|| http://xxx.com/admincp/template.php?...e||Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0Access Denied, you have been logged."

What is the problem Can you help me? Thank you!
Reply With Quote
  #13  
Old 08-30-2011, 07:29 AM
hhumas's Avatar
hhumas hhumas is offline
 
Join Date: Aug 2010
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have done everything .. now tell me how to tell which content to hide ....
Reply With Quote
  #14  
Old 09-03-2011, 06:10 AM
setishock setishock is offline
 
Join Date: Feb 2008
Location: Houma, La.
Posts: 1,177
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

At your live demo I can see the code for the embedded clocks just fine. Even nabbed one.
Reply With Quote
  #15  
Old 09-03-2011, 06:53 AM
kfyonur kfyonur is offline
 
Join Date: Apr 2008
Posts: 177
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i can see too.
Reply With Quote
  #16  
Old 09-05-2011, 08:25 AM
westbam666's Avatar
westbam666 westbam666 is offline
 
Join Date: Jul 2011
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bumbo View Post
All I did as you wrote. However, when I wanted to edit bbcode_php, I got the following message:

"1||1313150055||80.65.85.121||s=&do=add&dostyleid= 41&title=bbcode_php&group=bbcode&searchstring=&exp andset=41|| http://xxx.com/admincp/template.php?...e||Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0Access Denied, you have been logged."...
Beside you on forum is installed probably vBFirewall.
Necessary must uncouple him, install the product then once again to include.
Reply With Quote
  #17  
Old 10-09-2011, 01:53 PM
maxie maxie is offline
 
Join Date: Mar 2008
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ngocol View Post
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 ?
work for me just clear you cokies and try again
Reply With Quote
  #18  
Old 10-09-2011, 10:02 PM
nacaruncr nacaruncr is offline
 
Join Date: Nov 2010
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nacaruncr View Post
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?
Are there news about this???
Reply With Quote
  #19  
Old 11-18-2011, 05:06 AM
uninvited13th uninvited13th is offline
 
Join Date: Aug 2009
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

as far as I know it is because bbcode template is cached
Reply With Quote
  #20  
Old 11-18-2011, 11:17 PM
ioscoder ioscoder is offline
 
Join Date: Nov 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not Success. It hides with all groups!
Reply With Quote
  #21  
Old 02-15-2012, 12:22 PM
Berdus2012 Berdus2012 is offline
 
Join Date: Dec 2011
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not working, show for admin and all groups ! -.- not for Guest's
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 11:47 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.13201 seconds
  • Memory Usage 2,340KB
  • Queries Executed 28 (?)
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
  • (3)bbcode_quote
  • (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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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