Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-03-2008, 04:45 PM
Oreamnos's Avatar
Oreamnos Oreamnos is offline
 
Join Date: Dec 2004
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Prevent usergroup(s) from viewing [PHP] or [CODE]

I've searched vb.org as well as Google but can't seem to find a way to prevent usergroups from viewing text between [ c o d e ] or [ p h p ] BBcode tags.

Does anyone know if a mod exists for this?

Thanks,
Eric
Reply With Quote
  #2  
Old 02-03-2008, 04:47 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could do it with a couple of template edits.
Reply With Quote
  #3  
Old 02-03-2008, 05:21 PM
Oreamnos's Avatar
Oreamnos Oreamnos is offline
 
Join Date: Dec 2004
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo View Post
You could do it with a couple of template edits.
im not quite sure how that would be done in a template edit. aren't the [PHP and [CODE tags embedded in the post's message?
Reply With Quote
  #4  
Old 02-03-2008, 05:47 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can make the edits in the bbcode templates for which ones you want to block.

In the bbcode_php template, look for this code:

HTML Code:
   <!-- php buffer start -->$code<!-- php buffer end -->
and do a conditional for that line. You could have it insert a phrase of whatever you want for those that you don't want to see the php code.
Reply With Quote
  #5  
Old 02-03-2008, 06:11 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<if condition="is_member_of($bbuserinfo, X, Y, Z)">
   <!-- php buffer start -->$code<!-- php buffer end -->
<else />
    Your in usergroup x, y or z and so can't see the code
</if>
Reply With Quote
  #6  
Old 02-03-2008, 06:20 PM
Oreamnos's Avatar
Oreamnos Oreamnos is offline
 
Join Date: Dec 2004
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, thanks! i found the code i needed in the templates.
Reply With Quote
  #7  
Old 02-03-2008, 06:22 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Careful... posts are cached.

If an admin (or X,Y,Z) views the post first, it becomes cached. The next guest can walk by and see it.
Reply With Quote
  #8  
Old 02-03-2008, 06:43 PM
Oreamnos's Avatar
Oreamnos Oreamnos is offline
 
Join Date: Dec 2004
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the heads up. how long are posts cached for?

eric
Reply With Quote
  #9  
Old 02-03-2008, 06:58 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Whatever you have the setting set for that in the vBulletin settings.

--------------- Added [DATE]1202072385[/DATE] at [TIME]1202072385[/TIME] ---------------

Quote:
Originally Posted by SirAdrian View Post
Careful... posts are cached.

If an admin (or X,Y,Z) views the post first, it becomes cached. The next guest can walk by and see it.
How do you get by that then?
Reply With Quote
  #10  
Old 02-03-2008, 07:02 PM
Oreamnos's Avatar
Oreamnos Oreamnos is offline
 
Join Date: Dec 2004
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo View Post
How do you get by that then?
good question!
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 05:09 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06172 seconds
  • Memory Usage 2,253KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_html
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete