• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Multiple rooms...

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
2 posts • Page 1 of 1

Postby Rawksie » Fri Jun 02, 2006 2:47 am

I'm trying to integrate PHPFreeChat into my PHPNuke portal. When I'm done, I hope for it to read users from the nuke user database, require you to log in, and have multiple rooms. Once I have it all sorted, I intend on sharing it on the PHPNuke community, thus advertising both my websites and your uber product.

However, now that I got the thing working, I find multiple rooms are not working. Can anyone help? It just keeps saying 'Sorry, such file does not exist...'. I've tried everything I can think of. Here is the code;

Code: Select all
// create the customized command
require_once dirname(__FILE__)."/src/pfccommand.class.php";
class pfcCommand_roll extends pfcCommand {
  function run(&$xml_reponse, $clientid, $msg)  {
    $c =& $this->c;
   
    $nick      = $c->nick;
    $container =& $c->getContainerInstance();
    $text      = trim($msg);
   
    // Call parse roll
    require_once dirname(__FILE__).'/dice.class.php';
    $dice = new Dice();
    if (!$dice->check($text))     {
      $result = $dice->error_get();
      $cmd =& pfcCommand::Factory("error", $c);
      $cmd->run($xml_reponse, $clientid, "Cmd_roll failed: " . $result);
    }
    else
    {
      $result = $dice->roll();
      $container->writeMsg($nick, $result);
    }
    if ($c->debug) pxlog("Cmd_roll[".$c->sessionid."]: msg=".$result, "chat", $c->getId());
  }
}
require_once dirname(__FILE__)."/src/phpfreechat.class.php";

$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["title"]    = "Welcome to the Stickler's Rest chat-room!";
$params["nick"]     = "guest";  // setup the intitial nickname
$params["height"]        = "500px";
// do not uses width parameter because of a display bug in IE6
//$params["width"]         = "650px";
$params["channel"]  = isset($_GET["channel"]) ? $_GET["channel"] : "Out_of_Character";
$params["max_msg"]       = 0;
$params["max_text_len"]       = 1500;
$params["max_nick_len"]       = 30;
$params["clock"]       = false;
$params["showsmileys"]       = false;
$params["btn_sh_smileys"]       = false;
$params["themepath"]     = dirname(__FILE__)."/sticky";
$params["theme"]         = "mytheme";
$chat = new phpFreeChat( $params );

 $chat->printJavascript();
 $chat->printStyle();


    global $prefix, $db, $sitename, $admin, $module_name;

    include("header.php");

    OpenTable();

echo'<p><center>:: <a href="?name=Chat?channel=Out_of_Character">#Out_of_Character</a> :: <a href="?name=Chat?channel=Phastidiar">#Phastidiar</a> :: <a href="?name=Chat?channel=The_Rift">#The_Rift</a> :: <a href="?name=Chat?channel=War_of_the_Elements">#War_of_the_Elements</a> :: <a href="?name=Chat?channel=Silent_Hill">#Silent_Hill</a> :: <a href="?name=Chat?channel=The_Crusades">#The_Crusades</a> ::</center></p>';


  $c =& phpFreeChatConfig::Instance();
  echo '<p>You are in #'.$c->channel.'</p>';

I hope you can help me, as I really want this thing to take off - it is wonderful!
Rawksie
New member
 
Posts: 1
Joined: Fri Jun 02, 2006 2:17 am
Top

Postby Hap » Fri Jun 02, 2006 8:01 am

Looks to me like the problem is in your links you have to join the other channels.

For example:
Code: Select all
<a href="?name=Chat?channel=Out_of_Character">

should read:
Code: Select all
<a href="?name=Chat&channel=Out_of_Character">

The 2 ?'s are throwing it off
Hap
New member
 
Posts: 8
Joined: Tue May 30, 2006 12:09 am
Top


Post a reply
2 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 16 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub