PDA

View Full Version : Can we have custom permissions to view member profiles?


Hilary
11-08-2007, 04:25 PM
Here's what I'd like to achieve:

Free, public forum: all the world can view your profile. It displays the basics - your name, your website... but not your instant messenger IDs.

Paid, private forum: other members of this same usergroup can see the hidden parts of your profile.

In other words: make elements of a profile available for everyone to fill in, but only visible to members of a certain usergroup. You can see why it'd be useful: create more of a sense of community for your paying members, but don't ask them to disclose private contact details in public.

Is there already an add-on for this? I searched but couldn't find anything. If not, does anyone want to create one?

WhaLberg
11-09-2007, 12:57 PM
<if condition="!is_member_of($vbulletin->userinfo, x, y, z)"></if> will give you what you need.

Hilary
11-09-2007, 01:27 PM
Ah... thank you. There's some learning curve for me here.

x, y, z - identifying usergroups, I take it.

The ! - does that mean isn't a member of these groups? Would you omit the ! to get 'if they are a member of these groups'?

Then does x,y,z mean 'any of these groups x, y or z' or 'all of these groups x, y and z' to satisfy the condition?

And what do you actually insert to identify a usergroup - where do you find this?

I guess you then put this in the template for displaying user profiles, wrapped round the relevant section?

Erm, sorry about all the questions. It's quite a steep curve... If there's documentation for this somewhere, you could just give me a link and tell me to go work it out myself... :o

WhaLberg
11-09-2007, 01:58 PM
When you remove '!', it will show to x, y, z. Sorry for putting it there. :)

This will check if the user is a member of 'any' of these groups.

These code must wrapp around the codes that you don't want to show.

Usergroupids can be found in AdminCP -> Usergroups -> Usergroup Manager

It'll be like that: Edit Usergroup (id: x)

Hilary
11-09-2007, 02:49 PM
<i>Thank you!</i>

Opserty
11-09-2007, 03:25 PM
<if condition="is_member_of($vbulletin->userinfo, $userinfo['usergroupid'])">
Usergroups Match
</if>

If you want to compare the usergroup of the Viewer with the usergroup of the member profile.