vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Forum Display Enhancements - Xenforo Like User Avatars (https://vborg.vbsupport.ru/showthread.php?t=268855)

shabbirbhimani 08-20-2011 10:00 PM

Xenforo Like User Avatars
 
1 Attachment(s)
Download vB 4.x.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.

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

HTML Code:

$thread[title_editable]

And add the following code before.

HTML Code:

<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

HTML Code:

<td class="alt2" title="<phrase 1="$thread[replycount]" 2="$thread[views]">$vbphrase[replies_x_views_y]</phrase>">
And add the following code after.

HTML Code:

<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

HTML Code:

<div class="smallfont" style="text-align:$stylevar[right]; white-space:nowrap">

Replace with
HTML Code:

<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

HTML Code:

<td class="alt2">$forum[lastpostinfo]</td>

Replace with

HTML Code:

<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
HTML Code:

        <if condition="$show['moderated']">
        <td class="alt2">
        <else />
        <td class="alt1">
        </if>

Add the following code below

HTML Code:

<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>

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

See the plugin in action at MBA Forum

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

Quote:

Originally Posted by FF|Skyrider (Post 2236247)
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

Quote:

Originally Posted by Mark.B (Post 2236260)
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

Quote:

Originally Posted by FF|Skyrider (Post 2236271)
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

Quote:

Originally Posted by great kitten (Post 2236385)
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.


Code:

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_Database

Hopefully 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

Quote:

Originally Posted by valdet (Post 2236463)
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.


Code:

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_Database

Hopefully 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

Quote:

Originally Posted by shabbirbhimani (Post 2236416)
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

Quote:

Originally Posted by great kitten (Post 2236562)
I let you capture

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?

great kitten 08-23-2011 04:40 AM

Quote:

Originally Posted by shabbirbhimani (Post 2236875)
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

Quote:

Originally Posted by great kitten (Post 2236877)
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

Quote:

Originally Posted by realmr (Post 2242144)
any additional queries run ?

one for each image

Quote:

Originally Posted by realmr (Post 2242144)
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

Quote:

Originally Posted by realmr (Post 2242144)
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.

Quote:

Originally Posted by great kitten (Post 2236928)
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

Not sure what you are saying but I am using myself on my MBA Forum without any such thing for PMs.

Quote:

Originally Posted by Artes_Marciales (Post 2242157)
is a shame because the modification is very nice

Not 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

Quote:

Originally Posted by JohnT (Post 2289851)
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

Quote:

Originally Posted by JohnT (Post 2294075)
Anything?

This would mean distortion of image.

Alfa1 01-30-2012 05:53 AM

Quote:

Originally Posted by shabbirbhimani (Post 2294086)
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/ajax...-php-crop-tool
http://woork.blogspot.com/2009/02/be...o-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

Quote:

Originally Posted by Artes_Marciales (Post 2240700)
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

Quote:

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

1 Attachment(s)
Bug in Threadbit:

Attachment 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

Quote:

Originally Posted by shabbirbhimani (Post 2375555)
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

Quote:

Originally Posted by Tyran1 (Post 2376384)
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

Quote:

Originally Posted by shabbirbhimani (Post 2376485)
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

Code:

eval('$threadbits .= "' . fetch_template('threadbit') . '";');
And Add just above it the following

Code:

($hook = vBulletinHook::fetch_hook('search_results_threadbit')) ? eval($hook) : false;
And the avatars would show for thread results in tag pages.

tommydamic68 11-03-2012 12:44 PM

Quote:

Originally Posted by shabbirbhimani (Post 2377990)
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

Code:

eval('$threadbits .= "' . fetch_template('threadbit') . '";');
And Add just above it the following

Code:

($hook = vBulletinHook::fetch_hook('search_results_threadbit')) ? 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

1 Attachment(s)
No Avatar right?

muhakeme 11-04-2012 11:49 PM

It works in vBadvanced. 20 queries in addition : (
My CPU load is high


All times are GMT. The time now is 05:20 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.01630 seconds
  • Memory Usage 1,857KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (10)bbcode_html_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete