![]() |
Customizing VSa - Chatbox with user avatars
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: PHP Code:
PHP Code:
|
[S]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: PHP Code:
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: PHP Code:
PHP Code:
|
Thank you for posting the solution to your problem. Hopefully it will help someone else who has the same issue.
|
Thank you for this! I was also trying to code this.
|
thanks, great addon!
|
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 ;).
|
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://vborg.vbsupport.ru/external/2016/05/26.png And if anyone was wondering where to place {vb:raw user_avatar} inside the vsa_chatbox_bit template, find: PHP Code:
PHP Code:
|
1 Attachment(s)
I kind of went wild when I was learning javascript and made quite a few changes to the chat:
https://vborg.vbsupport.ru/attachmen...1&d=1462727590 |
Quote:
|
Quote:
|
i use
https://vborg.vbsupport.ru/showthread.php?t=268618 i cant set 20x20 Code:
.tile_avatar { |
This article is about adding avatars to "VSa - Chatbox" not to the forumdisplay or other areas. :)
|
pls check is so big 80x80
http://prntscr.com/b6ezvd i just add Code:
{vb:raw user_avatar} {vb:raw vsacb_msg_box.musername} |
Change this line:
PHP Code:
|
thank you so much fixed
Code:
$user_avatar = '<img src="'.$avatar.'" border="20" width="20" style="vertical-align: middle" />'; Code:
http://prntscr.com/b6fqys |
All times are GMT. The time now is 02:16 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|