Jump to content

Integration Of Flashchat


Ninjakreborn

Recommended Posts

I have the software Flash Chat, I am trying to integrate it, into my system so it does an auto-login when they click to go to the chatroom (I still have to do this for the forum he is using, as well as the shopping cart)
Everythign is working, except when the chatroom function is called, it does absolutely nothing but doesn't show the chatroom, any advice?

I am having a problem integrating it into my website.

When they register for the site, I populate the user info for the chatroom automatically there with

[CODE] $sqlchat = "INSERT INTO totalchat_users (username, pw, nickname, fname, lname, gender, email, comments, validated) VALUES ('$emailaddress', '$password', '$chatusername', '$firstname', '$lastname', '$gender', '$emailaddress', 'comments here', '$validated');";
mysql_query($sqlchat);[/CODE]

That completely handles populating that table.

Then on another page, when they click the link, I created a temp file called gateway.php (The gateway between the site and the chatroom to prevent them having to login.

On this page I put the following (relevant code)

[CODE]<?php
// Note 3: Some notes on what is going on here
// The bottom is my standard auth checking script, inside of that is various bits of
// modified code pulled from some of the main files from the flash chat archive.  These are meant
// to automatically authenticate the user and provide a link to allow them direct access into the
// chat room, without having to relog into the website
if ($_SESSION['userinfo']['logged'] == "yes") { // main part 1if you are logged into the site, display date
// following inclusion is required, it contains all of flash chats functions, to be used
// to help me authenticate login automatically.
require_once($docroot . "/chats/inc/common.php"); // rewrote to match path

$params = array(); // starts parameter array
// below set's parameters to pass to flashchat
// get data from db to pass to parameters
$selectchat = "SELECT username, password, room FROM userinformation WHERE id = '$_SESSION[userinfo][id]';";
$querychat = mysql_query($selectchat);
if ($rowchat = mysql_fetch_array($querychat)) {
$params = array_merge($params, array(
'login' => $rowchat['username'],
'password' =>$rowchat['password'],
'lang'  => $_REQUEST['lang'],
'room'  => $_REQUEST['room']
));
// starts flash chat, with the above parameters custom built in
echo flashChatTag('50%', '50%', $params);
// end flashchat script to perform integration
}else {
echo "Problem compiling information for chatroom.<br />";
echo "Critical Error: Possible Hack Attempt.<br />";
}

}else { // main part 2: If not logged in at all, then display error, they must login first
echo "You must be Logged Into an account to get into the chatroom.<br />";
}
// Finish standard layout below here, no matter what the choice

?>[/CODE]
This is meant to check if they are logged into my site, then recover data from db, pass it to the parameter's, and from there I then call the function.

Well most of it works, but the chatroom itself
When I finally call the function, it comes up with a blank screen, well it shows my layout, but the whole area the chatroom is suppose to be comes up blank, is there a step I am missing?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.