vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Flashchat: Who is chatting (https://vborg.vbsupport.ru/showthread.php?t=73042)

Paul M 05-06-2005 06:53 PM

BTW, not related, but just reading your forum I noticed you had changed the refresh time from 3 secs to 0.1 secs - this is a very bad idea - 2 seconds is about the minimum you should consider. Basically you are telling every user to poll the server every 0.1 seconds - using large amounts of bandwidth and eventully if quite a few join, collapsing the whole thing. (Imagine trying to refresh a normal page 10 times a second !!).

Acers 05-07-2005 12:35 AM

thanks for telling that.
Actually i did that as a test to see if it fixes lag. Right now all were complaining of some 7 to 30 secs lag. I tried to test the chat with high refresh to see if it did anything. It hasn't. Ar best its now variable with some users getting it way too high and some low.
Anyway i will make it back to 2secs.

the problem is caused only on
1. Index.php edited, Forumhome not changed.
(or even if i change forumhome, and don't edit the index.php its allright. Its only on index.php file edit that it occurs.)
btw i just sent you some details via pm(index file and test user details.)

Sleazy 05-15-2005 04:00 PM

I am trying to use this code in collaboration with AdColumns so that it has a Whos in chat display on a side column. I put this code in a template being called by AdColumns but it doesn't appear to work this way. The template is being called on ForumHome, is there anything you can think of that would fix this problem so the code can function as part of a template that is being called?

Paul M 05-15-2005 05:25 PM

I don't know much about adcolumns - and am not really sure what you are saying doesn't work. Can you be more specific, or link to your site.

Paul M 05-15-2005 09:25 PM

Sleazy - thanks for the PM - I have replied with what should be the answer for you.

T3MEDIA 05-15-2005 10:55 PM

hey paul should I bother with flash chat?

dsboyce8624 05-15-2005 11:59 PM

Quote:

Originally Posted by T3MEDIA
hey paul should I bother with flash chat?

AFAICT FlashChat is the best out there right now.

I have it, and this hack installed. Both running smoothly.

Paul M 05-16-2005 12:14 AM

Quote:

Originally Posted by T3MEDIA
hey paul should I bother with flash chat?

Well that depends - do you want a chat system ?

If so then yes, FC does the job (as do others I might add, but I, and many others chose this one).

Romeos Tune 05-16-2005 01:19 AM

Hey Paul,

I'm running VB3.03 and the latest FlashChat.... For some reason I'm getting this error. It's adding an extra vb3_ it seems when doing the queries.... I'm still too new to figure this out I guess..... Any help would be appreciated.....

Database error in vBulletin 3.0.3:

Invalid SQL: SELECT connections.userid, connections.roomid, rooms.name, rooms.ispublic, connections.start,
user.usergroupid, user.displaygroupid, user.options, user.username, groupa.opentag as opentaga, groupa.closetag as closetaga,
groupb.opentag as opentagb, groupb.closetag as closetagb
FROM vb3_vb3__fc_connections as connections
LEFT JOIN vb3_vb3__fc_rooms as rooms ON(connections.roomid = rooms.id)
LEFT JOIN vb3_user as user ON(connections.userid = user.userid)
LEFT JOIN vb3_usergroup as groupa ON(user.usergroupid = groupa.usergroupid)
LEFT JOIN vb3_usergroup as groupb ON(user.displaygroupid = groupb.usergroupid)
WHERE connections.userid IS NOT NULL ORDER BY start
mysql error: Table 'vb.vb3_vb3__fc_connections' doesn't exist

mysql error number: 1146

esology 05-16-2005 01:41 AM

Romeos Tune,
I am getting the exact same error. Still trying to figure out what it is.

Paul M 05-16-2005 11:38 AM

Quote:

Originally Posted by Romeos Tune
Hey Paul,

I'm running VB3.03 and the latest FlashChat.... For some reason I'm getting this error. It's adding an extra vb3_ it seems when doing the queries.... I'm still too new to figure this out I guess..... Any help would be appreciated.....

Database error in vBulletin 3.0.3:

Invalid SQL: SELECT connections.userid, connections.roomid, rooms.name, rooms.ispublic, connections.start,
user.usergroupid, user.displaygroupid, user.options, user.username, groupa.opentag as opentaga, groupa.closetag as closetaga,
groupb.opentag as opentagb, groupb.closetag as closetagb
FROM vb3_vb3__fc_connections as connections
LEFT JOIN vb3_vb3__fc_rooms as rooms ON(connections.roomid = rooms.id)
LEFT JOIN vb3_user as user ON(connections.userid = user.userid)
LEFT JOIN vb3_usergroup as groupa ON(user.usergroupid = groupa.usergroupid)
LEFT JOIN vb3_usergroup as groupb ON(user.displaygroupid = groupb.usergroupid)
WHERE connections.userid IS NOT NULL ORDER BY start
mysql error: Table 'vb.vb3_vb3__fc_connections' doesn't exist

mysql error number: 1146

Which versions of flashchat, and this hack are you using ?

The 'vb3_' is your vB table prefix, because it assumes the flashchat tables were also created with this prefix. On top of this there is also a flashchat prefix which was added in 4.0.x which has complicated matters. Does your chat actually work ? What are you flashchat tables actually called ? What prefix (pref) is defined in your flashchat config.srv.php ?

esology 05-16-2005 12:19 PM

Quote:

Originally Posted by Paul M
Which versions of flashchat, and this hack are you using ?

FlashChat 4.0.6
Whos chatting Hack 2.16
Quote:

Originally Posted by Paul M
The 'vb3_' is your vB table prefix, because it assumes the flashchat tables were also created with this prefix. On top of this there is also a flashchat prefix which was added in 4.0.x which has complicated matters. Does your chat actually work ?

Yes, chat works fine
Quote:

Originally Posted by Paul M
What are you flashchat tables actually called ? What prefix (pref) is defined in your flashchat config.srv.php ?

vb3_fc

Paul M 05-16-2005 01:24 PM

Okay, looks like flashchat 4.0.x now ignores the vB prefix (except at install ?) and just uses it's own internal one.

Try replacing the code in index.php with this 2.17 version and let me know how it goes.

PHP Code:

// ## Paul M - Flashchat - Who is in the chat v2.17 ## //

$fcfolder 'chat';
// ## Make sure the folder name defined above is the correct name of your flashchat installation folder ## //

$GLOBALS['fc_config_stop'] = true;
require_once(
"./" $fcfolder "/inc/common.php"); 
$fcprefix $GLOBALS['fc_config']['db']['pref'];
$chatlist $DB_site->query("SELECT connections.userid, connections.roomid, rooms.name, rooms.ispublic, connections.start, 
user.usergroupid, user.displaygroupid, user.options, user.username, groupa.opentag as opentaga, groupa.closetag as closetaga, 
groupb.opentag as opentagb, groupb.closetag as closetagb
FROM " 
$fcprefix "connections as connections
LEFT JOIN " 
$fcprefix "rooms as rooms ON(connections.roomid = rooms.id)
LEFT JOIN " 
TABLE_PREFIX "user as user ON(connections.userid = user.userid)
LEFT JOIN " 
TABLE_PREFIX "usergroup as groupa ON(user.usergroupid = groupa.usergroupid)
LEFT JOIN " 
TABLE_PREFIX "usergroup as groupb ON(user.displaygroupid = groupb.usergroupid)
WHERE connections.userid IS NOT NULL ORDER BY start" 
);
unset(
$chatters);
$totalchatters 0;
while (
$chat $DB_site->fetch_array($chatlist))
{
    
$totalchatters += 1;
    
$roomname "In private room";
    
$chat['opentag'] = $chat['opentaga'] ;
    
$chat['closetag'] = $chat['closetaga'] ;
    if (
$chat['displaygroupid']) 
    {
        
$chat['opentag'] = $chat['opentagb'] ;
        
$chat['closetag'] = $chat['closetagb'] ;
    }
    if (
$chat['ispublic']) { $roomname "In ".$chat['name']; }
    
$chatters .= "<a href='member.php?u=$chat[userid]' title=\"$roomname\" >";
    
$chatters .= $chat['opentag'].$chat['username'].$chat['closetag']."</a>, ";
}
if (
$chatters)
{
    
$chatters substr($chatters0strlen($chatters)-2);
}
else
{
    
$chatters "No one is currently using the chat";
}

// ############# End of Who is in the chat ############### 

If this cures it then I will update the first post.

esology 05-16-2005 01:42 PM

Thanks Paul! Works like a charm.

Paul M 05-16-2005 02:29 PM

Quote:

Originally Posted by esology
Thanks Paul! Works like a charm.

Good. I have updated the install file. I hope they don't change this behaviour again ......

Romeos Tune 05-16-2005 10:39 PM

Thanks Paul! That fixed my problem too.... Awesome! :)

dfaonxa 05-18-2005 04:58 AM

Just wanted to say thanks for the mod, works perfectly and so easy to install! Thanks! :up:

plateau 05-18-2005 10:53 AM

good job!

install clicked!!!

Cyricx 05-18-2005 06:57 PM

Running vb 3.0.7 and flash chat 4.0.6

Works great!! :)

No errors at all, only bug I noticed is that it counts bots as being in the room(bad), but doesn't list them in the Who's In Chat(good).

We have 1 bot in our chat so unfortunately it never thinks noone is in chat thought it will have a blank area where the names list heh.

Cyricx 05-18-2005 07:51 PM

the inthechat.php is missing the code to grab the template..

Find
Code:

?>

And Add ABOVE it:
Code:

eval('$home[$onlineid][\'content\'] = "' . fetch_template('adv_portal_ts') . '";');

Has the same problem as the forumhome section in counting bots though.

Paul M 05-18-2005 10:53 PM

Quote:

Originally Posted by Cyricx
the inthechat.php is missing the code to grab the template..

Ooops, well spotted - a slight copy/paste error when I updated it - I overwrote the template call ....

Updated and re-uploaded. :)

Cyricx 05-18-2005 11:52 PM

Okay Paul, I debugged the rest for ya :)

Here's the other things you'll need to add to correct the module to work.

For the forumhome hack so that it doesn't pick up the bots, also find this code in the inthechat.php file to fix it for the module.

Replace this:
Code:

$chatlist = $DB_site->query("SELECT connections.userid, connections.roomid, rooms.name, rooms.ispublic, connections.start,
user.usergroupid, user.displaygroupid, user.options, user.username, groupa.opentag as opentaga, groupa.closetag as closetaga,
groupb.opentag as opentagb, groupb.closetag as closetagb
FROM " . $fcprefix . "connections as connections
LEFT JOIN " . $fcprefix . "rooms as rooms ON(connections.roomid = rooms.id)
LEFT JOIN " . TABLE_PREFIX . "user as user ON(connections.userid = user.userid)
LEFT JOIN " . TABLE_PREFIX . "usergroup as groupa ON(user.usergroupid = groupa.usergroupid)
LEFT JOIN " . TABLE_PREFIX . "usergroup as groupb ON(user.displaygroupid = groupb.usergroupid)
WHERE connections.userid IS NOT NULL ORDER BY start" );

with this:
Code:

$chatlist = $DB_site->query("SELECT connections.userid, connections.roomid, rooms.name, rooms.ispublic, connections.start,
user.usergroupid, user.displaygroupid, user.options, user.username, groupa.opentag as opentaga, groupa.closetag as closetaga,
groupb.opentag as opentagb, groupb.closetag as closetagb
FROM " . $fcprefix . "connections as connections
LEFT JOIN " . $fcprefix . "rooms as rooms ON(connections.roomid = rooms.id)
LEFT JOIN " . TABLE_PREFIX . "user as user ON(connections.userid = user.userid)
LEFT JOIN " . TABLE_PREFIX . "usergroup as groupa ON(user.usergroupid = groupa.usergroupid)
LEFT JOIN " . TABLE_PREFIX . "usergroup as groupb ON(user.displaygroupid = groupb.usergroupid)
WHERE connections.userid IS NOT NULL AND connections.ip != '0.0.0.0' ORDER BY start" );

That'll fix the forumhome.

The last fix for the module is open inthechat.php and find:
Code:

<?
AFTER IT, Add:
Code:

foreach ($modules AS $omods)
{
        if ($omods['identifier'] == 'flashchat' AND in_array($omods['modid'], explode(',', $pages['modules'])))
        {
                $showonline = true;
                $onlineid = $omods['modid'];
        }
}

unset($omods);

And go into your admincp, edit modules and set the module indentifier as

flashchat

That'll fix all the quirks :)



Awesome work Paul, thank you so much, I never could have coded this myself :), I can tweak code like crazy, but I can't write a damn thing from scratch LOL!

Paul M 05-19-2005 12:04 AM

Quote:

Originally Posted by Cyricx
Okay Paul, I debugged the rest for ya :)

Here's the other things you'll need to add to correct the module to work.

For the forumhome hack so that it doesn't pick up the bots, also find this code in the inthechat.php file to fix it for the module.


And go into your admincp, edit modules and set the module indentifier as

flashchat

That'll fix all the quirks :)

Awesome work Paul, thank you so much, I never could have coded this myself :), I can tweak code like crazy, but I can't write a damn thing from scratch LOL!

Chris - I'll update the CPMS module and it's instructions later (see your PM) - we don't have the portal installed so I can't test it myself (hence why it's not supported).

As regards the bots - these are a new feature of FlashChat 4.0.x - you are the first person to ask about not displaying them. I personally don't use them anyway. The code you have added will technically work if you haven't changed the bot ip address in the f/c config file - but if I add this to the hack then I will make sure it reads the configured ip, and also make it optional as some people my want the bots listed.

Thanks for your post. :)

Cyricx 05-19-2005 01:05 AM

Ah bugger, I did make a typo in my first post.

Here is the attached editted inthechat.php file with the changes I made.

Paul M 05-19-2005 01:36 AM

Cheers - I have written v2.20 which includes the option to not show bots - but I can't test it until tomorrow. If it works then I will upload it and a new corrected module as well. Thanks for you help with the CPMS bit. :)

Cyricx 05-19-2005 01:53 AM

