[ABD] AJAX Chat

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
gr00vytunes
Registered User
Posts: 58
Joined: Sat May 03, 2008 1:53 pm

Re: [RC] AJAX Chat

Post by gr00vytunes »

Bogey wrote:
gr00vytunes wrote:
gr00vytunes wrote:Does anyone know where Ajax gets its time from? I am posted messages and they are 8 or 9 mins behind time??

Thanks in Advance

Anyone?

Code: Select all

	function getChatViewMessageXML(
		$messageID,
		$timeStamp,
		$userID,
		$userName,
		$userRole,
		$channelID,
		$text
		) {
		$message = '<message';
		$message .= ' id="'.$messageID.'"';
		$message .= ' dateTime="'.date('r', $timeStamp).'"';
		$message .= ' userID="'.$userID.'"';
		$message .= ' userRole="'.$userRole.'"';
		$message .= ' channelID="'.$channelID.'"';
		$message .= '>';
		$message .= '<username><![CDATA['.$this->encodeSpecialChars($userName).']]></username>';
		$message .= '<text><![CDATA['.$this->encodeSpecialChars($text).']]></text>';
		$message .= '</message>';
		return $message;
	}
Line 1980-2000 in file AJAX_CHAT_PATH/lib/class/AJAXChat.php

cheers
Where does the timestamp come from? The Hosting Server? My phpBB has the correct time but Ajax Chat is 8 or 9 mins behind...

Cheers
User avatar
easygo
Registered User
Posts: 689
Joined: Sun Oct 31, 2004 4:23 pm
Contact:

Re: [RC] AJAX Chat

Post by easygo »

Strange somehow, i.e. never happened to me! If there's a minimal time difference on the part
of server, you should get the same result in both cases, chat/phpbb post times.

Could you provide a link to that issue? // test user account incl.
Casual developer for AJAX Chat on behalf of the author / Arcade Center powered by phpBB Arcade

A problem well put is half solved. (John Dewey, 1859–1952)
xtremesniper
Registered User
Posts: 10
Joined: Mon Nov 12, 2007 10:43 pm

Re: [RC] AJAX Chat

Post by xtremesniper »

Hi, I finally managed to implement the Ajax Chat into my PHPBB 3.0.4 installation.

But now I have a few questions...

How come no matter what setting I set my config.js to, the chat does not reflect them? Even after I purge the cache in the ACP. For example, I changed the settings so that...

1. sounds are off by default
2. showchannelmessages is off by default
3. auto focus on load is off by default

However, none of those settings reflect in the chat. I was able to force the auto focus to stop working by commenting out the line of code that made it work, but the other two are a little more complicated from what I can tell, and I'm not sure why a simple setting change isn't working to begin with.

Any thoughts? Thanks.

EDIT: Also, easygo, I would love to know how you managed to implement your chatbox on this page ( http://www.net4seven.de/phpbb3/ ) the way that you did. Instead of a full blown chat system, I was looking for an implementation similar to that. Thanks.

SECOND EDIT: I also have one more question. Is there a setting to change how it wipes older messages? When I go to another page on the forum and come back, only the latest 6 or so messages are left on screen and the older ones are gone. I'd like to have a set number of messages that should always show, and anything over that number gets bumped off. That's what a real shoutbox is like.

Thanks.
Bogey
Registered User
Posts: 419
Joined: Wed Sep 19, 2007 2:31 am

Re: [RC] AJAX Chat

Post by Bogey »

gr00vytunes wrote:
Bogey wrote:
gr00vytunes wrote:
gr00vytunes wrote:Does anyone know where Ajax gets its time from? I am posted messages and they are 8 or 9 mins behind time??

Thanks in Advance

Anyone?

Code: Select all

	function getChatViewMessageXML(
		$messageID,
		$timeStamp,
		$userID,
		$userName,
		$userRole,
		$channelID,
		$text
		) {
		$message = '<message';
		$message .= ' id="'.$messageID.'"';
		$message .= ' dateTime="'.date('r', $timeStamp).'"';
		$message .= ' userID="'.$userID.'"';
		$message .= ' userRole="'.$userRole.'"';
		$message .= ' channelID="'.$channelID.'"';
		$message .= '>';
		$message .= '<username><![CDATA['.$this->encodeSpecialChars($userName).']]></username>';
		$message .= '<text><![CDATA['.$this->encodeSpecialChars($text).']]></text>';
		$message .= '</message>';
		return $message;
	}
Line 1980-2000 in file AJAX_CHAT_PATH/lib/class/AJAXChat.php

cheers
Where does the timestamp come from? The Hosting Server? My phpBB has the correct time but Ajax Chat is 8 or 9 mins behind...

Cheers
I don't know where the timestamp is taken from. I can't find anywhere in any of the AJAX Chat files the $timestamp defined. It's just used in 4 places in that one file like it has already being defined, so I'm assuming it's using one that is defined by phpBB but I'm not sure. You got to wait for the author or someone who knows the answer to post back.

cheers
railroadfan2
Registered User
Posts: 15
Joined: Wed Aug 17, 2005 2:19 pm

Re: [RC] AJAX Chat

Post by railroadfan2 »

easygo wrote:
killerz11 wrote:I've searched through pages but could not find anything to help me.

I am having troubles with the shoutbox displaying on my forum. I want my chatlist to look like this with colored names, a delete button for people with the permissions, and alternating row colors http://www.net4seven.de/phpbb3/ so basically how it looks in the normal /chat/

My shoutbox appears like this in the normal text font of my forum
(23:06:02) ChatBot: Fireman rolls 1d6 and gets 6.
(11:49:25) ChatBot: T6 rolls 1d6 and gets 2.

I can't find the chat messages in the page source either, otherwise I might have been able to find where these are generated.

thanks
Um well, if you followed this wiki step by step

http://ajax-chat.wiki.sourceforge.net/p ... ntegration

you still may have to refresh your theme in order to see any style sheet around. :)

Regards
Maybe someone can give help on this, as my shoutbox that is placed in my overall_footer is having basically the same problem. Can someone give some insight as to why it's just showing as plain text, instead of being in a style box with scroll bars on the right? See the image at this link:
http://www.railroadfan.com/images/ajax1.JPG
xtremesniper
Registered User
Posts: 10
Joined: Mon Nov 12, 2007 10:43 pm

Re: [RC] AJAX Chat

Post by xtremesniper »

railroadfan2 wrote:Maybe someone can give help on this, as my shoutbox that is placed in my overall_footer is having basically the same problem. Can someone give some insight as to why it's just showing as plain text, instead of being in a style box with scroll bars on the right? See the image at this link:
http://www.railroadfan.com/images/ajax1.JPG
My understanding is that this is normal behaviour. Assuming you followed the instructions for implementing a shoutbox into PHPBB, that's what it should look like. The mod assumes that the shoutbox should be a slimmed down (to the point of being simply basic text) version of the Chat. This is why people are implementing an iFrame that contains the full blown Chat to solve their problem.
gr00vytunes
Registered User
Posts: 58
Joined: Sat May 03, 2008 1:53 pm

Re: [RC] AJAX Chat

Post by gr00vytunes »

I have implemented this chat into a popup and it is working quite well.

i have a couple of small issues that have been posted previous which are the connection status errors 0 and 500, the other is the time is 8 or 9 minutes behind my actual phpBB 3.0.4 time?

I would like a little stats area at the top of the forum list that will show who is in the popup chat and also the last 10 or so messages but no access to post a msg. I have so far followed the shoutbox integration wiki but its just floating about... Its not in a border which matches the forums...

here is a pic.

Image


Any thoughts ideas or code would be greatly appreciated.
User avatar
easygo
Registered User
Posts: 689
Joined: Sun Oct 31, 2004 4:23 pm
Contact:

Re: [RC] AJAX Chat

Post by easygo »

Bogey wrote:
gr00vytunes wrote:
Bogey wrote:
gr00vytunes wrote:
gr00vytunes wrote:Does anyone know where Ajax gets its time from? I am posted messages and they are 8 or 9 mins behind time??

Thanks in Advance

Anyone?

Code: Select all

	function getChatViewMessageXML(
		$messageID,
		$timeStamp,
		$userID,
		$userName,
		$userRole,
		$channelID,
		$text
		) {
		$message = '<message';
		$message .= ' id="'.$messageID.'"';
		$message .= ' dateTime="'.date('r', $timeStamp).'"';
		$message .= ' userID="'.$userID.'"';
		$message .= ' userRole="'.$userRole.'"';
		$message .= ' channelID="'.$channelID.'"';
		$message .= '>';
		$message .= '<username><![CDATA['.$this->encodeSpecialChars($userName).']]></username>';
		$message .= '<text><![CDATA['.$this->encodeSpecialChars($text).']]></text>';
		$message .= '</message>';
		return $message;
	}
Line 1980-2000 in file AJAX_CHAT_PATH/lib/class/AJAXChat.php

cheers
Where does the timestamp come from? The Hosting Server? My phpBB has the correct time but Ajax Chat is 8 or 9 mins behind...

Cheers
I don't know where the timestamp is taken from. I can't find anywhere in any of the AJAX Chat files the $timestamp defined. It's just used in 4 places in that one file like it has already being defined, so I'm assuming it's using one that is defined by phpBB but I'm not sure. You got to wait for the author or someone who knows the answer to post back.

cheers
You are wrong! It's well-defined in the same file. See function getChatViewMessagesXML()
Casual developer for AJAX Chat on behalf of the author / Arcade Center powered by phpBB Arcade

A problem well put is half solved. (John Dewey, 1859–1952)
gr00vytunes
Registered User
Posts: 58
Joined: Sat May 03, 2008 1:53 pm

Re: [RC] AJAX Chat

Post by gr00vytunes »

when running the Chat on a local webserver the time is fine! so it must be the hosting server who's time is out??
User avatar
easygo
Registered User
Posts: 689
Joined: Sun Oct 31, 2004 4:23 pm
Contact:

Re: [RC] AJAX Chat

Post by easygo »

gr00vytunes wrote:when running the Chat on a local webserver the time is fine! so it must be the hosting server who's time is out??
You got it! That's why I made it bold for you last time. :)

See :: http://www.phpbb.com/community/viewtopi ... 5#p8300795
Casual developer for AJAX Chat on behalf of the author / Arcade Center powered by phpBB Arcade

A problem well put is half solved. (John Dewey, 1859–1952)
User avatar
easygo
Registered User
Posts: 689
Joined: Sun Oct 31, 2004 4:23 pm
Contact:

Re: [RC] AJAX Chat

Post by easygo »

xtremesniper wrote:Hi, I finally managed to implement the Ajax Chat into my PHPBB 3.0.4 installation.

But now I have a few questions...

How come no matter what setting I set my config.js to, the chat does not reflect them? Even after I purge the cache in the ACP. For example, I changed the settings so that...

1. sounds are off by default
2. showchannelmessages is off by default
3. auto focus on load is off by default

However, none of those settings reflect in the chat. I was able to force the auto focus to stop working by commenting out the line of code that made it work, but the other two are a little more complicated from what I can tell, and I'm not sure why a simple setting change isn't working to begin with.

Any thoughts? Thanks.

