Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
User Avatars In Thread Listing Details »»
User Avatars In Thread Listing
Version: 1.03, by shabbirbhimani shabbirbhimani is offline
Developer Last Online: Aug 2021 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 4.x.x Rating:
Released: 08-15-2011 Last Update: 08-20-2011 Installs: 263
Uses Plugins Template Edits
Re-useable Code  
No support by the author.

Download vB 3.8.x Compatible Version Here

What does this plugin do?

This plugin add user avatars to the thread listing in forum display page. See the sceenshot for sample.



How to Install the plugin?

This plugin requires you edit vBulletin templates.

Import the xml file from the product manager..

Edit the threadbit template.

Find

HTML Code:
<vb:if condition="$show['threadicon']">
And add the following just above it.

HTML Code:
<a href="{vb:link member, {vb:raw thread}, null, 'postuserid', 'postusername'}"><img height="32px" width="32px" style="float:left;margin-right:4px" src="{vb:raw thread.avatarurl}" border="0" /></a>
Find

HTML Code:
<dt>{vb:rawphrase last_post_by}</dt>
Please note: Some custom templates have the above code as
Code:
<dt class="lastpostby hidden">{vb:rawphrase last_post_by}</dt>


And add the following just above it.

HTML Code:
<a href="{vb:link member, {vb:raw thread}, null, 'lastposterid', 'lastposter'}"><img height="32px" width="32px" style="float:left;margin-right:4px" src="{vb:raw thread.lastposteravatarurl}" border="0" /></a>
Edit forumhome_forumbit_level1_post and forumhome_forumbit_level2_post templates as follows.

Find

HTML Code:
{vb:raw forum.lastpostinfo}
And add the following code just above it.

HTML Code:
<a href="{vb:link member, {vb:raw forum}, null, 'real_lastposterid', 'real_lastposter'}"><img height="48px" width="48px" style="float:left;margin-right:4px" src="{vb:raw forum.avatarurl}" border="0" /></a>
Edit search_threadbit

Find the first occurrence of

HTML Code:
<div class="inner">
And add after that

HTML Code:
<a href="{vb:link member, {vb:raw thread}, null, 'postuserid', 'postusername'}"><img height="32px" width="32px" style="float:left;margin:7px 4px 0 0" src="{vb:raw thread.avatarurl}" border="0" /></a>
Then again find

HTML Code:
<dl class="threadlastpost td">
And add after that

HTML Code:
<a href="{vb:link member, {vb:raw thread}, null, 'lastposterid', 'lastposter'}"><img height="32px" width="32px" style="float:left;margin-right:4px" src="{vb:raw thread.lastposteravatarurl}" border="0" /></a>
Edit search_results_postbit

Find

HTML Code:
<div class="contact">
And add after that

HTML Code:
<a href="{vb:link member, {vb:raw post}, null, 'userid', 'username'}"><img height="32px" width="32px" style="float:left;margin-left:4px" src="{vb:raw post.avatarurl}" border="0" /></a>
Upgrading Instructions

If you are upgrading the plugin, just import the new plugin file and overwrite the existing plugins. Once done make the necessary edits to the search templates.

Credits
  1. Last poster's avatar idea by James from VirtueScience

Support

This plugin is supported, so you can post your issues and queries either on my blog or in comments below.

If you would like to Optimize your vBulletin for Less Server Load & Better User Experience, read this post on Optimizing vBulletin

History

Updated 21st August
  1. Added support for avatars in search results.
  2. Fixed bug for thread started by guests.

Updated 18th August
  1. Avatar of sub forums last post bug fixed.

Updated 17th August
  1. Added Support for avatars in forumhome
  2. Avatars linked to member urls

Enjoy!!!

Download Now

File Type: xml product-xfstyleavatars-v1.03-vb4.xml (4.2 KB, 1192 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #132  
Old 09-05-2011, 04:35 PM
COL NIL SATIS COL NIL SATIS is offline
 
Join Date: Aug 2009
Location: Liverpool UK
Posts: 802
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this looks brilliant
Reply With Quote
  #133  
Old 09-22-2011, 05:44 AM
Jarred_CK Jarred_CK is offline
 
Join Date: Aug 2011
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent Mod...Just Wanted 2 Show Some Love 4 Your Excellent Work...Will be voting 4 best Mod...
Reply With Quote
  #134  
Old 09-22-2011, 06:37 AM
shabbirbhimani's Avatar
shabbirbhimani shabbirbhimani is offline
 
Join Date: Nov 2004
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jarred_CK View Post
Excellent Mod...Just Wanted 2 Show Some Love 4 Your Excellent Work...Will be voting 4 best Mod...
Thanks for the appreciation and vote.
Reply With Quote
  #135  
Old 09-29-2011, 03:35 AM
steve71 steve71 is offline
 
Join Date: Dec 2006
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<div class="contact">

I can only find the above snippet of code in the postbit template but not in the search_results_postbit template as instructed. I have just omitted this (last) step and everything is working fine. Is this ok?
Reply With Quote
  #136  
Old 09-29-2011, 03:42 AM
shabbirbhimani's Avatar
shabbirbhimani shabbirbhimani is offline
 
Join Date: Nov 2004
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by steve71 View Post
<div class="contact">

I can only find the above snippet of code in the postbit template but not in the search_results_postbit template as instructed. I have just omitted this (last) step and everything is working fine. Is this ok?
Check the default version of the template and see if it has been edited before.
Reply With Quote
  #137  
Old 09-29-2011, 08:26 AM
steve71 steve71 is offline
 
Join Date: Dec 2006
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is the default version of the search_results_postbit (vbulletin 4.0.3)
There is no <div class="contact">


Quote:
<li class="imodselector threadbit" id="post_{vb:raw post.postid}">
<div class="nonsticky">
<div class="threadinfo post">
<!-- status icon block -->
<a class="threadstatus"></a>

<!-- title / author block -->
<div class="inner">
<h3 class="searchtitle">
{vb:raw post.typeprefix} {vb:raw post.prefix_rich} <a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_post}}#post{vb:raw post.postid}" title="{vb:var post.pagetext}"><strong>{vb:raw post.threadtitle}</strong></a>
</h3>

