vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Integration with vBulletin - Flashchat Integration for vB 3.6 (https://vborg.vbsupport.ru/showthread.php?t=120926)

charlesk 09-20-2006 06:05 PM

Thanks, Paul.

I've tried a couple of times now to update the product.. it still says it is version 3.05, and the file dates look old inside the ZIP....?

c

Paul M 09-20-2006 07:25 PM

Try clearing your local browser cache and then download it again, the zip file is correct, I just downloaded it and checked.

charlesk 09-20-2006 09:38 PM

Thanks, all set now. (Never had Firefox do that to me before so I never suspected...) --c

Spikeman 09-20-2006 10:41 PM

Excellent Paul, thanks, integrated like a dream :)

charlesk 09-21-2006 02:09 PM

Paul, my users now report that the "who's in chat" product is now not showing who is in chat... it used to work. Any ideas?

Appreciate your help. Thanks.

smoknz28 09-25-2006 04:42 AM

When in the Flashchat....users cannot use the dropdown menus in the navbar. The Flashchat blocks out the dropdown menus from displaying.

vB 3.6.1

Mark

Paul M 09-25-2006 07:56 AM

Yep, the frame blocks the menus. I'm afraid my knowledge of html does to stretch to knowning how to stop that, if anyone does, feel free to enlighten me.

delds 09-25-2006 02:19 PM

I am searching for the instructions on how to put the flashchat link into the navbar, I had it in their before that would only appear to logged in users, but during the last vbulletin upgrade I had to revert the navbar.

SCRIPT3R 09-25-2006 03:29 PM

Quote:

Originally Posted by delds
I am searching for the instructions on how to put the flashchat link into the navbar, I had it in their before that would only appear to logged in users, but during the last vbulletin upgrade I had to revert the navbar.

Code:

                <if condition="$show['member']">
                <td class="vbmenu_control"><a href="misc.php?do=flashchat">$vbphrase[flashchat]: $totalchatters</a></td>
                </if>

just remove the RED text if you don't want the number of active chatters to appear in your navbar.

SCRIPT3R 09-25-2006 03:40 PM

Quote:

Originally Posted by Paul M
Yep, the frame blocks the menus. I'm afraid my knowledge of html does to stretch to knowning how to stop that, if anyone does, feel free to enlighten me.

re: http://www.creations.nl/visual.html (check out the source code)

i'm thinking you would have to change the order of the DIV layer, so as to keep the navbar atop the flashchat.

here's another good links...

http://www.adobe.com/cfusion/knowled...fm?id=tn_15523

add this to your flash code:
<param name="wmode" value="transparent">

imported_Saleel 09-25-2006 04:18 PM

I was wondering, with FlashChat, is it possible to have three chat rooms? The default chat room (the main room) is limited so that only you can see what you type, and the other two rooms are password protected?

SCRIPT3R 09-25-2006 04:47 PM

Quote:

Originally Posted by imported_Saleel
I was wondering, with FlashChat, is it possible to have three chat rooms? The default chat room (the main room) is limited so that only you can see what you type, and the other two rooms are password protected?

yes... all configurable via the FC Admin.

voteforbird 09-25-2006 05:33 PM

Even after configuring the usergroups, everyone but the admins are getting denied. Any idea why?

SCRIPT3R 09-25-2006 06:23 PM

Quote:

Originally Posted by voteforbird
Even after configuring the usergroups, everyone but the admins are getting denied. Any idea why?

post up your CMS file so we can take a looksee.

voteforbird 09-25-2006 07:14 PM

2 is Registered Users. 25 is Premium Members. Admins work.
PHP Code:

<?php

    
if ( !defined'INC_DIR' ) ) {
        die( 
'hacking attempt' );
    }

/*

Version 3.02
By Paul M - this CMS file is For vBulletin 3.6.x and Flashchat 4.5.x (or above).

Recent changes ;
3.01 - First Version, based on vb 3.5 CMS file (v2.60).
3.02 - Changes to User and Role Caching to fix minor irritations.

*/

class vBulletinCMS
{
    
// Initialise CMS
    
function vBulletinCMS()
    {
        
$this->loginStmt = new Statement("SELECT userid AS id, password, salt FROM {$GLOBALS['vbulletin']['prefix']}user WHERE username=?");
        
$this->getUserStmt = new Statement("SELECT userid AS id, username AS login, usergroupid, membergroupids FROM {$GLOBALS['vbulletin']['prefix']}user WHERE userid=?");
        
$this->getUsersStmt = new Statement("SELECT userid AS id, username AS login, usergroupid FROM {$GLOBALS['vbulletin']['prefix']}user");
        
$this->getUserForSession = new Statement("SELECT * FROM {$GLOBALS['vbulletin']['prefix']}session WHERE sessionhash=? ORDER BY lastactivity DESC");
        
$this->updateLastactivityForUser = new Statement("UPDATE {$GLOBALS['vbulletin']['prefix']}user SET lastactivity=? WHERE userid=?");
        
$this->updateSessionForUser = new Statement("UPDATE {$GLOBALS['vbulletin']['prefix']}session SET lastactivity=?, location='$_SERVER[REQUEST_URI]' WHERE userid=?");
        
$this->getAvatar = new Statement("SELECT * FROM {$GLOBALS['vbulletin']['prefix']}customavatar WHERE userid = ? AND visible = 1");
        
$this->getPicture = new Statement("SELECT * FROM {$GLOBALS['vbulletin']['prefix']}customprofilepic WHERE userid = ? AND visible = 1");

        
$this->session $_COOKIE[$GLOBALS['vbulletin']['cookie'] . 'sessionhash'];
        if(
$_SESSION['fc_users_cache']['sessionhashid'] != $this->session)
        {
            
$rs $this->getUserForSession->process($this->session);
            if(
$rec $rs->next())
            {
                
$this->userid intval($rec['userid']);
                
$_SESSION['fc_users_cache']['sessionuserid'] = $this->userid;
                
$_SESSION['fc_users_cache']['sessionhashid'] = $this->session;
            }
        }
        else
        {
            
$this->userid $_SESSION['fc_users_cache']['sessionuserid'];
        }

        if(
$_POST['t'] AND $GLOBALS['vbulletin']['spkupdate'] AND intval($this->userid) > 0)
        {
            
$ru $this->updateSessionForUser->process(time(),$this->userid);
            
$ru $this->updateLastactivityForUser->process(time(),$this->userid);
        }
    }

    
// Auto Login
    
function isLoggedIn()
    {
        if(
$this->userid AND $GLOBALS['vbulletin']['logupdate'])
        {
            
$ru $this->updateSessionForUser->process(time(),$this->userid);
            
$ru $this->updateLastactivityForUser->process(time(),$this->userid);
        }
        unset (
$_SESSION['fc_users_cache'][$this->userid]);
        unset (
$_SESSION['fc_roles_cache'][$this->userid]);
        return 
$this->userid;
    }

    
// Manual Login
    
function login($login$password)
    {
        
$rv NULL;
        if (
$login == '_int_') return $this->userid;
        
$login utf8_to_entities($login);
        
$rs $this->loginStmt->process(utf8_decode($login));
        
$rec $rs->next();
        if(
$rs)
        {
            
$password utf8_to_entities($password);
            if((
$rec['password'] == md5(md5(utf8_decode($password)) . $rec['salt']))) $rv $rec['id'];
        }
        if(
$rv AND $GLOBALS['vbulletin']['logupdate'])
        {
            
$ru $this->updateSessionForUser->process(time(),$rv);
            
$ru $this->updateLastactivityForUser->process(time(),$rv);
        }
        unset (
$_SESSION['fc_users_cache'][$this->userid]);
        unset (
$_SESSION['fc_roles_cache'][$this->userid]);
        return 
$rv;
    }

    
// Logout
    
function logout()
    {
        
$_SESSION['fc_users_cache']['sessionhashid'] = '#';
        if(
$this->userid AND $GLOBALS['vbulletin']['logupdate'])
        {
            
$ru $this->updateSessionForUser->process(time(),$this->userid);
            
$ru $this->updateLastactivityForUser->process(time(),$this->userid);
        }
        return 
NULL;
    }

    
// Assign chat role
    
function getRoles($usergroupid)
    {
        
$groups explode(',',$usergroupid);
        
$userrole ROLE_NOBODY // Set default access
        
foreach ($GLOBALS['vbulletin']['users'] as $group) if (in_array($group,$groups)) $userrole ROLE_USER;
        if (
$GLOBALS['fc_config']['liveSupportMode'])
        {
            foreach (
$GLOBALS['vbulletin']['customer'] as $group) if (in_array($group,$groups)) $userrole ROLE_CUSTOMER;
        }
        foreach (
$GLOBALS['vbulletin']['mods'] as $group) if (in_array($group,$groups)) $userrole ROLE_MODERATOR;
        foreach (
$GLOBALS['vbulletin']['admin'] as $group) if (in_array($group,$groups)) $userrole ROLE_ADMIN;
        foreach (
$GLOBALS['vbulletin']['banned'] as $group) if (in_array($group,$groups)) $userrole ROLE_NOBODY;
        return 
$userrole;
    }

    
// Get user details
    
function getUser($userid)
    {
        if((
$rs $this->getUserStmt->process($userid)) && ($rec $rs->next()))
        {
            
$rec['usergroupid'] .= ",".$rec['membergroupids'] ;
            
$rec['roles'] = $this->getRoles($rec['usergroupid']);
            
$tagencoded entities_to_utf8($rec['login']);
            if(
strlen($rec['login']) > strlen($tagencoded)) $rec['login'] = $tagencoded;
            else 
$rec['login'] = utf8_encode($rec['login']);
            
$_SESSION['fc_users_cache'][$userid] = $rec;
            
$_SESSION['fc_roles_cache'][$userid] = $rec['roles'];
            return 
$rec;
        }
        return 
null;
    }

    
// Return all existing users
    
function getUsers()
    {
        return 
$this->getUsersStmt->process();
    }

    
// Returns URL of user profile page for such user id or null if user not found
    
function getUserProfile($userid)
    {
        return (
$this->userid == $userid) ? "../profile.php?do=editprofile" "../member.php?u=$userid";
    }

    
// Check if user is in a specific role
    
function userInRole($userid$role)
    {
        if(!
intval($userid))
        {
            return 
false;
        }
        
$user $this->getUser($userid) ;
        if(
$role == $user['roles']) return true;
        return 
false;
    }

    
// Get male or female
    
function getGender($user)
    {
        return 
NULL;
    }

    
// Get current profile picture or avatar
    // This function is only supported if you use the database storage method in vbulletin
    
function getPhoto($userid)
    {
        if(
$_SESSION['fc_users_cache'][$userid]['pid'] == $userid)
        {
            return 
$_SESSION['fc_users_cache'][$userid]['fpath'];
        }
        if(
$GLOBALS['vbulletin']['useavatar'])
        {
            
$rs $this->getAvatar->process($userid);
        }
        else
        {
            
$rs $this->getPicture->process($userid);
        }
        if((
$rec $rs->next()) == null) return '';
        
$fparts explode('.'$rec['filename']);
        
$fname  strtolower('$'.substr('000000'.$userid,-6).'$'.$rec['dateline'].'.'.$fparts[count($fparts)-1]);
        
$fpath  './images/cust_img/'.$fname;
        if(!
file_exists($fpath))
        {
            
$fp fopen($fpath'wb');
            
fwrite($fp$rec['filedata']);
            
fflush($fp);
            
fclose($fp);
        }
        
$_SESSION['fc_users_cache'][$userid]['pid'] = $userid;
        
$_SESSION['fc_users_cache'][$userid]['fpath'] = $fpath;
        return 
$fpath;
    }
}

