I have a phpnuke website, and I use DigiChat chat. Since I have users who
register, I'd like to be able to pass there username and email (at a
minimum) into the chat system, so they do not have to enter in their
information multiple times.
I am attempting to use the below file (which was obtained from a website
using DigiChat and something called IBForums), but I am not able to get any
output on the page when using it. Any help?
Thanks
Eric
<?php
//--------------------------------
// Basic DigiChat Integration v1.0 hack by InvisionHacks(t m)
// Copyright 2004 Chris Griego [cgriego]
// http://www.invisionhacks.com/
//class module extends module_loader
{
// var $output = "";
function module()
{
global $fg_phpnuke,
$print,
$std;
$ibforums->lang['digichat_guest '] = "You must register with
our forums to use our chat feature.";
if (!$fg_phpnuke->nuke_users['user_id'])
{
// If a guest, error.
$std->Error(array('L EVEL' => 1, 'MSG' =>
'digichat_guest '));
} else {
$this->output = <<<EOF
<head>
<title>Chat Entry</title>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red"
leftmargin="0" marginwidth="0" topmargin="0" marginheight="0 ">
<div align="left">
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" height="100%">
<tr>
<td align="center" valign="top" width="100%" background="blo ck.title.png"
height="20">&nb sp;</td>
</tr>
<tr>
<TD HEIGHT="100%" ALIGN="left" VALIGN="top" style="margin:0 ;
padding-top:0pt; padding-right:0pt; padding-bottom:0pt; padding-left:10pt;">
<p align="left"><f ont face="Verdana"> Be patient while
chat<br>loads.</font></p>
<p align="left">&n bsp;</p>
</td>
</tr>
</table>
</div>
</body>
</html>
<script language="JavaS cript" type="text/javascript">
isMac = (navigator.appV ersion.indexOf( "Mac")!=-1) ?
true : false;
IEmac = ((document.all) &&(isMac)) ? true : false;
IEwin =
((document.all) &&(navigator.ap pVersion.indexO f("MSIE")!=-1) && !isMac) ?
true : false;
NS = (navigator.appN ame.indexOf("Ne tscape")!=-1) ?
true : false;
document.writel n("<APPLET NAME='DigiChat'
CODEBASE='http://www.flyguylive. com/DigiChat/DigiClasses/' ");
document.writel n("CODE='com.di ginet.digichat. client.DigiChat Applet' ");
if (isMac)
document.writel n("ARCHIVE=Clie nt_Mac.jar
MAYSCRIPT>");
else if (!isMac)
{
if (IEwin)
{
document.writel n("ARCHIVE=Clie nt_Plugin.jar MAYSCRIPT>");
document.write( " <PARAM NAME=cabbase
value=Client_IE .cab>");
document.write( " <PARAM
NAME=useslibrar y value=DigiChat Applet>");
document.write( " <PARAM
NAME=namespace value=Digi-Net>");
document.write( " <PARAM
NAME=useslibrar ycodebase value=Client_IE .cab>");
document.write( " <PARAM
NAME=useslibrar yversion value=4,0,1,0>" );
}
else if (NS)
document.writel n("ARCHIVE='Cli ent_NS.jar' MAYSCRIPT>");
}
document.write( " <PARAM NAME=MenuItem1
VALUE=GrownUpsM eet.com>");
document.write( " <PARAM NAME=MenuLocati on1
VALUE=http://www.GrownUpsMee t.com>");
document.write( " <PARAM NAME=MenuItem2
VALUE='GrownUps .info'>");
document.write( " <PARAM NAME=MenuLocati on2
VALUE=http://www.GrownUps.in fo>");
document.write( " <PARAM NAME=siteID VALUE=1000>");
document.write( " <PARAM NAME=background
VALUE=FFFFFF>") ;
document.write( " <PARAM NAME=signed VALUE=true>");
document.write( " <PARAM NAME=textcolor
VALUE=000000>") ;
// Integration Here
document.write( " <param name=nickname
value=$_POST['name'][arrayindex]>");
# document.write( " <param name=nickname
value='{$ibforu ms->member['name']}'>");
# document.write( " <param name=email
value='{$ibforu ms->member['email']}'>");
document.write( " GrownUpsChat requires a Java
Compatible web browser to run. ");
document.write( " </APPLET>");
</script>
EOF;
print($this->output);
exit();
}
}
}
// End Basic DigiChat Integration v1.0 hack
//--------------------------------
?>