<div class="threadmeta">
<div class="author">
<vb:if condition="$post['userid']">
{vb:rawphrase posted_by_x_y_z_a, {vb:link member, {vb:raw post}, null, 'userid', 'username'}, {vb:raw post.username}, {vb:raw post.postdate}, {vb:raw post.posttime}}
<vb:else />
{vb:rawphrase posted_by_x_y_z_guest, {vb:raw post.username}, {vb:raw post.postdate}, {vb:raw post.posttime}}
</vb:if>

<vb:if condition="$show['moderated']"><span class="moderated shade">{vb:rawphrase this_message_is_moderated}</span></vb:if>
<vb:if condition="$show['deleted']">
<span class="moderated shade">
{vb:rawphrase {vb:raw post.del_phrase}, {vb:link member, {vb:raw post}, null, 'del_userid', 'del_username'}, {vb:raw post.del_username}}
<vb:if condition="$post['del_reason']">
{vb:rawphrase reason_for_deletion}: <em>{vb:raw post.del_reason}</em>
</vb:if>
</span>
</vb:if>
</div>
</div>

</div>
</div>
<!-- threadstats -->
<ul class="threadstats td alt">
<li class="stats">{vb:rawphrase replies}: {vb:raw post.replycount}</li>
<li class="stats">{vb:rawphrase views}: {vb:raw post.views}</li>
</ul>
<!-- lastpost -->
<dl class="threadlastpost td">
<dt class="lastpostby hidden">{vb:rawphrase last_post_by}:</dt>
<dd>{vb:rawphrase last_post}: <em class="time">{vb:raw lastpostdate}&nbsp;{vb:raw lastpostdatetime}</em></dd>
<dd>
<vb:if condition="$threadinfo['lastposterid']">
{vb:rawphrase by_x, {vb:link member, {vb:raw threadinfo}, null, 'lastposterid', 'lastposter'}, {vb:raw threadinfo.lastposter}}
<vb:else />
{vb:rawphrase by_x_guest , {vb:raw threadinfo.lastposter}}
</vb:if>
&nbsp;<a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_lastpost}, 'threadid', 'threadtitle'}#post{vb:raw threadinfo.lastpostid}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a>
</dd>
</dl>

<div class="threadpostedin td alt">
<p>
{vb:rawphrase forum}:<br /><a href="{vb:link forum, {vb:raw post}, null, 'forumid', 'forumtitle'}" title="{vb:raw post.forumtitleclean}">{vb:raw post.forumtitle}</a>
</p>
</div>

<vb:if condition="$show['inlinemod']">
<!-- fourth block -->
<label class="threadimod">
<input type="checkbox" id="post_imod_checkbox_{vb:raw post.postid}" name="imodcheck[{vb:raw post.postid}]" />
</label>
</vb:if>

</div>
</li>
Reply With Quote
  #138  
Old 09-29-2011, 09:44 AM
shabbirbhimani's Avatar
shabbirbhimani shabbirbhimani is offline
 
Join Date: Nov 2004
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Probably <div class="contact"> is added in 4.1.3 and if you want to show the avatars in search results bit you need to add the code at some location at least.
Reply With Quote
  #139  
Old 09-29-2011, 09:50 AM
steve71 steve71 is offline
 
Join Date: Dec 2006
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by shabbirbhimani View Post
Probably <div class="contact"> is added in 4.1.3 and if you want to show the avatars in search results bit you need to add the code at some location at least.
Ya but the avatars are showing in the search results...both for the quick/advanced search and on the new posts/today's posts page. I'm not sure what affect omitting that edit has in this case if any...

?
Reply With Quote
  #140  
Old 09-29-2011, 10:34 AM
Pvtiste Pvtiste is offline
 
Join Date: Nov 2005
Location: Toronto
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent work! thans for sharing
Can you do the same thing for the PM?
Reply With Quote
  #141  
Old 09-29-2011, 10:38 AM
apn3a apn3a is offline
 
Join Date: Oct 2004
Location: Athens Greece
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you share the code with us or you prefer it to have it unique?


Quote:
Originally Posted by Mark.B View Post
That's my site - it's done with some jQuery, same piece that does the forum description hover tooltip addon someone posted recently. You could use this hack to generate the avatar.

Though I should add, it shouldn't be pink. I have no idea why it has appeared pink for you....
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:34 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10003 seconds
  • Memory Usage 2,382KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (12)bbcode_html
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (26)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete