2015-08-31, 03:39 PM
2015-08-31, 03:56 PM
(2015-08-31, 03:39 PM)Mr_Joker Wrote: [ -> ]there is a way to not use plugins?
Everything can vbe done without plugins. Plugins are only a tool to implement changes in MyBB in a structured way, such that the can be installed/activated en uninstalled/deacticvated easily.
Not long ago there was someone with the same wish as you. I will have a look.
2015-08-31, 04:18 PM
This isn't possible without a plugin or core edit I'm afraid.
2015-08-31, 04:47 PM
Add the following lines in script forumdisplay.php line 1314 and on:
Then add {$thread['avatar']} at the place in template forumdisplay_thread where you want to have the avatar of the last poster.
But it is more elegant to do this with a plugin.
$query = $db->simple_select("users", "avatar, avatardimensions, username", "uid = {$thread['lastposteruid']}");
$avatar = $db->fetch_array($query);
$profilelink = get_profile_link($thread['lastposteruid']);
$thread['avatar'] = "";
if ($avatar['avatar'] != "")
{
$useravatar = format_avatar($avatar['avatar'], $avatar['avatardimensions'], $mybb->settings['postmaxavatarsize']);
$thread['avatar'] = '<img src="'.$useravatar['image'].'" '.$useravatar['width_height'].' />';
}
Then add {$thread['avatar']} at the place in template forumdisplay_thread where you want to have the avatar of the last poster.
But it is more elegant to do this with a plugin.
2015-08-31, 06:22 PM
ok thanks