inherit
245245
0
Sept 18, 2017 1:03:30 GMT -8
naxos84
9
June 2017
naxos84
|
Post by naxos84 on Jun 18, 2017 13:09:49 GMT -8
I know this question was asked and answered earlier: support.proboards.com/thread/394745But i like to know wether this is possible now, because the other question is pretty old. I'm also putting most members into groups. And if possible, I like to show the rank AND group of a member instead of just the group. Is this possible? If yes: where can i find this setting?
|
|
inherit
226544
0
Oct 5, 2018 10:29:39 GMT -8
Ulises
4,881
November 2015
umacklin
Ulises Weirdo
|
Post by Ulises on Jun 19, 2017 9:31:10 GMT -8
naxos84 Sure it is. Do you want to show both only when both the user is both in a group and has a rank and not show anything if he is not in either a group or rank? Or show only one or the other depending on what the user is in? In the following code I made it so that it only shows both if the user has both. Go to your admin menu and navigate to Admin Home > Themes > Layout Templates > Mini-Profile and look for the following section: {if $[user.group]} $[user.group.name]<br />$[user.group.stars]<br /> {elseif $[user.rank]} $[user.rank.name]<br /> {if $[user.rank.stars]} $[user.rank.stars]<br /> {/if} {/if} and replace it with the following: {if $[user.group] && $[user.rank]} $[user.group.name]<br />$[user.group.stars]<br /> $[user.rank.name]<br /> {if $[user.rank.stars]} $[user.rank.stars]<br /> {/if} {/if}
Some things to note, any user can choose not to display the group in his Edit Profile & Settings page which would defeat the purpose of this code and not show his group or rank -- same goes for the case when the member is not in a rank but is in a group.
|
|
inherit
245245
0
Sept 18, 2017 1:03:30 GMT -8
naxos84
9
June 2017
naxos84
|
Post by naxos84 on Jun 19, 2017 10:02:14 GMT -8
Ulises thx for your answer. I will try this. I want to Show the rank and/or Group. But with your example i will bei able to figure it out. I just didnt know where to do this. I will let you know, when this is working as i wanted. ..
|
|
inherit
226544
0
Oct 5, 2018 10:29:39 GMT -8
Ulises
4,881
November 2015
umacklin
Ulises Weirdo
|
Post by Ulises on Jun 19, 2017 10:05:10 GMT -8
No problem, naxos84. The way it is by default is that it will show either the group or the rank depending on which is defined so if that is what you wanted then you wouldn't need to do anything. Any questions let me know.
|
|
inherit
245245
0
Sept 18, 2017 1:03:30 GMT -8
naxos84
9
June 2017
naxos84
|
Post by naxos84 on Jun 19, 2017 10:41:13 GMT -8
Ulises Is it jquery i have to use?
|
|
inherit
226544
0
Oct 5, 2018 10:29:39 GMT -8
Ulises
4,881
November 2015
umacklin
Ulises Weirdo
|
Post by Ulises on Jun 19, 2017 10:44:50 GMT -8
naxos84 You don't need jquery for this. All of the work is done inside the layout template I mentioned in my first post.
|
|
inherit
245245
0
Sept 18, 2017 1:03:30 GMT -8
naxos84
9
June 2017
naxos84
|
Post by naxos84 on Jun 19, 2017 10:50:18 GMT -8
Ulises i went to the template > mini profile section and found the code to change... I changed it to: {if $[user.group]} $[user.group.name]<br />$[user.group.stars]<br /> {/if} {if $[user.rank] && $[user.rank.name] != "Administrator" } $[user.rank.name]<br /> {if $[user.rank.stars]} $[user.rank.stars]<br /> {/if} {/if} So I like to achieve the following: If the user has a group assigned: show the group. If the user has a rank assigned and the rank name is not "Administrator" show the rank. If the user is administrator don't show the rank.
|
|
inherit
245245
0
Sept 18, 2017 1:03:30 GMT -8
naxos84
9
June 2017
naxos84
|
Post by naxos84 on Jun 19, 2017 10:59:44 GMT -8
I found my mistake..... there is no rank with name "administrator" but a group.name Thanks for your help. This is solved for me.
|
|
inherit
226544
0
Oct 5, 2018 10:29:39 GMT -8
Ulises
4,881
November 2015
umacklin
Ulises Weirdo
|
Post by Ulises on Jun 19, 2017 11:05:06 GMT -8
|
|
inherit
247064
0
May 26, 2024 1:47:02 GMT -8
๐ฑโ๐ValSG
^^She was ?my Sugar Bear?
18
July 2017
valsg
|
Post by ๐ฑโ๐ValSG on Jul 18, 2017 17:28:39 GMT -8
Ulises Want to thank you SO much for this : quote: "and replace it with the following: {if $[user.group] && $[user.rank]} $[user.group.name]<br />$[user.group.stars]<br /> $[user.rank.name]<br /> {if $[user.rank.stars]} $[user.rank.stars]<br /> {/if} {/if}" Yay!!! I've wanted to do that from day one. Had been disappointed that there was not a setting to do it. So after working with the forum, my first time administering and also I know nothing about codes to speak of, I have been coming to the boards here and learned a lot stuff I could do, but not that. I've enjoyed learning to use plugins... and am using several and my members are tickled with what I have learned and have done so far. But alas, a plugin did not do this. I figured then, that it meant I'd have to step into deeper waters and find if anyone else had thought to want to do this and if so... where did they put it here in support boards? If it wasn't here already, then where to ask? So... yesterday... I stepped into the Templates board... just reading down through posts.... and came upon this post. ! The title seemed like it was this last thing I was wanting to do! And reading your post... YES!!! You had posted exactly what I wanted/needed. I did as you directed and all is well and I'm a happy camper now. Thank you so much for you sharing your knowledge for us dweebs that know nothing. I can read it and understand most what everything refers to and why the lines as done... but I don't know the coding to do it myself. And, have a lousy memory for remembering, which would make doing it hard. So, again, thank you ever so much. ^_^ aaay?? [the Fonz]
|
|