Welcome to Geeklog, Anonymous Friday, April 19 2024 @ 10:20 am EDT

Geeklog Forums

Flash Chat!!!!!


sam

Anonymous
I just installed flash chat and I wrapped around geeklog. I want to do some testing if this is feasible through my site. If you have some time come over and check it out here. I paid 5 bux for it, and I would love to see this fully incorporated into geeklog.
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
Hmmm, I don't know if it is a speed issue or what, but the chatroom isn't working for me on Safari or Firebird. It keeps telling me that I entered the room over and over and it won't let me send any messages.

The integration looks really nice, though. I hope you can get everything to run smoothly!
 Quote

sam

Anonymous
I been reading about flash player and safari. It seems to be a quicktime issue and should be fix in the next release of flash player. The work around that I cam across if u go into ur Library/Internet Plug-ins and put a space in Shockwave Flash NP-PPC.

So when safari starts the plugin loads before quicktime.....so far so good. I saw you at the chat room and tried to talk. Last msg you said "woo broke Safari. I tried to msg back til ur problem. I was using safari when u entered.
 Quote

Status: offline

paulmon

Forum User
Newbie
Registered: 11/22/03
Posts: 11

I've managed to integrate Flash Chat into my GL site. Feel free to check out what I did at http://www.somc.on.ca (you'll need an account) but generally here's what I did:

My specific variation has the Flash Chat running in a seperate pop-up window. This allows you to stay in chat while browsing the site and reading the forums.

Edited the config.php to match the colours to my site.

Edit the index.php and added:

/** Set to true if using Geeklog CMS. */
$useGeeklog = true;

if ( $useGeeklog ) {
require_once("../lib-common.php");
/** Uncomment below if you want to embed this **/
/* echo COM_siteHeader(); */
$lang = $defaultLanguage;
if ($name == "") {
$username = $_USER['username'];
}
}

My site automatically rewrites /USERNAME to bring up the profile so I modified the $popuppath to open http://www.somc.on.ca/USERNAME this automatically brings up the users profile when their name is clicked on in the chat.

I then added a block called "Chatter" that calls a function in lib-custom.php that block is below. This function tells you who's in chat and gives you a link that opens a pop-up with the chat window. Login is automatic thanks to the chagnes to index.php above. I'll make this an iframe so that the list of who's in the chat auto refreshes.

function phpblock_whochat() {

global $_CONF;
$query = mysql_query( "SELECT COUNT(ID) FROM chat_users WHERE NOW() - datetime $numchat = DB_fetchArray($query);
$numinchat = $numchat[0];
$userquery = mysql_query( "SELECT name FROM chat_users WHERE NOW() - datetime if ($numinchat > 0) {
while ($usersinchat = DB_fetchArray($userquery)) {
$retval = $retval . $usersinchat[name] . '
';
}
} else {
$retval .= 'Currently no users in chat';
}

$retval .= "
Join Chat";

return $retval;
}


That's about it. Let me know what you think.

Paul
 Quote

sam

Anonymous
I keep gettin errors...

Parse error: parse error in /Library/WebServer/system/lib-custom.php on line 386

Warning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/system/lib-custom.php:386) in/Library/WebServer/system/lib-sessions.php on line 180

Warning: Cannot modify header information - headers already sent by (output started at /Library/WebServer/system/lib-custom.php:386) in/Library/WebServer/system/lib-sessions.php on line 192

then In the block
Error in PHP Block. Function, phpblock_whochat, does not exist.

Help

I did check out ur site ....awesome! They way u used Flash Chat. I want to get this to work.
 Quote

sam

Anonymous
Also the chat window is not opening in a new window.

heeeelp

sam
 Quote

Status: offline

paulmon

Forum User
Newbie
Registered: 11/22/03
Posts: 11

Worked with sam to fix this. Works a charm now. Issue was that the code above got alterned when pasted in the site. And table name differences. Make sure your FlashChat tables are in the same database as your GL site. My tables also have a "chat" prefix such as "chat_users." If you're site doesn't follow this you'll have to edit the phpblock code below. The code below also assume you've installed FlashChat in /FlashChat.

Here are my changes again, this time I hope things don't get stripped:

Text Formatted Code


Add this to your FlashChat index.php at the top:

/** Set to true if using Geeklog **/
$useGeeklog = true;

if ( $useGeeklog ) {
        require_once("../lib-common.php");
        $lang = $defaultLanguage;
        if ($name == "") {
                $username = $_USER['username'];
                $uid = $_USER['uid'];
        }
}

New block function that lists users in Chat and provides a link to start the chat as a popup window.  A simple way to prevent non-members from logging in is to add the block with logged in permissions.

function phpblock_whochat() {

    global $_CONF;
    $query = mysql_query( "SELECT COUNT(ID) FROM chat_users WHERE NOW() - datetime < 12" );
    $numchat = DB_fetchArray($query);
    $numinchat = $numchat[0];
    $userquery = mysql_query( "SELECT name FROM chat_users WHERE NOW() - datetime < 12");
    if ($numinchat > 0) {
    while ($usersinchat = DB_fetchArray($userquery)) {
        $retval = $retval . $usersinchat[name] . '<br>';
    }
    } else {
        $retval .= 'Currently no users in chat';
    }

        $retval .= "<br><a href=\"\" onclick=\"window.open('/FlashChat/index.php',1,'directories=no,menubar=no,top=0,left=0,width=550,height=560');\">Join Chat</a>";


return $retval;
}


 


You're on your own for the profile pop-up. I did this by making a rewrite rule and some code changes to users.php.

Enjoy. You can see a sample of how this works at http://www.somc.on.ca/ but you'll need to get an account to check it out.

Cheers,

Paul
 Quote

Status: offline

HighCLIMBER

Forum User
Newbie
Registered: 05/12/04
Posts: 6
So how "good" do you have to be to get this installed. Is anyone else using this or some other one?

I found it here for the $5:
http://www.tufat.com/script.php?script=chat

Is a diffient one that would work better with geeklog cause this says it works with php-nuke....

 Quote

Status: offline

comicbookguy

Forum User
Regular Poster
Registered: 05/15/04
Posts: 97
You could try the PhpMychat plugin. It is a true geeklog plug in which integrates with your user database so people dont have to supply a second user name and password when they enter a chat room.

I have it running on my site at www.planetdouglas.com. You have to have an account to see and access the chat rooms but it works really well and is easy to install assuming you read the instructions first.

You can download it at http://www.notime-enterprises.com/index.php?topic=GeekLog.
 Quote

Status: offline

jnordquist

Forum User
Full Member
Registered: 03/14/03
Posts: 129
Location:Kenosha
I'm using FlashChat at KenoshaOnline.net and it works well, but takes a long tome to load. 20 seconds or more sometimes. I like the interface. It is so customizable, but may have to go back to MyPHPChat because I've noticed chat users have decliend by more than 1/2.
John Nordquist,
Applications Specialist, medical Technologies
 Quote

All times are EDT. The time is now 10:20 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content