View Full Version : Integrating Realchat with Vbulletin
Jaime82
10-20-2005, 07:22 PM
Can anyone please tell me how integrate RealChat with Vbulletin 3.5.0? I want to password protect the RealChat chat room with the member list from Vbulletin. I know there are a few websites that have successfully done this, but the RealChat support pages are not detailed enough.
Thanks in advance for anyone that can help me
Jaime
NxTek
10-21-2005, 03:16 PM
I used http://www.realchat.com/doc/adv-server-api.html to make a vBadvanced module that only displays to registered users, then used http://www.realchat.com/doc/howto-integration.html to pass the username to the chat room.
Jaime82
10-21-2005, 05:59 PM
What do you put in replace of the value "BadJohn" in this line <param name="nick" value="BadJohn"> ? Whatever I put in for the value it logs into the chat room as.
Thank you!
Jaime
NxTek
10-21-2005, 06:17 PM
At the top of the applet page, put this to get access to vB's varaibles -
<?php
error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);
chdir('/home/httpd/vhosts/yourdomain.com/httpdocs/forums');
require_once('./global.php');
?>
Then add this to your applet parameter -
<param name="nick" value="<?php echo $bbuserinfo['username']; ?>">
In my vBa module -
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat">
<span class="smallfont">
<strong>
OPL Chatroom
</strong>
</span>
</td>
</tr>
<tr>
<td width="100%" align="center" class="$getbgrow">
<strong>
<div align="center">
<script type="text/javascript">
<!--
function popUp( url ) {
window.open( "/chat/frame.html","chatWindow",'width=730,height=600,status=no,scrollbars=no,loc ation=no,toolbar=no,resizable=yes');
}
//-->
</script>
<?
$port = 5900;
function getServerAPI( $apiCommand ) {
global $port;
$result = "";
$fp = fsockopen("localhost", $port, &$errno, &$errstr, 2);
if(!$fp) {
echo "$errstr ($errno)\n";
} else {
fputs($fp,"GET /?".$apiCommand." HTTP/1.0\n\n");
$header = true;
while(!feof($fp)) {
$line = fgets($fp,128);
if ( $header == false ) $result .= $line;
if ( trim($line) == "" ) $header = false;
}
fclose($fp);
}
return $result;
}
$userCount = getServerAPI( "api.UserCount" );
$roomList = getServerAPI( "api.RoomList" );
echo "Users conected: ".$userCount."<br>";
?>
</strong>
<form>
<input type=button value="Launch Chatroom" onclick="javascript:popUp();" style="background-color: #B0B4B9; color: #000000; font: bold 11px verdana, geneva, sans-serif">
</form>
</td>
</tr>
</table>
<br />
Jaime82
10-22-2005, 01:31 AM
I log into the message board and have a chat link, when I click on it, it automatically logs me in like it should, but it logs me in as "?php echo $bbuserinfo['username']; ?". Could you tell me why it is doing that?
Thank you!
Jaime
NxTek
10-25-2005, 04:54 PM
Is your applet page a .php and you added the globals code at the top?
Jaime82
10-25-2005, 05:25 PM
Yes I put the globals at the top of the page and the page is named chat.php.
The page loads now, but doesn't automatically log me in. When it was automatically logging me in before, but as "?php echo $bbuserinfo['username']; ?", I had the page named chat.html. It's chat.php now and it isn't automatically logging me in. Hope this can help you know what the problem is and help me figure it out. Would greatly appreciate it.
Thank you!
Jaime
NxTek
10-25-2005, 05:33 PM
Please show the contents of that file.
Jaime82
10-25-2005, 05:39 PM
<?php
error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);
chdir('/home/myurl.com/forum directory');
require_once('./global.php');
?>
<html>
<head>
<title>Chat Login Page</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<meta name="description" content="RealChat Software">
<meta name="keywords" content="chat, client, server, java, realchat">
</head>
<body topmargin=0 leftmargin=0>
<center>
<!-- Begin: RealChat Client code -->
<applet
archive = "RealChat.jar"
codebase = "."
code = "rcs.client.RealChatClient.class"
name = "ChatClient"
width = "100%"
height = "100%"
align = "top"
alt = "RealChat Client applet"
MAYSCRIPT>
<param name="nick" value="<?php echo $bbuserinfo['username'];?>">
<param name="embedded" value="yes">
<!-- no java or java disabled -->
RealChat client requires Java compatible web browser<br>For more information visit our <a target="_blank" href="http://www.realchat.com/">java chat software</a> support page<br><br><a target="_blank" href="http://www.java.com/"><img src="getjava.gif" alt="Java - Get it now!" width="88" height="31" border="0"></a><br><br>Please click the button above to get the Java plug-in now
</applet>
<!-- End: RealChat Client code -->
<br><br>
<small>
Please wait for applet to load.
</small>
</center>
</body>
</html>
NxTek
10-26-2005, 04:26 PM
You need to update the chdir line to the path to your forum.
Jaime82
10-26-2005, 05:13 PM
I have the chdir pointing to my forum directory, just changed where my URL was and put myurl.com, I didn't want to post my url on a big website like this.
NxTek
10-26-2005, 07:23 PM
What's the path to your applet?
Jaime82
10-26-2005, 10:16 PM
I have the chat.php in the same directory as my applet, the applet loads just fine, but it doesn't automatically log me in now. I can type in a name and get in the chat room.
NxTek
10-27-2005, 01:57 PM
Try putting your chatroom directory under your forums directory.
Jaime82
10-27-2005, 05:26 PM
The same thing happens, it doesn't automatically log me in. The param nick field looks like this <param name="nick" value=""> when I click on view source after I clicked on the chat room from the message board.
Thank you!
Jaime
NxTek
10-27-2005, 05:56 PM
Are you using 3.5? I'm wondering if something has changed -- it works with 3.0.8
Jaime82
10-27-2005, 07:00 PM
Yes I am using Vbulletin 3.5.0.
NxTek
10-27-2005, 07:09 PM
Can't help ya much there then. I'm going to be upgrading mine soon so I'll update this when I do. Sorry I couldn't help more.
Jaime82
10-27-2005, 07:23 PM
That's ok, thanks for all the help in trying to figure this out
fotoplatz
01-10-2006, 01:32 PM
Has anyone an idea how to integrate it?
Greetings
Tom
Jaime82
02-02-2006, 05:28 AM
Has anyone an idea how to integrate it?
Greetings
Tom
Are you still wanting to integrate Vbulletin and RealChat?
I've seen other boards with this integrated. Do the instructions in this thread work for 3.5.4?
Jaime82
03-06-2006, 06:06 AM
The instructions on this thread might work now that I have the code for pulling up information from VBulletin and using it for Realchat. Instead of
<param name="nick" value="<?php echo $bbuserinfo['username']; ?>">
Use the Following:
<param name="nick" value="<?php echo $vbulletin->userinfo[username]; ?>">
Good Luck!
Jaime
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.