Page 91 of 116

Re: [DEV] AJAX Chat

Posted: Tue Nov 11, 2008 12:49 am
by easygo
AmateurCichlids wrote:What important thing are you referring to?
AmateurCichlids, you are late...and honestly, I don't understand the question.

In my view, there's only one important thing for months.

Re: [RC] AJAX Chat

Posted: Tue Nov 11, 2008 1:31 am
by AmateurCichlids
I know I'm late.
When I first read your reply, it didn't contain the answers I was looking for.
Instead of making more work for myself I decided it'd be easier to tell the forum users to use what they had in the chat room and just wait for a chat that used the board smilies. Now that issues have arisen where I need to disable whispers/pm's and opening private channels, I've returned to this thread. Reading your reply, you said I missed the most important thing in the first thread. So the question was, what important thing did I miss?
If I seem to be coming across as irritated and annoyed I apologize. There's drama on my site and since I do it all for free as a hobby, I tend to find the drama irritating. I apologize if I've brought that with me here.

What I would like from anyone who may have an answer:
Have you tried to use the config.php settings to disable pm's aka whispering in chat? Has it been successful.
Has anyone found a way to use the board smilies in chat rather than re-adding them to config.js?

Thanks in advance,
Tim

Re: [RC] AJAX Chat

Posted: Tue Nov 11, 2008 2:23 am
by LonestarSkizm
Ok, so I successfully got AJAX chat to work and have tried, in vain, to get it integrated into the board. When anyone goes to http://skizm.homelinux.org/phpbb3/chat/ everything loads up fine and functions as normal however when anyone goes to http://skizm.homelinux.org/phpbb3/chat_test.php it does not load the chatroom. I'm not sure at this point what exactly is happening but thought someone on here might be able to shed a bit of light on the situation. I've got a basic grasp of PHP, Java, and HTML so I don't believe the problem is there but maybe my webserver?

If anyone needs to see any files please let me know and I'll post them on here. The only MODS I've added to the forums are a portal and photo album so far and this is stumping me since everything else is functioning just fine.

Here is my chat_test.php

Code: Select all

    <?php
    define('IN_PHPBB', true);
    $phpbb_root_path = '';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);

    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup();

    page_header();

    $template->set_filenames(array(
        'body' => 'chat_body.html',
    ));

       page_footer();
    ?>
Here is my chat_body.html file

Code: Select all

    <!-- INCLUDE overall_header.html -->
    <div class="panel">
       <div class="inner"><span class="corners-top"><span></span></span>

       <div class="content">
          <iframe src="http://skizm.homelinux.org/phpbb3/chat/index.php" frameborder="0" width="960" height="540" ></iframe>
       </div>
       <span class="corners-bottom"><span></span></span></div>
    </div>
      <!-- INCLUDE overall_footer.html -->

Re: [RC] AJAX Chat

Posted: Tue Nov 11, 2008 10:15 am
by fimo
easygo wrote:
fimo wrote:Hello again Easygo,
fimo wrote:2)
How to make a right pane, at the moment when ever a user type something it will push down the
chat box instead of a windows scrol on the right side (as on your site
On that score am I not sure what you mean...sorry! The scroll bar on the right
hand side should occur (by default) once the display limit is reached :/
Hi again,

if you try to look at my test site here:

http://www.calnord.web.surftown.dk/arcade.php

then i cant see where i did something, so that there is no scroll bar once the display limit is reached ?
Or where do i have to look for that "display limit" ?
thank you once again !

Re: [RC] AJAX Chat

Posted: Tue Nov 11, 2008 5:24 pm
by easygo
// public goes private

Re: [RC] AJAX Chat

Posted: Tue Nov 11, 2008 5:56 pm
by easygo
LonestarSkizm wrote:Here is my chat_test.php

Code: Select all

    <?php
    define('IN_PHPBB', true);
    $phpbb_root_path = '';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);

    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup();

    page_header();

    $template->set_filenames(array(
        'body' => 'chat_body.html',
    ));

       page_footer();
    ?>
Here is my chat_body.html file

Code: Select all

    <!-- INCLUDE overall_header.html -->
    <div class="panel">
       <div class="inner"><span class="corners-top"><span></span></span>

       <div class="content">
          <iframe src="http://skizm.homelinux.org/phpbb3/chat/index.php" frameborder="0" width="960" height="540" ></iframe>
       </div>
       <span class="corners-bottom"><span></span></span></div>
    </div>
      <!-- INCLUDE overall_footer.html -->
Try

Code: Select all

<?php
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

// Lets build a page ...
$template->assign_vars(array(
	'U_CHAT'	=> append_sid("{$phpbb_root_path}chat/index.$phpEx"),
));

// Output page
page_header('AJAX Chat');

// Output page
page_header('AJAX Chat');

$template->set_filenames(array(
	'body' => 'chatloader_body.html',
));

page_footer();

?>
as well as

Code: Select all

<!-- INCLUDE overall_header.html -->
<div class="panel">
	<div class="inner">
		<span class="corners-top"><span></span></span>
		<div class="content">
    	<iframe src="{U_CHAT}" frameborder="0" width="960" height="540"></iframe>
 		</div>
		<span class="corners-bottom"><span></span></span>
	</div>
</div>
<!-- INCLUDE overall_footer.html -->
instead of yours and then let's hope it does the trick.

Re: [RC] AJAX Chat

Posted: Tue Nov 11, 2008 7:34 pm
by fimo
Hi easygo
Sent u a PM

