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)

franzis 05-18-2010 11:05 AM

Quote:

Originally Posted by cory_booth (Post 1992214)
Add an alert sound to new chats....

OK folks, this is not for the faint of heart and I know there must be a much easier way to do this, but until something better comes along....

BEFORE YOU BEGIN.

You'll need a wav file and access to your database.

STEP 1: UPDATE USER TABLE
Add new column of type "INT"
Name Column = "countvsachats"

STEP 2: MODIFY PLUGINS - (VSa - ChatBox - MN)

Find the following function "ccbmessages"
Add above: $vbulletin->db->show_errors();
PHP Code:

$tvsacurrent $vbulletin->db->query_read("SELECT COUNT(ID) AS VSACURRENT FROM ".TABLE_PREFIX."vsa_chatbox AS vsa_chatbox");
                while (
$tvsacurrent $vbulletin->db->fetch_array($tvsacurrent))
                {
                
$vsacurrent $tvsacurrent[VSACURRENT];
                }
                
$tvsauser $vbulletin->db->query_read("SELECT countvsachats AS VSAUSER FROM ".TABLE_PREFIX."user WHERE userid = " $vbulletin->userinfo['userid'] ."");
                while (
$tvsauser $vbulletin->db->fetch_array($tvsauser))
                {
                
$vsauser $tvsauser[VSAUSER];
                }
                if (
$vsacurrent $vsauser)
                {
                
$vbulletin->db->query_write("UPDATE " TABLE_PREFIX "user SET countvsachats = ".$vsacurrent." WHERE userid = " $vbulletin->userinfo['userid'] . "");
                }
                if (
$vsacurrent $vsauser)
                {
                
$vbulletin->db->query_write("UPDATE " TABLE_PREFIX "user SET countvsachats = ".$vsacurrent." WHERE userid = " $vbulletin->userinfo['userid'] . "");
                }
                
$vsacb_box_totalmessages $vbulletin->db->num_rows($vsacb_get_msg_box); 


STEP 3: Scroll down and find .... if ($vsacb_box_totalmessages>0)
Add above (notice here I am loading a chat.wav from images\misc - you'll need to upload a wav and change accordingly):

PHP Code:

              if ($vsacurrent $vsauser)
                {
                echo (
'<div><table><tr><td><EMBED SRC="images\misc\chat.wav" HIDDEN="TRUE" AUTOSTART="TRUE"></EMBED></td></tr></div>');
                } 


I have yet to try with FireFox but the idea is simple. Have a coulm in the user tabe keep track of the current amount of chats. When the chatbox refreshes, run a quick query to count the number of chats. If the chats in the query are larger than the entry in the user table - update the user table to match and fire off a sound.



I hope that there will be a good response to this and Valter might provide a similar solution?

Unfortunately, this extension runs only in the IE, in Firefox and Opera one hears nothing: (

Can who help there?

LG Franzis

Greight 05-18-2010 11:08 AM

Thx for the nice mod. Can a bot be integrated in the chatbox when there are no users to chat to or when someone chooses to chat with that bot? A bot like the one below:
HTML Code:

http://www.pandorabots.com/pandora/talk?botid=a6e5ca6e6e37472c

BobbyBig 05-19-2010 01:14 PM

Anybody knows what to edit for showing Banned users by infraction as Banned also in the chatbox? by now they get displayed as non-banned.

jkcerda 05-19-2010 01:43 PM

getting errors related to the CB
https://vborg.vbsupport.ru/showthrea...48#post2039848

anybody else have this issue?

Videx 05-19-2010 02:03 PM

That log you quoted only shows chatbox tangentially, not as a core part of the problem. But there's no question HG's shared servers are being crammed full - all under the guise of 'unlimited' storage and bandwidth! And they aren't alone.

Nonetheless, as has been pointed out many times, any chatbox can be a real resource hog if you don't rein it in. Don't put it on every page, don't encourage people to sit in it all day long (forget sounds of any sort to notify them of new activity), do set your idle timeouts low.

obmob 05-19-2010 05:16 PM

Quote:

Originally Posted by zonaenlinea (Post 2037336)

I have the same problem
PlissssssssssssssssssssssssThank ;)

Check your language locale, if it is stablished, maybe you need to modify the time and date value in vSa's adding "#"

Or, you can remove the locale modifications, then, the code in vSa's should work. :p

vilhiem 05-19-2010 07:10 PM

Great idea Franzis regarding the "Alert Sound"!

NOW ... can a "visual alert" somehow be added in case the window is minimized ... such as HIGHLIGHTING THE WINDOWS TASKBAR ...? To alert the user that a new Chat is posted

Thanks!

Gn_Snake 05-19-2010 08:35 PM

I have setup ON the alert sound for new message, but not working?

franzis 05-19-2010 09:18 PM

Quote:

Originally Posted by Gn_Snake (Post 2040123)
I have setup ON the alert sound for new message, but not working?

==> https://vborg.vbsupport.ru/showpost....postcount=1116

Unfortunately, this extension runs only in the IE :(

I hope it who can offer there soon a solution, the sound is very important.

LG Franzis

your24hourstore 05-19-2010 09:46 PM

Quote:

Originally Posted by Greight (Post 2039116)
Thx for the nice mod. Can a bot be integrated in the chatbox when there are no users to chat to or when someone chooses to chat with that bot? A bot like the one below:
HTML Code:

http://www.pandorabots.com/pandora/talk?botid=a6e5ca6e6e37472c

LOL if you have to talk to a bot :eek:


All times are GMT. The time now is 08:36 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.02338 seconds
  • Memory Usage 1,764KB
  • 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
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (6)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