grantus
Active member
What would be the proper avatar code to display in a template within my loop?
I've tried
I've also tried
and it works, however the issue is the
For example, I have a user_id of 18551 so it spits out 19 instead of 18. Another user_id is 5131 and it shows 5 as it should.
I've tried
<xf:avatar user="{$value.user_id}" size="s" defaultname="{$value.username}" />
within my own foreach loop, yet it doesn't return a user_id.I've also tried
Code:
<img src="{{ link('data/avatars/m/') }}{{ number(floor({$value.user_id})/1000) }}/{$value.user_id}.jpg" alt="{$value.username}" />
and it works, however the issue is the
number(floor
part. It seems to round up over 5.For example, I have a user_id of 18551 so it spits out 19 instead of 18. Another user_id is 5131 and it shows 5 as it should.