• 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

why does phpfreechat.class.php need to be at top of the page

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

Post a reply
8 posts • Page 1 of 1

Postby jesus_squirrel » Wed Jun 07, 2006 9:05 pm

why does phpfreechat.class.php need to be at top of the page. I dont need
a bunch of javascript at the top of the page.

Putting any other place makes it send every thing above it as xml....

Whats the problem....
......Jesus Squirrel
jesus_squirrel
New member
 
Posts: 8
Joined: Wed Jun 07, 2006 3:06 pm
Top

Postby phpfreechat » Wed Jun 07, 2006 11:31 pm

look at this demo : http://www.phpfreechat.net/demo/pfc/dem ... client.php

it explains how to separate the client page from the server script (the script ajax will call)
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby jesus_squirrel » Sat Jun 10, 2006 3:13 pm

Hi .... I upgraded my phpFreeChat to the
"chat with one script for client and on script for server" version
and it fixed the problem I had with placement of the files.
Right now I have everything in my content module ( div) which is in the body of the page.:
Code: Select all
<?php
require_once "phpchat/src/phpfreechat.class.php";
require_once "phpchat/src/demo2_config.php";
$chat = new phpFreeChat( $params );?>
<?php $chat->printJavascript(); ?>
<?php $chat->printStyle(); ?>
<?php $chat->printChat(); ?>

I can also put these in order in various places in the head :
Code: Select all
require_once "phpchat/src/phpfreechat.class.php";
require_once "phpchat/src/demo2_config.php";
$chat = new phpFreeChat( $params );?>
<?php $chat->printJavascript(); ?>
<?php $chat->printStyle(); ?>

and this in the body.
Code: Select all
<?php $chat->printChat(); ?>

After doing both of the above I had a new problem when using IE. Whenever I did a show/hide on the smilies list and the whos online list ... I would lose all my existing CSS information for the my page except for the CSS for phpFreeChat.
I traced this to pfcclient.js.tpl.php refreshOnlineandSmiles ( ) function called by the refreshSmiles ( ) and the redfreshWhosOnline ( ) functions.
The last line of refeshOnlineAndSmiles ( ) seems to be the problem and commenting it out fixed the problem.
Code: Select all
    // for IE7 CSS refresh
    // if fixes the smiley and online boxes resize problem on IE6
    // if (document.recalc) setTimeout('document.recalc(true);', 0);

It works fine now on IE and FireFox. (IE6)

Earlier I had changed:
Code: Select all
$params["refresh_delay"]   =  2500 ;  // from 5000

To keep IE from hanging. This could have been a problem with setTimeout( ) problem above. Im still testing.....
See at: http://visiblephp.com/?MOD=chat
Last edited by jesus_squirrel on Sat Jun 10, 2006 3:23 pm, edited 1 time in total.
......Jesus Squirrel
jesus_squirrel
New member
 
Posts: 8
Joined: Wed Jun 07, 2006 3:06 pm
Top

Postby jesus_squirrel » Tue Jun 13, 2006 4:41 pm

I have returned the refresh_delay perameter to 5000 for testing in IE.
With my implementation as explained in the above post IE quits working after a few posts with the setting at 5000.
Code: Select all
$params["refresh_delay"]   =  5000 ;  // from 2500

Even set a 2500 IE will quit working if the chat is left unattended for very long. Its not due to timeout because I have
Code: Select all
$params["timeout"]   =  2000000 ;

When chat stops responding in IE its not possible to refresh the page or open a new page or connect or disconnect chat. You have to close the browser to reload chat.

Chat is always stable in FireFox.

I have a very slow dialup ISP connection to my browsers machine.

PLEASE FEAL FREE TO TEST ON MY SERVER IN IE 6 at...... http://visiblephp.com/?MOD=chat

........
......Jesus Squirrel
jesus_squirrel
New member
 
Posts: 8
Joined: Wed Jun 07, 2006 3:06 pm
Top

Postby jesus_squirrel » Wed Jun 14, 2006 11:17 pm

So........ no testers.....?????
......Jesus Squirrel
jesus_squirrel
New member
 
Posts: 8
Joined: Wed Jun 07, 2006 3:06 pm
Top

Postby phpfreechat » Thu Jun 15, 2006 9:02 am

I was testing your chat with IE6 and I didn't found unexcepted behaviour ...
Where is the problem ?
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby jesus_squirrel » Thu Jun 15, 2006 10:58 pm

The problem I have is in IE6 if refresh_delay is set to 5000 my IE6 browser hangs after a few posts. It requires the browser to be closed and reopened to resume chat or even to connect to any other page....

This may be a problem with my browser or connection. I have a very slow dial up connection.

When set on 2500 It will last much longer but still eventually crashes

It will stay running all day in firefox....

I may need to reload IE I have another problem with it too..
......Jesus Squirrel
jesus_squirrel
New member
 
Posts: 8
Joined: Wed Jun 07, 2006 3:06 pm
Top

Postby jesus_squirrel » Fri Jun 16, 2006 11:18 pm

It seems to be my browser... several people tested it yesterday and had no problem..

Im wondering if it could by my very slow ISP connection though its only 33600bps

FireFox will stay up all day.....
......Jesus Squirrel
jesus_squirrel
New member
 
Posts: 8
Joined: Wed Jun 07, 2006 3:06 pm
Top


Post a reply
8 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
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub