PDA

View Full Version : what is the code for limiting access to certain usergroup?


salata
12-01-2006, 12:51 AM
what is the code to make only certain usergroups view things

TCG503
12-01-2006, 03:35 AM
That would be under either the forum permissions if you wanted to modify forum access, or for most other things it would be under the edit usergroup page (ie vBplaza, vbux, etc. I few things like the shoutbox permissions are changed under the main settings page.

salata
12-01-2006, 12:27 PM
That would be under either the forum permissions if you wanted to modify forum access, or for most other things it would be under the edit usergroup page (ie vBplaza, vbux, etc. I few things like the shoutbox permissions are changed under the main settings page.

thanks, i knew that in the acp some things have a permission setting. but what about those that you have to add a code into the template for it to work.

tnguy3n
12-01-2006, 01:41 PM
a simple conditional would do.
<if condition="is_member_of($bbuserinfo, USERGROUPID)">Some Codes Go HERE</if>

projectego
12-01-2006, 02:05 PM
another would be:

<if condition="$show['guest']">
content for guests goes here...
<else />
content for everyone else goes here...
</if>

yoyoyoyo
12-01-2006, 02:12 PM
what would the conditional be to limit access to certain code only being displayed in certain forums. Let's say I don't want a certain gif image to be displayed in postbit in one particular forum? how would I do that?

tnguy3n
12-01-2006, 02:58 PM
I don't think that can be done by conditionals in template. You would have to write some plugin or modifying the file.

Kirk Y
12-01-2006, 10:06 PM
<if condition="$foruminfo[forumid] == XX">
<center><img src="images/lobby_head.gif" alt="Lobby" /></center>
</if>
<if condition="$foruminfo[forumid] == XX">
<center><img src="images/news_head.gif" alt="News" /></center>
</if>

In your forumdisplay template.

yoyoyoyo
12-02-2006, 01:06 AM
thanks much acidburn0520. Lets say I wanted to put this in postbit to disallow the IP address tracking for a certain forum - would it look like this?

<if condition="$foruminfo[forumid]==49">
&nbsp;
<else />
<if condition="$post[iplogged]">$post[iplogged]&nbsp;&nbsp;<else />$post[iplogged]</if>
</if>

Kirk Y
12-02-2006, 01:50 AM
No, I don't think that's possible without some extra hacking. Wouldn't that be somewhat pointless, seeing as someone could get the IP Address from a post by a specific user in another forum?

yoyoyoyo
12-02-2006, 02:02 AM
thanks, but that doesn;t seem to change anything. isn;t the $post[iplogged] either way in the above example, the only difference being the missing &nbsp;'s? how about:

<if condition="$foruminfo[forumid] != '49'">
<if condition="$post[iplogged]">$post[iplogged]&nbsp;&nbsp;<else />&nbsp;</if>
</if>

that doesn't work either. darn it.

No, I don't think that's possible without some extra hacking. Wouldn't that be somewhat pointless, seeing as someone could get the IP Address from a post by a specific user in another forum?
The purpose of this mod is to hopefully disallow IP tracking of anonymous posters in the anonymous forum I set up

Paul M
12-02-2006, 02:38 AM
Template changes would not really stop that anyway - as you could just type the url in to the address bar to view the ip address information for a post.

yoyoyoyo
12-02-2006, 03:13 AM
Template changes would not really stop that anyway - as you could just type the url in to the address bar to view the ip address information for a post.
good point... thanks much. It seems like it should be an easy thing to do, but I guess it isn't. oh well - thanks for the input.