Vapers United
Junior Member
Taking a sec to thank the staff & member helpers for everything they do for us!
Posts: 300
inherit
220798
0
Jun 19, 2022 19:37:35 GMT -8
Vapers United
Taking a sec to thank the staff & member helpers for everything they do for us!
300
April 2015
vapersunited
|
Post by Vapers United on Jul 25, 2017 10:07:31 GMT -8
{if $[user.group_name] == "Site Owner"} <div class="mp-group-banner Administrator"> $[user.group] </div> {elseif $[user.group_name] == "Contest Organizer"} <div class="mp-group-banner Administrator2"> ... A Group that would be created for the 2 Admin ladies. #[user.group] </div> {/if} {elseif $[user.group_name] == "Forum Supplier"} <div class="mp-group-banner Supplier"> #[user.group] </div> {/if}
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jul 25, 2017 10:08:20 GMT -8
It would be $[user.group.name], but the rest of that is fine. I do not know why you are using a hashtag however, so I'll assume that's a typo.
Now as for the other things: 1. You say that each user is in only one group, but you mentioned that the other admins also serve other functions. What you can do here, since there's only three of you, is specify the banners based on user ID rather than group or a combination of group and ID, and it will look like however you want for each person. If you would rather create a new group for them, however, that's fine too.
2. I know the above screenshots are from a xenforo forum, which I know allows a user to have multiple banners: your original post seemed to suggest that you would like to mimic this effect, which is why I meantioned the caveat of the user profiles displaying only one group at a time. If you could clarify what it is you wanted, exactly, that would be great. My suggestion is based on the idea you simply want to style the group names each user is in to look like the banners above. Am I incorrect?
3. While you are welcome to capitalise your CSS class names, I personally don't find it necessary. You don't need to match the CSS to the group name, or anything either. You could call it "butts" if you wanted, haha. It's whatever YOU think is appropriate there, and ideally descriptive so you remember what it is targeting.
|
|
Vapers United
Junior Member
Taking a sec to thank the staff & member helpers for everything they do for us!
Posts: 300
inherit
220798
0
Jun 19, 2022 19:37:35 GMT -8
Vapers United
Taking a sec to thank the staff & member helpers for everything they do for us!
300
April 2015
vapersunited
|
Post by Vapers United on Jul 25, 2017 10:13:42 GMT -8
It would be $[user.group.name], but the rest of that is fine.
Now as for the other things: 1. You say that each user is in only one group, but you mentioned that the other admins also serve other functions. What you can do here, since there's only three of you, is specify the banners based on user ID rather than group or a combination of group and ID, and it will look like however you want for each person. If you would rather create a new group for them, however, that's fine too.
2. I know the above screenshots are from a xenforo forum, which I know allows a user to have multiple banners: your original post seemed to suggest that you would like to mimic this effect, which is why I meantioned the caveat of the user profiles displaying only one group at a time. If you could clarify what it is you wanted, exactly, that would be great. My suggestion is based on the idea you simply want to style the group names each user is in to look like the banners above. Am I incorrect?
3. While you are welcome to capitalise your CSS class names, I personally don't find it necessary.
That Screen Shot of Groups, and any others I have ever posted here, are from the Vapers United ProBoards forum. But yes, those two samples were from XenForo.
Since there is only the one special case, I'll create a new Administrator2 Group for the 2 ladies. {if $[user.group.name] == "Site Owner"} <div class="mp-group-banner Administrator"> $[user.group] </div> {elseif $[user.group.name] == "Contest Organizer"} <div class="mp-group-banner Administrator2"> ... A Group that would be created for the 2 Admin ladies. #[user.group] </div> {/if} {elseif $[user.group.name] == "Forum Supplier"} <div class="mp-group-banner Supplier"> #[user.group] </div> {/if}
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jul 25, 2017 10:19:10 GMT -8
Please change any instances of $[user.group] to $[user.group.name], and any # to $
Also, you only need one closing {/if} tag to signify the end of the conditional. think of it like so:
IF this, do this; or ELSE IF this other thing, do this
so you'd only need the closing tag after the last elseif statement.
|
|
Vapers United
Junior Member
Taking a sec to thank the staff & member helpers for everything they do for us!
Posts: 300
inherit
220798
0
Jun 19, 2022 19:37:35 GMT -8
Vapers United
Taking a sec to thank the staff & member helpers for everything they do for us!
300
April 2015
vapersunited
|
Post by Vapers United on Jul 25, 2017 10:23:12 GMT -8
It would be $[user.group.name 2. I know the above screenshots are from a xenforo forum, which I know allows a user to have multiple banners: your original post seemed to suggest that you would like to mimic this effect, which is why I meantioned the caveat of the user profiles displaying only one group at a time. If you could clarify what it is you wanted, exactly, that would be great. My suggestion is based on the idea you simply want to style the group names each user is in to look like the banners above. Am I incorrect?
Since this is not a complicated Plugin, I might be good with only one Banner. Once I see how they actually look, I'll let you know what I think. In my initial post, I was looking to recreate 2 banners, this...
So if I should want it to be able to have two banners, after seeing how they look, I'll let you know.
|
|
Vapers United
Junior Member
Taking a sec to thank the staff & member helpers for everything they do for us!
Posts: 300
inherit
220798
0
Jun 19, 2022 19:37:35 GMT -8
Vapers United
Taking a sec to thank the staff & member helpers for everything they do for us!
300
April 2015
vapersunited
|
Post by Vapers United on Jul 25, 2017 10:27:46 GMT -8
Please change any instances of $[user.group] to $[user.group.name], and any # to $
Also, you only need one closing {/if} tag to signify the end of the conditional. think of it like so:
IF this, do this; or ELSE IF this other thing, do this
so you'd only need the closing tag after the last elseif statement.
{if $[user.group.name] == "Site Owner"} <div class="mp-group-banner Administrator"> $[user.group.name] </div> {elseif $[user.group.name] == "Contest Organizer"} <div class="mp-group-banner Administrator2"> ... A Group that would be created for the 2 Admin ladies. $[user.group.name] </div> {elseif $[user.group.name] == "Forum Supplier"} <div class="mp-group-banner Supplier"> $[user.group.name] </div> {/if}
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jul 25, 2017 10:35:16 GMT -8
If you navigate to admin > structure > layout templates and select "mini profile" (second to last option), you can put that code wherever you'd like it to appear; personally, I would put it after the "personal text" variable, since that is where they appear on xenforo.
NOTE: Since I have not provided any CSS this will simply display the group names -- unfortunately I have to get back to work now and I can't sit down and take the time to style the HTML for you right now. If you aren't helped by the time I'm done with work tonight I will see what I can come up with (:
|
|
Vapers United
Junior Member
Taking a sec to thank the staff & member helpers for everything they do for us!
Posts: 300
inherit
220798
0
Jun 19, 2022 19:37:35 GMT -8
Vapers United
Taking a sec to thank the staff & member helpers for everything they do for us!
300
April 2015
vapersunited
|
Post by Vapers United on Jul 25, 2017 10:37:09 GMT -8
I think I could recreate the rest of them OK. What I'd need to know next would be where they go, and how to get there to insert the code.
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jul 25, 2017 10:45:04 GMT -8
I think I could recreate the rest of them OK. What I'd need to know next would be where they go, and how to get there to insert the code. That is what my previous post supplied (: Was there something in particular that didn't make sense?
|
|
Vapers United
Junior Member
Taking a sec to thank the staff & member helpers for everything they do for us!
Posts: 300
inherit
220798
0
Jun 19, 2022 19:37:35 GMT -8
Vapers United
Taking a sec to thank the staff & member helpers for everything they do for us!
300
April 2015
vapersunited
|
Post by Vapers United on Jul 25, 2017 10:48:11 GMT -8
Like this?
<div class="$[miniprofile_class]"> $[user]<br /> {if $[user.is_guest]}Guest<br />{/if} {if $[user.is_deleted]}<em>Deleted Member</em><br />{/if} {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} {if $[user.custom_title]}$[user.custom_title]<br />{/if} $[user.warning.bar] <br /> {if $[user.avatar]} <div class="avatar">$[user.avatar]</div><br /> {/if} {if $[user.personal_text.message]} $[user.personal_text]<br /> {if $[user.group.name] == "Site Owner"} <div class="mp-group-banner Administrator"> $[user.group.name] </div> {elseif $[user.group.name] == "Contest Organizer"} <div class="mp-group-banner Administrator2"> ... A Group that would be created for the 2 Admin ladies. $[user.group.name] </div> {elseif $[user.group.name] == "Forum Supplier"} <div class="mp-group-banner Supplier"> $[user.group.name] </div> {/if} {/if} {if $[user.is_member]} <div class="info"> Posts: $[user.posts]{if $[user.gender]}<span class="float-right">$[user.gender.image]</span>{/if} {foreach $[user.mini_custom_field]} <br /><span class="$[user.mini_custom_field.content_class]">$[user.mini_custom_field.name]: $[user.mini_custom_field.value]</span> {/foreach} {if $[user.is_online]}<br /><span class="italic">Member is Online</span>{/if} </div><br /> {/if} {if $[user.badges_miniprofile]} <div class="$[user.badges_miniprofile_container_class]"> {foreach $[user.badges_miniprofile]} $[user.badges_miniprofile.icon] {/foreach} </div> {/if} </div>
|
|
Vapers United
Junior Member
Taking a sec to thank the staff & member helpers for everything they do for us!
Posts: 300
inherit
220798
0
Jun 19, 2022 19:37:35 GMT -8
Vapers United
Taking a sec to thank the staff & member helpers for everything they do for us!
300
April 2015
vapersunited
|
Post by Vapers United on Jul 25, 2017 10:49:33 GMT -8
No, thank you. I posted that before I saw your post.
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jul 25, 2017 10:51:25 GMT -8
almost correct. You need to be careful about placing codes in between other codes.
You put your content before the closing {/if} tag for the personal text, and it should go after. Reset the template to default and try it again (:
|
|
Vapers United
Junior Member
Taking a sec to thank the staff & member helpers for everything they do for us!
Posts: 300
inherit
220798
0
Jun 19, 2022 19:37:35 GMT -8
Vapers United
Taking a sec to thank the staff & member helpers for everything they do for us!
300
April 2015
vapersunited
|
Post by Vapers United on Jul 25, 2017 10:53:47 GMT -8
almost correct. You need to be careful about placing codes in between other codes.
You put your content before the closing {/if} tag for the personal text, and it should go after. Reset the template to default and try it again (:
I haven't inserted it in the forum yet. Getting it right here, first.
<div class="$[miniprofile_class]"> $[user]<br /> {if $[user.is_guest]}Guest<br />{/if} {if $[user.is_deleted]}<em>Deleted Member</em><br />{/if} {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} {if $[user.custom_title]}$[user.custom_title]<br />{/if} $[user.warning.bar] <br /> {if $[user.avatar]} <div class="avatar">$[user.avatar]</div><br /> {/if} {if $[user.personal_text.message]} $[user.personal_text]<br /> {/if} {if $[user.group.name] == "Site Owner"} <div class="mp-group-banner Administrator"> $[user.group.name] </div> {elseif $[user.group.name] == "Contest Organizer"} <div class="mp-group-banner Administrator2"> ... A Group that would be created for the 2 Admin ladies. $[user.group.name] </div> {elseif $[user.group.name] == "Forum Supplier"} <div class="mp-group-banner Supplier"> $[user.group.name] </div> {/if} {if $[user.is_member]} <div class="info"> Posts: $[user.posts]{if $[user.gender]}<span class="float-right">$[user.gender.image]</span>{/if} {foreach $[user.mini_custom_field]} <br /><span class="$[user.mini_custom_field.content_class]">$[user.mini_custom_field.name]: $[user.mini_custom_field.value]</span> {/foreach} {if $[user.is_online]}<br /><span class="italic">Member is Online</span>{/if} </div><br /> {/if} {if $[user.badges_miniprofile]} <div class="$[user.badges_miniprofile_container_class]"> {foreach $[user.badges_miniprofile]} $[user.badges_miniprofile.icon] {/foreach} </div> {/if} </div>
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Jul 25, 2017 10:57:50 GMT -8
That looks fine to me. (: If you encounter any issues I'll have to look at them at another time, or someone else can jump in to assist (:
|
|
Vapers United
Junior Member
Taking a sec to thank the staff & member helpers for everything they do for us!
Posts: 300
inherit
220798
0
Jun 19, 2022 19:37:35 GMT -8
Vapers United
Taking a sec to thank the staff & member helpers for everything they do for us!
300
April 2015
vapersunited
|
Post by Vapers United on Jul 25, 2017 11:01:34 GMT -8
That looks fine to me. (: If you encounter any issues I'll have to look at them at another time, or someone else can jump in to assist (:
Thanks for everything, and have a great day!
|
|