Hey Eric,
how are you using this file? Are you actually instantiating it in some
way? Viewing it directly won't produce anything. It needs to be called
from somewhere. Maybe you missed a step in the instructions?
Eric Wagar wrote:[color=blue]
> 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(tm)
> // 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('LEVEL' => 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="block.title.png" height="20"> </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"><font face="Verdana">Be patient
> while chat<br>loads.</font></p>
> <p align="left"> </p>
> </td>
> </tr>
> </table>
> </div>
> </body>
> </html>
>
> <script language="JavaScript" type="text/javascript">
>
> isMac =
> (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
> IEmac = ((document.all)&&(isMac)) ? true :
> false; IEwin =
> ((document.all)&&(navigator.appVersion.indexOf("MS IE")!=-1) &&
> !isMac) ? true : false;
> NS =
> (navigator.appName.indexOf("Netscape")!=-1) ? true : false;
>
> document.writeln("<APPLET NAME='DigiChat'
> CODEBASE='http://www.flyguylive.com/DigiChat/DigiClasses/' ");
>
> document.writeln("CODE='com.diginet.digichat.clien t.DigiChatApplet'
> "); if (isMac)
>
> document.writeln("ARCHIVE=Client_Mac.jar MAYSCRIPT>");
> else if (!isMac)
> {
> if (IEwin)
> {
>
> document.writeln("ARCHIVE=Client_Plugin.jar MAYSCRIPT>");
> document.write(" <PARAM
> NAME=cabbase value=Client_IE.cab>");
> document.write(" <PARAM
> NAME=useslibrary value=DigiChat Applet>");
> document.write(" <PARAM
> NAME=namespace value=Digi-Net>");
> document.write(" <PARAM
> NAME=useslibrarycodebase value=Client_IE.cab>");
> document.write(" <PARAM
> NAME=useslibraryversion value=4,0,1,0>");
> }
> else if (NS)
>
> document.writeln("ARCHIVE='Client_NS.jar' MAYSCRIPT>");
> }
>
> document.write(" <PARAM NAME=MenuItem1
> VALUE=GrownUpsMeet.com>");
> document.write(" <PARAM NAME=MenuLocation1
> VALUE=http://www.GrownUpsMeet.com>");
> document.write(" <PARAM NAME=MenuItem2
> VALUE='GrownUps.info'>");
> document.write(" <PARAM NAME=MenuLocation2
> VALUE=http://www.GrownUps.info>");
> 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='{$ibforums->member['name']}'>");
> # document.write(" <param name=email
> value='{$ibforums->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
> //--------------------------------[/color]