Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-20-2005, 07:22 PM
Jaime82 Jaime82 is offline
 
Join Date: Oct 2005
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Integrating Realchat with Vbulletin

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
Reply With Quote
  #2  
Old 10-21-2005, 03:16 PM
NxTek NxTek is offline
 
Join Date: Jun 2003
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 10-21-2005, 05:59 PM
Jaime82 Jaime82 is offline
 
Join Date: Oct 2005
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 10-21-2005, 06:17 PM
NxTek NxTek is offline
 
Join Date: Jun 2003
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

At the top of the applet page, put this to get access to vB's varaibles -
PHP Code:
<?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 -
PHP Code:
<param name="nick" value="<?php echo $bbuserinfo['username']; ?>">
In my vBa module -
PHP Code:
<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,location=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 />
Reply With Quote
  #5  
Old 10-22-2005, 01:31 AM
Jaime82 Jaime82 is offline
 
Join Date: Oct 2005
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 10-25-2005, 04:54 PM
NxTek NxTek is offline
 
Join Date: Jun 2003
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is your applet page a .php and you added the globals code at the top?
Reply With Quote
  #7  
Old 10-25-2005, 05:25 PM
Jaime82 Jaime82 is offline
 
Join Date: Oct 2005
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 10-25-2005, 05:33 PM
NxTek NxTek is offline
 
Join Date: Jun 2003
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please show the contents of that file.
Reply With Quote
  #9  
Old 10-25-2005, 05:39 PM
Jaime82 Jaime82 is offline
 
Join Date: Oct 2005
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<?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>
Reply With Quote
  #10  
Old 10-26-2005, 04:26 PM
NxTek NxTek is offline
 
Join Date: Jun 2003
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to update the chdir line to the path to your forum.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:32 AM.


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.03816 seconds
  • Memory Usage 2,256KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete