Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Flashchat: Who is chatting Details »»
Flashchat: Who is chatting
Version: 2.30, by Paul M Paul M is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.x Rating:
Released: 12-17-2004 Last Update: 09-28-2005 Installs: 225
 
No support by the author.

This modification is no longer available or supported.

This is a simple ForumHome display of who is currently using your Flashchat.

Version 2.20 is for use with Flashchat 4.1.x - however, it may work with older versions of Flashchat if set-up correctly.

The main features of Version 2.xx are ;

1. It displays the list on Forum Home with the "Users online" display.

2. The list view is collapsable, so you just see the number.

3. Users who should display as coloured or bold etc should be displayed correctly. (based on the display usergroup)

4. If you 'hover' over a username it will show the room they are chatting in.

5. If the chat is empty, a simple "no one is chatting" message is displayed.


Note: This will not display the names of any bots in the chat, due to the strange way that flashchat stores this information.


With help from Cyricx a CPMS module is located in this post. (Version 2.20 only, unsupported - use at your own risk).

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #132  
Old 04-24-2005, 02:45 AM
Mr_Bob's Avatar
Mr_Bob Mr_Bob is offline
 
Join Date: Jul 2004
Location: NJ, USA
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is the upgraded version supposed to work with the newly released FlashChat 4.0? If so, mine is not working . I logged into chat and refreshed the forum homepage to find it still said no users in chat. Is this supposed to be working with 4.0?
Reply With Quote
  #133  
Old 04-24-2005, 12:56 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mr_Bob
Is the upgraded version supposed to work with the newly released FlashChat 4.0? If so, mine is not working . I logged into chat and refreshed the forum homepage to find it still said no users in chat. Is this supposed to be working with 4.0?
The upgrade was nothing to do with any version of Flashchat, it was an alteration to take account of the displaygroupid in vB.

However, this hack works perfectly for Flashchat 4.0.0 (beta) - I have been running this version of the chat on our forum for 2/3 weeks now, so you must have made a mistake somewhere.
Reply With Quote
  #134  
Old 04-24-2005, 02:27 PM
Mr_Bob's Avatar
Mr_Bob Mr_Bob is offline
 
Join Date: Jul 2004
Location: NJ, USA
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
The upgrade was nothing to do with any version of Flashchat, it was an alteration to take account of the displaygroupid in vB.

However, this hack works perfectly for Flashchat 4.0.0 (beta) - I have been running this version of the chat on our forum for 2/3 weeks now, so you must have made a mistake somewhere.
I must, however FlashChat came out of beta on the 21. It worked well when I was working with the beta, but not now. I'll post up part of my index.php file and forumhome template

PHP Code:
}
// ############# Paul M - Flashchat - Who is in the chat v2.00 ###############

$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 " 
TABLE_PREFIX "connections as connections
LEFT JOIN " 
TABLE_PREFIX "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 ###############

