Guest rAv3nzZ Posted February 18, 2014 Share Posted February 18, 2014 (edited) I want to add a border to forum avatars with a custom border colour which depends on the group like this (admin) - I would be very thankful if you help me with this! Edited February 18, 2014 by rAv3nzZ 1 Link to comment Share on other sites More sharing options...
0 Lock Down Posted February 19, 2014 Share Posted February 19, 2014 Ok all set. If statements are added. Link to comment Share on other sites More sharing options...
0 Lock Down Posted February 18, 2014 Share Posted February 18, 2014 Are you talking about the circle?? Do you always want the avatar in a circle?? Do you know css? Have you created and tested the css for the border?? Link to comment Share on other sites More sharing options...
0 Guest rAv3nzZ Posted February 18, 2014 Share Posted February 18, 2014 (edited) Are you talking about the circle?? Do you always want the avatar in a circle?? Do you know css? Have you created and tested the css for the border?? Yeah, i'm talking about the circle, yes i know css and yes i have tested it. The problem is getting the color depending of user group or even assigning the already made color for the border to a member group. Edited February 18, 2014 by rAv3nzZ Link to comment Share on other sites More sharing options...
0 Lock Down Posted February 18, 2014 Share Posted February 18, 2014 (edited) ok in template global template > userinfpane find <if test="avatar:|:$author['member_id']"> <li class='avatar'> <if test="canSeeProfiles:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )"> <a itemprop="url" href="{parse url="showuser={$author['member_id']}" template="showuser" seotitle="{$author['members_seo_name']}" base="public"}" title="{$this->lang->words['view_profile']}: {$author['members_display_name']}" class='ipsUserPhotoLink'> </if> <if test="hasVariable:|:$this->settings['member_topic_avatar_max']"> <img itemprop="image" src='{$author['pp_main_photo']}' class='ipsUserPhoto ipsUserPhoto_variable' /> <else /> <img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' /> </if> <if test="canSeeProfiles2:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )"> </a> </if> </li> <else /> <li class='avatar'> <img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' /> </li> </if> Add the css to this < li there are 2 of them. <li class='avatar'> Use an <if statement like this for each group <if test="in_array($author['member_group_id'],array(4,6))"> new css here </if> make one for all groups you want to use for new css.. Edited February 18, 2014 by Lock Down Link to comment Share on other sites More sharing options...
0 Guest rAv3nzZ Posted February 18, 2014 Share Posted February 18, 2014 (edited) ok in template global template > userinfpane find <if test="avatar:|:$author['member_id']"> <li class='avatar'> <if test="canSeeProfiles:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )"> <a itemprop="url" href="{parse url="showuser={$author['member_id']}" template="showuser" seotitle="{$author['members_seo_name']}" base="public"}" title="{$this->lang->words['view_profile']}: {$author['members_display_name']}" class='ipsUserPhotoLink'> </if> <if test="hasVariable:|:$this->settings['member_topic_avatar_max']"> <img itemprop="image" src='{$author['pp_main_photo']}' class='ipsUserPhoto ipsUserPhoto_variable' /> <else /> <img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' /> </if> <if test="canSeeProfiles2:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )"> </a> </if> </li> <else /> <li class='avatar'> <img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' /> </li> </if> Add the css to this < li there are 2 of them. <li class='avatar'> Use an <if statement like this for each group <if test="in_array($author['member_group_id'],array(4,6))"> new css here </if> make one for all groups you want to use for new css.. Thank you for replying, i have added this above <li class='avatar'> <if test="in_array($author['member_group_id'],array(4,6))"><style type="text/css">.ipsUserPhoto { border: 1px solid red; }</style></if> The border is showing but it's working for all groups Edited February 18, 2014 by rAv3nzZ Link to comment Share on other sites More sharing options...
0 Lock Down Posted February 18, 2014 Share Posted February 18, 2014 (edited) try this <if test="in_array($author['member_group_id'],array(4,6))"><style type="text/css">.ipsUserPhoto { border: 1px solid red; }</if> <if test="avatar:|:$author['member_id']"> <li class='avatar'> <if test="canSeeProfiles:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )"> <a itemprop="url" href="{parse url="showuser={$author['member_id']}" template="showuser" seotitle="{$author['members_seo_name']}" base="public"}" title="{$this->lang->words['view_profile']}: {$author['members_display_name']}" class='ipsUserPhotoLink'> </if> <if test="hasVariable:|:$this->settings['member_topic_avatar_max']"> <img itemprop="image" src='{$author['pp_main_photo']}' class='ipsUserPhoto ipsUserPhoto_variable' /> <else /> <img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' /> </if> <if test="canSeeProfiles2:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )"> </a> </if> </li> <else /> <li class='avatar'> <img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' /> </li> </if> <if test="in_array($author['member_group_id'],array(4,6))"></style></if> Edited February 18, 2014 by Lock Down Link to comment Share on other sites More sharing options...
0 Guest rAv3nzZ Posted February 18, 2014 Share Posted February 18, 2014 try this <if test="in_array($author['member_group_id'],array(4,6))"><style type="text/css">.ipsUserPhoto { border: 1px solid red; }</if> <if test="avatar:|:$author['member_id']"> <li class='avatar'> <if test="canSeeProfiles:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )"> <a itemprop="url" href="{parse url="showuser={$author['member_id']}" template="showuser" seotitle="{$author['members_seo_name']}" base="public"}" title="{$this->lang->words['view_profile']}: {$author['members_display_name']}" class='ipsUserPhotoLink'> </if> <if test="hasVariable:|:$this->settings['member_topic_avatar_max']"> <img itemprop="image" src='{$author['pp_main_photo']}' class='ipsUserPhoto ipsUserPhoto_variable' /> <else /> <img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' /> </if> <if test="canSeeProfiles2:|:$this->memberData['g_is_supmod'] OR ( $this->memberData['g_mem_info'] && ! IPSMember::isInactive( $author ) )"> </a> </if> </li> <else /> <li class='avatar'> <img itemprop="image" src='{$author['pp_thumb_photo']}' class='ipsUserPhoto ipsUserPhoto_large' /> </li> </if> <if test="in_array($author['member_group_id'],array(4,6))"></style></if> Same thing + the avatar of Administrator group is now erased. Link to comment Share on other sites More sharing options...
0 Lock Down Posted February 18, 2014 Share Posted February 18, 2014 If you have an admin login and want me to look pm me the info, Link to comment Share on other sites More sharing options...
0 Guest rAv3nzZ Posted February 19, 2014 Share Posted February 19, 2014 If you have an admin login and want me to look pm me the info, Sent you the info. Thank you a lot for helping out! Link to comment Share on other sites More sharing options...
0 Guest rAv3nzZ Posted February 19, 2014 Share Posted February 19, 2014 Thank you a lot! Now it looks so sexy The thing is.. if i need to make the same effect for avatars in forum board index, i need to do the same right? Link to comment Share on other sites More sharing options...
0 -Cookie- Posted February 19, 2014 Share Posted February 19, 2014 The question(s) in this support topic have been answered and the owner has been able to solve the problem. Because of this, the support topic has been closed and moved. If you have other questions, please open a new topic. Link to comment Share on other sites More sharing options...
Question
Guest rAv3nzZ
I want to add a border to forum avatars with a custom border colour which depends on the group like this (admin) -
I would be very thankful if you help me with this!
Edited by rAv3nzZLink to comment
Share on other sites
11 answers to this question
Recommended Posts