PDA

View Full Version : Forum Display Enhancements - Xenforo Like User Avatars


shabbirbhimani
08-20-2011, 10:00 PM
Download vB 4.x.x Compatible Version Here (https://vborg.vbsupport.ru/showthread.php?t=268618)

What does this plugin do?

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

Screenshots

https://vborg.vbsupport.ru/external/2011/08/40.png

https://vborg.vbsupport.ru/external/2011/08/41.png

https://vborg.vbsupport.ru/external/2011/08/42.png

Installation Instructions

This plugin requires you to manually edit templates.

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" rel="nofollow"><img height="32px" style="float:left;margin-right:4px" src="$post[avatarurl]" border="0" /></a>


[U]Support

This plugin is supported, so you can post your issues and queries either on my blog (http://imtips.co/xenforo-avatars-vbulletin-3.html) 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 (http://imtips.co/optimize-vbulletin.html)

See the plugin in action at MBA Forum (http://www.mbaguys.net/)

Enjoy the plugin and do share your views, comments or feedback in comments below.

Skyrider
08-21-2011, 05:18 PM
This is only for vb 3?

Kolektor
08-21-2011, 05:38 PM
yes, thank you so much!!!

Mark.B
08-21-2011, 05:51 PM
This is only for vb 3?

No there's a vB4 version that was actually here first...view the developer's profile and you'll find it.

Skyrider
08-21-2011, 06:22 PM
No there's a vB4 version that was actually here first...view the developer's profile and you'll find it.
The one I found had been removed to the graveyard.

Mark.B
08-21-2011, 06:35 PM
The one I found had been removed to the graveyard.

https://vborg.vbsupport.ru/showthread.php?t=268618

great kitten
08-21-2011, 11:37 PM
would be like to appear on the avatar private messages

shabbirbhimani
08-22-2011, 02:19 AM
would be like to appear on the avatar private messages
What do you mean by avatar private message?

valdet
08-22-2011, 05:46 AM
Hi great mod, I expect this is incompatible with vB 3.6.x, however I tried and received this error on.

I had to disable the mod until hopefully it is solved.


Database error in vBulletin 3.6.8:

Invalid SQL:

SELECT user.userid as usersuserid, user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(customavatar.userid) AS hascustom, customavatar.dateline,
customavatar.width, customavatar.height, customavatar.width_thumb, customavatar.height_thumb
FROM vb_user AS user
LEFT JOIN vb_avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN vb_customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.username = 'someone';

MySQL Error : Unknown column 'customavatar.width_thumb' in 'field list'
Error Number : 1054
Date : Monday, August 22nd 2011 @ 01:37:41 AM
Script : http://www.mysite.com/forum/
Referrer : http://www.mysite.com/forum/admincp/index.php?do=head
IP Address : xx.xx.xx.xx
Username : someone
Classname : vB_DatabaseHopefully this will be made to work for old-timers as us still on vB 3.6.x versions
Thanks

shabbirbhimani
08-22-2011, 06:50 AM
Hi great mod, I expect this is incompatible with vB 3.6.x, however I tried and received this error on.

I had to disable the mod until hopefully it is solved.


Database error in vBulletin 3.6.8:

Invalid SQL:

SELECT user.userid as usersuserid, user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(customavatar.userid) AS hascustom, customavatar.dateline,
customavatar.width, customavatar.height, customavatar.width_thumb, customavatar.height_thumb
FROM vb_user AS user
LEFT JOIN vb_avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN vb_customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.username = 'someone';

MySQL Error : Unknown column 'customavatar.width_thumb' in 'field list'
Error Number : 1054
Date : Monday, August 22nd 2011 @ 01:37:41 AM
Script : http://www.mysite.com/forum/
Referrer : http://www.mysite.com/forum/admincp/index.php?do=head
IP Address : xx.xx.xx.xx
Username : someone
Classname : vB_DatabaseHopefully this will be made to work for old-timers as us still on vB 3.6.x versions
Thanks
This works with vB3.7+ and as of now and I would love to support old timers as I myself is an old timer on many of my forums but nothing lower than 3.7.

great kitten
08-22-2011, 02:27 PM
What do you mean by avatar private message?


I let you capture

https://vborg.vbsupport.ru/external/2011/08/39.png

sa3eka.com
08-22-2011, 03:44 PM
thank u 4 this Work

Max Taxable
08-22-2011, 11:46 PM
Installed and Nommed

shabbirbhimani
08-23-2011, 04:31 AM
I let you captureI still don't get what you want to say. Do you mean to say you are getting avatars in there or want to say you are not getting avatars in PMs and want it there?

great kitten
08-23-2011, 04:40 AM
I still don't get what you want to say. Do you mean to say you are getting avatars in there or want to say you are not getting avatars in PMs and want it there?

when someone sends you a PM, the icon of the message ... as in the subjects they placed the icon d elos posts .... but now instead of icons appears avatars

enters your MP and see that there are icons of MP you have sent, instead of these icons appear avtars also of people who send you the MP

shabbirbhimani
08-23-2011, 06:32 AM
when someone sends you a PM, the icon of the message ... as in the subjects they placed the icon d elos posts .... but now instead of icons appears avatars

enters your MP and see that there are icons of MP you have sent, instead of these icons appear avtars also of people who send you the MP
No it does not work that way for me. Can you tell me if you are using any other plugin or anything and also what version of vB you are using.

great kitten
08-23-2011, 07:08 AM
I leave as it appears in the list of private messages, and went up the first image that is as it should be

use the version 3.8.7

https://vborg.vbsupport.ru/external/2011/09/54.png

Artes_Marciales
09-01-2011, 04:16 AM
This add +100 queries :confused:
Unisnstall : S

realmr
09-05-2011, 11:06 AM
any additional queries run ? And how good is this with the load of the forums ?

Artes_Marciales
09-05-2011, 11:43 AM
any additional queries run ?
one for each image


And how good is this with the load of the forums ?
this is strongly discouraged because your server load unnecessarily

is a shame because the modification is very nice

shabbirbhimani
09-06-2011, 12:39 AM
any additional queries run ? And how good is this with the load of the forums ?Yes. One for each image and I have not bottlenecked it against load.

I leave as it appears in the list of private messages, and went up the first image that is as it should be

use the version 3.8.7

https://vborg.vbsupport.ru/external/2011/09/54.pngNot sure what you are saying but I am using myself on my MBA Forum (http://www.mbaguys.net) without any such thing for PMs.

is a shame because the modification is very niceNot sure how else we could fetch the avatars because adding a join to the avatar table with threads/posts table is much more costlier operation for large forums anyway.

JohnT
01-19-2012, 02:06 PM
I'm not liking how each avatar size is different, depending on the user's avatar. Can we make it so that they're all one fixed size?

FreshFroot
01-20-2012, 05:59 PM
Yeah query wise it is intensive.. though I have xenforo and haven't seen how they must have reduced it. I'm know for sure XF does not have too many queries.. pretty optimized.

Hellmaster
01-23-2012, 02:00 AM
Looks great, but my forums seems to be all piled...

JohnT
01-30-2012, 04:08 AM
I'm not liking how each avatar size is different, depending on the user's avatar. Can we make it so that they're all one fixed size?

Anything?

shabbirbhimani
01-30-2012, 05:07 AM
Anything?
This would mean distortion of image.

Alfa1
01-30-2012, 05:53 AM
This would mean distortion of image.
To make it the same as XenForo you need to add a image-crop tool:
http://keithics.com/blog/jquery/ajaxcrop-jquery-and-php-crop-tool
http://woork.blogspot.com/2009/02/best-image-croppers-ready-to-use-for.html

If you add that, then all avatars will show as equal dimensions, without distortion.

shabbirbhimani
01-30-2012, 06:01 AM
That would mean we have to add jQuery as well and vBulletin does not use jQuery and s I have no plans to add it.

Alfa1
01-30-2012, 06:12 AM
vbulletin has this directory for jquery: clientscript/jquery/

vbulletin is moving away from YUI and implementing jquery more and more. They intent to drop YUI completely.

Goomzee
04-02-2012, 06:11 AM
thanks works fine

Kolektor
08-19-2012, 11:04 AM
This add +100 queries :confused:
Unisnstall : S

I watch each and every queries added with every mod. Can it be done with minimal queries only and will cache it ?

I like the way XF did it but how...

kotkerk
08-19-2012, 05:02 PM
Can it be done with minimal queries only and will cache it
try this mod =)
https://vborg.vbsupport.ru/showthread.php?t=269031
no additional queries

Tyran1
10-23-2012, 10:54 PM
Bug in Threadbit:

141951

Avatar not works on vB 3.8.7

shabbirbhimani
10-24-2012, 04:17 AM
It works for me and can you share your forum URL so I can see what is the url of those missing avatar

Tyran1
10-27-2012, 08:01 PM
It works for me and can you share your forum URL so I can see what is the url of those missing avatar

http://www.tyran.de/tags/deutschland.html

Is it Avatar or Profil pic??

shabbirbhimani
10-28-2012, 06:34 AM
http://www.tyran.de/tags/deutschland.html

Is it Avatar or Profil pic??
Thanks for reporting that in the tag template. Will update the plugin with the fix.

shabbirbhimani
11-03-2012, 06:22 AM
Thanks for reporting that in the tag template. Will update the plugin with the fix.
Sorry to take so long to respond but there is no hooks when fetching thread bits in vBulletin 3.8.x and so we cannot fetch avatars thread results pages as thread bits.

The issue can only be solved once we edit the core vBulletin files but that is not recommended and so will not be able to update the plugin to support it.

If you are fine editing the core vB files, here is what you need to be doing.

Open tags.php file

Find

eval('$threadbits .= "' . fetch_template('threadbit') . '";');

And Add just above it the following

($hook = vBulletinHook::fetch_hook('search_results_threadbi t')) ? eval($hook) : false;

And the avatars would show for thread results in tag pages.

tommydamic68
11-03-2012, 12:44 PM
Sorry to take so long to respond but there is no hooks when fetching thread bits in vBulletin 3.8.x and so we cannot fetch avatars thread results pages as thread bits.

The issue can only be solved once we edit the core vBulletin files but that is not recommended and so will not be able to update the plugin to support it.

If you are fine editing the core vB files, here is what you need to be doing.

Open tags.php file

Find

eval('$threadbits .= "' . fetch_template('threadbit') . '";');

And Add just above it the following

($hook = vBulletinHook::fetch_hook('search_results_threadbi t')) ? eval($hook) : false;

And the avatars would show for thread results in tag pages.

Confirmed - it worked. Thank you!

J19784B5A39B
11-03-2012, 06:34 PM
No Avatar right?

muhakeme
11-04-2012, 11:49 PM
It works in vBadvanced. 20 queries in addition : (
My CPU load is high

Tyran1
11-28-2012, 05:48 PM
Sorry to take so long to respond but there is no hooks when fetching thread bits in vBulletin 3.8.x and so we cannot fetch avatars thread results pages as thread bits.

The issue can only be solved once we edit the core vBulletin files but that is not recommended and so will not be able to update the plugin to support it.

If you are fine editing the core vB files, here is what you need to be doing.

Open tags.php file

Find

eval('$threadbits .= "' . fetch_template('threadbit') . '";');

And Add just above it the following

($hook = vBulletinHook::fetch_hook('search_results_threadbi t')) ? eval($hook) : false;

And the avatars would show for thread results in tag pages.

Thanks it works!!!

mykkal
02-07-2013, 03:15 AM
Is there any way to have the next versions not require style edits? I'm just curious.

shabbirbhimani
02-07-2013, 04:01 AM
Is there any way to have the next versions not require style edits? I'm just curious.
Don't have any such plans as of now.

Frosti
02-08-2013, 01:01 AM
No Avatar right?
I have the same result, reply avatar uses the default blank, doesn't show lastposter's avatar

shabbirbhimani
02-08-2013, 04:09 AM
I have the same result, reply avatar uses the default blank, doesn't show lastposter's avatar
Can you share your forum url so I can see the issue.

Frosti
02-08-2013, 11:47 AM
I just took that one line back out and I can live without the lastpost avatars... I have quite a few other MODs installed so it might be a conflict, I'll play with it. I'm enjoying the Avies for the threadstarters so thnx for the MOD

mykkal
02-08-2013, 06:52 PM
Is it possible to decrease the MYSQL queries? This plugin drives the load up very high.

alzaabi
10-17-2013, 03:03 AM
it is not working for vbulletin 4.2.2

rockerzteam
10-19-2013, 08:36 PM
Not working on 3.8.7 blank avatars.

shabbirbhimani
11-03-2013, 11:12 AM
it is not working for vbulletin 4.2.2This is not for vB 4.2.2. You should be using this one (https://vborg.vbsupport.ru/showthread.php?t=268618)

Not working on 3.8.7 blank avatars.It works for me on vB 3.8.7 and so can you PM me your forum url and so I can look into it.

PinkMilk
04-20-2014, 11:45 PM
It's broken in tag search results for me, everywhere else is fine.

Update:
Nevermind just found fix for it in one of previous posts.

shabbirbhimani
04-21-2014, 03:41 AM
It's broken in tag search results for me, everywhere else is fine.

Update:
Nevermind just found fix for it in one of previous posts.
Glad to see that.

rodriiverduguez
09-02-2018, 05:04 PM
Can THUMBS be used so that it consumes less?

ufuk61
03-03-2019, 08:26 PM
.

vb 3.8.9 forumhome problem avatar

https://vborg.vbsupport.ru/external/2019/03/1.png