inherit
224350
0
Aug 22, 2015 5:29:54 GMT -8
fruitninja
3
August 2015
fruitninja
|
Post by fruitninja on Aug 19, 2015 4:53:41 GMT -8
So I am trying to make it so that one group has 2 rows of stars instead of one, but only the one group. The problem I am having is being able to select a specific group. What I have so far is
{elseif $[user.group] = "Developer"}
$[user.group] <br />
$[user.group.stars] <br />
$[user.group.stars] <br />
$[user.group.stars] <br /> obviously not including the {if} and {/if}. I am trying to get this to target the Developer group, but I cannot figure out how to do so. Any help would be appreciated! thanks!
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Aug 19, 2015 5:40:50 GMT -8
So I am trying to make it so that one group has 2 rows of stars instead of one, but only the one group. The problem I am having is being able to select a specific group. What I have so far is {elseif $[user.group] = "Developer"}
$[user.group] <br />
$[user.group.stars] <br />
$[user.group.stars] <br />
$[user.group.stars] <br /> obviously not including the {if} and {/if}. I am trying to get this to target the Developer group, but I cannot figure out how to do so. Any help would be appreciated! thanks! Why not just set that group with the number of stars you want it to have and then put a div around the stars in the mini-profile template where the width is such that it forces the new row: So line 6 in the mini-profile you could add the red: $[user.group.name]<br /><div style="margin:auto; width:80px;">$[user.group.stars]</div><br />
The 80px; would be the number of stars you want in a row times the width of the stars. You could remove the margin:auto; if you don't want them centered.
If you wanted two rows to display on the users profile you could do the same with user profile template but on line 17ish: $[user.group.name]<br /><div style="width:80px;">$[user.group.stars]</div>
|
|
inherit
224350
0
Aug 22, 2015 5:29:54 GMT -8
fruitninja
3
August 2015
fruitninja
|
Post by fruitninja on Aug 19, 2015 7:45:45 GMT -8
Not being big into HTML coding, my problem was more with calling back the group I needed. If I was to do
$[user.group.name], how would I make it target "Developer" specifically? Would I just replace .name to .Developer?
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Aug 20, 2015 7:29:53 GMT -8
Not being big into HTML coding, my problem was more with calling back the group I needed. If I was to do $[user.group.name], how would I make it target "Developer" specifically? Would I just replace .name to .Developer? Your title says you wanted a bit of html so I gave you a tiny bit of html. What you are asking for is jquery not html and I'm not sure it could be done they way you want it done. There is a reason they have the option of more stars in the group settings. Anyway, I'm not sure if this will work but try it out: (Replace the Admin with the exact way you have it in your group setting or just test it on Admin if you have a Admin group.) I'm not great a jquery so not sure if I did it right and I don't have multiple accounts to even test it on. {if $[user.group]} {if $[user.group.name] == " Admin"} $[user.group.name]<br />$[user.group.stars]<br />$[user.group.stars] {else} {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}
|
|
inherit
224350
0
Aug 22, 2015 5:29:54 GMT -8
fruitninja
3
August 2015
fruitninja
|
Post by fruitninja on Aug 21, 2015 3:56:08 GMT -8
I had to do a bit of modification because when I did that, my picture/posts/gender etc dissapeared from the mini-profile. So I had to re-insert that all underneath the custom part. It ended up being {if $[user.group]}
{if $[user.group.name] == "Developer"}
$[user.group.name]<br />$[user.group.stars]<br />$[user.group.stars]
{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.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}
{else}
{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} Thanks for setting me on the right track!
|
|