2015-02-16, 04:03 AM
2015-02-16, 10:32 AM
Do you mean you want avatars to appear on the forums? Like for the last poster in that forum?
2015-02-16, 04:06 PM
EDIT: Nevermind, you're right. I don't know why.
EDIT 2: Looks like at the end it has '/>'. I don't think it works in HTML5 anymore, and what I had used in mine was <img src="{$mybb->user['avatar']}" alt="{$mybb->user['username']}" class="avatar">.
EDIT 2: Looks like at the end it has '/>'. I don't think it works in HTML5 anymore, and what I had used in mine was <img src="{$mybb->user['avatar']}" alt="{$mybb->user['username']}" class="avatar">.
2015-02-16, 04:22 PM
Your code should work really.
This is how you do this in MyBB in a proper way. Firstly you need to generate avatar in PHP.
Then this is a template code.
Maybe someone has better solution without meddling with PHP code, but it doesn't look like it. In global.php there's even no "avatar" word.
This is how you do this in MyBB in a proper way. Firstly you need to generate avatar in PHP.
$useravatar = format_avatar(htmlspecialchars_uni($mybb->user['avatar']), $mybb->user['avatardimensions'], my_strtolower('100x100'));
Then this is a template code.
<img src="{$useravatar['image']}" alt="" {$useravatar['width_height']} />
Maybe someone has better solution without meddling with PHP code, but it doesn't look like it. In global.php there's even no "avatar" word.
2015-02-16, 04:25 PM
(2015-02-16, 04:22 PM)mrnu Wrote: [ -> ]This is how you do this in MyBB in a proper way. First you need to generate avatar in PHP.
$useravatar = format_avatar(htmlspecialchars_uni($mybb->user['avatar']), $mybb->user['avatardimensions'], my_strtolower('100x100'));
Then this is a template code.
<img src="{$useravatar['image']}" alt="" {$useravatar['width_height']} />
Maybe someone has better solution without meddling with PHP code, but it doesn't look like it. In global.php there's even no "avatar" word.
This probably can work. I'll test it out for you.
EDIT: That isn't even working.
2015-02-16, 04:42 PM
top one is working, was moving JS around and for some reason it stopped working
2015-02-16, 08:29 PM