EDIT: Also, easygo, I would love to know how you managed to implement your chatbox on this page ( http://www.net4seven.de/phpbb3/ ) the way that you did. Instead of a full blown chat system, I was looking for an implementation similar to that. Thanks.

SECOND EDIT: I also have one more question. Is there a setting to change how it wipes older messages? When I go to another page on the forum and come back, only the latest 6 or so messages are left on screen and the older ones are gone. I'd like to have a set number of messages that should always show, and anything over that number gets bumped off. That's what a real shoutbox is like.

Thanks.
Hi,

there are too many problems at a single blow! Let's take one thing at a time, please.

So, where should we start?

Regards

P.S. Either shoutbox or chatbox? I need to know what you want // on what page
Casual developer for AJAX Chat on behalf of the author / Arcade Center powered by phpBB Arcade

A problem well put is half solved. (John Dewey, 1859–1952)
xtremesniper
Registered User
Posts: 10
Joined: Mon Nov 12, 2007 10:43 pm

Re: [RC] AJAX Chat

Post by xtremesniper »

easygo wrote:
xtremesniper wrote:Hi, I finally managed to implement the Ajax Chat into my PHPBB 3.0.4 installation.

But now I have a few questions...

How come no matter what setting I set my config.js to, the chat does not reflect them? Even after I purge the cache in the ACP. For example, I changed the settings so that...

1. sounds are off by default
2. showchannelmessages is off by default
3. auto focus on load is off by default

However, none of those settings reflect in the chat. I was able to force the auto focus to stop working by commenting out the line of code that made it work, but the other two are a little more complicated from what I can tell, and I'm not sure why a simple setting change isn't working to begin with.

Any thoughts? Thanks.

EDIT: Also, easygo, I would love to know how you managed to implement your chatbox on this page ( http://www.net4seven.de/phpbb3/ ) the way that you did. Instead of a full blown chat system, I was looking for an implementation similar to that. Thanks.

SECOND EDIT: I also have one more question. Is there a setting to change how it wipes older messages? When I go to another page on the forum and come back, only the latest 6 or so messages are left on screen and the older ones are gone. I'd like to have a set number of messages that should always show, and anything over that number gets bumped off. That's what a real shoutbox is like.

Thanks.
Hi,

there are too many problems at a single blow! Let's take one thing at a time, please.

So, where should we start?

Regards

P.S. Either shoutbox or chatbox? I need to know what you want // on what page
Well I guess the most important thing right now is the issue about the config settings not being reflected in the chat.

Right now I have my forum set up so that the chat is included on the index of the board using an iFrame, so there is no shoutbox being used at this time. But I guess one of my questions in the other post was asking about your implementation of the shoutbox, so maybe I'll change it back if I can make sense of that later.

But for now, my issue is with the changing of the config.js file and how any changes to it does not reflect in the chat.

To reiterate from my previous post:

No matter what setting I set my config.js to, the chat does not reflect them. Even after I purge the cache in the ACP. For example, I changed the settings so that...

1. sounds are off by default
2. showchannelmessages is off by default
3. auto focus on load is off by default

Thanks!
gr00vytunes
Registered User
Posts: 58
Joined: Sat May 03, 2008 1:53 pm

Re: [RC] AJAX Chat

Post by gr00vytunes »

easygo wrote:
gr00vytunes wrote:when running the Chat on a local webserver the time is fine! so it must be the hosting server who's time is out??
You got it! That's why I made it bold for you last time. :)

See :: http://www.phpbb.com/community/viewtopi ... 5#p8300795

Well in chat/lib/config.php

Code: Select all

// Defines the timezone offset in seconds (-12*60*60 to 12*60*60) - if null, the server timezone is used:
$config['timeZoneOffset'] = null;
So it is the Server! I reported it to the Hosting company. If they don't sort it at least I can offset the time :)
User avatar
easygo
Registered User
Posts: 689
Joined: Sun Oct 31, 2004 4:23 pm
Contact:

Re: [RC] AJAX Chat

Post by easygo »

gr00vytunes wrote:
easygo wrote:
gr00vytunes wrote:when running the Chat on a local webserver the time is fine! so it must be the hosting server who's time is out??
You got it! That's why I made it bold for you last time. :)

See :: http://www.phpbb.com/community/viewtopi ... 5#p8300795

Well in chat/lib/config.php

Code: Select all

// Defines the timezone offset in seconds (-12*60*60 to 12*60*60) - if null, the server timezone is used:
$config['timeZoneOffset'] = null;
So it is the Server! I reported it to the Hosting company. If they don't sort it at least I can offset the time :)
I wish you were right, honestly! But this setting will only affect your opening hours (if currently in use)

On that score, there's still something to do. I know... :oops:
Casual developer for AJAX Chat on behalf of the author / Arcade Center powered by phpBB Arcade

A problem well put is half solved. (John Dewey, 1859–1952)
User avatar
easygo
Registered User
Posts: 689
Joined: Sun Oct 31, 2004 4:23 pm
Contact:

Re: [RC] AJAX Chat

Post by easygo »

xtremesniper wrote:No matter what setting I set my config.js to, the chat does not reflect them. Even after I purge the cache in the ACP. For example, I changed the settings so that...

1. sounds are off by default
2. showchannelmessages is off by default
3. auto focus on load is off by default

Thanks!
Don't forget the server-sided settings in chat/lib/config.php, especially for showChannelMessages.

Set $config['showChannelMessages'] to false, and it should be done. :)

To get the chat sounds off by default, go into chat/js/config.js and set audio to false.

-- worked for me after reloading the page (see loudspeaker)

Still no change? Then, it could be necessary to purge the browser's cache as well. :idea:

To the auto focus: Never tested yet! There might be a problem, let's see...
Casual developer for AJAX Chat on behalf of the author / Arcade Center powered by phpBB Arcade

A problem well put is half solved. (John Dewey, 1859–1952)
Locked

Return to “[3.0.x] Abandoned MODs”