[Alpha] Ajax Shoutbox

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
smuli73
Registered User
Posts: 6
Joined: Thu Aug 10, 2006 12:59 pm

Re: Error on JavaScript part when using IE (v 6.0)

Post by smuli73 » Tue Sep 19, 2006 9:17 am

Kinfule wrote: When does this happen?
On page load?


Yes, on the pageload. After this you can send message to the chat but it doesn't load previous ones nor show the one you sent (IE).

From Firefox window I can see, that it sends the messages to database and shows 'em the messages too.

Kinfule
Registered User
Posts: 706
Joined: Tue Mar 02, 2004 12:16 am
Location: Chile

Re: Error on JavaScript part when using IE (v 6.0)

Post by Kinfule » Tue Sep 19, 2006 10:04 pm

smuli73 wrote:
Kinfule wrote:When does this happen?
On page load?


Yes, on the pageload. After this you can send message to the chat but it doesn't load previous ones nor show the one you sent (IE).

From Firefox window I can see, that it sends the messages to database and shows 'em the messages too.

I guess the problem is that the XML Request doesn't load correctly cause a server problem. I will try to improve this kind of error handeling (The only browser to handle this correctly is Firefox)

Could you copy me your line 402?
My Mods:
Show Voters || Moderate Own Topics || Thanks Mod || Tibian Char BBcode || Tibian Guild BBCode
Working on:
Ajax Shoutbox
I don't support by PM

smuli73
Registered User
Posts: 6
Joined: Thu Aug 10, 2006 12:59 pm

Re: Error on JavaScript part when using IE (v 6.0)

Post by smuli73 » Wed Sep 20, 2006 11:51 am

Kinfule wrote: I guess the problem is that the XML Request doesn't load correctly cause a server problem. I will try to improve this kind of error handeling (The only browser to handle this correctly is Firefox)

Could you copy me your line 402?


As requested:

Code: Select all

				for (var iNode = 0; iNode < root.childNodes.length; iNode++)

Kinfule
Registered User
Posts: 706
Joined: Tue Mar 02, 2004 12:16 am
Location: Chile

Post by Kinfule » Wed Sep 20, 2006 2:37 pm

Ok try replacing yourhandlehResponse(obj) function for this one.

Code: Select all

function handlehResponse(obj)
{	
	if (obj.readyState == 4)
	{	
		if (obj.status == 200)
		{
			indicator_switch();
			// We didn't timeout
			if (obj == httpReceiveChat)
			{
				clearTimeout(receiveTimeout);
			}
			else
			{
				clearTimeout(sendTimeout);			
			}

			var xmldoc;
			var arr = new Array();;
		
			if (xmldoc = obj.responseXML)
			{
				var root, field;
				root = xmldoc.getElementsByTagName('response').item(0);
				for (var iNode = 0; iNode < root.childNodes.length; iNode++)
				{
					var node = root.childNodes.item(iNode);
					if(node.tagName != undefined)
					{
						for (i = 0; i < node.childNodes.length; i++) 
						{
							var sibl = node.childNodes.item(i);
							for (x = 0; x < sibl.childNodes.length; x++)
							{
								if (sibl.childNodes.length > 0)
								{
									sibl2 = sibl.childNodes.item(0);
									field = sibl.tagName;	
									if (field != undefined)
									{
										arr[field] = sibl2.data;
										
										if (arr['error_status'] == 1 && field == 'error_msg')
										{
											alert(arr['error_msg']);
											return false;
										}
									}
								} 
							}
						}
						// Add Content
						if (node.tagName == 'shout' && arr['id'] > lastID)
						{
							var shouter = (arr['shouter_link'] != -1) ? '<a href="'+arr['shouter_link']+'" class="postlink">'+arr['shouter']+'</a>' : arr['shouter']; 				
							var message = unescape(arr['msg']);
							insertNewContent(arr['id'], shouter, message, arr['date'], lastID); 
						}
					}
				}
			}
		}
		// Start the timer for the next request to read data
		if (obj == httpReceiveChat)
		{
			// Get the last Id of this round
			for (var key in arr) 
			{
				if (key == 'id')
				{
					lastID = arr['id']*1;
				}
			}

			setTimeout('receiveChatText();', refresh_time);
		}
	} 
}
My Mods:
Show Voters || Moderate Own Topics || Thanks Mod || Tibian Char BBcode || Tibian Guild BBCode
Working on:
Ajax Shoutbox
I don't support by PM

baerenwurm
Registered User
Posts: 131
Joined: Wed Nov 06, 2002 2:38 pm
Location: Germany

Post by baerenwurm » Thu Sep 21, 2006 6:10 pm

Just a small suggestion:

"Loading..." text instead of a blank table while the shoutbox is loading.

Kinfule
Registered User
Posts: 706
Joined: Tue Mar 02, 2004 12:16 am
Location: Chile

Post by Kinfule » Thu Sep 21, 2006 6:20 pm

Sounds fair enough... I will think of a nice way to implement this.


Also, I'm thinking of removing the activity indicator.
What do you people think?
My Mods:
Show Voters || Moderate Own Topics || Thanks Mod || Tibian Char BBcode || Tibian Guild BBCode
Working on:
Ajax Shoutbox
I don't support by PM

