vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Prevent usergroup(s) from viewing [PHP] or [CODE] (https://vborg.vbsupport.ru/showthread.php?t=169542)

Oreamnos 02-03-2008 04:45 PM

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

Boofo 02-03-2008 04:47 PM

You could do it with a couple of template edits.

Oreamnos 02-03-2008 05:21 PM

Quote:

Originally Posted by Boofo (Post 1435473)
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?

Boofo 02-03-2008 05:47 PM

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.

Opserty 02-03-2008 06:11 PM

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>


Oreamnos 02-03-2008 06:20 PM

ok, thanks! i found the code i needed in the templates.

Adrian Schneider 02-03-2008 06:22 PM

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.

Oreamnos 02-03-2008 06:43 PM

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

eric

Boofo 02-03-2008 06:58 PM

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 (Post 1435541)
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?

Oreamnos 02-03-2008 07:02 PM

Quote:

Originally Posted by Boofo (Post 1435569)
How do you get by that then?

good question!


All times are GMT. The time now is 01:08 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.02116 seconds
  • Memory Usage 1,729KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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