Re: [RC] AJAX Chat

Posted: Tue Nov 11, 2008 7:36 pm
by LonestarSkizm
easygo wrote: Try

Code: Select all

<?php
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

// Lets build a page ...
$template->assign_vars(array(
	'U_CHAT'	=> append_sid("{$phpbb_root_path}chat/index.$phpEx"),
));

// Output page
page_header('AJAX Chat');

// Output page
page_header('AJAX Chat');

$template->set_filenames(array(
	'body' => 'chatloader_body.html',
));

page_footer();

?>
as well as

Code: Select all

<!-- INCLUDE overall_header.html -->
<div class="panel">
	<div class="inner">
		<span class="corners-top"><span></span></span>
		<div class="content">
    	<iframe src="{U_CHAT}" frameborder="0" width="960" height="540"></iframe>
 		</div>
		<span class="corners-bottom"><span></span></span>
	</div>
</div>
<!-- INCLUDE overall_footer.html -->
instead of yours and then let's hope it does the trick.

Ok, I've tried that code but still get the same output and I've tried FF3, IE6,and IE7 with no luck.

Hmmm, I'm wondering if maybe my web server is configured wrong or some other phpbb file that's been modded is doing this???

<EDIT: For spelling and grammar>

Re: [RC] AJAX Chat

Posted: Wed Nov 12, 2008 7:38 am
by fimo
:?:

Re: [RC] AJAX Chat

Posted: Wed Nov 12, 2008 9:07 am
by azzam
I tested this mod on my old site on same free hosting site BYETHOST.All forum is working great

But now i installed this mod and i am getting this error >>>

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<iframe name="rotater" Width="100%" height="100%" frameborder="0" src="http://xlphp.net/blog2/" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="auto">
</iframe>

<!--
399 310 772 188 121 747 908 375 658 989 471 891 842 282 539 788 863 399 310 772 188 121 747 908 375 658 989 471 891 842 282 539 788 863 399 310 772 188 121 747 908 375 658 989 471 891 842 282 539 788 863 526 640 917 51 415 140 573 716 965 688 395 829 76 810 801 733 244 95 205 283 488 189 705 173 743 574 947 608 694 973 886 298 223 449 99 309 936 432 209 623 454 ph
-->


Thanks in advance :)

Re: [RC] AJAX Chat

Posted: Wed Nov 12, 2008 3:09 pm
by easygo
LonestarSkizm wrote:
easygo wrote: Try

Code: Select all

<?php
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

// Lets build a page ...
$template->assign_vars(array(
	'U_CHAT'	=> append_sid("{$phpbb_root_path}chat/index.$phpEx"),
));

// Output page
page_header('AJAX Chat');

// Output page
page_header('AJAX Chat');

$template->set_filenames(array(
	'body' => 'chatloader_body.html',
));

page_footer();

?>
as well as

Code: Select all

<!-- INCLUDE overall_header.html -->
<div class="panel">
	<div class="inner">
		<span class="corners-top"><span></span></span>
		<div class="content">
    	<iframe src="{U_CHAT}" frameborder="0" width="960" height="540"></iframe>
 		</div>
		<span class="corners-bottom"><span></span></span>
	</div>
</div>
<!-- INCLUDE overall_footer.html -->
instead of yours and then let's hope it does the trick.

Ok, I've tried that code but still get the same output and I've tried FF3, IE6,and IE7 with no luck.

Hmmm, I'm wondering if maybe my web server is configured wrong or some other phpbb file that's been modded is doing this???

<EDIT: For spelling and grammar>
It seemed to work on my test board, as far as I've seen. So what about your chat_test.php?
There's just some javascript and style sheet behind the test link you provided here.

Means no header, no footer...no valid xhtml. How could it be run this way :?:

Also note that iframe is deprecated in xhtml 1.0 strict as well as no longer supported in xhtml 1.1

Re: [RC] AJAX Chat

Posted: Wed Nov 12, 2008 6:57 pm
by LonestarSkizm
easygo wrote:
It seemed to work on my test board, as far as I've seen. So what about your chat_test.php?
There's just some javascript and style sheet behind the test link you provided here.

Means no header, no footer...no valid xhtml. How could it be run this way :?:

Also note that iframe is deprecated in xhtml 1.0 strict as well as no longer supported in xhtml 1.1

Ok, I want to first say thank you to easygo for the code example and help since it got me pointed in the correct direction to fixing this problem.

It would appear that the problem has been resolved and the chat page is working correctly. I had modified your code to point to "chat_body.html" and I guess I still have a piece of left over code from the Handyman chat program I was using somewhere in one of my templates. I changed the code back to chatloader_body.html and then renamed the file to match and that worked. Now I get to go through all my templates looking for code I no longer need. :(

Re: [RC] AJAX Chat

Posted: Wed Nov 12, 2008 9:35 pm
by easygo
Good to know that it works now, you're welcome.
LonestarSkizm wrote:Now I get to go through all my templates looking for code I no longer need. :(
Yeah, tidying up is always a good idea. ;)

Re: [RC] AJAX Chat

Posted: Thu Nov 13, 2008 8:04 pm
by DABenji
finally managed to get it working

newbie error edited the /common.php file instead of the language/en/common.php file

just one question how do i change the layout and size??

Re: [RC] AJAX Chat

Posted: Fri Nov 14, 2008 8:01 pm
by danswano
Good news for all, the sound notification is now working on firefox 3.0.4! :D