// Get vb config.php
$vbpath realpath(dirname(__FILE__));
require_once 
$vbpath '/../../../includes/config.php';

// Clear moderator message
foreach($GLOBALS['fc_config']['languages'] as $k => $v)
{
    
$GLOBALS['fc_config']['languages'][$k]['dialog']['login']['moderator'] = '';
}

// Get settings from vbulletin config settings
$GLOBALS['fc_config']['db'] = array(
    
'base' => $config['Database']['dbname'],
    
'user' => $config['MasterServer']['username'],
    
'pass' => $config['MasterServer']['password'],
    
'pref' => $GLOBALS['fc_config']['db']['pref'],
    
'host' => $config['MasterServer']['servername'],
);

// Add tcp port if specified
if($config['MasterServer']['port'])
{
    
$GLOBALS['fc_config']['db']['host'] .= ':'.$config['MasterServer']['port'];
}

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

    
'spkupdate' => true// Update vBulletin when user speaks.
    
'logupdate' => true// Update vBulletin when user logs in/out.
    
'useavatar' => true// True = use custom avatar for flashchat photo feature, False = use custom profile picture.

    
'users' => array( 2,25 ) , // Usergroups allowed standard access to chat.
    
'mods' => array( 5,) , // Usergroups allowed access as chat moderators.
    
