Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

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
  #82  
Old 08-19-2011, 02:48 AM
nacaruncr nacaruncr is offline
 
Join Date: Nov 2010
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by shabbirbhimani View Post
No this is not the feature of this mod and probably some other mod.
ok.. I'll wait for it.. thanks
Reply With Quote
  #83  
Old 08-19-2011, 06:20 AM
nCODE nCODE is offline
 
Join Date: Aug 2011
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nacaruncr View Post
ok.. I'll wait for it.. thanks
no.. no... shabbir meant that its another mod the forum owner is using...
Reply With Quote
  #84  
Old 08-19-2011, 08:44 AM
nacaruncr nacaruncr is offline
 
Join Date: Nov 2010
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And may I know the code?, I say, since we already are several who have sought this and not give in yet. Could you give me a hand?
Reply With Quote
  #85  
Old 08-19-2011, 10:24 AM
nCODE nCODE is offline
 
Join Date: Aug 2011
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry, I dunno, try PMing the owner of the picture

and shabbirbhimani,
did some modifications, if you dont mind.
added the functionality to show the avatar in search results.

Instructions
1) Import the product and allow overwrite...
2) Now you have to edit one template:
Search Templates --> search_threadbit
Find
Code:
<!-- title / author block -->
And add the following just above it
Code:
<a href="{vb:link member, {vb:raw thread}, null, 'postuserid', 'postusername'}"><img height="32px" width="32px" style="float:left;margin-right:4px; padding-top:6px" src="{vb:raw thread.avatarurl}" border="0" /></a>
Find
Code:
<dt>{vb:rawphrase last_post_by}</dt>
And add the following just above it
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>
Note: Some custom templates have the above code as
Code:
<dt class="lastpostby hidden">{vb:rawphrase last_post_by}</dt>
Attached Images
File Type: png avatar in search result.PNG (8.4 KB, 0 views)
Attached Files
File Type: xml product-xfstyleavatars-1.02.1.xml (3.2 KB, 11 views)
Reply With Quote
  #86  
Old 08-19-2011, 07:13 PM
FReeSTER FReeSTER is offline
 
Join Date: Jun 2006
Location: Rome
Posts: 730
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nCODE View Post
sorry, I dunno, try PMing the owner of the picture

and shabbirbhimani,
did some modifications, if you dont mind.
added the functionality to show the avatar in search results.

Instructions
1) Import the product and allow overwrite...
2) Now you have to edit one template:
Search Templates --> search_threadbit
Find
Code:
<vb:if condition="$show['threadicon']">
And add the following just above it
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
Code:
<dt>{vb:rawphrase last_post_by}</dt>
And add the following just above it
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>
Note: Some custom templates have the above code as
Code:
<dt class="lastpostby hidden">{vb:rawphrase last_post_by}</dt>
Thank you for this, but did you asked the creator before posting?
anyway, the code
PHP Code:
<vb:if condition="$show['threadicon']"
is NOT on my search_threadbit
Reply With Quote
  #87  
Old 08-19-2011, 08:48 PM
FReeSTER FReeSTER is offline
 
Join Date: Jun 2006
Location: Rome
Posts: 730
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I have put the first code on the search_threadbit template everywhere is possible to be for the first avatar to shown.

The problem I have is or neither the avatar only show half of the avatar or if I put the code somewhere else it will not center the avatar in the threadbit..

My code for the first avatar looks like below, the code in green is the one posted here above... I have put on the code places I have tried putting the code but is not working out for me.. Check the tag <------------- I tried here --------> (blah blah blah blah)


Code:
<li class="imodselector threadbit {vb:if !$thread['del_username'], $thread['statusstring']}" id="thread_{vb:raw thread.realthreadid}" title="{vb:raw thread.preview}">


<------------- I tried here --------> (shows the avatar before the threadicon)


	<div class="icon{vb:raw thread.threadiconid} rating{vb:raw thread.rating}<vb:if condition="$thread['sticky']"> sticky<vb:else /> nonsticky</vb:if>{vb:if $thread['del_username'], ' deleted'}">
		<div class="threadinfo thread">
			<!--  status icon block -->
			<a class="threadstatus" rel="vB::AJAX" <vb:if condition="$show['threadcount']">title="{vb:rawphrase have_x_posts_in_thread_last_y, {vb:raw thread.dot_count}, {vb:raw thread.dot_lastpost}}"</vb:if>></a>


<------------- I tried here --------> (Only shows half of the avatar)

			<!-- title / author block -->
			<div class="inner">
				<h3 class="searchtitle">

<------------- I tried here --------> (Only shows half of the avatar)


					<vb:if condition="$show['gotonewpost']"><a href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_newpost}, 'threadid', 'threadtitle'}" id="thread_gotonew_{vb:raw thread.realthreadid}"><img class="gotonewpost" src="{vb:stylevar imgdir_button}/firstnew.png" alt="{vb:rawphrase go_to_first_new_post}" /></a>
					</vb:if>
					

<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>
					<vb:if condition="$thread['sticky']">
					 	<img src="{vb:stylevar imgdir_misc}/sticky.gif" alt="{vb:rawphrase sticky_thread}" />
					</vb:if>

					<vb:if condition="$thread['movedprefix'] OR $thread['typeprefix'] OR $thread['moderatedprefix'] OR $thread['prefix_rich']">
						<span class="prefix understate">
							{vb:raw thread.movedprefix}
							{vb:raw thread.typeprefix}
							{vb:raw thread.moderatedprefix}
							{vb:raw thread.prefix_rich}
						</span>
					</vb:if>
					<a class="title<vb:if condition="$show['gotonewpost']"> threadtitle_unread</vb:if>" href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo}, 'threadid', 'threadtitle'}" id="thread_title_{vb:raw thread.realthreadid}" title="{vb:raw thread.preview}">{vb:raw thread.threadtitle}</a>
				</h3>


<------------- I tried here --------> (It shows the avatar but is not centered)


				<div class="threadmeta">
					<div class="author">
						{vb:rawphrase started_by_x_y_z_a, {vb:link member, {vb:raw thread}, null, 'postuserid', 'postusername'}, {vb:raw thread.postusername}, {vb:raw thread.startdate}, {vb:raw thread.starttime}, {vb:stylevar dirmark}}

below is an image explaining what I mean

Reply With Quote
  #88  
Old 08-20-2011, 03:35 AM
shabbirbhimani's Avatar
shabbirbhimani shabbirbhimani is offline
 
Join Date: Nov 2004
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nCODE View Post
and shabbirbhimani,
did some modifications, if you dont mind.
added the functionality to show the avatar in search results.
No I am fine with it.

Quote:
Originally Posted by FReeSTER View Post
Thank you for this, but did you asked the creator before posting?
Nope but I am fine with it but for those code support will be provided by him.

I will also update the plugin to support search as well but it is some distance because as of now I am working on 3.7 support.

@nCode Each bits (forumbits/threadbit) and now search bit is lot different. In search bits you have the options of showing only the posts and not as threads and so when doing we have to take that into account as well.
Reply With Quote
  #89  
Old 08-20-2011, 04:10 AM
FReeSTER FReeSTER is offline
 
Join Date: Jun 2006
Location: Rome
Posts: 730
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by shabbirbhimani View Post
No I am fine with it.

Nope but I am fine with it but for those code support will be provided by him.

I will also update the plugin to support search as well but it is some distance because as of now I am working on 3.7 support.

@nCode Each bits (forumbits/threadbit) and now search bit is lot different. In search bits you have the options of showing only the posts and not as threads and so when doing we have to take that into account as well.
Thank you bro, I have made it to work fine but the avatars from the thread creator on the new post searchbits are not centered. other then that is good
Reply With Quote
  #90  
Old 08-20-2011, 05:55 AM
nCODE nCODE is offline
 
Join Date: Aug 2011
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FReeSTER View Post
Ok, I have put the first code on the search_threadbit template everywhere is possible to be for the first avatar to shown.

The problem I have is or neither the avatar only show half of the avatar or if I put the code somewhere else it will not center the avatar in the threadbit..

My code for the first avatar looks like below, the code in green is the one posted here above... I have put on the code places I have tried putting the code but is not working out for me.. Check the tag <------------- I tried here --------> (blah blah blah blah)


Code:
<li class="imodselector threadbit {vb:if !$thread['del_username'], $thread['statusstring']}" id="thread_{vb:raw thread.realthreadid}" title="{vb:raw thread.preview}">


