PDA

View Full Version : Please - Need help with custom profile fields!


dcrdomains
02-24-2011, 03:24 AM
Here's my problem, I have three usergroups that all need to be able to view the custom fields when they are looking at each others public profile, but only two of them need to be able to see them on their about me page and be able to edit them.

I've tried everything I can think of but nothing comes out right. If I could somehow cut into the raw block data of the about me section it might work but I'm not sure where to find that.

Does anyone have any ideas?

Thanks!

--------------- Added 1298563051 at 1298563051 ---------------

No ideas anyone? I found the class for the about me section last night, I suppose I can modify the query itself but I was hoping for a more elegant solution....

Lynne
02-24-2011, 02:27 PM
I don't understand exactly what you want. You want two groups to be able to edit the field, but the other group cannot?

dcrdomains
02-24-2011, 03:46 PM
Hi Lynne,

I need everyone to see the fields when they look at another persons profile, but only two of the profiles to have the fields show up on their about me where they edit it. Basically we have two main users, normal and business. If someone views a persons profile they need to be able to see all the profile fields, including the business ones, but only a business user should have these fields show up on their about me when they go to edit.

So far my only solution that seems to be working is to modify the query in class_profileblock.php but I hate to do that. =(

--------------- Added 1298584274 at 1298584274 ---------------

Ok, so I modified the class and it works - now I need to access the usergroupid of the profile being viewed.

I was able to do this using $this->profile->userinfo['usergroupid']; as long as I was inside the class, but now I need to access it from a template. Does anyone know how to do that?

Thanks!

--------------- Added 1298584720 at 1298584720 ---------------

Nevermind, I figured it out - it was <vb:if condition="in_array($userinfo['usergroupid'],array(17,18))">
stuff</vb:if> instead of $bbuserinfo

--------------- Added 1298589158 at 1298589158 ---------------

Any thoughts on how I can make it a plugin instead of actually modifying the base class? Can I override the base class through a plugin?