PDA

View Full Version : Avatar in Last Post Info bit.


koby411
07-31-2011, 04:44 AM
I'm trying to figure out how to add the avatar of the last poster in the forumhome_lastpostby but have been unable to figure out the right phrase to get it to work.

Example:
<img src="image.php?u=$lastpostinfo[forumid]" alt="Avatar" class="post_avatar" style="float:left;margin-right:10px;"/>

I need to change [forumid] to whatever works for the user id but I've tried various things but nothing worked. Any help?

I found this: https://vborg.vbsupport.ru/showthread.php?t=266326&highlight=Avatar+lastpostby But it's for vB4 and doesn't work in vB3.

BirdOPrey5
07-31-2011, 05:54 PM
There is no userid stored in $lastpostinfo...

Here is a copy of all the info in $lastpostinfo-


[forumid] => 9
[lastpost] => 1293022161
[lastposter] => BirdOPrey5
[lastthread] => my test thread
[lastthreadid] => 56
[lasticonid] => 0
[threadcount] => 2
[replycount] => 3
[lastpostid] => 201
[lastprefixid] =>
[forumread] =>
[styleid] => 0
[title] => Test Forum Y
[title_clean] => Test Forum Y
[description] => This is a test forum with a description.
[description_clean] => This is a test forum with a description.
[options] => 89799
[showprivate] => 0
[displayorder] => 23
[daysprune] => -1
[newpostemail] =>
[newthreademail] =>
[parentid] => 8
[parentlist] => 9,8,1,-1
[password] =>
[link] =>
[childlist] => 9,-1
[defaultsortfield] => lastpost
[defaultsortorder] => desc
[imageprefix] =>
[excludable] => 1
[podcast] => 0
[depth] => 2
[permissions]=> Array


You would need to make some plugin on a forumhome hook to find the userid given the username which is available in: $lastpostinfo[lastposter]

I did some work on this a while back and never fully finished it but I think what I have works if you want to take a look- (attached) - feel free to use it however you want.

koby411
08-03-2011, 04:01 AM
I tried using that but it broke the forum and left only an error message behind. Should have probably copied the error but didn't think about it as I was trying to get it removed quickly to get the forum working again.

Feanor_87
08-09-2011, 04:03 PM
The Mod is working, but for Guests it says

Fatal error: Call to undefined function fetch_avatar_url() in /home/*****/public_html/forums/includes/functions_forumlist.php(487) : eval()'d code on line 26

Anyone know how to fix that?