MyBB Hacks

Full Version: how to put avatar on last post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
just want to know the update Smile
Sorry Thalhah, but I am doing a complete site set up for a friends wedding, and have not had any time to look at this really.

From what I can see though, it is a bit complicated - I have found the threads fields, but the last poster link is eluding me....

I have to work on this site as a prio.
(02-08-2011 02:46 AM)thalhah Wrote: [ -> ]just want to know the update Smile

I think I have a "similar" plugin. But it is for the thread author, not for the lastposter of each thread. XThreads is required installed for this. I will try to modify it if you really want it.
yes. i really want it RateU. pleaseee....
Try this (attached).

This plugin depends on XThreads. So, you need to install XThreads before using this plugin.

For displaying last poster avatar URL, use this code in your forumdisplay_thread template:

Code:
{$thread['avatar']}


For displaying the last poster avatar image, use this kind of code in that template:

HTML Code
<img src="{$thread['avatar']}" alt="" title="" />


"Resize" the avatar as needed directly in the img tag.

If the last poster doesn't have avatar, it will use default_avatar.gif image.
By default, this images included in images folder.
If there is no default_avatar.gif in images folder, upload it.
It will prevent broken image link if the last poster doesn't have avatar.

[attachment=423]

Live Demo:
http://www.14.mynie.co.cc/forumdisplay.php?fid=33
Click the thread images there.

thanks RateU. awesome. you are the best. can it being done in index.php forums?
There is a thread author plugin posted on mybb mods site - it is a bit wonky though as far as avatar display is concerned. Even with a td, a div AND a span and a bloody big hammer the darn thing wont resize in Chrome using css (which is a browser I don't use, but a fair few of my users do......).

http://community.mybb.com/thread-79700.html
where is template for subforum? i want to add avatar last post on subforum 2.
(02-10-2011 12:38 AM)thalhah Wrote: [ -> ]can it being done in index.php forums?
The hard thing for this (for me) is, dealing with the depth of forumbit.

(02-10-2011 12:54 PM)thalhah Wrote: [ -> ]where is template for subforum? i want to add avatar last post on subforum 2.
For what? If you mean for the plugin linked in Leefish post, it is used (not directly) for threadlist. But if you really want to use that plugin, maybe it is better to reduce the number of threads displayed for each page in your threadlist.
I don't use it. I have my own thread author plugin with other method, XThreads required, because I use one of the amazing hidden treasure XThreads function. With this way I can prevent using query in loop function, no core edit and no additional query loaded at all.
thanks RateU. plugin that you attach is the best. i like it vvery much.
Pages: 1 2 3
Reference URL's