PDA

View Full Version : User Profiles


phalanxents
02-26-2016, 05:48 PM
I really need this for a few of my sites. Very little vb knowledge, although I did see there's an archived 2.2 mod that would have done something SIMILAR.

I want one profile layout for 1 usergroup,
another profile layout for another usergroup
another for another

so on and so on.

Would any <if> statements do this? Really need this to work

Dr.CustUmz
02-26-2016, 06:14 PM
one way to do it would be to edit the memberinfo template and use

<if condition="$userinfo[usergroupid] == ##">

example admin and registered user templates

<if condition="$userinfo[usergroupid] == 6">
ADMIN
</if>

<if condition="$userinfo[usergroupid] == 2">
MEMBER
</if>


just place all of the memberinfo template into each if condition and change accordingly

i would recommend keeping the <head> stuff and doing this in the body part of MEMBERINFO

blind-eddie
02-26-2016, 07:24 PM
I never thought about doing this this way, opens many ideas for me, thanks Mark!
I have hid profile fields this way but not on member page.

Dr.CustUmz
02-26-2016, 07:36 PM
thanks Mark!

whos mark lol

phalanxents
02-26-2016, 07:49 PM
one way to do it would be to edit the memberinfo template and use

<if condition="$userinfo[usergroupid] == ##">

example admin and registered user templates

<if condition="$userinfo[usergroupid] == 6">
ADMIN
</if>

<if condition="$userinfo[usergroupid] == 2">
MEMBER
</if>


just place all of the memberinfo template into each if condition and change accordingly

i would recommend keeping the <head> stuff and doing this in the body part of MEMBERINFO

Spot on! That's exactly what I wanted!!! Thank you!!!

blind-eddie
02-26-2016, 09:41 PM
whos mark lol

oops, Sorry Ryan, I was just reading another post by MarkFL and was thinking I was replying to him. :eek:

phalanxents
02-26-2016, 09:47 PM
I am doing the links in the UserCP, as I want different links to show depending on which profile is logged in and it won't show the other ones

I have a hairdressing directory and it will show the options for the price list edits for hairdressers (userid=9) but it won't show the edit price list to beauticians (userid=10)


Here's my code (USERCP_SHELL):


<if condition="$userinfo[usergroupid] == 9">
<tr><td class="$navclass[men]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=men">Edit Price List (Men)</a></td></tr>
<tr><td class="$navclass[women]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=women">Edit Price List (Women)</a></td></tr>
</if>
<if condition="$userinfo[usergroupid] == 10">
<tr><td class="$navclass[waxing]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=waxing">Edit Waxing</a></td></tr>
<tr><td class="$navclass[nails]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=nails">Edit Nails</a></td></tr>
<tr><td class="$navclass[facials]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=facials">Edit Facials</a></td></tr>
</if>

Dr.CustUmz
02-27-2016, 12:45 AM
I'm a little confused here.
You're wanting links to show based on the user logged in so if I'm logged in and I'm a beautician I see certain links? Right?

phalanxents
02-27-2016, 11:28 AM
Yes, that's correct.

Obviously hairdressers have different price lists to beauticians. I've used the extra profile fields page and managed to get the extra pages working with the relevant profile fields, I just can't get the links to show for that particular usergroup

Dr.CustUmz
02-27-2016, 12:34 PM
<if condition="is_member_of($bbuserinfo, ##)"> LINK FOR ##</if>

replace ## with usergroup id

--------------- Added 1456583844 at 1456583844 ---------------

more than one usergroup can see the same link would be <if condition="is_member_of($bbuserinfo, ##, 6, #, ##)"> LINK FOR ##</if>

phalanxents
02-27-2016, 02:06 PM
Yeah, just as you posted that, I found:
<if condition="is_member_of($bbuserinfo,9)">