mgutt
Registered User
Posts: 346
Joined: Tue Sep 21, 2004 2:54 pm
Location: Germany, Sankt Augustin
Contact:

Post by mgutt » Thu Sep 21, 2006 6:21 pm

Yes :P
Forums: Honda || phpBB Categories Hierarchy
Mods: Spamfilter against bot registrations || Seo Urls

Wylis
Registered User
Posts: 9
Joined: Thu Sep 07, 2006 8:56 am

Post by Wylis » Fri Sep 22, 2006 7:16 am

Kinfule wrote: Sounds fair enough... I will think of a nice way to implement this.


Also, I'm thinking of removing the activity indicator.
What do you people think?


for me this is a good indicator for a freezing browser or some other errors.

So, if you ask me: just keep ist.

Wylis

mgutt
Registered User
Posts: 346
Joined: Tue Sep 21, 2004 2:54 pm
Location: Germany, Sankt Augustin
Contact:

Post by mgutt » Fri Sep 22, 2006 7:55 am

Wylis wrote:
Kinfule wrote:Sounds fair enough... I will think of a nice way to implement this.


Also, I'm thinking of removing the activity indicator.
What do you people think?


for me this is a good indicator for a freezing browser or some other errors.

So, if you ask me: just keep ist.

Wylis


Do you have an indicator in your operation system and are you waiting for an error ;)

This mod is alpha staged, so if it is released a freeze or something else won't appear anymore. (we hope so ;) )

regards
Forums: Honda || phpBB Categories Hierarchy
Mods: Spamfilter against bot registrations || Seo Urls

Surkow
Registered User
Posts: 19
Joined: Mon Jan 09, 2006 4:52 pm

Post by Surkow » Fri Sep 22, 2006 8:17 am

Wylis wrote:
Kinfule wrote:Sounds fair enough... I will think of a nice way to implement this.


Also, I'm thinking of removing the activity indicator.
What do you people think?


for me this is a good indicator for a freezing browser or some other errors.

So, if you ask me: just keep ist.

Wylis

Do you have a link to your working shoutbox? I also agree about the loading option.

Wylis
Registered User
Posts: 9
Joined: Thu Sep 07, 2006 8:56 am

Post by Wylis » Fri Sep 22, 2006 2:28 pm

Surkow wrote:
Wylis wrote:
Kinfule wrote:Sounds fair enough... I will think of a nice way to implement this.


Also, I'm thinking of removing the activity indicator.
What do you people think?


for me this is a good indicator for a freezing browser or some other errors.

So, if you ask me: just keep ist.

Wylis

Do you have a link to your working shoutbox? I also agree about the loading option.


of course: www.kernhoffnung.de

second_coming
Registered User
Posts: 5
Joined: Fri Sep 22, 2006 2:24 pm

Post by second_coming » Fri Sep 22, 2006 2:30 pm

If you have the shoutbox open in one window and also your forum in another window and you log out of phpBB in the other window you can still post into the shoutbox in the window that is still open (even if you have non registered and guest users switched off).

Obviously shoutbox doesn't know you are no longer logged in and still allows you to post (the username is unregistered on the shoutbox posts)

Is there a way of getting the shoutbox to check that you are still logged in when it checks for new messages and if not refresh the screen and log you out of shoutbox?

thanks

killyouall
Registered User
Posts: 523
Joined: Tue Oct 18, 2005 3:04 am
Contact:

Post by killyouall » Sat Sep 23, 2006 11:25 pm

whats the best way to update?

Kinfule
Registered User
Posts: 706
Joined: Tue Mar 02, 2004 12:16 am
Location: Chile

Post by Kinfule » Sun Sep 24, 2006 8:21 pm

second_coming wrote: If you have the shoutbox open in one window and also your forum in another window and you log out of phpBB in the other window you can still post into the shoutbox in the window that is still open (even if you have non registered and guest users switched off).

Obviously shoutbox doesn't know you are no longer logged in and still allows you to post (the username is unregistered on the shoutbox posts)

Is there a way of getting the shoutbox to check that you are still logged in when it checks for new messages and if not refresh the screen and log you out of shoutbox?

thanks

Bug noted. It will be fixed in next released
My Mods:
Show Voters || Moderate Own Topics || Thanks Mod || Tibian Char BBcode || Tibian Guild BBCode
Working on:
Ajax Shoutbox
I don't support by PM

User avatar
vsabah
Registered User
Posts: 357
Joined: Wed Apr 05, 2006 5:57 pm
Location: Konya / Türkiye
Contact:

Post by vsabah » Mon Sep 25, 2006 6:51 am

Hi everyone!!!
i take an error in IE. it works Mozilla and others...

Kinfule wrote: Ok try replacing yourhandlehResponse(obj) function for this one.

i tried this but it didnt work

Image

Its my error...
Image

For my chat.php you can click HERE!!

IMPORTANT: I didnt any modifications on Shoutbox, all the files are original....

Please help me! What can i do??

when answering my question please quote my message..OK?? :wink:
My english isnt good. :oops:


FOR MY URL: http://www.kostebekforum.com/chat.php

Post Reply

Return to “[2.0.x] MODs in Development”