'admin' => array( ) , // Usergroups allowed access as chat administrators.
    
'banned' => array( 1,14 ) , // Usergroups banned from accessing the chat.
    
'customer' => array( ) , // Usergroups allowed access as customers (Live support mode only).
);

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

?>


Paul M 09-25-2006 08:40 PM

What is group 14 ?

Are you sure you have uploaded this to /chat/inc/cmses ?

voteforbird 09-25-2006 11:20 PM

Wow. I feel really dumb. Somehow it wasn't uploaded. I'm not a novice at this, so I should have known better. Thanks for the reminder…

Paul M 09-26-2006 01:31 AM

You're not the first (by a long way), hence why I ask. :)

Gripemaster 09-26-2006 01:38 AM

Hey Paul,

I just noticed this is an "updated" mod... but I'm not sure if it's been updated since you logged into my board and fixed my installation of another flashchat mod....because we were discussing where I went wrong in chat after you fixed it. How do I find out which version I have of this mod?

Paul M 09-26-2006 01:48 AM

Look in the ACP (Product Manager).

Gripemaster 09-26-2006 01:51 AM

LOL...DUH! Sorry, it's been a long weekend. Pardon the flatulence in my brain. Says I have version 3.05 of Flashchat Integration.

Paul M 09-26-2006 01:55 AM

I would suggest upgrading to 3.06 when you can, there is a small bug in 3.05 when trying to access the flashchat admin area.

Gripemaster 09-26-2006 02:07 AM

*Updated*

Thank you sir. Seems to be working fine and sez I got version 3.06. :)

charlesk 09-26-2006 03:29 PM

Quote:

Originally Posted by charlesk
Paul, my users now report that the "who's in chat" product is now not showing who is in chat... it used to work. Any ideas?

Appreciate your help. Thanks.

Hi Paul, just wondering if you have any ideas on this? Thanks. :)

Paul M 09-26-2006 06:53 PM

Not really, I have nothing to go on - there can be many reasons why something does not work. I assume you mean my mod, in which case you need to post in the correct thread, and also take note of the support notes in the main post of this thread.

Quote:

..... If you are still stuck and want me to take a look then feel free to PM me your site address, an admin user, and ftp access details, without these I cannot help you. I will look when I have time.

charlesk 09-26-2006 10:29 PM

Okay.. I had only asked here because after I found that issue with the admin login not working and you posted 3.06, when I updated to 3.06, that's when the other hack stopped working.

teedizz 09-28-2006 06:30 AM

NM, I got it to work. Thanks alot for this hack ;)

pokerie 09-28-2006 02:45 PM

Hi there,

I'm trying to get flashchat to fit with the site www.poker.ie

I've setup a testpage at: http://www.poker.ie/community/forums...r_ie_chat2.php

As you can see the chatbox isn't showing up. I've followed the instructions on http://www.tufat.com/docs/flashchat/sample.html

Any ideas on why it isn't showing?

Paul M 09-28-2006 02:53 PM

Sorry, no idea - your question should be posted on the Tufat forum as it is a Flashchat question, unrelated to this modification.

Doglet 09-30-2006 04:01 AM

I just got FlashChat running with vBulletin 3.6.1 last night, but I am unsure how to prevent certain user groups from using it. I know from reading that this part is the bit that does it.

PHP Code:

