vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=315913

Customizing VSa - Chatbox with user avatars
by MarkFL
09 Dec 2014 02:25

How to display user avatars. We use the file system to store our avatars, so could not use the image.php?u=userid method.

To show avatars open the plugin titled "VSa - ChatBox - MN" and locate the line:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And after that, inserted the code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Save the plugin, and then in the template "vsa_chatbox_bit" you may use "{vb:raw user_avatar}" to display the user avatars. :cool:

MarkFL 12 Dec 2014 01:54

Hello all,

I am using vBulletin 4.2.1 on my local server as my dev site, and once done, I will go live with this on the forum I help administrate which runs vBulletin 4.2.2 patch level 2.

I am doing some custom hacks to Valter's great chatbox, and I am stumped on how to display user avatars. We use the file system to store our avatars, so I cannot use the image.php?u=userid method.

So, I have written a plugin, hook location is parse_templates, with the plugin PHP code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Now, what I get is my avatar in every posted message, instead of the avatars of the users who actually posted the various messages. Can anyone tell me what I am missing?


I found the solution to my problem! :D

Instead of creating a new plugin, I hacked an existing one. I opened the plugin titled "VSa - ChatBox - MN" and located the line:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And after that, inserted the code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Save the plugin, and then in the template "vsa_chatbox_bit" you may use "{vb:raw user_avatar}" to display the user avatars. :cool:

Lynne 12 Dec 2014 02:22

Thank you for posting the solution to your problem. Hopefully it will help someone else who has the same issue.

chikuru 12 Dec 2014 05:27

Thank you for this! I was also trying to code this.

M.C. 02 May 2016 09:12

thanks, great addon!

TheLastSuperman 02 May 2016 20:56

Moved to articles :cool:. Also made second post the first post then pasted old first post code into second with strike-through - for reference only ;).

GHRake 08 May 2016 17:00

This is an awesome article, thank you!

In the img tag I set height="20" width="20" and it looks great with 14px text height

https://www.vbulletin.org/forum/external/2016/05/26.png

And if anyone was wondering where to place {vb:raw user_avatar} inside the vsa_chatbox_bit template, find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And replace with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


MarkFL 08 May 2016 17:13

1 Attachment(s)
I kind of went wild when I was learning javascript and made quite a few changes to the chat:

http://www.vbulletin.org/forum/attac...1&d=1462727590

GHRake 09 May 2016 04:05

Quote:

Originally Posted by MarkFL (Post 2570358)
I kind of went wild

Yes you did! Site looks great BTW

MarkFL 09 May 2016 04:09

Quote:

Originally Posted by GHRake (Post 2570386)
Yes you did! Site looks great BTW

Thank you! The style was done by a hired designer, and we have added a lot of bells and whistles. :D

BliNeR-KeY 20 May 2016 17:59

i use
http://www.vbulletin.org/forum/showthread.php?t=268618

i cant set 20x20


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

maybe you have code only for chatbox ?

MarkFL 20 May 2016 18:04

This article is about adding avatars to "VSa - Chatbox" not to the forumdisplay or other areas. :)

BliNeR-KeY 20 May 2016 18:14

pls check is so big 80x80
http://prntscr.com/b6ezvd
i just add


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


MarkFL 20 May 2016 18:55

Change this line:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to suit your needs. :)

BliNeR-KeY 20 May 2016 19:07

thank you so much fixed


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

see


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



All times are GMT. The time now is 13:40.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.