Moderator: Integra Moderator
//your CMS system
<php>constArr = array( 'users' =>'phpbb_users', 'login' =>'username', 'id' =>'user_id', 'password' =>'user_password', 'roles' =>'user_id', 'encode_type' =>'md5', 'spy_fld' =>'user_id', 'spy_value' =>'100', 'profile_path'=>'http]} WHERE username=? AND user_password=md5(?) AND user_active<0>constArr['sessions']} WHERE session_id=?"); $this->configStmt = new Statement("SELECT * FROM {$GLOBALS['table_prefix']}config WHERE config_name='cookie_name'"); $this->getUserStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['id']}=? LIMIT 1"); $this->getUsersStmt = new Statement("SELECT * FROM {$this->constArr['users']} ORDER BY {$this->constArr['login']}"); $this->delStmt = new Statement("DELETE FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=?"); $encode_type = $this->constArr['encode_type']; switch( $encode_type ) { case 'md5' : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=MD5(?) LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, MD5(?))"); break; case 'mysql_pass' : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=PASSWORD(?) LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, PASSWORD(?))"); break; default : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=? LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, ?)"); break; } } //----------------------------------------------------------------------------------------- function isLoggedIn() { return $this->userid; } //----------------------------------------------------------------------------------------- function login($login, $password) { $this->userid = null; if($login && $password) { $encode_type = $this->constArr['encode_type']; $pass = $password; /* switch( $encode_type ) { case 'md5' : $pass = md5($password); break; default : $pass = $password; break; }*/ //Try to find user using provided login if(($rs = $this->loginStmt->process($login,$pass)) && ($rec = $rs->next())) { //if($rec[$this->constArr['password']] == $pass) $this->userid = $rec[$this->constArr['id']]; } else { //If not - autocreate user with such login and password if($this->autocreateUsers) { //$roles = ($password == $GLOBALS['fc_config']['adminPassword'])?ROLE_ADMIN:($GLOBALS['fc_config']['liveSupportMode']?ROLE_CUSTOMER:ROLE_USER); $ins = $this->addUserStmt->process($login, $pass); if( $ins != null && $ins == 0 ) { //we not know if id field is autoincrement $this->userid = login($login, $password); } elseif($ins != null) { $this->userid = $ins; } } } } return $this->userid; } //----------------------------------------------------------------------------------------- function logout() { if($this->constArr['logoff'] == 'true') $this->user = null; } //----------------------------------------------------------------------------------------- function getUser($userid) { if($userid) { $rs = $this->getUserStmt->process($userid); $usr = $rs->next(); $usr['login'] = $usr[$this->constArr['login']];//important! $usr['roles'] = $usr[$this->constArr['moderator_fld']] == $this->constArr['moderator_value'] ? ROLE_ADMIN : ($usr[$this->constArr['spy_fld']] == $this->constArr['spy_value'] ? ROLE_SPY : ROLE_USER); return $usr; } else { return null; } } //----------------------------------------------------------------------------------------- function getUsers() { $users = $this->getUsersStmt->process(); if( is_array($users) ) if( sizeof($users) > 0) foreach( $users as $k=>$v ) { $users['login'] = $users[$this->constArr['login']];//important! $users['roles'] = $users[$this->constArr['moderator_fld']] == $this->constArr['moderator_value'] ? ROLE_ADMIN : ($users[$this->constArr['spy_fld']] == $this->constArr['spy_value'] ? ROLE_SPY : ROLE_USER); } return $users; } //----------------------------------------------------------------------------------------- function getUserProfile($userid) { $spy_fld = $this->constArr['spy_fld']; $spy_val = $this->constArr['spy_value']; $user = $this->getUser($userid); if( $spy_fld != '' ) { if( $user[$spy_fld] == $spy_val ) return null; } extract($user); return "{$this->constArr['profile_path']}?mode=viewprofile&u={$user_id}"; } //----------------------------------------------------------------------------------------- function userInRole($userid, $role) { if($user = $this->getUser($userid)) { if($role == ROLE_ADMIN) { if( $user[$this->constArr['moderator_fld']] == $this->constArr['moderator_value']) return true; else return false; } if($role == ROLE_SPY) { if( $user[$this->constArr['spy_fld']] == $this->constArr['spy_value']) return true; else return false; } if($role == ROLE_USER) { return true;//??? } } return false; } function getGender($userid) { // 'M' for Male, 'F' for Female, NULL for undefined return NULL; } function addUser($login, $password, $roles) { $user = $this->loginStmt->process($login); if(($rec = $user->next()) != null) return $rec['id']; /* $encode_type = $this->constArr['encode_type']; $pass = $password; switch( $encode_type ) { case 'md5' : $pass = md5($password); break; default : $pass = $password; break; } */ return $this->addUserStmt->process($login, $password); } function deleteUser($login){ $this->delUserStmt->process($login); } } $GLOBALS['fc_config']['cms'] = new DefaultCMS(); //clear 'if moderator' message foreach($GLOBALS['fc_config']['languages'] as $k => $v) { $GLOBALS['fc_config']['languages'][$k]['dialog']['login']['moderator'] = ''; }?>
Do you mean that you can login without entering your username and password, or are you referring to the manual entry?"cleo";p="8357" wrote:thanks, got it to working, and the auto login does not work for me either. but if you go to chat/index.php and click on the auto login from there, it works.
This password is not necessarily the same as your IM password. It is defined in config.php, somewhere around line 65:and i cannot log in as admin, when i go to FlashChat Admin Panel i get
Could not grant admin role for this login and password.
any ideas how i can get in there and set up the chat rooms etc?
'adminPassword' => 'adminpass', //allows any user to login as a moderator - stateless CMS mode only
I am going to retract this statement. I think that password only applied to a stateless CMS. Go ahead and try it to be sure, but it does not work on mine."Dr. Bantham";p="8365" wrote:This password is not necessarily the same as your IM password. It is defined in config.php, somewhere around line 65.
I would not call this an auto login, since you are entering your username and password. The auto login would transfer this information instantly for users logged in. No worries - I was just confused a bit."cleo";p="8395" wrote:on, if you to to .../chat/index.php and am signed into my forum i cannot auto login where indicated and can auto login where indicated
Do you have full admin capabilities on the site, or are you only a Junior Admin or Moderator? Neither of the latter would give you access to FlashChat Admin.now when i login, there is not A beside my name, and i cannot log into the chat admin, but when my other admin logins, there is an A beside her name, and she can get into the chat admin.
//your CMS system
REPLACE NEXT LINE with]
CREATE: integramodCMS.php
ADD
[code] <php>constArr = array( 'users' =>'phpbb_users', 'login' =>'username', 'id' =>'user_id', 'password' =>'user_password', 'roles' =>'user_id', //'encode_type' =>'md5', use this for passwords filled in by users //'encode_type' =>'', use this for passwords pulled out of the DB 'encode_type' =>'', 'spy_fld' =>'user_id', 'spy_value' =>'100', 'profile_path'=>'../profile.php', 'profile_arg' =>'?mode=viewprofile&u={$user_id}', 'moderator_fld'=>'user_level', 'moderator_value'=>'2', 'admin_fld'=>'user_level', 'admin_value'=>'1', 'logoff' =>'false' ); $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE username=? AND user_password=md5(?) AND user_active<0>constArr['sessions']} WHERE session_id=?"); $this->configStmt = new Statement("SELECT * FROM {$GLOBALS['table_prefix']}config WHERE config_name='cookie_name'"); $this->getUserStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['id']}=? LIMIT 1"); $this->getUsersStmt = new Statement("SELECT * FROM {$this->constArr['users']} ORDER BY {$this->constArr['login']}"); $this->delStmt = new Statement("DELETE FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=?"); $encode_type = $this->constArr['encode_type']; switch( $encode_type ) { case 'md5' ]} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=MD5(?) LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, MD5(?))"); break; case 'mysql_pass' : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=PASSWORD(?) LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, PASSWORD(?))"); break; default : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=? LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, ?)"); break; } } //----------------------------------------------------------------------------------------- function isLoggedIn() { return $this->userid; } //----------------------------------------------------------------------------------------- function login($login, $password) { $this->userid = null; if($login && $password) { $encode_type = $this->constArr['encode_type']; $pass = $password; /* switch( $encode_type ) { case 'md5' : $pass = md5($password); break; default : $pass = $password; break; }*/ //Try to find user using provided login if(($rs = $this->loginStmt->process($login,$pass)) && ($rec = $rs->next())) { //if($rec[$this->constArr['password']] == $pass) $this->userid = $rec[$this->constArr['id']]; } else { //If not - autocreate user with such login and password if($this->autocreateUsers) { //$roles = ($password == $GLOBALS['fc_config']['adminPassword'])?ROLE_ADMIN:($GLOBALS['fc_config']['liveSupportMode']?ROLE_CUSTOMER:ROLE_USER); $ins = $this->addUserStmt->process($login, $pass); if( $ins != null && $ins == 0 ) { //we not know if id field is autoincrement $this->userid = login($login, $password); } elseif($ins != null) { $this->userid = $ins; } } } } return $this->userid; } //----------------------------------------------------------------------------------------- function logout() { if($this->constArr['logoff'] == 'true') $this->user = null; } //----------------------------------------------------------------------------------------- function getUser($userid) { if($userid) { $rs = $this->getUserStmt->process($userid); $usr = $rs->next(); $usr['login'] = $usr[$this->constArr['login']];//important! $usr['roles'] = ($usr[$this->constArr['admin_fld']] == $this->constArr['admin_value']) ? ROLE_ADMIN : ($usr[$this->constArr['moderator_fld']] == $this->constArr['moderator_value']) ? ROLE_MODERATOR : ($usr[$this->constArr['spy_fld']] == $this->constArr['spy_value'] ? ROLE_SPY : ROLE_USER); return $usr; } else { return null; } } //----------------------------------------------------------------------------------------- function getUsers() { $users = $this->getUsersStmt->process(); if( is_array($users) ) if( sizeof($users) > 0) foreach( $users as $k=>$v ) { $users['login'] = $users[$this->constArr['login']];//important! $users['roles'] = ($users[$this->constArr['admin_fld']] == $this->constArr['admin_value']) ? ROLE_ADMIN : ($users[$this->constArr['moderator_fld']] == $this->constArr['moderator_value']) ? ROLE_MODERATOR : ($users[$this->constArr['spy_fld']] == $this->constArr['spy_value'] ? ROLE_SPY : ROLE_USER); } return $users; } //----------------------------------------------------------------------------------------- function getUserProfile($userid) { $spy_fld = $this->constArr['spy_fld']; $spy_val = $this->constArr['spy_value']; $user = $this->getUser($userid); if( $spy_fld != '' ) { if( $user[$spy_fld] == $spy_val ) return null; } extract($user); return "{$this->constArr['profile_path']}?mode=viewprofile&u={$user_id}"; } //----------------------------------------------------------------------------------------- function userInRole($userid, $role) { if($user = $this->getUser($userid)) { if($role == ROLE_ADMIN) { if( $user[$this->constArr['admin_fld']] == $this->constArr['admin_value']) return true; else return false; } if($role == ROLE_MODERATOR) { if( $user[$this->constArr['moderator_fld']] == $this->constArr['moderator_value']) return true; else return false; } if($role == ROLE_SPY) { if( $user[$this->constArr['spy_fld']] == $this->constArr['spy_value']) return true; else return false; } if($role == ROLE_USER) { return true;//??? } } return false; } function getGender($userid) { // 'M' for Male, 'F' for Female, NULL for undefined return NULL; } function addUser($login, $password, $roles) { $user = $this->loginStmt->process($login); if(($rec = $user->next()) != null) return $rec['id']; /* $encode_type = $this->constArr['encode_type']; $pass = $password; switch( $encode_type ) { case 'md5' : $pass = md5($password); break; default : $pass = $password; break; } */ return $this->addUserStmt->process($login, $password); } function deleteUser($login){ $this->delUserStmt->process($login); } } $GLOBALS['fc_config']['cms'] = new DefaultCMS(); //clear 'if moderator' message foreach($GLOBALS['fc_config']['languages'] as $k => $v) { $GLOBALS['fc_config']['languages'][$k]['dialog']['login']['moderator'] = ''; }?> [/code]
for those who want to make a auto login page
OPEN includes/page_header.php
FIND:
[code] //// Generate logged in/logged out status// [/code]
BEFORE ADD] //insert variable USERNAME into smarty engine$template->assign_vars(array('USERNAME' => $userdata['username'],'PASSWORD' => $userdata['user_password'],'ID' => $userdata['user_id']));
<a><img></a> Or a tekst link can also be created just use "chat/flashchat.php?username={USERNAME}&password={PASSWORD}" as url
"cleo";p="8357" wrote:thanks, got it to working, and the auto login does not work for me either. but if you go to chat/index.php and click on the auto login from there, it works.
and i cannot log in as admin, when i go to FlashChat Admin Panel i get
Could not grant admin role for this login and password.
any ideas how i can get in there and set up the chat rooms etc?
i found this
http://www.tufat.com/docs/flashchat/admin.html
but i don't see where it tells you what file to edit, or where exactly to put the edit. sorry i am no good at this guys <img>
option to pull user_passwords out of the mysql DB
FIND
//your CMS system
REPLACE next line with:
'CMSsystem' => 'defaultUsrExtCMS',// defaultCMS - default CMS, blank - stateless CMS
'users' =>'phpbb_users',
"Dr. Bantham";p="8730" wrote:Skywalker, I am trying to utilize pulling the database username and password for autologin and I can not get it to work. I have made all of the edits, and the resultant URL does relay my username and what appears to be an encoded password. However, the page becomes white with no activity whatsoever. Any clues and to what the problem might be?
I am using the upgraded 2.0.20 version of phpBB within IntegraMOD and phpBB Security 1.0.3.
Certainly - and thanks for posting an update."Skywalker";p="8731" wrote:can you wait one day? i have edited the original file of flash chat phpBB2CMS.php and this is working for me now i will look if it is still working tomorow because the first time i used that CMS it was also only working for one day if it then still is working i will post the edited original file and then al the functions are working how they should be autologin normal login admin pannel login and so on
just give me 24 hours to check
<php>loginStmt = new Statement("SELECT user_id FROM {$GLOBALS['table_prefix']}users WHERE username=? AND user_password=md5(?) AND user_active<>0 LIMIT 1"); $this->loggedinStmt = new Statement("SELECT session_user_id as id FROM {$GLOBALS['table_prefix']}sessions WHERE session_id=?"); $this->configStmt = new Statement("SELECT config_value FROM {$GLOBALS['table_prefix']}config WHERE config_name='cookie_name'"); $this->getUserStmt = new Statement("SELECT user_id as id, username as login, user_level FROM {$GLOBALS['table_prefix']}users WHERE user_id=? AND user_active<>0 LIMIT 1"); $this->getUsersStmt = new Statement("SELECT user_id as id, username as login FROM {$GLOBALS['table_prefix']}users ORDER BY login"); $this->getPhotoStmt = new Statement("SELECT user_avatar FROM {$GLOBALS['table_prefix']}users WHERE user_id=? AND user_active<>0 LIMIT 1"); } function isLoggedIn() { $userdata = session_pagestart($GLOBALS['user_ip'], PAGE_FAQ); init_userprefs($userdata); return ($userdata['user_id'] > 0) ? $userdata['user_id'] ], $GLOBALS['user_ip'], PAGE_INDEX, FALSE, FALSE); return $rec['user_id']; } return null; } function logout() { /* $userdata = session_pagestart($GLOBALS['user_ip'], PAGE_FAQ); session_end($userdata['session_id'], $userdata['user_id']); */ } function getUser($userid) { if($userid == SPY_USERID) return null; //fwrite($GLOBALS['fp'], "llada a getuser:".print_r($userid, true)."n"); if($userid && ($rs = $this->getUserStmt->process($userid)) && ($rec = $rs->next())) { if ($rec['user_level'] >= 1) { if ($rec['user_level'] == 1) { $rec['roles'] = ROLE_ADMIN; $rec['user_level'] = ROLE_ADMIN; }else{ $rec['roles'] = ROLE_MODERATOR; $rec['user_level'] = ROLE_MODERATOR; } } elseif ($GLOBALS['fc_config']['liveSupportMode']) { $rec['roles'] = ROLE_CUSTOMER; $rec['user_level'] = ROLE_CUSTOMER; } else { $rec['roles'] = ROLE_USER; $rec['user_level'] = ROLE_USER; } //fwrite($GLOBALS['fp'], "rec:".print_r($rec, true)."n"); //$rec['login'] = utf8_encode( $rec['login'] );//umlavta characters fix return $rec; } else { return null; } } function getUsers() { return $this->getUsersStmt->process(); } function getUserProfile($userid) { if($user = $this->getUser($userid)) { return (($id = $this->isLoggedIn()) && ($id == $userid))?"../profile.php?mode=editprofile":"../profile.php?mode=viewprofile&u=$userid"; } else { return null; } } function getPhoto($userid) { $rs = $this->getPhotoStmt->process($userid); if(($rec = $rs->next()) == null) return ''; $fileExt = explode(',', $GLOBALS['fc_config']['photoloading']['allowFileExt']); $oldFile = './nick_image/' . $userid . '.'; $fs = reset($fileExt); while($fs) { if(file_exists($oldFile . $fs)) return $oldFile . $fs; $fs = next($fileExt); } return '../images/avatars/'.$rec['user_avatar']; } function userInRole($userid, $role) { if($user = $this->getUser($userid)) { return ($user['roles'] == $role); } return false; } function getGender($userid) { // 'M' for Male, 'F' for Female, NULL for undefined return NULL; }} $GLOBALS['fc_config']['db'] = array( 'host' => $dbhost, 'user' => (isset($dbuser) ? $dbuser : $dbuname), 'pass' => $dbpasswd, 'base' => $dbname, 'pref' => $table_prefix . "fc_", ); $GLOBALS['fc_config']['cms'] = new PhpBB2CMS(); //fwrite($GLOBALS['fp'], print_r($GLOBALS['fc_config'], true)); //clear 'if moderator' messageforeach($GLOBALS['fc_config']['languages'] as $k => $v) { $GLOBALS['fc_config']['languages'][$k]['dialog']['login']['moderator'] = ''; }?>
//your CMS system
<php>constArr = array( 'users' =>'phpbb_users', 'login' =>'username', 'id' =>'user_id', 'password' =>'user_password', 'roles' =>'user_id', 'encode_type' =>'md5', 'spy_fld' =>'user_id', 'spy_value' =>'100', 'profile_path'=>'http://www.ligotti.net/profile.php', 'profile_arg' =>'?mode=viewprofile&u={$user_id}', 'moderator_fld'=>'user_rank', 'moderator_value'=>'1', 'logoff' =>'false' ); $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE username=? AND user_password=md5(?) AND user_active<0>constArr['sessions']} WHERE session_id=?"); $this->configStmt = new Statement("SELECT * FROM {$GLOBALS['table_prefix']}config WHERE config_name='cookie_name'"); $this->getUserStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['id']}=? LIMIT 1"); $this->getUsersStmt = new Statement("SELECT * FROM {$this->constArr['users']} ORDER BY {$this->constArr['login']}"); $this->delStmt = new Statement("DELETE FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=?"); $encode_type = $this->constArr['encode_type']; switch( $encode_type ) { case 'md5' : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=MD5(?) LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, MD5(?))"); break; case 'mysql_pass' : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=PASSWORD(?) LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, PASSWORD(?))"); break; default : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=? LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, ?)"); break; } } //----------------------------------------------------------------------------------------- function isLoggedIn() { return $this->userid; } //----------------------------------------------------------------------------------------- function login($login, $password) { $this->userid = null; if($login && $password) { $encode_type = $this->constArr['encode_type']; $pass = $password; /* switch( $encode_type ) { case 'md5' : $pass = md5($password); break; default : $pass = $password; break; }*/ //Try to find user using provided login if(($rs = $this->loginStmt->process($login,$pass)) && ($rec = $rs->next())) { //if($rec[$this->constArr['password']] == $pass) $this->userid = $rec[$this->constArr['id']]; } else { //If not - autocreate user with such login and password if($this->autocreateUsers) { //$roles = ($password == $GLOBALS['fc_config']['adminPassword'])?ROLE_ADMIN:($GLOBALS['fc_config']['liveSupportMode']?ROLE_CUSTOMER:ROLE_USER); $ins = $this->addUserStmt->process($login, $pass); if( $ins != null && $ins == 0 ) { //we not know if id field is autoincrement $this->userid = login($login, $password); } elseif($ins != null) { $this->userid = $ins; } } } } return $this->userid; } //----------------------------------------------------------------------------------------- function logout() { if($this->constArr['logoff'] == 'true') $this->user = null; } //----------------------------------------------------------------------------------------- function getUser($userid) { if($userid) { $rs = $this->getUserStmt->process($userid); $usr = $rs->next(); $usr['login'] = $usr[$this->constArr['login']];//important! $usr['roles'] = $usr[$this->constArr['moderator_fld']] == $this->constArr['moderator_value'] ? ROLE_ADMIN : ($usr[$this->constArr['spy_fld']] == $this->constArr['spy_value'] ? ROLE_SPY : ROLE_USER); return $usr; } else { return null; } } //----------------------------------------------------------------------------------------- function getUsers() { $users = $this->getUsersStmt->process(); if( is_array($users) ) if( sizeof($users) > 0) foreach( $users as $k=>$v ) { $users['login'] = $users[$this->constArr['login']];//important! $users['roles'] = $users[$this->constArr['moderator_fld']] == $this->constArr['moderator_value'] ? ROLE_ADMIN : ($users[$this->constArr['spy_fld']] == $this->constArr['spy_value'] ? ROLE_SPY : ROLE_USER); } return $users; } //----------------------------------------------------------------------------------------- function getUserProfile($userid) { $spy_fld = $this->constArr['spy_fld']; $spy_val = $this->constArr['spy_value']; $user = $this->getUser($userid); if( $spy_fld != '' ) { if( $user[$spy_fld] == $spy_val ) return null; } extract($user); return "{$this->constArr['profile_path']}?mode=viewprofile&u={$user_id}"; } //----------------------------------------------------------------------------------------- function userInRole($userid, $role) { if($user = $this->getUser($userid)) { if($role == ROLE_ADMIN) { if( $user[$this->constArr['moderator_fld']] == $this->constArr['moderator_value']) return true; else return false; } if($role == ROLE_SPY) { if( $user[$this->constArr['spy_fld']] == $this->constArr['spy_value']) return true; else return false; } if($role == ROLE_USER) { return true;//??? } } return false; } function getGender($userid) { // 'M' for Male, 'F' for Female, NULL for undefined return NULL; } function addUser($login, $password, $roles) { $user = $this->loginStmt->process($login); if(($rec = $user->next()) != null) return $rec['id']; /* $encode_type = $this->constArr['encode_type']; $pass = $password; switch( $encode_type ) { case 'md5' : $pass = md5($password); break; default : $pass = $password; break; } */ return $this->addUserStmt->process($login, $password); } function deleteUser($login){ $this->delUserStmt->process($login); } } $GLOBALS['fc_config']['cms'] = new DefaultCMS(); //clear 'if moderator' message foreach($GLOBALS['fc_config']['languages'] as $k => $v) { $GLOBALS['fc_config']['languages'][$k]['dialog']['login']['moderator'] = ''; }?>
"Dr. Bantham";p="8930" wrote:Unfortunately, this is not working for me. I was confused at first, but apparently you have abandoned the first solution which used a new CMS file for IntegraMOD. I made the changes exactly as shown for the two files in the last post, but...
I get a white screen if I execute flashchat.php or flashchat.php?username={USERNAME}&password={PASSWORD}.
I get the following error when I execute index.php:
[code]Warning]
That fixed the error from index.php, but index.php now reverts to install.php, which results in an error message since this file was removed. Otherwise, the program is still behaving as before. It displays the percentage startup screen, goes to 100%, and then the screen goes white."Skywalker";p="8935" wrote:think i got the problem,
make sure you don't have spaces before
<php>
"Dr. Bantham";p="8938" wrote:That fixed the error from index.php, but index.php now reverts to install.php, which results in an error message since this file was removed. Otherwise, the program is still behaving as before. It displays the percentage startup screen, goes to 100%, and then the screen goes white."Skywalker";p="8935" wrote:think i got the problem,
make sure you don't have spaces before
<php>
"found it";p="8939" wrote:Hi
This is the info i used to install flash chat on integramod if it is of any use to anyone...
http://integrmod.com/home/viewtopic.php?p=45212#45212
and this is the code for a block
http://integrmod.com/home/viewtopic.php?p=53982#53982
'moderator_fld'=>'user_rank', 'moderator_value'=>'1',
"Dr. Bantham";p="8936" wrote:I have two installations of FlashChat. One is for testing, though I tried this solution on both.
http://www.ligotti.net/flashchat/
It has been working previously (manual login) with the following defaultUsrExtCMS.php:I have the FlashChat database installed into the IntegraMOD database, with the prefix flashchat_.
- Code: Select all
<php>constArr = array( 'users' =>'phpbb_users', 'login' =>'username', 'id' =>'user_id', 'password' =>'user_password', 'roles' =>'user_id', 'encode_type' =>'md5', 'spy_fld' =>'user_id', 'spy_value' =>'100', 'profile_path'=>'http://www.ligotti.net/profile.php', 'profile_arg' =>'?mode=viewprofile&u={$user_id}', 'moderator_fld'=>'user_rank', 'moderator_value'=>'1', 'logoff' =>'false' ); $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE username=? AND user_password=md5(?) AND user_active<0>constArr['sessions']} WHERE session_id=?"); $this->configStmt = new Statement("SELECT * FROM {$GLOBALS['table_prefix']}config WHERE config_name='cookie_name'"); $this->getUserStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['id']}=? LIMIT 1"); $this->getUsersStmt = new Statement("SELECT * FROM {$this->constArr['users']} ORDER BY {$this->constArr['login']}"); $this->delStmt = new Statement("DELETE FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=?"); $encode_type = $this->constArr['encode_type']; switch( $encode_type ) { case 'md5' : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=MD5(?) LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, MD5(?))"); break; case 'mysql_pass' : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=PASSWORD(?) LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, PASSWORD(?))"); break; default : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=? LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, ?)"); break; } } //----------------------------------------------------------------------------------------- function isLoggedIn() { return $this->userid; } //----------------------------------------------------------------------------------------- function login($login, $password) { $this->userid = null; if($login && $password) { $encode_type = $this->constArr['encode_type']; $pass = $password; /* switch( $encode_type ) { case 'md5' : $pass = md5($password); break; default : $pass = $password; break; }*/ //Try to find user using provided login if(($rs = $this->loginStmt->process($login,$pass)) && ($rec = $rs->next())) { //if($rec[$this->constArr['password']] == $pass) $this->userid = $rec[$this->constArr['id']]; } else { //If not - autocreate user with such login and password if($this->autocreateUsers) { //$roles = ($password == $GLOBALS['fc_config']['adminPassword'])?ROLE_ADMIN:($GLOBALS['fc_config']['liveSupportMode']?ROLE_CUSTOMER:ROLE_USER); $ins = $this->addUserStmt->process($login, $pass); if( $ins != null && $ins == 0 ) { //we not know if id field is autoincrement $this->userid = login($login, $password); } elseif($ins != null) { $this->userid = $ins; } } } } return $this->userid; } //----------------------------------------------------------------------------------------- function logout() { if($this->constArr['logoff'] == 'true') $this->user = null; } //----------------------------------------------------------------------------------------- function getUser($userid) { if($userid) { $rs = $this->getUserStmt->process($userid); $usr = $rs->next(); $usr['login'] = $usr[$this->constArr['login']];//important! $usr['roles'] = $usr[$this->constArr['moderator_fld']] == $this->constArr['moderator_value'] ? ROLE_ADMIN : ($usr[$this->constArr['spy_fld']] == $this->constArr['spy_value'] ? ROLE_SPY : ROLE_USER); return $usr; } else { return null; } } //----------------------------------------------------------------------------------------- function getUsers() { $users = $this->getUsersStmt->process(); if( is_array($users) ) if( sizeof($users) > 0) foreach( $users as $k=>$v ) { $users['login'] = $users[$this->constArr['login']];//important! $users['roles'] = $users[$this->constArr['moderator_fld']] == $this->constArr['moderator_value'] ? ROLE_ADMIN : ($users[$this->constArr['spy_fld']] == $this->constArr['spy_value'] ? ROLE_SPY : ROLE_USER); } return $users; } //----------------------------------------------------------------------------------------- function getUserProfile($userid) { $spy_fld = $this->constArr['spy_fld']; $spy_val = $this->constArr['spy_value']; $user = $this->getUser($userid); if( $spy_fld != '' ) { if( $user[$spy_fld] == $spy_val ) return null; } extract($user); return "{$this->constArr['profile_path']}?mode=viewprofile&u={$user_id}"; } //----------------------------------------------------------------------------------------- function userInRole($userid, $role) { if($user = $this->getUser($userid)) { if($role == ROLE_ADMIN) { if( $user[$this->constArr['moderator_fld']] == $this->constArr['moderator_value']) return true; else return false; } if($role == ROLE_SPY) { if( $user[$this->constArr['spy_fld']] == $this->constArr['spy_value']) return true; else return false; } if($role == ROLE_USER) { return true;//??? } } return false; } function getGender($userid) { // 'M' for Male, 'F' for Female, NULL for undefined return NULL; } function addUser($login, $password, $roles) { $user = $this->loginStmt->process($login); if(($rec = $user->next()) != null) return $rec['id']; /* $encode_type = $this->constArr['encode_type']; $pass = $password; switch( $encode_type ) { case 'md5' : $pass = md5($password); break; default : $pass = $password; break; } */ return $this->addUserStmt->process($login, $password); } function deleteUser($login){ $this->delUserStmt->process($login); } } $GLOBALS['fc_config']['cms'] = new DefaultCMS(); //clear 'if moderator' message foreach($GLOBALS['fc_config']['languages'] as $k => $v) { $GLOBALS['fc_config']['languages'][$k]['dialog']['login']['moderator'] = ''; }?>
I changed this section to match identically with the lines in config.srv.php. The index.php page now displays correctly, but a manual login freezes up at the login background screen. Executing flashchat.php results in the same freeze. I am not using the variable pass extensions ?username={USERNAME}&password={PASSWORD}, as I assume these were abandoned with the new CMS you created."Skywalker";p="8943" wrote:yust thinking about this...
open phpBB2CMS
and find
[code] $GLOBALS['fc_config']['db'] = array( 'host' => $dbhost, 'user' => (isset($dbuser) ? $dbuser ]
edit that if needed and this should work for you
I am not following this statement entirely. My table prefix for flashchat is flashchat_, not phpbb_flashchat_. Could this be the problem?"Skywalker";p="8943" wrote:remind like this the db table is phpbb_fc_ if your board prefix is phpbb
hope your chat will work with this edit
"Dr. Bantham";p="8966" wrote:
hope your chat will work with this edit
I am not following this statement entirely. My table prefix for flashchat is flashchat_, not phpbb_flashchat_. Could this be the problem?
This did not work either - same result. Thanks so much for your continued help in the matter. Has anyone else tried this? There may be something specific to your installation that is simply not working in my environment. I am curious to see if anyone else can get it to work. Also, what version of FlashChat are you using?"Skywalker";p="8969" wrote:or rename your tables or use following code:
[code] $GLOBALS['fc_config']['db'] = array( 'host' => $dbhost, 'user' => (isset($dbuser) ? $dbuser ]
"Dr. Bantham";p="8972" wrote:This did not work either - same result. Thanks so much for your continued help in the matter. Has anyone else tried this? There may be something specific to your installation that is simply not working in my environment. I am curious to see if anyone else can get it to work. Also, what version of FlashChat are you using?"Skywalker";p="8969" wrote:or rename your tables or use following code:
[code] $GLOBALS['fc_config']['db'] = array( 'host' => $dbhost, 'user' => (isset($dbuser) ? $dbuser ]
if( $userid >= 90000 )
if($userid<90000) {
$num = mt_rand(0, 50000); $userid=90000+$num;
<php>loginStmt = new Statement("SELECT user_id FROM {$GLOBALS['table_prefix']}users WHERE username=? AND user_password=md5(?) AND user_active<>0 LIMIT 1"); $this->loggedinStmt = new Statement("SELECT session_user_id as id FROM {$GLOBALS['table_prefix']}sessions WHERE session_id=?"); $this->configStmt = new Statement("SELECT config_value FROM {$GLOBALS['table_prefix']}config WHERE config_name='cookie_name'"); $this->getUserStmt = new Statement("SELECT user_id as id, username as login, user_level FROM {$GLOBALS['table_prefix']}users WHERE user_id=? AND user_active<>0 LIMIT 1"); $this->getUsersStmt = new Statement("SELECT user_id as id, username as login FROM {$GLOBALS['table_prefix']}users ORDER BY login"); $this->getPhotoStmt = new Statement("SELECT user_avatar FROM {$GLOBALS['table_prefix']}users WHERE user_id=? AND user_active<>0 LIMIT 1"); } function isLoggedIn() { $userdata = session_pagestart($GLOBALS['user_ip'], PAGE_FAQ); init_userprefs($userdata);if( $userdata['user_id'] == -1 ) { mt_srand((double)microtime() * 1000000); $num = mt_rand(0, 50000); $userid=90000+$num; //return array('id' => $userid, 'login' => 'Guest'+$num, 'roles' => ROLE_CUSTOMER); $userdata['user_id']=$userid; $userdata['user_level']=ROLE_USER; $userdata['roles']=ROLE_USER; } return ($userdata['user_id'] > 0) ? $userdata['user_id'] ], $GLOBALS['user_ip'], PAGE_INDEX, FALSE, FALSE); return $rec['user_id']; } return null; } function logout() { /* $userdata = session_pagestart($GLOBALS['user_ip'], PAGE_FAQ); session_end($userdata['session_id'], $userdata['user_id']); */ } function getUser($userid) { if( $userid >= 90000 ) { //mt_srand((double)microtime() * 1000000); //$num = mt_rand(0, 50000); //$userid=90000+$num; $logname='Chatter'.$userid; return array('id' => $userid, 'login' => $logname, 'roles' => ROLE_USER); } if($userid == SPY_USERID) return null; //fwrite($GLOBALS['fp'], "llada a getuser:".print_r($userid, true)."n"); if($userid && ($rs = $this->getUserStmt->process($userid)) && ($rec = $rs->next())) { if ($rec['user_level'] >= 1) { if ($rec['user_level'] == 1) { $rec['roles'] = ROLE_ADMIN; $rec['user_level'] = ROLE_ADMIN; }else{ $rec['roles'] = ROLE_MODERATOR; $rec['user_level'] = ROLE_MODERATOR; } } elseif ($GLOBALS['fc_config']['liveSupportMode']) { $rec['roles'] = ROLE_CUSTOMER; $rec['user_level'] = ROLE_CUSTOMER; } else { $rec['roles'] = ROLE_USER; $rec['user_level'] = ROLE_USER; } //fwrite($GLOBALS['fp'], "rec:".print_r($rec, true)."n"); //$rec['login'] = utf8_encode( $rec['login'] );//umlavta characters fix return $rec; } else { return null; } } function getUsers() { return $this->getUsersStmt->process(); } function getUserProfile($userid) { if($user = $this->getUser($userid)) { return (($id = $this->isLoggedIn()) && ($id == $userid))?"../profile.php?mode=editprofile":"../profile.php?mode=viewprofile&u=$userid"; } else { return null; } } function getPhoto($userid) { $rs = $this->getPhotoStmt->process($userid); if(($rec = $rs->next()) == null) return ''; $fileExt = explode(',', $GLOBALS['fc_config']['photoloading']['allowFileExt']); $oldFile = './nick_image/' . $userid . '.'; $fs = reset($fileExt); while($fs) { if(file_exists($oldFile . $fs)) return $oldFile . $fs; $fs = next($fileExt); } return '../images/avatars/'.$rec['user_avatar']; } // function userInRole($userid, $role) {// if($user = $this->getUser($userid)) {// return ($user['roles'] == $role);// }// return false;// } function userInRole($userid, $role) { if($userid<90000>getUser($userid)) { return ($user['roles'] == $role); } return false; } } function getGender($userid) { // 'M' for Male, 'F' for Female, NULL for undefined return NULL; }} $GLOBALS['fc_config']['db'] = array( 'host' => $dbhost, 'user' => (isset($dbuser) ? $dbuser : $dbuname), 'pass' => $dbpasswd, 'base' => $dbname, 'pref' => $table_prefix . "fc_", ); $GLOBALS['fc_config']['cms'] = new PhpBB2CMS(); //fwrite($GLOBALS['fp'], print_r($GLOBALS['fc_config'], true)); //clear 'if moderator' messageforeach($GLOBALS['fc_config']['languages'] as $k => $v) { $GLOBALS['fc_config']['languages'][$k]['dialog']['login']['moderator'] = ''; }?>
'pref' => $table_prefix . "fc_",
I have not tried this one yet. However, perhaps it is worth pointing out that my flashchat table is based with "flashchat_" and has no prefix otherwise. In other words, it is not "phpbb_flashchat_" or "phpbb_fc". Perhaps this is my problem, or am I misunderstanding the intent of this statement?"Skywalker";p="9159" wrote:if you user another prefix then "yourboardprefix_fc_"
you need to edit
- Code: Select all
'pref' => $table_prefix . "fc_",
to your prefix to make this CMS file work
"Dr. Bantham";p="9163" wrote:I have not tried this one yet. However, perhaps it is worth pointing out that my flashchat table is based with "flashchat_" and has no prefix otherwise. In other words, it is not "phpbb_flashchat_" or "phpbb_fc". Perhaps this is my problem, or am I misunderstanding the intent of this statement?"Skywalker";p="9159" wrote:if you user another prefix then "yourboardprefix_fc_"
you need to edit
- Code: Select all
'pref' => $table_prefix . "fc_",
to your prefix to make this CMS file work
"Dr. Bantham";p="9165" wrote:That may very well be my problem. My previous installation was integrated via defaultUsrExtCMS which did not involve a phpBB installation, though it did install tables in the same database. I will re-install FlashChat to a new directory using the phpBB installation routine and see if it works. Thanks again.
<php> 0, //set to non-zero value to force loading previous messages since XXX minutes ago, upon login 'backtimeMax' => 5, //sets the maximum number of minutes the backtime command will serve up, use 0 to have no max. 'backMax' => 30, //sets the maximum number of lines the back command will serve up, use 0 to have no max. 'timeOffset' => 0, //sets server time offset (needed only to correct server timezone problem), minutes 'debug' => false, //set to true to run in debug mode 'version' => '4.5.7', //architecture release . feature release . patch release 'enableSocketServer' => false, //set to true to enable socket server - see online PDF docs for more details 'liveSupportMode' => false,//set to true to use chat in "Live Support" mode 'errorReports' => false,//set to true to enable error reports 'enableBots' => true, //set to true to enable Bots 'bot_ip' => '0.0.0.0', //virtual ip of bot 'hideSelfPopup' => false,//set to false to allow self popup menu 'showConfirmation'=> true, //set to true to allow confirmation popup window for admin (moderator) 'labelFormat' => "AVATAR[USER] TIMESTAMP: ", //possible values are any combinations of AVATAR, USER and TIMESTAMP 'timeStampFormat' => 'g:i a', //pattern for PHP date function 'loginsPerIP' => 10, // number of logins allowed per IP address 'disabledIRC' => '',// you can put list of IRC commands to disable here, like 'back,backtime' 'mods' => 'addbot,removebot,startbot,killbot', //Moderators Restrictions (which IRC commands are disabled for Moderators) 'modsAdminRestrictions'=> 'bots,uninstall,connections,users', //Moderators Restrictions in admin section (admin.php), like 'bots,uninstall,connections,users' 'maxMessageSize' => 500, //maximum input text size, # characters 'maxMessageCount' => 100, //maximum number of the messages stored in the chat log 'userListAutoExpand' => false, //if true user list opens all the rooms with users in them 'showLogoutWindow' => true, // if false, then use only the ....src=logout.php method, but do not use the popup method at all 'logoutWindowDisplayTime' => 3, // in seconds 'floodInterval' => 1, // in seconds, the amount of time that must pass before the user posts another message 'inactivityInterval' => 24*60*60, // in seconds, if a user has FlashChat open for 'inactivityInterval' seconds, but they // do not type anything, then the user should be automatically logged-out of the chat // Note 60*60 - one hour 'splashWindow' => false, //splash non active chat window when new message is received //Rooms config 'defaultRoom' => 1, //primary key of room where all users go after login 'autoremoveAfter' => 30, //number of seconds before room is removed 'roomTitleFormat' => 'ROOM_LABEL - USER_COUNT', //format string for room title in userlist 'maxUsersPerRoom' => 50, 'listOrder' => 'MOD_THEN_AZ', // options: AZ, ENTRY, MOD_THEN_AZ, MOD_THEN_ENTRY, STATUS, MOD_STATUS // AZ = alphabetical order, A to Z // ENTRY = by order of entry only // MOD_THEN_AZ = same as AZ, but moderators at top // MOD_THEN_ENTRY = same as ENTRY, but moderators at top // STATUS = by order of 'status' (Here / Busy / Away / BRB) // MOD_STATUS = same as STATUS, but moderators at top //your CMS system 'CMSsystem' => 'phpBB2CMS',// defaultCMS - default CMS, blank - stateless CMS //Some systems use UTF-8 encoding for user names. If you are using some CMS systems with non-English character sets, you may need to enable UTF-8 decoding for user names. 'loginUTF8decode' => false,// possible values - true, false //option 'encryptPass' => 1,//option to encrypt user password for defaultCMS, can be 1 - encrypt and 0 - no encrypt //motd & welcome message flags 'auto_motd' => 0, // 1 for on, 0 for off (on means it is displayed upon chat entry) 'auto_topic' => 0, // 1 for on, 0 for off (on means it is displayed upon room entry) // Roles config 'adminPassword' => 'adminpass', //allows any user to login as a administrator - stateless CMS mode only 'moderatorPassword' => 'modpass', //allows any user to login as a moderator - stateless CMS mode only 'spyPassword' => 'spypass', //allows any user to login as a spy - stateless CMS mode only 'layouts' => array(), // do not change this //Sound config 'sound' => array( 'pan' => 0, // range from -100 to 100 (left ... right) 'volume' => 75, // default sound volume, in percent 'muteAll' => false, // true = checked by default, false = unchecked 'muteSubmitMessage' => false, 'muteReceiveMessage' => false, 'muteOtherUserEnters' => false, 'muteLeaveRoom' => false, 'muteRoomOpenClose' => false, 'muteInitialLogin' => false, 'muteLogout' => false, 'muteComboListOpenClose' => false, 'muteUserBannedBooted' => true, 'muteInvitationReceived' => false, 'mutePrivateMessageReceived' => false, 'muteUserMenuMouseOver' => false, 'mutePopupWindowOpen' => false, 'mutePopupWindowCloseMin' => false, 'muteEnterRoom' => true, 'mutePressButton' => true ), //Themes config 'themes' => array(), 'defaultTheme' => 'macintosh', //Skins config (available skins in /inc/skins; example: 'defaultSkin' => <swf_name>) 'skin' => array(), 'defaultSkin' => 'aqua_skin', //Text config 'text' => array( //defaults (presence : is that option visible or hiden) 'itemToChange' => array( 'myTextColor' => false, 'mainChat' => array( 'presence' => true, 'fontSize' => 13, 'fontFamily' => 'Arial'), 'interfaceElements' => array( 'presence' => true, 'fontSize' => 13, 'fontFamily' => 'Arial'), 'title' => array( 'presence' => true, 'fontSize' => 13, 'fontFamily' => 'Arial') ), //posible values (to add new value just type something like this : 'itm10' => 25) 'fontSize' => array( 'itm0' => 8, 'itm1' => 9, 'itm2' => 10, 'itm3' => 11, 'itm4' => 12, 'itm5' => 13, 'itm6' => 14, 'itm7' => 16, 'itm8' => 18, 'itm9' => 20 ), 'fontFamily' => array( 'itm0' => 'Arial', 'itm1' => 'Times', 'itm2' => 'Courier', 'itm3' => 'Verdana', 'itm4' => 'Georgia' ), ), //Preloader config 'preloader' => array( 'text' => array( 'settings' => 'Loading settings...', 'smilies' => 'Loading smiles....', 'mainchat' => 'Loading main chat window...', 'starting' => 'Starting chat system...', 'okText' => 'OK' ), 'fontFamily' => 'Verdana', 'fontSize' => '11', 'fontColor' => 0x000000, 'BGColor' => 0xFFFFFF, 'barColor' => 0x000000 ), //Language config. For some languages like Japanese or Chinese. //This option allows ctrl+enter vs enter and always enables the send button. 'special_language' => array( 'itm0' => 'jp', 'itm1' => 'cn' ), //Smile settings //To disable any smilie, comment or delete the appropriate line. 'smiles' => array( 'smi_smile' => ':) <s><img><s>', 'smi_sad' => ':( <s><img><s>', 'smi_wink' => ';) <s><img><s>', 'smi_laugh' => ':D <s><img><s>', 'smi_red' => ':red:', 'smi_tongue' => ':p :-p', 'smi_ask' => ':? <s><img><s>', 'smi_awe' => ':awe:', 'smi_baby' => ':baby:', 'smi_cool' => '8) <s8><img><s8>', 'smi_evil' => ':evil:', //'smi_finger' => ':finger:', 'smi_grin' => ':grin:', 'smi_heart' => ':heart:', 'smi_kiss' => ':kiss:', 'smi_newline' => ':break:', 'smi_ninja' => ':ninja:', 'smi_roll' => ':roll:', 'smi_roll_eyes' => ':rolleyes:', 'smi_slash' => ':! :-!', 'smi_sleep' => ':zzz:', 'smi_weird' => ':weird:', 'smi_whistle' => ':whistle:', 'smi_wonder' => '8s', //addon 1 'smi_call' => ':call:', 'smi_cash' => ':cash:', 'smi_shock' => ':shock:', 'smi_check' => ':check:', //addon 2 'smi_ball' => ':ball:', 'smi_clap' => ':clap:', 'smi_cry' => ':cry:', 'smi_luck' => ':luck:', 'smi_nono' => ':nono:', 'smi_punch' => ':Punch:', 'smi_skull' => ':skull:', 'smi_yeah' => ':yeah:', 'smi_yinyang' => ':69:', //addon 3 'smi_earth' => ':earth:', 'smi_huh' => ':huh:', 'smi_hypno' => ':hypno:', 'smi_java' => ':java:', 'smi_no' => ':no:', 'smi_rain' => ':rain:', 'smi_rose' => ':rose:', 'smi_usa' => ':usa:', //addon 4 'smi_big_grin' => ':biggrin:', 'smi_faint' => ':faint:', 'smi_ill_content' => ':mean:', 'smi_meow' => ':cat:', 'smi_thumbs_down' => ':down:', 'smi_thumbs_up' => ':up:', 'smi_woof' => ':dog:', 'smi_beer' => ':beer:', 'smi_music' => ':music:', 'smi_reading' => ':read:', 'smi_word_bubble' => ':speak:', 'smi_female' => ':female:', 'smi_female2' => ':ms:', 'smi_male' => ':male:', 'smi_male2' => ':mr:', 'smi_admin' => ':admin:', 'smi_moderator' => ':mod:', 'smi_basketball' => ':bball:', 'smi_bowling' => ':bowl:', 'smi_cricket' => ':cricket:', 'smi_football' => ':fball:', 'smi_golf' => ':golf:', 'smi_hockey' => ':hockey:', 'smi_sailing' => ':sail:', 'smi_soccer' => ':soccer:', 'smi_tennis' => ':tennis:', 'smi_AustraliaFlag' => ':au:', 'smi_Brazil' => ':br:', 'smi_CanadaFlag' => ':ca:', 'smi_China' => ':cn:', 'smi_Spain' => ':es:', 'smi_European_Union' => ':eu:', 'smi_France' => ':fr:', 'smi_Germany' => ':de:', 'smi_Greece' => ':gr:', 'smi_IndianFlag' => ':in:', 'smi_Italy' => ':it:', 'smi_Japan' => ':jp:', 'smi_MexicoFlag' => ':mx:', 'smi_PolandFlag' => ':pl:', 'smi_PortugalFlag' => ':pt:', 'smi_Russia' => ':ru:', 'smi_Sweeden' => ':se:', 'smi_UkraineFlag' => ':ua:', 'smi_UK' => ':uk:', 'smi_US_Map' => ':us:', ), //Avatar settings 'avatars' => array( 'mod_only' => 'smi_admin,smi_moderator', // for standard users (& customers, if using support mode) 'user' => array( 'male' => array( 'mainchat' => array( 'default_value' => 'smi_male', // a smilie code 'default_state' => false, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), 'room' => array( 'default_value' => 'smi_male', // a smilie code 'default_state' => true, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), ), 'female' => array( 'mainchat' => array( 'default_value' => 'smi_female', // a smilie code 'default_state' => false, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), 'room' => array( 'default_value' => 'smi_female', // a smilie code 'default_state' => true, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), ), ), // for administrators 'admin' => array( 'male' => array( 'mainchat' => array( 'default_value' => 'smi_admin', // a smilie code 'default_state' => false, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), 'room' => array( 'default_value' => 'smi_admin', // a smilie code 'default_state' => true, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), ), 'female' => array( 'mainchat' => array( 'default_value' => 'smi_admin', // a smilie code 'default_state' => false, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), 'room' => array( 'default_value' => 'smi_admin', // a smilie code 'default_state' => true, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), ), ), // for moderators 'moderator' => array( 'male' => array( 'mainchat' => array( 'default_value' => 'smi_moderator', // a smilie code 'default_state' => false, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), 'room' => array( 'default_value' => 'smi_moderator', // a smilie code 'default_state' => true, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), ), 'female' => array( 'mainchat' => array( 'default_value' => 'smi_moderator', // a smilie code 'default_state' => false, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), 'room' => array( 'default_value' => 'smi_moderator', // a smilie code 'default_state' => true, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), ), ), ), //Message processing 'msgRequestInterval' => 3, //chat refresh time, seconds 'msgRequestIntervalAway' => 15, //chat refresh time in away state, seconds //NOTE: it should not be bigger than a half of autologoutAfter //otherwise your users risk being disconnected in away mode 'msgRemoveAfter' => 24*3600, //messages removed after this time, seconds //Connection processing 'autologoutAfter' => 60, //time of pooling inactivity after which user is considered logged off, seconds 'autocloseAfter' => 3600,//time of pooling inactivity after which connection is removed from database, seconds 'helpUrl' => 'http://tufat.com/docs/flashchat/index.html', //you can use also help.php //Ban processing 'autounbanAfter' => 36000, //time after user is un-banned, seconds //Language options 'languages' => array(), //do not change this 'defaultLanguage' => 'en', //two-letter code of the default language (see below) 'allowLanguage' => true, //allow user to choose another language 'base' => '', //Chat server options 'ChatOwner' => array( 1, // replace with your own values for user names //2, // look in users table for these values //3, // add extra lines if required, delete if you need less than 3 users in table ), 'commands' => array( 'showIP' => true, // show user IP and host at /who if set to true 'userPM' => true, // set to true to output list of user commands to a PM window, false to chat window 'adminPM' => true, // set to true to output list of moderator commands to a PM window, false to chat window 'maxRooms' => 8, // max number of Public Rooms ), //external sound options 'sound_options' => array( 'RingBell' => 'sounds/tin_can.mp3', 'LeaveRoom' => 'sounds/door_shut.mp3', 'OtherUserEnters' => 'sounds/jetsons.mp3', 'ReceiveMessage' => 'sounds/aol_receive_message.mp3', 'SubmitMessage' => 'sounds/aol_send_message.mp3', 'RoomOpenClose' => 'sounds/_default.mp3', 'InitialLogin' => 'sounds/harp_cord.mp3', 'Logout' => 'sounds/high_low_chord.mp3', 'ComboListOpenClose' => 'sounds/mouse_over_6.mp3', 'UserBannedBooted' => 'sounds/chime.mp3', 'InvitationReceived' => 'sounds/three_notes.mp3', 'PrivateMessageReceived' => 'sounds/aol_receive_message.mp3', 'UserMenuMouseOver' => 'sounds/mouse_over_1.mp3', 'PopupWindowOpen' => 'sounds/air_swoosh_2.mp3', 'PopupWindowCloseMin' => 'sounds/mouse_over_2.mp3', 'EnterRoom' => 'sounds/ta_da.mp3', 'PressButton' => 'sounds/activate_button.mp3' ), //--- //File sharing options // to disable file sharing, go to /inc/layouts/user.php and set allowFileShare to 'false' 'filesharing' => array( 'allowShareRoom' => false,//moderators can always share with all users in a room - this option is only for non-moderators 'allowShareChat' => false,//moderators can always share with all users in a chat - this option is only for non-moderators 'allowFileExt' => 'zip,rar,jpg,gif,sit,pdf',// allowed file extensions, comma separated (to allow all extensions set to '') 'maxFileSize' => 0.5*1024*1024,//max file size in bytes (2*1024*1024 equals 2 Mb) 'maxFileHoursLife' => 0.5, // time in hours to store the file on the server (file will be deleted after this time) ), 'avatarbgloading' => array( 'allowFileExt' => 'jpg,swf',// allowed file extensions, comma separated (to allow all extensions set to '') 'maxFileSize' => 0.5*1024*1024,//max file size in bytes (1024*1024 equals 1 Mb) 'maxFileHoursLife' => 24*31, // time in hours to store the file on the server (file will be deleted after this time) ), 'photoloading' => array( 'allowFileExt' => 'jpg,gif,png,swf',// allowed file extensions, comma separated (to allow all extensions set to '') 'maxFileSize' => 0.1*1024*1024,//max file size in bytes (1024*1024 equals 1 Mb) 'maxFileHoursLife' => 24*31, // time in hours to store the file on the server (file will be deleted after this time) ), //--- //Logout behavior 'logout' => array( 'close' => false, // if true, then FlashChat window is closed upon logout 'redirect' => false, // redirectURL must be a valid URL 'url' => 'http://www.tufat.com/chat.php', // 'redirect' must be set to true for this to work 'window' => '_blank', // the window to open into. possible values: _blank, _self, _parent, or a named window ), //--- //module settings (anchored SWF/JPG file) //banner.swf is a simple Flash banner ad, moduleText.swf is an advanced module with bi-directional communication between FlashChat and the module 'module' => array( 'anchor' => '0',//the anchor point: -1,0,1,2,3 or 4 (0=centered,1-4=corners of space below roomlist) + 5-12 points //anchor of -1 means that module will occupy a floating window (not anchored with flashchat template) 'path' => '',//set to '' to disable. To see how this works, use 'banner.swf' or 'moduleTest.swf' 'stretch' => 'true',// if true, anchored SWF is stretched horizontally & vertically to fill all available space 'float_x' => '300', // the default "x" position of the floating window (when anchor = -1) 'float_y' => '200', // the default "y" position of the floating window (when anchor = -1) 'float_w' => '200', // the default width of the floating window (when anchor = -1) 'float_h' => '300', // the default height of the floating window (when anchor = -1) ), // This 'module' block demonstrates how to load two modules simultaneously /* 'module' => array( 'anchor' => '0,-1',//the anchor point: -1,0,1,2,3 or 4 (0=centered,1-4=corners of space below roomlist) + 5-12 points //anchor of -1 means that module will occupy a floating window (not anchored with flashchat template) 'path' => 'modules/mp3_player/mp3player.swf,modules/mp3_player/mp3player.swf',//set to '' to disable. To see how this works, use 'banner.swf' or 'moduleTest.swf' 'stretch' => 'true,true',// if true, anchored SWF is stretched horizontally & vertically to fill all available space 'float_x' => '300,300', // the default "x" position of the floating window (when anchor = -1) 'float_y' => '200,200', // the default "y" position of the floating window (when anchor = -1) 'float_w' => '300,300', // the default width of the floating window (when anchor = -1) 'float_h' => '300,300', // the default height of the floating window (when anchor = -1) ), */ ); if(!$GLOBALS['fc_config_stop']) { require_once(INC_DIR . 'flashChatTag.php'); require_once(INC_DIR . 'layouts/admin.php'); require_once(INC_DIR . 'layouts/moderator.php'); require_once(INC_DIR . 'layouts/spy.php'); require_once(INC_DIR . 'layouts/user.php'); require_once(INC_DIR . 'layouts/customer.php'); //SKINS: To disable a skin, comment or delete the appropriate line require_once(INC_DIR . 'skins/default_skin.php'); require_once(INC_DIR . 'skins/xp_skin.php'); require_once(INC_DIR . 'skins/aqua_skin.php'); require_once(INC_DIR . 'skins/gradient_skin.php'); //THEMES: To disable a color theme, comment or delete the appropriate line require_once(INC_DIR . 'themes/xp.php'); require_once(INC_DIR . 'themes/macintosh.php'); require_once(INC_DIR . 'themes/gradient.php'); require_once(INC_DIR . 'themes/navy.php'); require_once(INC_DIR . 'themes/metallic.php'); require_once(INC_DIR . 'themes/tropical.php'); require_once(INC_DIR . 'themes/aqua.php'); require_once(INC_DIR . 'themes/olive.php'); require_once(INC_DIR . 'themes/pink.php'); require_once(INC_DIR . 'themes/oak.php'); require_once(INC_DIR . 'themes/black.php'); //LANGUAGES: To disable a language, comment or delete the appropriate line require_once(INC_DIR . 'langs/en.php'); //English require_once(INC_DIR . 'langs/gm.php'); //German require_once(INC_DIR . 'langs/si.php'); //Spanish - Informal require_once(INC_DIR . 'langs/sf.php'); //Spanish - Formal require_once(INC_DIR . 'langs/du.php'); //Dutch require_once(INC_DIR . 'langs/it.php'); //Italian //require_once(INC_DIR . 'langs/sv.php'); //Sweedish require_once(INC_DIR . 'langs/gr.php'); //Greek require_once(INC_DIR . 'langs/ru.php'); //Russian require_once(INC_DIR . 'langs/ua.php'); //Ukrainian require_once(INC_DIR . 'langs/he.php'); //Hebrew require_once(INC_DIR . 'langs/ar.php'); //Arabic require_once(INC_DIR . 'langs/tr.php'); //Turkish require_once(INC_DIR . 'langs/ro.php'); //Romanian //require_once(INC_DIR . 'langs/bg.php'); //Bulgarian require_once(INC_DIR . 'langs/pt.php'); //Portugal Portuguese require_once(INC_DIR . 'langs/br.php'); //Brazilian Portuguese require_once(INC_DIR . 'langs/fr.php'); //French require_once(INC_DIR . 'langs/lt.php'); //Lithuanian require_once(INC_DIR . 'langs/pl.php'); //Polish require_once(INC_DIR . 'langs/no.php'); //Norweigan require_once(INC_DIR . 'langs/da.php'); //Danish require_once(INC_DIR . 'langs/hu.php'); //Hungarian require_once(INC_DIR . 'langs/fi.php'); //Finnish require_once(INC_DIR . 'langs/sk.php'); //Slovak require_once(INC_DIR . 'langs/cz.php'); //Czech require_once(INC_DIR . 'langs/hr.php'); //Croatian require_once(INC_DIR . 'langs/th.php'); //Thai require_once(INC_DIR . 'langs/jp.php'); //Japanese require_once(INC_DIR . 'langs/tw.php'); //Chinese (BIG-5) require_once(INC_DIR . 'langs/cn.php'); //Chinese (GB) require_once(INC_DIR . 'langs/hi.php'); //Hindi require_once(INC_DIR . 'langs/kl.php'); //Klingon (fictional language) require_once(INC_DIR . 'langs/pg.php'); //Pig Latin (fictional language) } ?>
"Dr. Bantham";p="9203" wrote:The solution that Found It referred to is an entirely different installation approach. I had this one working with the exception of automatic login. Skywalker's solution is a different one which I can not get to function on my installation at all. I am anxious to get his approach to function as he appears to have it integrated - including the automatic login. If I recall correctly, you had FlashChat working just as I did - without the login. Correct? I did not write either integration, therefore it would not be appropriate for me to provide installation instructions, especially for the latter since it is not working for me.
"Dr. Bantham";p="9199" wrote:I installed the latest version of FlashChat and utilized the phpBB installation option, to no avail. I am still getting a freeze. I have tried both the manual and autostart login methods. Here is a copy of my config.php, which was generated upon installation:The database prefix is the standard phpbb_fc which was defined upon installation. I have installated to a subdirectory "flashchat" in lieu of "chat", but beyond this everything is vanilla. I am working with a fresh installation at this point, therefore I would imagine that this CMS will not work for other folks either.
- Code: Select all
<php> 0, //set to non-zero value to force loading previous messages since XXX minutes ago, upon login 'backtimeMax' => 5, //sets the maximum number of minutes the backtime command will serve up, use 0 to have no max. 'backMax' => 30, //sets the maximum number of lines the back command will serve up, use 0 to have no max. 'timeOffset' => 0, //sets server time offset (needed only to correct server timezone problem), minutes 'debug' => false, //set to true to run in debug mode 'version' => '4.5.7', //architecture release . feature release . patch release 'enableSocketServer' => false, //set to true to enable socket server - see online PDF docs for more details 'liveSupportMode' => false,//set to true to use chat in "Live Support" mode 'errorReports' => false,//set to true to enable error reports 'enableBots' => true, //set to true to enable Bots 'bot_ip' => '0.0.0.0', //virtual ip of bot 'hideSelfPopup' => false,//set to false to allow self popup menu 'showConfirmation'=> true, //set to true to allow confirmation popup window for admin (moderator) 'labelFormat' => "AVATAR[USER] TIMESTAMP: ", //possible values are any combinations of AVATAR, USER and TIMESTAMP 'timeStampFormat' => 'g:i a', //pattern for PHP date function 'loginsPerIP' => 10, // number of logins allowed per IP address 'disabledIRC' => '',// you can put list of IRC commands to disable here, like 'back,backtime' 'mods' => 'addbot,removebot,startbot,killbot', //Moderators Restrictions (which IRC commands are disabled for Moderators) 'modsAdminRestrictions'=> 'bots,uninstall,connections,users', //Moderators Restrictions in admin section (admin.php), like 'bots,uninstall,connections,users' 'maxMessageSize' => 500, //maximum input text size, # characters 'maxMessageCount' => 100, //maximum number of the messages stored in the chat log 'userListAutoExpand' => false, //if true user list opens all the rooms with users in them 'showLogoutWindow' => true, // if false, then use only the ....src=logout.php method, but do not use the popup method at all 'logoutWindowDisplayTime' => 3, // in seconds 'floodInterval' => 1, // in seconds, the amount of time that must pass before the user posts another message 'inactivityInterval' => 24*60*60, // in seconds, if a user has FlashChat open for 'inactivityInterval' seconds, but they // do not type anything, then the user should be automatically logged-out of the chat // Note 60*60 - one hour 'splashWindow' => false, //splash non active chat window when new message is received //Rooms config 'defaultRoom' => 1, //primary key of room where all users go after login 'autoremoveAfter' => 30, //number of seconds before room is removed 'roomTitleFormat' => 'ROOM_LABEL - USER_COUNT', //format string for room title in userlist 'maxUsersPerRoom' => 50, 'listOrder' => 'MOD_THEN_AZ', // options: AZ, ENTRY, MOD_THEN_AZ, MOD_THEN_ENTRY, STATUS, MOD_STATUS // AZ = alphabetical order, A to Z // ENTRY = by order of entry only // MOD_THEN_AZ = same as AZ, but moderators at top // MOD_THEN_ENTRY = same as ENTRY, but moderators at top // STATUS = by order of 'status' (Here / Busy / Away / BRB) // MOD_STATUS = same as STATUS, but moderators at top //your CMS system 'CMSsystem' => 'phpBB2CMS',// defaultCMS - default CMS, blank - stateless CMS //Some systems use UTF-8 encoding for user names. If you are using some CMS systems with non-English character sets, you may need to enable UTF-8 decoding for user names. 'loginUTF8decode' => false,// possible values - true, false //option 'encryptPass' => 1,//option to encrypt user password for defaultCMS, can be 1 - encrypt and 0 - no encrypt //motd & welcome message flags 'auto_motd' => 0, // 1 for on, 0 for off (on means it is displayed upon chat entry) 'auto_topic' => 0, // 1 for on, 0 for off (on means it is displayed upon room entry) // Roles config 'adminPassword' => 'adminpass', //allows any user to login as a administrator - stateless CMS mode only 'moderatorPassword' => 'modpass', //allows any user to login as a moderator - stateless CMS mode only 'spyPassword' => 'spypass', //allows any user to login as a spy - stateless CMS mode only 'layouts' => array(), // do not change this //Sound config 'sound' => array( 'pan' => 0, // range from -100 to 100 (left ... right) 'volume' => 75, // default sound volume, in percent 'muteAll' => false, // true = checked by default, false = unchecked 'muteSubmitMessage' => false, 'muteReceiveMessage' => false, 'muteOtherUserEnters' => false, 'muteLeaveRoom' => false, 'muteRoomOpenClose' => false, 'muteInitialLogin' => false, 'muteLogout' => false, 'muteComboListOpenClose' => false, 'muteUserBannedBooted' => true, 'muteInvitationReceived' => false, 'mutePrivateMessageReceived' => false, 'muteUserMenuMouseOver' => false, 'mutePopupWindowOpen' => false, 'mutePopupWindowCloseMin' => false, 'muteEnterRoom' => true, 'mutePressButton' => true ), //Themes config 'themes' => array(), 'defaultTheme' => 'macintosh', //Skins config (available skins in /inc/skins; example: 'defaultSkin' => <swf_name>) 'skin' => array(), 'defaultSkin' => 'aqua_skin', //Text config 'text' => array( //defaults (presence : is that option visible or hiden) 'itemToChange' => array( 'myTextColor' => false, 'mainChat' => array( 'presence' => true, 'fontSize' => 13, 'fontFamily' => 'Arial'), 'interfaceElements' => array( 'presence' => true, 'fontSize' => 13, 'fontFamily' => 'Arial'), 'title' => array( 'presence' => true, 'fontSize' => 13, 'fontFamily' => 'Arial') ), //posible values (to add new value just type something like this : 'itm10' => 25) 'fontSize' => array( 'itm0' => 8, 'itm1' => 9, 'itm2' => 10, 'itm3' => 11, 'itm4' => 12, 'itm5' => 13, 'itm6' => 14, 'itm7' => 16, 'itm8' => 18, 'itm9' => 20 ), 'fontFamily' => array( 'itm0' => 'Arial', 'itm1' => 'Times', 'itm2' => 'Courier', 'itm3' => 'Verdana', 'itm4' => 'Georgia' ), ), //Preloader config 'preloader' => array( 'text' => array( 'settings' => 'Loading settings...', 'smilies' => 'Loading smiles....', 'mainchat' => 'Loading main chat window...', 'starting' => 'Starting chat system...', 'okText' => 'OK' ), 'fontFamily' => 'Verdana', 'fontSize' => '11', 'fontColor' => 0x000000, 'BGColor' => 0xFFFFFF, 'barColor' => 0x000000 ), //Language config. For some languages like Japanese or Chinese. //This option allows ctrl+enter vs enter and always enables the send button. 'special_language' => array( 'itm0' => 'jp', 'itm1' => 'cn' ), //Smile settings //To disable any smilie, comment or delete the appropriate line. 'smiles' => array( 'smi_smile' => ':) <s><img><s>', 'smi_sad' => ':( <s><img><s>', 'smi_wink' => ';) <s><img><s>', 'smi_laugh' => ':D <s><img><s>', 'smi_red' => ':red:', 'smi_tongue' => ':p :-p', 'smi_ask' => ':? <s><img><s>', 'smi_awe' => ':awe:', 'smi_baby' => ':baby:', 'smi_cool' => '8) <s8><img><s8>', 'smi_evil' => ':evil:', //'smi_finger' => ':finger:', 'smi_grin' => ':grin:', 'smi_heart' => ':heart:', 'smi_kiss' => ':kiss:', 'smi_newline' => ':break:', 'smi_ninja' => ':ninja:', 'smi_roll' => ':roll:', 'smi_roll_eyes' => ':rolleyes:', 'smi_slash' => ':! :-!', 'smi_sleep' => ':zzz:', 'smi_weird' => ':weird:', 'smi_whistle' => ':whistle:', 'smi_wonder' => '8s', //addon 1 'smi_call' => ':call:', 'smi_cash' => ':cash:', 'smi_shock' => ':shock:', 'smi_check' => ':check:', //addon 2 'smi_ball' => ':ball:', 'smi_clap' => ':clap:', 'smi_cry' => ':cry:', 'smi_luck' => ':luck:', 'smi_nono' => ':nono:', 'smi_punch' => ':Punch:', 'smi_skull' => ':skull:', 'smi_yeah' => ':yeah:', 'smi_yinyang' => ':69:', //addon 3 'smi_earth' => ':earth:', 'smi_huh' => ':huh:', 'smi_hypno' => ':hypno:', 'smi_java' => ':java:', 'smi_no' => ':no:', 'smi_rain' => ':rain:', 'smi_rose' => ':rose:', 'smi_usa' => ':usa:', //addon 4 'smi_big_grin' => ':biggrin:', 'smi_faint' => ':faint:', 'smi_ill_content' => ':mean:', 'smi_meow' => ':cat:', 'smi_thumbs_down' => ':down:', 'smi_thumbs_up' => ':up:', 'smi_woof' => ':dog:', 'smi_beer' => ':beer:', 'smi_music' => ':music:', 'smi_reading' => ':read:', 'smi_word_bubble' => ':speak:', 'smi_female' => ':female:', 'smi_female2' => ':ms:', 'smi_male' => ':male:', 'smi_male2' => ':mr:', 'smi_admin' => ':admin:', 'smi_moderator' => ':mod:', 'smi_basketball' => ':bball:', 'smi_bowling' => ':bowl:', 'smi_cricket' => ':cricket:', 'smi_football' => ':fball:', 'smi_golf' => ':golf:', 'smi_hockey' => ':hockey:', 'smi_sailing' => ':sail:', 'smi_soccer' => ':soccer:', 'smi_tennis' => ':tennis:', 'smi_AustraliaFlag' => ':au:', 'smi_Brazil' => ':br:', 'smi_CanadaFlag' => ':ca:', 'smi_China' => ':cn:', 'smi_Spain' => ':es:', 'smi_European_Union' => ':eu:', 'smi_France' => ':fr:', 'smi_Germany' => ':de:', 'smi_Greece' => ':gr:', 'smi_IndianFlag' => ':in:', 'smi_Italy' => ':it:', 'smi_Japan' => ':jp:', 'smi_MexicoFlag' => ':mx:', 'smi_PolandFlag' => ':pl:', 'smi_PortugalFlag' => ':pt:', 'smi_Russia' => ':ru:', 'smi_Sweeden' => ':se:', 'smi_UkraineFlag' => ':ua:', 'smi_UK' => ':uk:', 'smi_US_Map' => ':us:', ), //Avatar settings 'avatars' => array( 'mod_only' => 'smi_admin,smi_moderator', // for standard users (& customers, if using support mode) 'user' => array( 'male' => array( 'mainchat' => array( 'default_value' => 'smi_male', // a smilie code 'default_state' => false, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), 'room' => array( 'default_value' => 'smi_male', // a smilie code 'default_state' => true, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), ), 'female' => array( 'mainchat' => array( 'default_value' => 'smi_female', // a smilie code 'default_state' => false, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), 'room' => array( 'default_value' => 'smi_female', // a smilie code 'default_state' => true, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), ), ), // for administrators 'admin' => array( 'male' => array( 'mainchat' => array( 'default_value' => 'smi_admin', // a smilie code 'default_state' => false, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), 'room' => array( 'default_value' => 'smi_admin', // a smilie code 'default_state' => true, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), ), 'female' => array( 'mainchat' => array( 'default_value' => 'smi_admin', // a smilie code 'default_state' => false, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), 'room' => array( 'default_value' => 'smi_admin', // a smilie code 'default_state' => true, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), ), ), // for moderators 'moderator' => array( 'male' => array( 'mainchat' => array( 'default_value' => 'smi_moderator', // a smilie code 'default_state' => false, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), 'room' => array( 'default_value' => 'smi_moderator', // a smilie code 'default_state' => true, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), ), 'female' => array( 'mainchat' => array( 'default_value' => 'smi_moderator', // a smilie code 'default_state' => false, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), 'room' => array( 'default_value' => 'smi_moderator', // a smilie code 'default_state' => true, // true = checked/on by default 'allow_override' => true, // if false, cannot be changed (combo box is disabled) ), ), ), ), //Message processing 'msgRequestInterval' => 3, //chat refresh time, seconds 'msgRequestIntervalAway' => 15, //chat refresh time in away state, seconds //NOTE: it should not be bigger than a half of autologoutAfter //otherwise your users risk being disconnected in away mode 'msgRemoveAfter' => 24*3600, //messages removed after this time, seconds //Connection processing 'autologoutAfter' => 60, //time of pooling inactivity after which user is considered logged off, seconds 'autocloseAfter' => 3600,//time of pooling inactivity after which connection is removed from database, seconds 'helpUrl' => 'http://tufat.com/docs/flashchat/index.html', //you can use also help.php //Ban processing 'autounbanAfter' => 36000, //time after user is un-banned, seconds //Language options 'languages' => array(), //do not change this 'defaultLanguage' => 'en', //two-letter code of the default language (see below) 'allowLanguage' => true, //allow user to choose another language 'base' => '', //Chat server options 'ChatOwner' => array( 1, // replace with your own values for user names //2, // look in users table for these values //3, // add extra lines if required, delete if you need less than 3 users in table ), 'commands' => array( 'showIP' => true, // show user IP and host at /who if set to true 'userPM' => true, // set to true to output list of user commands to a PM window, false to chat window 'adminPM' => true, // set to true to output list of moderator commands to a PM window, false to chat window 'maxRooms' => 8, // max number of Public Rooms ), //external sound options 'sound_options' => array( 'RingBell' => 'sounds/tin_can.mp3', 'LeaveRoom' => 'sounds/door_shut.mp3', 'OtherUserEnters' => 'sounds/jetsons.mp3', 'ReceiveMessage' => 'sounds/aol_receive_message.mp3', 'SubmitMessage' => 'sounds/aol_send_message.mp3', 'RoomOpenClose' => 'sounds/_default.mp3', 'InitialLogin' => 'sounds/harp_cord.mp3', 'Logout' => 'sounds/high_low_chord.mp3', 'ComboListOpenClose' => 'sounds/mouse_over_6.mp3', 'UserBannedBooted' => 'sounds/chime.mp3', 'InvitationReceived' => 'sounds/three_notes.mp3', 'PrivateMessageReceived' => 'sounds/aol_receive_message.mp3', 'UserMenuMouseOver' => 'sounds/mouse_over_1.mp3', 'PopupWindowOpen' => 'sounds/air_swoosh_2.mp3', 'PopupWindowCloseMin' => 'sounds/mouse_over_2.mp3', 'EnterRoom' => 'sounds/ta_da.mp3', 'PressButton' => 'sounds/activate_button.mp3' ), //--- //File sharing options // to disable file sharing, go to /inc/layouts/user.php and set allowFileShare to 'false' 'filesharing' => array( 'allowShareRoom' => false,//moderators can always share with all users in a room - this option is only for non-moderators 'allowShareChat' => false,//moderators can always share with all users in a chat - this option is only for non-moderators 'allowFileExt' => 'zip,rar,jpg,gif,sit,pdf',// allowed file extensions, comma separated (to allow all extensions set to '') 'maxFileSize' => 0.5*1024*1024,//max file size in bytes (2*1024*1024 equals 2 Mb) 'maxFileHoursLife' => 0.5, // time in hours to store the file on the server (file will be deleted after this time) ), 'avatarbgloading' => array( 'allowFileExt' => 'jpg,swf',// allowed file extensions, comma separated (to allow all extensions set to '') 'maxFileSize' => 0.5*1024*1024,//max file size in bytes (1024*1024 equals 1 Mb) 'maxFileHoursLife' => 24*31, // time in hours to store the file on the server (file will be deleted after this time) ), 'photoloading' => array( 'allowFileExt' => 'jpg,gif,png,swf',// allowed file extensions, comma separated (to allow all extensions set to '') 'maxFileSize' => 0.1*1024*1024,//max file size in bytes (1024*1024 equals 1 Mb) 'maxFileHoursLife' => 24*31, // time in hours to store the file on the server (file will be deleted after this time) ), //--- //Logout behavior 'logout' => array( 'close' => false, // if true, then FlashChat window is closed upon logout 'redirect' => false, // redirectURL must be a valid URL 'url' => 'http://www.tufat.com/chat.php', // 'redirect' must be set to true for this to work 'window' => '_blank', // the window to open into. possible values: _blank, _self, _parent, or a named window ), //--- //module settings (anchored SWF/JPG file) //banner.swf is a simple Flash banner ad, moduleText.swf is an advanced module with bi-directional communication between FlashChat and the module 'module' => array( 'anchor' => '0',//the anchor point: -1,0,1,2,3 or 4 (0=centered,1-4=corners of space below roomlist) + 5-12 points //anchor of -1 means that module will occupy a floating window (not anchored with flashchat template) 'path' => '',//set to '' to disable. To see how this works, use 'banner.swf' or 'moduleTest.swf' 'stretch' => 'true',// if true, anchored SWF is stretched horizontally & vertically to fill all available space 'float_x' => '300', // the default "x" position of the floating window (when anchor = -1) 'float_y' => '200', // the default "y" position of the floating window (when anchor = -1) 'float_w' => '200', // the default width of the floating window (when anchor = -1) 'float_h' => '300', // the default height of the floating window (when anchor = -1) ), // This 'module' block demonstrates how to load two modules simultaneously /* 'module' => array( 'anchor' => '0,-1',//the anchor point: -1,0,1,2,3 or 4 (0=centered,1-4=corners of space below roomlist) + 5-12 points //anchor of -1 means that module will occupy a floating window (not anchored with flashchat template) 'path' => 'modules/mp3_player/mp3player.swf,modules/mp3_player/mp3player.swf',//set to '' to disable. To see how this works, use 'banner.swf' or 'moduleTest.swf' 'stretch' => 'true,true',// if true, anchored SWF is stretched horizontally & vertically to fill all available space 'float_x' => '300,300', // the default "x" position of the floating window (when anchor = -1) 'float_y' => '200,200', // the default "y" position of the floating window (when anchor = -1) 'float_w' => '300,300', // the default width of the floating window (when anchor = -1) 'float_h' => '300,300', // the default height of the floating window (when anchor = -1) ), */ ); if(!$GLOBALS['fc_config_stop']) { require_once(INC_DIR . 'flashChatTag.php'); require_once(INC_DIR . 'layouts/admin.php'); require_once(INC_DIR . 'layouts/moderator.php'); require_once(INC_DIR . 'layouts/spy.php'); require_once(INC_DIR . 'layouts/user.php'); require_once(INC_DIR . 'layouts/customer.php'); //SKINS: To disable a skin, comment or delete the appropriate line require_once(INC_DIR . 'skins/default_skin.php'); require_once(INC_DIR . 'skins/xp_skin.php'); require_once(INC_DIR . 'skins/aqua_skin.php'); require_once(INC_DIR . 'skins/gradient_skin.php'); //THEMES: To disable a color theme, comment or delete the appropriate line require_once(INC_DIR . 'themes/xp.php'); require_once(INC_DIR . 'themes/macintosh.php'); require_once(INC_DIR . 'themes/gradient.php'); require_once(INC_DIR . 'themes/navy.php'); require_once(INC_DIR . 'themes/metallic.php'); require_once(INC_DIR . 'themes/tropical.php'); require_once(INC_DIR . 'themes/aqua.php'); require_once(INC_DIR . 'themes/olive.php'); require_once(INC_DIR . 'themes/pink.php'); require_once(INC_DIR . 'themes/oak.php'); require_once(INC_DIR . 'themes/black.php'); //LANGUAGES: To disable a language, comment or delete the appropriate line require_once(INC_DIR . 'langs/en.php'); //English require_once(INC_DIR . 'langs/gm.php'); //German require_once(INC_DIR . 'langs/si.php'); //Spanish - Informal require_once(INC_DIR . 'langs/sf.php'); //Spanish - Formal require_once(INC_DIR . 'langs/du.php'); //Dutch require_once(INC_DIR . 'langs/it.php'); //Italian //require_once(INC_DIR . 'langs/sv.php'); //Sweedish require_once(INC_DIR . 'langs/gr.php'); //Greek require_once(INC_DIR . 'langs/ru.php'); //Russian require_once(INC_DIR . 'langs/ua.php'); //Ukrainian require_once(INC_DIR . 'langs/he.php'); //Hebrew require_once(INC_DIR . 'langs/ar.php'); //Arabic require_once(INC_DIR . 'langs/tr.php'); //Turkish require_once(INC_DIR . 'langs/ro.php'); //Romanian //require_once(INC_DIR . 'langs/bg.php'); //Bulgarian require_once(INC_DIR . 'langs/pt.php'); //Portugal Portuguese require_once(INC_DIR . 'langs/br.php'); //Brazilian Portuguese require_once(INC_DIR . 'langs/fr.php'); //French require_once(INC_DIR . 'langs/lt.php'); //Lithuanian require_once(INC_DIR . 'langs/pl.php'); //Polish require_once(INC_DIR . 'langs/no.php'); //Norweigan require_once(INC_DIR . 'langs/da.php'); //Danish require_once(INC_DIR . 'langs/hu.php'); //Hungarian require_once(INC_DIR . 'langs/fi.php'); //Finnish require_once(INC_DIR . 'langs/sk.php'); //Slovak require_once(INC_DIR . 'langs/cz.php'); //Czech require_once(INC_DIR . 'langs/hr.php'); //Croatian require_once(INC_DIR . 'langs/th.php'); //Thai require_once(INC_DIR . 'langs/jp.php'); //Japanese require_once(INC_DIR . 'langs/tw.php'); //Chinese (BIG-5) require_once(INC_DIR . 'langs/cn.php'); //Chinese (GB) require_once(INC_DIR . 'langs/hi.php'); //Hindi require_once(INC_DIR . 'langs/kl.php'); //Klingon (fictional language) require_once(INC_DIR . 'langs/pg.php'); //Pig Latin (fictional language) } ?>
I also noticed that your last version of the CMS was not included in your post. Were there any other revisions other than the guest chat function? I do not wish to allow guests to chat.
"Dr. Bantham";p="9217" wrote:Skywalker,
I did miss the new CMS file in your post for some reason - sorry about that. I also apologize if I had offended or annoyed you in some manner - that was certainly not my intent. My last post was an attempt to explain to Cleo the process that was unfolding. I can understand your reaction otherwise, and thank you for your efforts in troubleshooting my attempts.
Having said that, has anyone else here managed to integrate Skywalker's FlashChat integration? Any clues as to why my attempts have fallen short?
<php>constArr['id']}=? LIMIT 1"); $this->getUsersStmt = new Statement("SELECT * FROM {$this->constArr['users']} ORDER BY {$this->constArr['login']}"); $this->delStmt = new Statement("DELETE FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=?"); $encode_type = $this->constArr['encode_type']; switch( $encode_type ) { case 'md5' : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=MD5(?) LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, MD5(?))"); break; case 'mysql_pass' : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=PASSWORD(?) LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, PASSWORD(?))"); break; default : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=? LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, ?)"); break; } } //----------------------------------------------------------------------------------------- function isLoggedIn() { return $this->userid; } //----------------------------------------------------------------------------------------- function login($login, $password) { $this->userid = null; if($login && $password) { $encode_type = $this->constArr['encode_type']; $pass = $password; /* switch( $encode_type ) { case 'md5' : $pass = md5($password); break; default : $pass = $password; break; }*/ //Try to find user using provided login if(($rs = $this->loginStmt->process($login,$pass)) && ($rec = $rs->next())) { //if($rec[$this->constArr['password']] == $pass) $this->userid = $rec[$this->constArr['id']]; } else { //If not - autocreate user with such login and password if($this->autocreateUsers) { //$roles = ($password == $GLOBALS['fc_config']['adminPassword'])?ROLE_ADMIN:($GLOBALS['fc_config']['liveSupportMode']?ROLE_CUSTOMER:ROLE_USER); $ins = $this->addUserStmt->process($login, $pass); if( $ins != null && $ins == 0 ) { //we not know if id field is autoincrement $this->userid = login($login, $password); } elseif($ins != null) { $this->userid = $ins; } } } } return $this->userid; } //----------------------------------------------------------------------------------------- function logout() { if($this->constArr['logoff'] == 'true') $this->user = null; } //----------------------------------------------------------------------------------------- function getUser($userid) { if($userid) { $rs = $this->getUserStmt->process($userid); $usr = $rs->next(); $usr['login'] = $usr[$this->constArr['login']];//important! $usr['roles'] = $usr[$this->constArr['admin_fld']] == $this->constArr['admin_value'] ? ROLE_ADMIN : ($usr[$this->constArr['spy_fld']] == $this->constArr['spy_value'] ? ROLE_SPY : ($usr[$this->constArr['moderator_fld']] == $this->constArr['moderator_value'] ? ROLE_MODERATOR : ROLE_USER)); return $usr; } else { return null; } } //----------------------------------------------------------------------------------------- function getUsers() { $users = $this->getUsersStmt->process(); if( is_array($users) ) if( sizeof($users) > 0) foreach( $users as $k=>$v ) { $users['login'] = $users[$this->constArr['login']];//important! $users['roles'] = $users[$this->constArr['admin_fld']] == $this->constArr['admin_value'] ? ROLE_ADMIN : ($users[$this->constArr['spy_fld']] == $this->constArr['spy_value'] ? ROLE_SPY : ($usr[$this->constArr['moderator_fld']] == $this->constArr['moderator_value'] ? ROLE_MODERATOR : ROLE_USER)); } return $users; } //----------------------------------------------------------------------------------------- function getUserProfile($userid) { $spy_fld = $this->constArr['spy_fld']; $spy_val = $this->constArr['spy_value']; $user = $this->getUser($userid); if( $spy_fld != '' ) { if( $user[$spy_fld] == $spy_val ) return null; } extract($user); return "{$this->constArr['profile_path']}?user={$user_id}"; } //----------------------------------------------------------------------------------------- function userInRole($userid, $role) { if($user = $this->getUser($userid)) { if($role == ROLE_ADMIN) { if( $user[$this->constArr['admin_fld']] == $this->constArr['admin_value']) return true; else return false; } if($role == ROLE_MODERATOR) { if( $user[$this->constArr['moderator_fld']] == $this->constArr['moderator_value']) return true; else return false; } if($role == ROLE_SPY) { if( $user[$this->constArr['spy_fld']] == $this->constArr['spy_value']) return true; else return false; } if($role == ROLE_USER) { return true;//??? } } return false; } function getGender($userid) { // 'M' for Male, 'F' for Female, NULL for undefined return NULL; } function addUser($login, $password, $roles) { $user = $this->loginStmt->process($login); if(($rec = $user->next()) != null) return $rec['id']; /* $encode_type = $this->constArr['encode_type']; $pass = $password; switch( $encode_type ) { case 'md5' : $pass = md5($password); break; default : $pass = $password; break; } */ return $this->addUserStmt->process($login, $password); } function deleteUser($login){ $this->delUserStmt->process($login); } } $GLOBALS['fc_config']['cms'] = new DefaultCMS(); //clear 'if moderator' message foreach($GLOBALS['fc_config']['languages'] as $k => $v) { $GLOBALS['fc_config']['languages'][$k]['dialog']['login']['moderator'] = ''; }?>
"found it";p="9335" wrote:hi
this is my defaultUsrExtCMS.php file which will run on an integramod forum but you will have to log in...it also excepts moderators and admin but you will have to change the profile path as it is set up on my local machine...
Obviously you do not need to use this if you do not want to but this does work....
- Code: Select all
<php>constArr['id']}=? LIMIT 1"); $this->getUsersStmt = new Statement("SELECT * FROM {$this->constArr['users']} ORDER BY {$this->constArr['login']}"); $this->delStmt = new Statement("DELETE FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=?"); $encode_type = $this->constArr['encode_type']; switch( $encode_type ) { case 'md5' : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=MD5(?) LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, MD5(?))"); break; case 'mysql_pass' : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=PASSWORD(?) LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, PASSWORD(?))"); break; default : $this->loginStmt = new Statement("SELECT * FROM {$this->constArr['users']} WHERE {$this->constArr['login']}=? AND {$this->constArr['password']}=? LIMIT 1"); $this->addUserStmt = new Statement("INSERT INTO {$this->constArr['users']} ({$this->constArr['login']}, {$this->constArr['password']}) VALUES(?, ?)"); break; } } //----------------------------------------------------------------------------------------- function isLoggedIn() { return $this->userid; } //----------------------------------------------------------------------------------------- function login($login, $password) { $this->userid = null; if($login && $password) { $encode_type = $this->constArr['encode_type']; $pass = $password; /* switch( $encode_type ) { case 'md5' : $pass = md5($password); break; default : $pass = $password; break; }*/ //Try to find user using provided login if(($rs = $this->loginStmt->process($login,$pass)) && ($rec = $rs->next())) { //if($rec[$this->constArr['password']] == $pass) $this->userid = $rec[$this->constArr['id']]; } else { //If not - autocreate user with such login and password if($this->autocreateUsers) { //$roles = ($password == $GLOBALS['fc_config']['adminPassword'])?ROLE_ADMIN:($GLOBALS['fc_config']['liveSupportMode']?ROLE_CUSTOMER:ROLE_USER); $ins = $this->addUserStmt->process($login, $pass); if( $ins != null && $ins == 0 ) { //we not know if id field is autoincrement $this->userid = login($login, $password); } elseif($ins != null) { $this->userid = $ins; } } } } return $this->userid; } //----------------------------------------------------------------------------------------- function logout() { if($this->constArr['logoff'] == 'true') $this->user = null; } //----------------------------------------------------------------------------------------- function getUser($userid) { if($userid) { $rs = $this->getUserStmt->process($userid); $usr = $rs->next(); $usr['login'] = $usr[$this->constArr['login']];//important! $usr['roles'] = $usr[$this->constArr['admin_fld']] == $this->constArr['admin_value'] ? ROLE_ADMIN : ($usr[$this->constArr['spy_fld']] == $this->constArr['spy_value'] ? ROLE_SPY : ($usr[$this->constArr['moderator_fld']] == $this->constArr['moderator_value'] ? ROLE_MODERATOR : ROLE_USER)); return $usr; } else { return null; } } //----------------------------------------------------------------------------------------- function getUsers() { $users = $this->getUsersStmt->process(); if( is_array($users) ) if( sizeof($users) > 0) foreach( $users as $k=>$v ) { $users['login'] = $users[$this->constArr['login']];//important! $users['roles'] = $users[$this->constArr['admin_fld']] == $this->constArr['admin_value'] ? ROLE_ADMIN : ($users[$this->constArr['spy_fld']] == $this->constArr['spy_value'] ? ROLE_SPY : ($usr[$this->constArr['moderator_fld']] == $this->constArr['moderator_value'] ? ROLE_MODERATOR : ROLE_USER)); } return $users; } //----------------------------------------------------------------------------------------- function getUserProfile($userid) { $spy_fld = $this->constArr['spy_fld']; $spy_val = $this->constArr['spy_value']; $user = $this->getUser($userid); if( $spy_fld != '' ) { if( $user[$spy_fld] == $spy_val ) return null; } extract($user); return "{$this->constArr['profile_path']}?user={$user_id}"; } //----------------------------------------------------------------------------------------- function userInRole($userid, $role) { if($user = $this->getUser($userid)) { if($role == ROLE_ADMIN) { if( $user[$this->constArr['admin_fld']] == $this->constArr['admin_value']) return true; else return false; } if($role == ROLE_MODERATOR) { if( $user[$this->constArr['moderator_fld']] == $this->constArr['moderator_value']) return true; else return false; } if($role == ROLE_SPY) { if( $user[$this->constArr['spy_fld']] == $this->constArr['spy_value']) return true; else return false; } if($role == ROLE_USER) { return true;//??? } } return false; } function getGender($userid) { // 'M' for Male, 'F' for Female, NULL for undefined return NULL; } function addUser($login, $password, $roles) { $user = $this->loginStmt->process($login); if(($rec = $user->next()) != null) return $rec['id']; /* $encode_type = $this->constArr['encode_type']; $pass = $password; switch( $encode_type ) { case 'md5' : $pass = md5($password); break; default : $pass = $password; break; } */ return $this->addUserStmt->process($login, $password); } function deleteUser($login){ $this->delUserStmt->process($login); } } $GLOBALS['fc_config']['cms'] = new DefaultCMS(); //clear 'if moderator' message foreach($GLOBALS['fc_config']['languages'] as $k => $v) { $GLOBALS['fc_config']['languages'][$k]['dialog']['login']['moderator'] = ''; }?>
My board is IntegraMOD 1.4.0 with upgrades installed through phpBB 2.0.20 and phpBB Security 1.0.3, if this should help."Skywalker";p="9328" wrote:i don't know of upgrades to phpbb2.0.20 made it work or any of my other mods.
"Dr. Bantham";p="9340" wrote:My board is IntegraMOD 1.4.0 with upgrades installed through phpBB 2.0.20 and phpBB Security 1.0.3, if this should help."Skywalker";p="9328" wrote:i don't know of upgrades to phpbb2.0.20 made it work or any of my other mods.
I'm definitely interested. I have been running the same CMS as found it and it works great - with the exception of the autologin. If you would manage to get that working I would be a happy camper indeed. <img>"Skywalker";p="9346" wrote:
iff someone is interested in this and want to use this function just let me know and i'm on it
think i can heave it ready already today
please note that the autologin is created for flashchat 4.5.7
"Dr. Bantham";p="9388" wrote:I'm definitely interested. I have been running the same CMS as found it and it works great - with the exception of the autologin. If you would manage to get that working I would be a happy camper indeed. <img>"Skywalker";p="9346" wrote:
iff someone is interested in this and want to use this function just let me know and i'm on it
think i can heave it ready already today
please note that the autologin is created for flashchat 4.5.7
"Dr. Bantham";p="9697" wrote:I tried the new FlashChat IM integration with password transfer, and I must have something off. It seems to be connecting to the database, as the link generated lists my unsername correctly, but the login box states "incorrect username or password". The URL generated has a long series of scrambled letters and numbers for the password element. If I manually type my password within the URL in place of the scrambled password, it logs in correctly. Therefore, I assume I have a setting incorrect which is not allowing for the translation of the encrypted password. This is a new installation of FlashChat which is installed within the IntegraMOD database with the phpbb_fc prefix. Any ideas? Thanks again for hanging in there with us!
"Dr. Bantham";p="9722" wrote:It works! I am ever grateful!
Though this next question does not fall into a standard integration, perhaps you can help with little effort. I am using a javascript menu system which is called from overallheader.tpl and it seems that the login variables are not transferred when I call the link from this javascript. Again, it works like a charm when linking through conventional means. Do you have an idea of how I can transfer the variables to a javascript routine?
Again, many thanks for the patience and effort of following through!
"MWE_001";p="33581" wrote:I stand to be corrected if Im wrong, BUT FlashChat is payware. Payware links can not be given out on this website due to copyrights and such. Freeware, and standard phpBB mods can be discussed and links given out.
I personally had a flashchat install as recent as 2 months ago up and running with no issues what so ever. I do believe the only issue I had was when right clicking a user, it was having difficulties finding the users profile, but otherwise it was great. Autologin and all worked accordingly. I however can not provide any links to view due to a dispute with me and the customer that I was hosting and doing all his custom work for. The website is no longer, and I could kick myself for not taking notes. <img> BUT I know it works good.
Registered users: App360MonitorBot, Bing [Bot], Google [Bot]