// ### LOGGED IN USERS #################################################
$activeusers '';
if (
$vboptions['displayloggedin'])
{
    
$datecut TIMENOW $vboptions['cookietimeout'];
    
$numbervisible 0;
    
$numberregistered 0;
    
$numberguest 0;

    
$forumusers $DB_site->query("
        SELECT
            user.username, (user.options & 
$_USEROPTIONS[invisible]) AS invisible, user.usergroupid,
            session.userid, session.inforum, session.lastactivity,
            IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
        FROM " 
TABLE_PREFIX "session AS session
        LEFT JOIN " 
TABLE_PREFIX "user AS user ON(user.userid = session.userid)
        WHERE session.lastactivity > 
$datecut
        " 
iif($vboptions['displayloggedin'] == 1"ORDER BY username ASC") . "
    "
);

    if (
$bbuserinfo['userid'])
    {
        
// fakes the user being online for an initial page view of index.php
        
$bbuserinfo['joingroupid'] = iif($bbuserinfo['displaygroupid'], $bbuserinfo['displaygroupid'], $bbuserinfo['usergroupid']);
        
$userinfos = array
        (
            
$bbuserinfo['userid'] => array
            (
                
'userid' => $bbuserinfo['userid'],
                
'username' => $bbuserinfo['username'],
                
'invisible' => $bbuserinfo['invisible'],
                
'inforum' => 0,
                
'lastactivity' => TIMENOW,
                
'usergroupid' => $bbuserinfo['usergroupid'],
                
'displaygroupid' => $bbuserinfo['displaygroupid'],
            )
        );
    }
    else
    {
        
$userinfos = array();
    }
    
$inforum = array();

    while (
$loggedin $DB_site->fetch_array($forumusers))
    {
        
$userid $loggedin['userid'];
        if (!
$userid)
        {    
// Guest
            
$numberguest++;
            
$inforum["$loggedin[inforum]"]++;
        }
        else if (empty(
$userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
        {
            
$userinfos["$userid"] = $loggedin;
        }
    }

    foreach(
$userinfos AS $userid => $loggedin)
    {
        
$numberregistered++;
        if (
$userid != $bbuserinfo['userid'])
        {
            
$inforum["$loggedin[inforum]"]++;
        }
        
$loggedin['musername'] = fetch_musername($loggedin);

        if (
fetch_online_status($loggedin))
        {
            
$numbervisible++;
            eval(
'$activeusers .= ", ' fetch_template('forumhome_loggedinuser') . '";');
        }
    }

    
// memory saving
    
unset($userinfos$loggedin);

    
$activeusers substr($activeusers 2); // get rid of initial comma

    
$DB_site->free_result($loggedins);

    
$totalonline $numberregistered $numberguest;
    
$numberinvisible $numberregistered $numbervisible;

    
// ### MAX LOGGEDIN USERS ################################
    
$maxusers unserialize($datastore['maxloggedin']);
    if (
intval($maxusers['maxonline']) <= $totalonline)
    {
        
$maxusers['maxonline'] = $totalonline;
        
$maxusers['maxonlinedate'] = TIMENOW;
        
build_datastore('maxloggedin'serialize($maxusers));
    }

    
$recordusers $maxusers['maxonline'];
    
$recorddate vbdate($vboptions['dateformat'], $maxusers['maxonlinedate'], true);
    
$recordtime vbdate($vboptions['timeformat'], $maxusers['maxonlinedate']);

    
$show['loggedinusers'] = true;
}
else
{
    
$show['loggedinusers'] = false;
}

// ### GET FORUMS & MODERATOR iCACHES ########################
cache_ordered_forums(1);
if (
$vboptions['showmoderatorcolumn'])
{
    
cache_moderators();
}
else
{
    
$imodcache = array();
    
$mod = array();
}

// define max depth for forums display based on $vboptions[forumhomedepth]
define('MAXFORUMDEPTH'$vboptions['forumhomedepth']);

$forumbits construct_forum_bit($forumid); 
Also here is the portion of my forumhome template:
Code:
<!-- end logged-in users -->
<!-- who's in flashchat -->
<tbody>
	<tr>
		<td class="thead" colspan="2">
			<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_chatusers')"><img id="collapseimg_forumhome_chatusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_chatusers].gif" alt="" border="0" /></a>
			Members currently in the Chat: $totalchatters
		</td>
	</tr>
</tbody>
<tbody id="collapseobj_forumhome_chatusers" style="$vbcollapse[collapseobj_forumhome_chatusers]">
	<tr>
		<td class="alt2"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="Users online today" border="0" /></td>
		<td class="alt1" width="100%"><div class="smallfont">$chatters</div></td>
	</tr>
</tbody>
<!-- end who's in flashchat -->
</if>
<tbody>
Hope you can help me out, this is a great hack I won't give up on without a fight .
Reply With Quote
  #135  
Old 04-24-2005, 03:56 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mr_Bob
I must, however FlashChat came out of beta on the 21. It worked well when I was working with the beta, but not now.
Hmmm. I wasn't aware that it had been released in full - I'll grab the latest version then to see if anything has changed.
Reply With Quote
  #136  
Old 04-24-2005, 04:43 PM
Mr_Bob's Avatar
Mr_Bob Mr_Bob is offline
 
Join Date: Jul 2004
Location: NJ, USA
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Hmmm. I wasn't aware that it had been released in full - I'll grab the latest version then to see if anything has changed.
Yeah, there are now two VBCMPS files. VBCMPS2 being for 3.0.7. Also, I know commen.php and many other files changed drasticly. There were also changes to the MYSQL tables. This may be the problem.

PS: Do not install the bots, there is a bug where if you install them with a cms you will get call to undefined member errors. This is supposed to be fixed in a later release.
Reply With Quote
  #137  
Old 04-24-2005, 10:11 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well they really f**ked up from 4.0.0 beta to 4.0.1 didn't they - Yes, the BOTS are a pain - I had to edit proc.php despite turning them off.

The problem with the hack seems to be down to the fact that 4.0.1 now uses it's own table prefix system with vB - as well as the vB table prefix system - and to make it worse, there is an error in the CMS2 file as well. The default prefix they use seems to be "flashchat_", but you will find it in the config.srv.php file as below ;

Code:
<?php
	$GLOBALS['fc_config']['db'] = array(
		'host' => 'localhost',
		'user' => 'sqluser',
		'pass' => 'password',
		'base' => 'database',
		'pref' => '',
//		'pref' => 'flashchat_',
	);
?>
Try the following experimental fix and let me know how it goes.


Find this in the Hack Code ;

PHP Code:
// ############# Paul M - Flashchat - Who is in the chat v2.00 ###############

$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 " 
TABLE_PREFIX "connections as connections
LEFT JOIN " 
TABLE_PREFIX "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" 
); 
and replace it with this ;

PHP Code:
// ############# Paul M - Flashchat - Who is in the chat v2.05 ###############

require_once('./flashchat/inc/config.srv.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 " 
TABLE_PREFIX $fcprefix "connections as connections
LEFT JOIN " 
TABLE_PREFIX $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" 
); 
Reply With Quote
  #138  
Old 04-24-2005, 11:13 PM
LEAD_WEIGHT LEAD_WEIGHT is offline
 
Join Date: Feb 2005
Location: Canada
Posts: 369
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this be change to work with AMF FlashChat http://www.tufat.com/ simular but different. :ermm:
I can fiddle around with it but I am not a coder but know how to play with codes a little. :nervous:
Reply With Quote
  #139  
Old 04-24-2005, 11:55 PM
Mr_Bob's Avatar
Mr_Bob Mr_Bob is offline
 
Join Date: Jul 2004
Location: NJ, USA
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Well they really f**ked up from 4.0.0 beta to 4.0.1 didn't they - Yes, the BOTS are a pain - I had to edit proc.php despite turning them off.

The problem with the hack seems to be down to the fact that 4.0.1 now uses it's own table prefix system with vB - as well as the vB table prefix system - and to make it worse, there is an error in the CMS2 file as well. The default prefix they use seems to be "flashchat_", but you will find it in the config.srv.php file as below ;

Code:
<?php
	$GLOBALS['fc_config']['db'] = array(
		'host' => 'localhost',
		'user' => 'sqluser',
		'pass' => 'password',
		'base' => 'database',
		'pref' => '',
//		'pref' => 'flashchat_',
	);
?>
Try the following experimental fix and let me know how it goes.


Find this in the Hack Code ;

PHP Code:
// ############# Paul M - Flashchat - Who is in the chat v2.00 ###############

$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 " 
TABLE_PREFIX "connections as connections
LEFT JOIN " 
TABLE_PREFIX "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" 
); 
and replace it with this ;

