Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Customizing VSa - Chatbox with user avatars
MarkFL
Join Date: Feb 2014
Posts: 3,853

I'm a relative newcomer to vBulletin administration, but I am enjoying every second of it, thanks in large part to the community here at vBorg.

St. Augustine, FL
by MarkFL MarkFL is offline 09 Dec 2014
Rating: (4 votes - 5.00 average)

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.

Last edited by TheLastSuperman; 02 May 2016 at 20:54..
Views: 3312
Reply With Quote
Comments
  #2  
Old 12 Dec 2014, 01:54
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
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!

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.

Last edited by TheLastSuperman; 02 May 2016 at 20:55.
Reply With Quote
  #3  
Old 12 Dec 2014, 02:22
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Thank you for posting the solution to your problem. Hopefully it will help someone else who has the same issue.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #4  
Old 12 Dec 2014, 05:27
chikuru chikuru is offline
 
Join Date: Nov 2011
Thank you for this! I was also trying to code this.
Reply With Quote
  #5  
Old 02 May 2016, 09:12
M.C.'s Avatar
M.C. M.C. is offline
 
Join Date: Jan 2002
thanks, great addon!
__________________
WBR`s
M.C.
Reply With Quote
  #6  
Old 02 May 2016, 20:56
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
 
Join Date: Sep 2008
Real name: Michael Miller Jr
Moved to articles . Also made second post the first post then pasted old first post code into second with strike-through - for reference only .
__________________
Daddy Does Dios and Figs!
https://www.linkedin.com/in/thelastsuperman

Search - Use the search feature to find similar issues/answers.
Information - Include screenshots, copy/pasted error codes, url etc.
Fixed - Please return to your thread/post and let us know how it was fixed!
Thanks - For participating! Click the "Like" on a post if someone helped you!
Reply With Quote
  #7  
Old 08 May 2016, 17:00
GHRake GHRake is offline
 
Join Date: Sep 2015
Real name: Anomander Rake
Thumbs up

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



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.

Reply With Quote
  #8  
Old 08 May 2016, 17:13
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
I kind of went wild when I was learning javascript and made quite a few changes to the chat:

Attached Images
File Type: jpg vsachat.jpg (77.4 KB, 141 views)
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #9  
Old 09 May 2016, 04:05
GHRake GHRake is offline
 
Join Date: Sep 2015
Real name: Anomander Rake
Originally Posted by MarkFL View Post
I kind of went wild
Yes you did! Site looks great BTW
Reply With Quote
  #10  
Old 09 May 2016, 04:09
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Originally Posted by GHRake View Post
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.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #11  
Old 20 May 2016, 17:59
BliNeR-KeY BliNeR-KeY is offline
 
Join Date: Nov 2013
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 ?
Reply With Quote
  #12  
Old 20 May 2016, 18:04
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
This article is about adding avatars to "VSa - Chatbox" not to the forumdisplay or other areas.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #13  
Old 20 May 2016, 18:14
BliNeR-KeY BliNeR-KeY is offline
 
Join Date: Nov 2013
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.

Reply With Quote
  #14  
Old 20 May 2016, 18:55
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Real name: Mark
Change this line:


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

to suit your needs.
__________________
Former vBulletin.org Staff Member



Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #15  
Old 20 May 2016, 19:07
BliNeR-KeY BliNeR-KeY is offline
 
Join Date: Nov 2013
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.

Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

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


New To Site? Need Help?

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

Layout Options | Width: Wide Color: