Sunka
Well-known member
On xf1 when user choose hoby in custom user field it shows on message user info (under avatar).
I managed to show little icon against text. First part was added to message_user_info.php and second was in extra.css
I tried xf2 equivalent in message_macros template (also added second part into extra.less), but nothing shows.
Somewhere is error in code.
I also tried changing
Could anyone help with this?
I managed to show little icon against text. First part was added to message_user_info.php and second was in extra.css
Code:
<xen:if is="{$user.customFields.na_forumu_sam_poradi} == 'vrtlarstva'">
<div align="center"><i class="hobi hobi-vrtlarstvo" title="Hobi: Vrtlarstvo"></i></div>
<xen:elseif is="{$user.customFields.na_forumu_sam_poradi} == 'ribolova'" />
<div align="center" title="Hobi: Ribolov"><i class="hobi hobi-ribolov"></i></div>
<xen:elseif is="{$user.customFields.na_forumu_sam_poradi} == 'vrtlarstva_i_ribolova'" />
<div align="center"><i class="hobi hobi-vrtlarstvo" title="Hobi: Vrtlarstvo"></i> <i class="hobi hobi-ribolov" title="Hobi: Ribolov"></i></div>
</xen:if>
Code:
.hobi {
background-image: url('moje_graphic/hobi/hobi_sprites.png');
background-repeat: no-repeat;
display: inline-block;
}
.hobi-ribolov {
width: 32px;
height: 32px;
background-position: -5px -5px;
}
.hobi-vrtlarstvo {
width: 32px;
height: 32px;
background-position: -47px -5px;
}
I tried xf2 equivalent in message_macros template (also added second part into extra.less), but nothing shows.
Somewhere is error in code.
Code:
<xf:if is="{$xf.visitor.custom_fields.na_forumu_sam_poradi} == 'vrtlarstva'">
<div align="center"><i class="hobi hobi-vrtlarstvo" title="Hobi: Vrtlarstvo"></i></div>
<xf:elseif is="{$xf.visitor.custom_fields.na_forumu_sam_poradi} == 'ribolova'" />
<div align="center" title="Hobi: Ribolov"><i class="hobi hobi-ribolov"></i></div>
<xf:elseif is="{$xf.visitor.custom_fields.na_forumu_sam_poradi} == 'vrtlarstva_i_ribolova'" />
<div align="center"><i class="hobi hobi-vrtlarstvo" title="Hobi: Vrtlarstvo"></i> <i class="hobi hobi-ribolov" title="Hobi: Ribolov"></i></div>
</xf:if>
xen:if
changed to xf:if
$user.customFields
changed to $xf.visitor.custom_fields
I also tried changing
<i class="hobi hobi-ribolov">
to <i class="hobi.hobi-ribolov">
Could anyone help with this?