MyBB Community Forums

Full Version: How To Add Avatar To Forumdisplay?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Does anyone know how to add an avatar in the forumdisplay template next to each thread like it has in XenForo?

Is it possible without a plugin?
No, it isn't possible without plugin or core edits..

https://github.com/TommM/flpavatar - I recommend this plugin, it's probably the lighest - adds only 1 query on forumdisplay. Activate it, check its checkbox(es) in Configuration -> General Configuration and add this code https://github.com/TommM/flpavatar#example-1 manually.
It's possible to add avatars just like on my forum but you have to make core file modification because if you use a plugin you will get x2 queries!!!!

P.S. you should also consider to add avatars to search results!
(2013-11-17, 02:31 PM)marcus123 Wrote: [ -> ]It's possible to add avatars just like on my forum but you have to make core file modification because if you use a plugin you will get x2 queries!!!!

P.S. you should also consider to add avatars to search results!

Hey,

Yes I read about the plugin giving double the queries, so that's why I would like to do it without a plugin. I did think about adding it to search results too.

Is there a tutorial that I can follow to add an avatar by editing core files?
Yes please check this easy tutorial on how to "Display Avatars in Threadlist like XenForo"
http://community.mybb.com/thread-114472-...#pid869078

Works great and no extra queries just remember that after upgrade you will have to do edit forumdisplay.php again!!!!
Hey,

It works! Smile

But now I get a lot of html errors, it doesn't validate. Is there a way to remove them?

EDIT: The & needs to be changed to & before the uid:

member.php?action=profile&uid= needs to be member.php?action=profile&uid= to be valid.
That thread has many posts on how to display avatars only use the one I have posted here works great with no errors I am sure of it because I am using it!
Check this thread and change that URL!
http://community.mybb.com/thread-147109.html
(2013-11-19, 04:54 PM)marcus123 Wrote: [ -> ]That thread has many posts on how to display avatars only use the one I have posted here works great with no errors I am sure of it because I am using it!
Check this thread and change that URL!
http://community.mybb.com/thread-147109.html

Do you know how I would add it to search results too, by editing core files?
Apply the same code to search.php