<------------- I tried here --------> (shows the avatar before the threadicon)


    <div class="icon{vb:raw thread.threadiconid} rating{vb:raw thread.rating}<vb:if condition="$thread['sticky']"> sticky<vb:else /> nonsticky</vb:if>{vb:if $thread['del_username'], ' deleted'}">
        <div class="threadinfo thread">
            <!--  status icon block -->
            <a class="threadstatus" rel="vB::AJAX" <vb:if condition="$show['threadcount']">title="{vb:rawphrase have_x_posts_in_thread_last_y, {vb:raw thread.dot_count}, {vb:raw thread.dot_lastpost}}"</vb:if>></a>


<------------- I tried here --------> (Only shows half of the avatar)

            <!-- title / author block -->
            <div class="inner">
                <h3 class="searchtitle">

<------------- I tried here --------> (Only shows half of the avatar)


                    <vb:if condition="$show['gotonewpost']"><a href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo_newpost}, 'threadid', 'threadtitle'}" id="thread_gotonew_{vb:raw thread.realthreadid}"><img class="gotonewpost" src="{vb:stylevar imgdir_button}/firstnew.png" alt="{vb:rawphrase go_to_first_new_post}" /></a>
                    </vb:if>
                    

<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>
                    <vb:if condition="$thread['sticky']">
                         <img src="{vb:stylevar imgdir_misc}/sticky.gif" alt="{vb:rawphrase sticky_thread}" />
                    </vb:if>

                    <vb:if condition="$thread['movedprefix'] OR $thread['typeprefix'] OR $thread['moderatedprefix'] OR $thread['prefix_rich']">
                        <span class="prefix understate">
                            {vb:raw thread.movedprefix}
                            {vb:raw thread.typeprefix}
                            {vb:raw thread.moderatedprefix}
                            {vb:raw thread.prefix_rich}
                        </span>
                    </vb:if>
                    <a class="title<vb:if condition="$show['gotonewpost']"> threadtitle_unread</vb:if>" href="{vb:link thread, {vb:raw thread}, {vb:raw pageinfo}, 'threadid', 'threadtitle'}" id="thread_title_{vb:raw thread.realthreadid}" title="{vb:raw thread.preview}">{vb:raw thread.threadtitle}</a>
                </h3>


<------------- I tried here --------> (It shows the avatar but is not centered)


                <div class="threadmeta">
                    <div class="author">
                        {vb:rawphrase started_by_x_y_z_a, {vb:link member, {vb:raw thread}, null, 'postuserid', 'postusername'}, {vb:raw thread.postusername}, {vb:raw thread.startdate}, {vb:raw thread.starttime}, {vb:stylevar dirmark}}
below is an image explaining what I mean
Sorry man, for the inconvenience...
Look for:
Code:
<!-- title / author block -->
and add this above the line:
Code:
<a href="{vb:link member, {vb:raw thread}, null, 'postuserid', 'postusername'}"><img height="32px" width="32px" style="float:left;margin-right:4px; padding-top:6px" src="{vb:raw thread.avatarurl}" border="0" /></a>
It SHOULD work cuz its working for me...
Quote:
Originally Posted by shabbirbhimani View Post
I will also update the plugin to support search as well but it is some distance because as of now I am working on 3.7 support.

@nCode Each bits (forumbits/threadbit) and now search bit is lot different. In search bits you have the options of showing only the posts and not as threads and so when doing we have to take that into account as well.
Yes, and thats why the avatar will only be shown if the search results are in "thread" like...

Quote:
Originally Posted by FReeSTER View Post
Thank you bro, I have made it to work fine but the avatars from the thread creator on the new post searchbits are not centered. other then that is good
It has been taken care of...

[P.S. I didn't take the authors permission in the first place because its a re-usable code, so I had the impression that one can update it to further... but I haven't named it "mine" ]
Reply With Quote
  #91  
Old 08-20-2011, 03:07 PM
shabbirbhimani's Avatar
shabbirbhimani shabbirbhimani is offline
 
Join Date: Nov 2004
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nCODE View Post
[P.S. I didn't take the authors permission in the first place because its a re-usable code, so I had the impression that one can update it to further... but I haven't named it "mine" ]
Perfectly fine with me and I am ready with the vB3 version of it and will be releasing it tomorrow. You can see it action here as of now for testing.
Reply With Quote
Reply

Thread Tools

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 04:35 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.10925 seconds
  • Memory Usage 2,417KB
  • 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
  • (15)bbcode_code
  • (12)bbcode_html
  • (1)bbcode_php
  • (10)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
  • (1)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
  • (3)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