Xenforo like user avatars in vBulletin forum, search and thread listing. Works with vBulletin 3.7, 3.8 and vBullein 4.
Last week I released the plugin XenForo Like User Avatars In Thread Listing For vBulletin 4. At that time I had no idea it would be one of the most awaited mod for vBulletin and based on user requests I added few more features like avatar on home page, forum display pages as well as on search results pages. There are many users like me who don’t prefer vBulletin 4 and so this plugin is for vBulletin 3.7 and vBulletin 3.8.
Some technical differences to vBulletin 4 Plugin
To show an avatar for user, vBulletin has function to fetch the avatar based on userid but for vBulletin 3.x we don’t have the threads last poster’s userid. So I have copied the vBulletin’s function to fetch the avatar based on username. This has been done to avoid one necessary database query to fetch the userid from username.
Screenshots



Installation Instructions
Note: This plugin like vBulletin 4 plugin requires you edit templates. The edit are very simple but remember to follow the right instructions of editing the template.
Download the zip file. Extract the xml file within the zip file and import the xml file as product into vBulletin.
1. Edit threadbit template as follows
Find
$thread[title_editable]
And add the following code before.
<a href="member.php?$session[sessionurl]u=$thread[postuserid]" rel="nofollow"><img height="32px" style="float:left;margin-right:4px" src="$thread[avatarurl]" border="0" /></a>
Find
<td class="alt2" title="<phrase 1="$thread[replycount]" 2="$thread[views]">$vbphrase[replies_x_views_y]</phrase>">
And add the following code after.
<a href="member.php?$session[sessionurl]find=lastposter&t=$thread[threadid]" rel="nofollow"><img height="32px" style="float:left;margin-right:4px" src="$thread[lastposteravatarurl]" border="0" /></a>
Optionally you can edit the username to be left aligned rather than right aligned. Find
<div class="smallfont" style="text-align:$stylevar[right]; white-space:nowrap">
Replace with
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap;padding-left:32px;">
2. Edit forumhome_forumbit_level1_post and forumhome_forumbit_level2_post as follows
Find
<td class="alt2">$forum[lastpostinfo]</td>
Replace with
<td class="alt2"><a href="member.php?find=lastposter&f=$forum[forumid]" rel="nofollow"><img height="32px" style="float:left;margin-right:4px" src="$forum[avatarurl]" border="0" /></a><div style="padding-left:36px;">$forum[lastpostinfo]</div></td>
3. Edit Search_result_postbit template as follows
Find
<if condition="$show['moderated']"> <td class="alt2"> <else /> <td class="alt1"> </if>
Add the following code below
<a href="member.php?$session[sessionurl]u=$post[userid]" rel="nofollow"><img height="32px" style="float:left;margin-right:4px" src="$post[avatarurl]" border="0" /></a>
Enjoy the plugin and do share your views, comments or feedback in comments below.
Further Reading …