vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Chat Modifications - VSa - ChatBox (AJAX) (https://vborg.vbsupport.ru/showthread.php?t=235271)

redragon29 12-20-2019 11:26 AM

nice work, thank you.
Do that work on vb 5.5?

Dave 12-20-2019 11:35 AM

Quote:

Originally Posted by redragon29 (Post 2601522)
nice work, thank you.
Do that work on vb 5.5?

This is a vBulletin 4 only add-on.

redragon29 12-20-2019 03:25 PM

Thanks for your answer Dave

lange 03-04-2020 10:55 PM

In cyb_chatbox_bit template, change:

Code:

<td style="font-size:$cybcb_textsize">
            $cybcb_msg_box_parsed

to
Code:

<td style="font-size:$cybcb_textsize;color: #FFFFFF">
            $cybcb_msg_box_parsed


lange 03-05-2020 12:16 PM

Valter and Cybernetec are the same person, the same coder. So the code is probably the same. The modification I suggested to you works under version 3.8.x that I am using. Check the content of the template again.

Mornagest 04-22-2020 10:04 AM

Hi,

I read several demands about how to change the default font color when typing a message, and didn't find any answer or else.

Does anybody know how to change this ? We have a dark skin and the background of the entermessage is dark too, and when typing in black (which is the default font color)... nobody is able to read it.

The very first color available in the drop-down menu is AntiqueWhite, which is... almost white :D so the problem seems to be elsewhere.

Thank you for your answers ! :)

shka 04-22-2020 01:34 PM

Hope I get the right code lines.
First short look into code shows - default color is value of style var "body_color" (to change in admincp / manage style vars) and only if unset it is the first color value in the available color list of the mod.

So if changing of option "Colors available in drop-down menu" shows no result change style var. And if that is not possible go to hook "VSa - ChatBox - IL" and edit the php code

Change

Code:

                                if (vB_Template_Runtime::fetchStyleVar('body_color'))
                                {
                                        $vsacb_color_predef = "#808080"; //grey or use any other color code
                                        $vsacb_color_body = VSacb_RGBtoHex($vsacb_color_predef).',';
                                }
                                else
                                {
                                        $vsacb_color_acplist = explode(",",str_replace(" ","",$vbulletin->options['vsachatbox_textcolors']));
                                        $vsacb_color_predef = $vsacb_color_acplist[0];
                                        $vsacb_color_body = '';
                                }

Or replace the complete part with
Code:

                                $vsacb_color_acplist = explode(",",str_replace(" ","",$vbulletin->options['vsachatbox_textcolors']));
                                $vsacb_color_predef = $vsacb_color_acplist[0];
                                $vsacb_color_body = '';


Mornagest 04-22-2020 05:05 PM

Why, thank you very much, Shka, the trick to modify the PHP file works perfectly ! :up:

Mornagest 05-06-2020 01:49 PM

Hi,

Since we recently activated the reverse display for the chatbox, we experimented the scroll bar problem that occurs when someone posts a message in the chatbox (which seems to be a good usage of the mod :D) or when the chatbox refreshes itself.

So I asked some help to a friend of mine (his nickname is Elzen, many thanks to him !!!) who has some JavaScript knowledges, and he found that solution :

1) load the vsa_chatbox template.

2) find these lines :

Code:

                                        vsacb_MessagesDiv = fetch_object('vsacb_messagearea');
                                        vsacb_MessagesDiv.innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="99%" align="{vb:stylevar left}">' + vsacb_Messages.handler.responseText + '</table>';


3) replace them with those five :

Code:

                                        vsacb_MessagesDiv = fetch_object('vsacb_messagearea');
                                        <vb:if condition="$vboptions[vsachatbox_reverse_messages]">
                                        var cboxgap = vsacb_MessagesDiv.scrollHeight-vsacb_MessagesDiv.scrollTop;
                                        </vb:if>
                                        vsacb_MessagesDiv.innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="99%" align="{vb:stylevar left}">' + vsacb_Messages.handler.responseText + '</table>';

This modification allows the rest to work :)


4) in the same template, locate those lines :

Code:

                                        <vb:if condition="$vboptions[vsachatbox_reverse_messages]">
                                        vsacb_MessagesDiv.scrollTop = vsacb_MessagesDiv.scrollHeight;
                                        </vb:if>


5) replace them by those :

Code:

                                        <vb:if condition="$vboptions[vsachatbox_reverse_messages]">
                                        vsacb_MessagesDiv.scrollTop = vsacb_MessagesDiv.scrollHeight-cboxgap;
                                        </vb:if>


6) save and enjoy :)



Bonus : if you use some smileys which are too big to fit in the chatbox lines, that can cause those lines to be shifted a bit (or more). Elzen also provided a solution :

7) find the three lines showed in 5) :

Code:

                                        <vb:if condition="$vboptions[vsachatbox_reverse_messages]">
                                        vsacb_MessagesDiv.scrollTop = vsacb_MessagesDiv.scrollHeight-cboxgap;
                                        </vb:if>


8) replace them with these :

Code:

                                        <vb:if condition="$vboptions[vsachatbox_reverse_messages]">
                                        vsacb_MessagesDiv.scrollTop = vsacb_MessagesDiv.scrollHeight-cboxgap;
                                        var imgs = document.getElementsByTagName("img");
                                        for (var i=0; i<imgs.length; i++) {
                                                if (vsacb_MessagesDiv.contains(imgs[i]))
                                                        imgs[i].onload = function() {
                                                                vsacb_MessagesDiv.scrollTop = vsacb_MessagesDiv.scrollHeight-cboxgap;
                                                        };
                                        }
                                        </vb:if>


According to his demand, this patch is licensed under the WTFPL.

JasV 05-13-2020 11:43 AM

I love this chatbox, the only thing I miss is sound when someone shouts.
Is that possible to do?


All times are GMT. The time now is 12:19 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.03099 seconds
  • Memory Usage 1,758KB
  • 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
  • (10)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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