Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
Flashchat Integration for vB 3.5 Details »»
Flashchat Integration for vB 3.5
Version: 2.67, by Paul M Paul M is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.5.x Rating:
Released: 06-28-2005 Last Update: 12-07-2006 Installs: 706
 
No support by the author.

This modification is no longer available or supported.

Flashchat integration with vBulletin 3.5

Note:
The latest versions of Flashchat include my integration as part of the standard Tufat supplied files - including the vBulletin 3.5 CMS file.



vB 3.5 integration allows ;

* Authorised members to be automatically logged in.
* All non authorised members are locked out (both are based on usergroup membership).
* If enabled, the users location is now displayed in WOL (use the plugin to avoid "Unknown Location").
* The CMS file no longer requires your vb licence code to be entered.
* Automatic login now works even if a member has not ticked "remember me".

Also ;

* Real ip detection when a proxy server is used (only if the proxy server passes on the details).
* Permanant, Private Rooms are loaded by Admins (and moderators in 4.5.0) (allows for Staff Rooms).


More notes:

* This integration is for Flashchat versions 4.7.0 upwards, support for versions prior to this has been withdrawn.
* If you use non standard usergroups you will need to edit the CMS file to give them permission to enter the chat.

[high]The CMS file assumes that you are installing Flashchat in your forum root folder - this is the same folder as your usercp.php file and includes folder. Installation will fail if you do not do this.[/high]

Support: Please check any file edits carefully, and make sure you have uploaded any edited files to the correct location - the vast majority of problems reported are due to an error made in editing [or uploading] a file. If you are still stuck and want me to take a look then feel free to PM me your site address, an admin user, and ftp access details, without these I cannot help you. I will then look as soon as I have time.

Finally, I am not Tufat.com nor anything to do with the Flashchat product - if you have questions about Flashchat in general, their forums are here.


History:

2.53 - Support for customer role added.
2.54 - GetUser caching added.
2.55 - Lastactivity update added, caching altered to match main flashchat code.
2.56 - Support for 4.5.x photo feature added with choice of avatar or profile picture.
2.57 - Changes for local language translations. Session cookie cleared on logout.
2.58 - Security fix: Integrated login code altered to cut out the use of insecure userid cookie.
2.59 - GetUser caching re-enabled, Port fix added for pre 3.5 RC3 versions of config.php
2.60 - Added the ability to login direct to a room using ../chat/flashchat.php?username=_int_&room=n
2.61 - Changes to User and Role Caching.
2.62 - Minor fix to Get User for membergroupids.
2.63 - Security (anti-hacking) code added (as supplied by Darren).
2.64 - Usergroup settings moved to top of CMS file.
2.65 - Fixed error message when accessing chat admin area.
2.66 - Default role changed.
2.67 - Minor bug fix to Avatar detection, login code changes, tidy up.

Show Your Support

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

Comments
  #352  
Old 11-03-2005, 02:58 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 Ramsesx
Is there anything in the acp where can change the options same as roomnames and so on paul? Sorry for asking but now I'm searching for a hour but don't find anything.
Thank you.
No. Flashchat has it's own admin system.
Reply With Quote
  #353  
Old 11-03-2005, 04:31 AM
ausnrl ausnrl is offline
 
Join Date: Oct 2005
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I Keep getting this error i keep changing it to what it says

Warning: main(/home/ausnrl/public_html/forums/../../../includes/config.php): failed to open stream: No such file or directory in /home/ausnrl/public_html/forums/flashchat.php on line 7

Fatal error: main(): Failed opening required '/home/ausnrl/public_html/forums/../../../includes/config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ausnrl/public_html/forums/flashchat.php on line 7

i tried
/home/ausnrl/public_html/forums/flashchat.php
/ausnrl/public_html/forums/flashchat.php

and i tried editing the xml
Reply With Quote
  #354  
Old 11-03-2005, 04:45 AM
DeepXP DeepXP is offline
 
Join Date: Apr 2005
Location: India
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well, it looks like you have vriable vbpath as well as relative path added in the config.php path string...

try somehing like this...

PHP Code:
require_once '/home/ausnrl/public_html/forums/includes/config.php'
in your vbulletin35CMS.php file


or simply

PHP Code:
require_once $vbpath '/config.php'
sine you have both in the forums folder.

Regards,
Deep
Reply With Quote
  #355  