// vbulletin specific settings
$GLOBALS['vbulletin'] = array(
    
'cookie' => $config['Misc']['cookieprefix'],
    
'prefix' => $config['Database']['tableprefix'],
    
'spkupdate' => true// Update vBulletin when user speaks.
    
'logupdate' => true// Update vBulletin when user logs in/out.
    
'useavatar' => true// True = use custom avatar for flashchat photo feature, False = use custom profile picture.
    
'users' => explode(',',$users) , // Usergroups allowed standard access to chat.
    
'mods' => explode(',',$moderators) , // Usergroups allowed access as chat moderators.
    
'admin' => explode(',',$administrators) , // Usergroups allowed access as chat administrators.
    
'banned' => explode(',',$banned) , // Usergroups banned from accessing the chat.
    
'customer' => explode(',',$customers) , // Usergroups allowed access as customers.
); 

I noted that others have usergroup numbers where mine has things like (',',$customers). How do I alter this file so that it bans certain groups, and allows others and recognises the groups I have.

Also, if I do that and just reupload this vBulletin3CMS.php, will it just work or do I need to do a reinstall?

NeitherSparky 09-30-2006 04:12 AM

Quote:

Originally Posted by Doglet
I just got FlashChat running with vBulletin 3.6.1 last night, but I am unsure how to prevent certain user groups from using it.

I am not sure if this is what you're asking, but:

PHP Code:

// Usergroup Definitions
$users '#,#,#' 
$moderators '#,#' ;
$administrators '#' ;
$banned '#,#,#,#' ;

// Live support mode only
$customers '0' 

(I stuck # signs in there to show you where the numbers go)

It's up near the top. In older versions of the mod it was at the bottom and so it says in the readme file:

Quote:

If necessary, edit the vbulletin section at the bottom of the this file to change the usergroup access & options as required.
It still said that in the readme of the latest version which I dl'ed recently so I guess that needs to be changed. I was *very* confused until I found the code I was looking for, moved to the top. :)

Maksa 09-30-2006 04:54 AM

i m really confused. don't know anything before using this should i have to buy Flashchat from http://www.tufat.com ???

buying it from tufat is required?

Doglet 09-30-2006 05:43 AM

Thanks, yes I found them at the top of the cms file. All is well.
One more thing.

When FlashChat 4.7.2 installed, it put a FlashChat link in the QuickLinks dropdown in the nav bar. I have searched the navbar template and cant find any mention of the word flash or chat. I want a separate link on the navbar between FAQ and the Members List - where the Site Rules are on this forum. What is the code I need to add into the navbar to get to Flashchat from there?

[EDIT] It's OK, I've worked this one out myself. Sorry.

Doglet 09-30-2006 06:32 AM

What I do want to know though is that I read somewhere a hack to the ForumsHome template that allows you to show who's in chat. I have just spent half an hour looking and can't relocate the information. It mentioned the code to add as well as where to insert it. Anyone know?

GD_Mehmed Emre 09-30-2006 07:47 AM

I didn't understand how i can install this. Can you help me please? :(

Paul M 09-30-2006 08:27 AM

Quote:

Originally Posted by NeitherSparky
It's up near the top. In older versions of the mod it was at the bottom and so it says in the readme file:

It still said that in the readme of the latest version which I dl'ed recently so I guess that needs to be changed. I was *very* confused until I found the code I was looking for, moved to the top. :)

Oops, yes you're right, the readme needs to be changed. A new version of the CMS is due shortly so I'll fix the readme when I do that.

Paul M 09-30-2006 08:29 AM

Quote:

Originally Posted by Doglet
What I do want to know though is that I read somewhere a hack to the ForumsHome template that allows you to show who's in chat. I have just spent half an hour looking and can't relocate the information. It mentioned the code to add as well as where to insert it. Anyone know?

Who is chatting is a seperate mod ;

https://vborg.vbsupport.ru/showthread.php?t=121884

Gripemaster 09-30-2006 01:49 PM

Paul, I can't keep up with you. LOL!

Is this update just another simple import/overwrite of the XML like when I recently went from 3.0.5 to 3.0.6?

Thanks...love your mods. ;)

Paul M 09-30-2006 04:26 PM

Yes, (and replace your CMS file) but you don't need to upgrade unless you feel like it, it's just a minor internal code change.

Gripemaster 09-30-2006 04:36 PM

Thank you sir! :)


All times are GMT. The time now is 09:35 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02984 seconds
  • Memory Usage 1,985KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete