MyBB Community Forums
need information - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: need information (/thread-177040.html)



need information - Mr_Joker - 2015-08-31

i need a method with show avatar on index in the forum last post without plugin. and a style nickname

there is a way to not use plugins?


RE: need information - Ad Bakker - 2015-08-31

(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.


RE: need information - Euan T - 2015-08-31

This isn't possible without a plugin or core edit I'm afraid.


RE: need information - Ad Bakker - 2015-08-31

Add the following lines in script forumdisplay.php line 1314 and on:


$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.


RE: need information - Mr_Joker - 2015-08-31

ok thanks