
04-24-2005, 11:55 PM
|
 |
|
|
Join Date: Jul 2004
Location: NJ, USA
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
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
|