Happy to help :)

weaver 06-02-2005 02:07 PM

I can't get my forum page to open. :( I'm getting this error:

Quote:

Warning: main(./chat/inc/common.php): failed to open stream: No such file or directory in /index.php on line 477

Fatal error: main(): Failed opening required './chat/inc/common.php' (include_path='.:/usr/local/php/lib/php') in /index.php on line 477
Here's what I have for my line 477:

require_once("./" . $fcfolder . "/inc/common.php");

diettalk 06-02-2005 02:13 PM

did you change to show your correct chat directory?

$fcfolder = 'chat'; // The folder name where your flashchat installation is located //

weaver 06-02-2005 02:23 PM

Quote:

Originally Posted by diettalk
did you change to show your correct chat directory?

$fcfolder = 'chat'; // The folder name where your flashchat installation is located //

My chat folder is named chat so I don't need to change anything right? Is it a chmod issue?

Paul M 06-02-2005 06:18 PM

Quote:

Originally Posted by snobbymom
My chat folder is named chat so I don't need to change anything right? Is it a chmod issue?

No, more likely a non standard path problem, what is the url of your site ?

Paul M 06-02-2005 08:52 PM

From the information you PM'd me, it looks like your chat is a folder level up from your forum (I would have thought you must have had to alter some paths in flashchat when you installed it) ?

Try ;

Code:

$fcfolder = '../chat'; // The folder name where your flashchat installation is located //
I'm off to bed in a couple of hours, and then away until next week. I'll check back in a bit to see if this fixed it, otherwise I'll check next week.

weaver 06-02-2005 08:59 PM

No I didn't have to alter anything. I just installed the newest version and from the way the install directions read I thought that's where it was supposed to go. Everything worked correctly with Flashchat itself so I didn't think anything was out of the ordinary. I'll try your fix and let you know if it works. Thanks. :)

weaver 06-02-2005 09:03 PM

That fixed it Paul. Thanks a lot. :) :)

EricaJoy 06-04-2005 01:44 PM

*clicks install

MrD 06-10-2005 02:29 PM

Hi Paul,
is there anyway to Block Usergroups from the Chat?

Paul M 06-10-2005 03:40 PM

Quote:

Originally Posted by MrD
Hi Paul,
is there anyway to Block Usergroups from the Chat?

I'm not sure what this has to do with who's chatting - but I don't quite follow anyway - can you be more specific about your problem please.

MrD 06-10-2005 03:58 PM

Quote:

Originally Posted by Paul M
I'm not sure what this has to do with who's chatting - but I don't quite follow anyway - can you be more specific about your problem please.

Hi Paul,

if i moved a user in a Group called moderate, they don?t use the chat and they don?t displayed too.

2. i asekd you, about to display most chatters an the day, a few weeks ago :)

Uyou insert the code in your new hack, wich contains who?s online,who?s chatting.
can i used the Part of the Code as standalone wich this one?

Paul M 06-10-2005 07:12 PM

Quote:

Originally Posted by MrD
Hi Paul,

if i moved a user in a Group called moderate, they don?t use the chat and they don?t displayed too.

2. i asekd you, about to display most chatters an the day, a few weeks ago :)

Uyou insert the code in your new hack, wich contains who?s online,who?s chatting.
can i used the Part of the Code as standalone wich this one?

TBH, I'm not entirely following you.

1. Are you saying you want to ban a group from using the chat ? If so then you need to install my Flashchat upgrades hack.

2. Most chatters is possible by installing all, or part, of my Most Ever Users/Members/Guests/Chatters hack.

HTH.

dsboyce8624 06-24-2005 12:44 AM

Quote:

Originally Posted by Cyricx
And go into your admincp, edit modules and set the module indentifier as

flashchat

That'll fix all the quirks :)

This should be added to the instructions for the vBa, it really acts weird without it.

Paul M 06-24-2005 01:51 AM

Quote:

Originally Posted by dsboyce8624
This should be added to the instructions for the vBa, it really acts weird without it.

um, setting the module identifier is in the instructions ....


All times are GMT. The time now is 03:03 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.01620 seconds
  • Memory Usage 1,868KB
  • 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
  • (7)bbcode_code_printable
  • (1)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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