PHP Code:
// ############# Paul M - Flashchat - Who is in the chat v2.05 ###############

require_once('./flashchat/inc/config.srv.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 " 
TABLE_PREFIX $fcprefix "connections as connections
LEFT JOIN " 
TABLE_PREFIX $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" 
); 
Works great perfectly
However where it says
PHP Code:

require_once('./flashchat/inc/config.srv.php'); 
Should read
PHP Code:
require_once('./chat/inc/config.srv.php'); 
FlashChat 4.0.1 uses a folder called chat now instead of FlashChat. any new people that will use this hack will run into a file error if it is not changed. Either this, or it can be made a note in installation to change this variable to your directory .
Great job Paul
Reply With Quote
  #140  
Old 04-25-2005, 12:15 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mr_Bob
Works great perfectly
However where it says
PHP Code:

require_once('./flashchat/inc/config.srv.php'); 
Should read
PHP Code:
require_once('./chat/inc/config.srv.php'); 
FlashChat 4.0.1 uses a folder called chat now instead of FlashChat. any new people that will use this hack will run into a file error if it is not changed. Either this, or it can be made a note in installation to change this variable to your directory .
Great job Paul
Don't you just love consistancy, why do they change things just for the sake of it.

I will make a note of it, people who upgrade from 3.x.x to 4.0.1 will probably retain the flashchat folder (as I did).
Reply With Quote
  #141  
Old 04-25-2005, 12:32 AM
Mr_Bob's Avatar
Mr_Bob Mr_Bob is offline
 
Join Date: Jul 2004
Location: NJ, USA
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Don't you just love consistancy, why do they change things just for the sake of it.

I will make a note of it, people who upgrade from 3.x.x to 4.0.1 will probably retain the flashchat folder (as I did).
Yup, you have to love it
I myself just changed the folder to the name chat. I try to keep everything as it came as much as possible . Even with these problems some of which plain acts of negligence on the coding side my members still like 4.0.1, and that's what makes them and myself happy. *with the exception of installation, it was iKonboard all over again*
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 04: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
  • Page Generation 0.13007 seconds
  • Memory Usage 2,423KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (9)bbcode_php
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete