View Full Version : Prevent usergroup(s) from viewing [PHP] or [CODE]
Oreamnos
02-03-2008, 04:45 PM
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
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:
<!-- 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
<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 1202072385 at 1202072385 ---------------
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
How do you get by that then?
good question!
Adrian Schneider
02-03-2008, 08:08 PM
I posted a sloppy version of this request @ vbhackers but I'm not sure if it still works // people said it didn't work for them.
When I get some time I may release a fixed version here that's not so messy.
Paul M
02-03-2008, 08:41 PM
How do you get by that then?Don't use post caching.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.