• 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

index.php is corrupted.. \"who is in the chat\" doesn\'t sho

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

Post a reply
4 posts • Page 1 of 1

Postby Jeej » Sun Jul 16, 2006 4:37 pm

Hello,

I have made some changes to the index.php.
I don't want the pop-up for the nick. So i have made something to get the nick out of the phpbb DB. Because i want to intergrate this chat with the forum.
The code from index.php is now:
Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = '../';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
error_reporting(E_ALL ^ E_NOTICE);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PRIVMSGS);
init_userprefs($userdata);
//
// End session management
//

require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["nick"] =  $userdata['username'];  // setup the intitial nickname
$params["frozen_nick"] = true;     // do not allow to change the nickname
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$chat = new phpFreeChat( $params );


?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>phpFreeChat Sources Index</title>
  <link rel="stylesheet" title="classic" type="text/css" href="style/generic.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/header.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/footer.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/menu.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/content.css" /> 
  <?php $chat->printJavascript(); ?>
  <?php $chat->printStyle(); ?> 
 </head>
 <body>

<div class="header">
      <h1>phpFreeChat - Sources Index</h1>
      <img alt="logo bulle" src="style/bulle.png" class="logo2" />
</div>

<div class="menu">
      <ul>
        <li class="sub title">General</li>
        <li>
          <ul class="sub">
            <li class="item">
              <a href="demo/">Demos</a>
            </li>
            <li class="item">
              <a href="admin/">Administration</a>
            </li>
          </ul>
        </li>
        <li class="sub title">Documentation</li>
        <li>
          <ul>
            <li class="item">
              <a href="README.en">readme [en]</a>
            </li>
            <li class="item">
              <a href="README.fr">readme [fr]</a>
            </li>
            <li class="item">
              <a href="INSTALL.en">install [en]</a>
            </li>
            <li class="item">
              <a href="INSTALL.fr">install [fr]</a>
            </li>
          </ul>
        </li>
      </ul>
      <p class="partner">
        <a href="http://www.phpfreechat.net"><img alt="logo big" src="style/logo_88x31.gif" /></a>
      </p>
     
      <div class="rating">
        <form action="http://www.hotscripts.com/rate/56184.html" method="get">
          <p><input type="hidden" name="RID" value="N452772" /></p>
          <table>
            <tbody>
              <tr>
                <td>
                  <table>
                    <tbody>
                      <tr>
                        <td>If you like our script, please rate it! <input type="hidden" name="external" value="1"/>
                        </td>
                      </tr>
                      <tr>
                        <td>
                          <select name="rate" size="1">
                            <option value="5" selected="selected">Excellent!</option>
                            <option value="4">Very Good</option>
                            <option value="3">Good</option>
                            <option value="2">Fair</option>
                            <option value="1">Poor</option>
                          </select>
                          <input type="submit" name="submit" value="Cast My Vote!"/>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
            </tbody>
          </table>
        </form>
      </div>
</div>

<div class="content">
  <h2>See the quick demo</h2>
  <?php $chat->printChat(); ?>
  <?php if (file_exists(dirname(__FILE__)."/checkmd5.php")) require_once dirname(__FILE__)."/checkmd5.php"; ?>
</div>

<div class="footer">
      <div class="valid">
        <a href="http://validator.w3.org/check?uri=referer">
          <img alt="Valid XHTML 1.0!" src="style/valid-xhtml.png" />
        </a>
        <a href="http://jigsaw.w3.org/css-validator/check/referer">
          <img alt="Valid CSS!" src="style/valid-css.png" />
        </a>
      </div>
      <p>@2006 phpFreeChat</p>
    </div>
</body></html>

I get now the error:
corrupted - ./index.php (please replace this file by a correct one)
And the "who is in the chat" doesn't show up..
Can someboy help me.. I don't understand why is doesn't work :(
Jeej
New member
 
Posts: 4
Joined: Sat Jul 15, 2006 3:10 pm
Top

Postby phpfreechat » Sun Jul 16, 2006 6:18 pm

I suggest you remove this line:
Code: Select all
<?php if (file_exists(dirname(__FILE__)."/checkmd5.php")) require_once dirname(__FILE__)."/checkmd5.php"; ?>

so the message "corrupted - ./index.php (please replace this file by a correct one)" will be hidden
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Jeej » Sun Jul 16, 2006 6:43 pm

Thank you! :D
A bit stupid from me :oops:
The "who is online" thing works by the way also :oops:

The only problem is the nick ting :(

I think that I can write somethig for the nick problem till the final version available for download is :D

Thank you!!! :D
Jeej
New member
 
Posts: 4
Joined: Sat Jul 15, 2006 3:10 pm
Top

Postby phpfreechat » Mon Jul 17, 2006 9:58 am

The nick parameter is broken in 1.0-beta3 so wait for the next 1.0-beta4.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top


Post a reply
4 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 9 guests

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