Old 11-03-2005, 07:17 AM
ausnrl ausnrl is offline
 
Join Date: Oct 2005
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now we get this error

Fatal error: Cannot instantiate non-existent class: statement in /home/ausnrl/public_html/forums/flashchat.php on line 19
Reply With Quote
  #356  
Old 11-03-2005, 09:23 AM
DeepXP DeepXP is offline
 
Join Date: Apr 2005
Location: India
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay to me it looks like that you have just copied flashchat.php from chat folder to main forums folder...

Copy whole chat folder as it is in the forums folder so your flashchat.php will be in forums/chat/flashchat.php

and then you can edit the path of forum config file in vbulletin35CMS.php as

PHP Code:
 require_once '/home/ausnrl/public_html/forums/includes/config.php'
Regards,
Deep
Reply With Quote
  #357  
Old 11-03-2005, 03:42 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

Just follow the original instructions and notes (which clearly tell you to install flashchat inside your forums folder) so you will have a chat folder with your admincp/modcp/includes etc folders. No editing of any path is required if you do it right in the first place.
Reply With Quote
  #358  
Old 11-04-2005, 06:18 AM
ausnrl ausnrl is offline
 
Join Date: Oct 2005
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did that and i get an error with the statements
Reply With Quote
  #359  
Old 11-04-2005, 08:36 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

Well you seem to have have made a mistake somewhere. Please refer to the support section in the main post, and have a read of my signature.
Reply With Quote
  #360  
Old 11-05-2005, 01:17 AM
ausnrl ausnrl is offline
 
Join Date: Oct 2005
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok i did the install thing.Il copy my whole document

Code:
<?php

//	Paul M v2.51 - for vB 3.5.0 //
//  For Flashchat v4.4.1 and above only //

$vbpath = realpath(dirname(__FILE__));
require_once '/home/ausnrl/public_html/forums/includes/config.php';

class vBulletinCMS {

	var $userid;
	var $loginStmt;
	var $getUserStmt;
	var $getUsersStmt;
  
	function vBulletinCMS() 
	{
	    $this->getUserStmt =
        new Statement("SELECT userid AS id, password, salt FROM {$GLOBALS['vbulletin']['prefix']}user WHERE username=? LIMIT 1");
		$this->getUserStmt = 
		new Statement("SELECT userid AS id, username AS login, usergroupid, membergroupids FROM {$GLOBALS['vbulletin']['prefix']}user WHERE userid=? LIMIT 1");
		$this->getUsersStmt = 
		new Statement("SELECT userid AS id, username AS login, usergroupid FROM {$GLOBALS['vbulletin']['prefix']}user");
		$this->getUserForSession = 
		new Statement("SELECT userid FROM {$GLOBALS['vbulletin']['prefix']}session WHERE sessionhash=? ORDER BY lastactivity DESC LIMIT 1");
		$this->updateSessionForUser = 
		new Statement("UPDATE {$GLOBALS['vbulletin']['prefix']}session SET lastactivity=?, location='$_SERVER[REQUEST_URI]' WHERE userid=?");
		

		$this->userid = intval($_COOKIE[$GLOBALS['vbulletin']['cookie'] . 'flashuserid']);
		if($this->userid == 0)
		{ 
			$this->userid = intval($_COOKIE[$GLOBALS['vbulletin']['cookie'] . 'userid']);
			if($this->userid == 0)
			{ 
				$rs = $this->getUserForSession->process($_COOKIE[$GLOBALS['vbulletin']['cookie'] . 'sessionhash']); 
				if($rec = $rs->next()) 
				{
					$this->userid = intval($rec['userid']);
					setcookie($GLOBALS['vbulletin']['cookie'] . 'flashuserid', $this->userid);
				}
			}
			else
			{
				setcookie($GLOBALS['vbulletin']['cookie'] . 'flashuserid', $this->userid);
			}
		}
		if($_POST['t'] AND $GLOBALS['vbulletin']['sessupdate'] AND $this->userid > 0) $ru = $this->updateSessionForUser->process(time(),$this->userid);
		if($this->userid == 0) $this->userid == NULL; 
	}
  
//	Auto Login
	function isLoggedIn() 
	{
		if($this->userid > 0 AND $GLOBALS['vbulletin']['sessupdate']) $ru = $this->updateSessionForUser->process(time(),$this->userid);
		return $this->userid;
	}
  
//	Manual Login
	function login($login, $password) 
	{
		$rv = NULL;
		$login = utf8_to_entities($login);
		$rs = $this->loginStmt->process(utf8_decode($login));
		$rec = $rs->next();
		if($rs) 
		{
			$password = utf8_to_entities($password);
			if(($rec['password'] == md5(md5(utf8_decode($password)) . $rec['salt']))) $rv = $rec['id'];
		}
		if($rv > 0 AND $GLOBALS['vbulletin']['sessupdate']) $ru = $this->updateSessionForUser->process(time(),$rv);
		return $rv;
	}
  
  // performs logging out for actual user
	function logout() { }
  
	function getRoles($usergroupid) 
	{ 
		$groups = explode(',',$usergroupid); 
		$userrole = ROLE_NOBODY ; // Set default access 
		foreach ($GLOBALS['vbulletin']['users'] as $group) if (in_array($group,$groups)) $userrole = ROLE_USER; // Check Allowed groups 
		foreach ($GLOBALS['vbulletin']['mods'] as $group) if (in_array($group,$groups)) $userrole = ROLE_MODERATOR; // Check Moderator groups 
		foreach ($GLOBALS['vbulletin']['admin'] as $group) if (in_array($group,$groups)) $userrole = ROLE_ADMIN; // Check Admin groups 
		foreach ($GLOBALS['vbulletin']['banned'] as $group) if (in_array($group,$groups)) $userrole = ROLE_NOBODY; // Check Banned groups 
		return $userrole; 
	}   

	function getUser($userid) 
	{
		if(($rs = $this->getUserStmt->process($userid)) && ($rec = $rs->next())) 
		{
			$rec['usergroupid'] .= ",".$rec['membergroupids'] ; 
			$rec['roles'] = $this->getRoles($rec['usergroupid']); 
			$tagencoded = entities_to_utf8($rec['login']);
			if(strlen($rec['login']) > strlen($tagencoded)) $rec['login'] = $tagencoded;
			else $rec['login'] = utf8_encode($rec['login']);
			return $rec;
		}
		return null;
	}
  
  
  // returns an object of vBulletinUsersRS class - an iterator on all existing users/admins
	function getUsers() 
	{
		return $this->getUsersStmt->process();
	}
  
  
  // returns URL of user profile page for such user id or null if user not found
	function getUserProfile($userid) 
	{
		return ($this->userid == $userid) ? "../profile.php?do=editprofile" : "../member.php?u=$userid";
	}
  
	function userInRole($userid, $role) 
	{
		$user = $this->getUser($userid) ;
		if($role == $user['roles']) return true;
		return false;
	}
  
	function getGender($user) 
	{
		return NULL;        
	}
}

$GLOBALS['fc_config']['db'] = array(
	'base' => $config['Database']['dbname'],
	'user' => $config['MasterServer']['username'],
	'pass' => $config['MasterServer']['password'],
    'pref' => $GLOBALS['fc_config']['db']['pref'],
	'host' => $config['MasterServer']['servername'].":".$config['MasterServer']['port'],
);

$GLOBALS['vbulletin'] = array(
	'cookie' => $config['Misc']['cookieprefix'],
	'prefix' => $config['Database']['tableprefix'],

	'sessupdate' => true, // Update vB session table when user speaks.
	'users' => array( 2,9 ) , // vB usergroups allowed access to chat.
	'mods' => array( 5,7 ) , // vB usergroups allowed access as chat moderators.
	'admin' => array( 6 ) , // vB usergroups allowed access as chat administrators.
	'banned' => array( 1,8 ) , // vB usergroups banned from accessing the chat (requires updated sendLoginInfo.php to work).
);

$GLOBALS['fc_config']['cms'] = new vBulletinCMS();

//clear 'if moderator' message
foreach($GLOBALS['fc_config']['languages'] as $k => $v) 
{
	$GLOBALS['fc_config']['languages'][$k]['dialog']['login']['moderator'] = '';
}
?>
Reply With Quote
  #361  
Old 11-05-2005, 01:49 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

Sorry, but that really doesn't help.

As it says in the support section, if you want me to have a look then I need ftp access and an admin login to the forum, otherwise there is little I can do.
Reply With Quote
Reply

Thread Tools

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 08:08 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05011 seconds
  • Memory Usage 2,318KB
  • 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
  • (1)bbcode_code
  • (3)bbcode_php
  • (1)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
  • (3)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