TinyPortal

Development => Support => Topic started by: Ken. on February 02, 2015, 06:21:54 PM

Title: ShoutBox, speaking of...
Post by: Ken. on February 02, 2015, 06:21:54 PM
In another Topic, Shoutbox Guest Issues (http://www.tinyportal.net/index.php?topic=35395.0), we are working through an issue with the shoutbox and I discovered a new issue but didn't want to clutter up that topic, so started this new thread.
----------------------
SMF 2.0.9
TP 1.108

If a smiles is added to a post in the shoutbox and then the shout is edited...
The following letter/symbol will appear in the text screen; "Â"
If the 'Save' button is then selected in the shoutbox edit page the letter/symbol will then appear in the shoutbox display block as seen in this screen shot.

... this behavior is not present in shouts with no smiles included.
Title: Re: ShoutBox, speaking of...
Post by: lurkalot on February 02, 2015, 06:29:49 PM
Quote from: Ken. on February 02, 2015, 06:21:54 PM


If a smiles is added to a post in the shoutbox and then the shout is edited...
The following letter/symbol will appear in the text screen; "Â"
If the 'Save' button is then selected in the shoutbox edit page the letter/symbol will then appear in the shoutbox display block as seen in this screen shot.

... this behavior is not present in shouts with no smiles included.

Seems if you a apace before the smiley it does this.  If you just type some text and add a smiley without a space it doesn't.  It's doing it on mine too. TP 1.108
Title: Re: ShoutBox, speaking of...
Post by: bloc on February 02, 2015, 06:35:23 PM
I can't duplicate it atm..but I think this is character set related, because that sign is what appear when using non-western letters and there's a clash between charachter-sets used in the database.A letter like "Ø" would appear like that.

Title: Re: ShoutBox, speaking of...
Post by: Ken. on February 02, 2015, 06:37:49 PM
You are right Mick, good catch.  O0
Title: Re: ShoutBox, speaking of...
Post by: bloc on February 02, 2015, 10:49:26 PM
What about now? Still same issue with attached file? (goes in tp-files/tp-modules/TPShout/Sources)
Title: Re: ShoutBox, speaking of...
Post by: lurkalot on February 02, 2015, 10:58:29 PM
Quote from: bloc on February 02, 2015, 10:49:26 PM
What about now? Still same issue with attached file? (goes in tp-files/tp-modules/TPShout/Sources)

Yep, it seems to have fixed this.

Nice work.  O0
Title: Re: ShoutBox, speaking of...
Post by: newday on February 02, 2015, 11:31:19 PM
This also happens with "+" signs. Nothing appears in the actual shoutbox, but you see a "Â" sign in the shoutbox admin page.
Title: Re: ShoutBox, speaking of...
Post by: lurkalot on February 02, 2015, 11:41:56 PM
Quote from: newday on February 02, 2015, 11:31:19 PM
This also happens with "+" signs. Nothing appears in the actual shoutbox, but you see a "Â" sign in the shoutbox admin page.

bloc's file posted above seems to have sorted this.  ;)
Title: Re: ShoutBox, speaking of...
Post by: newday on February 02, 2015, 11:56:22 PM
No. It still does not show up. I even tested it on the shoutbox here and as you can see it does not show the + sign.

Quote from: lurkalot on February 02, 2015, 11:41:56 PM
bloc's file posted above seems to have sorted this.  ;)
Title: Re: ShoutBox, speaking of...
Post by: lurkalot on February 03, 2015, 12:06:18 AM
Quote from: newday on February 02, 2015, 11:56:22 PM
No. It still does not show up. I even tested it on the shoutbox here and as you can see it does not show the + sign.

Quote from: lurkalot on February 02, 2015, 11:41:56 PM
bloc's file posted above seems to have sorted this.  ;)

OK, sorry I misread your post.  I wasn't seeing the "Â" sign in my edit page.  But you're correct the + doesn't show in shout.  I'm sure it did while I was testing, but it's gone now. Strange.

Thanks for the heads up.  ;)
Title: Re: ShoutBox, speaking of...
Post by: bloc on February 03, 2015, 04:21:11 PM
This removal of the + sign got me very puzzled, it seems to be removed no matter what I change. Could it be something in the javascript? I wonder...

And to make it more strange, adding + do work in shoutbox admin screen.
Title: Re: ShoutBox, speaking of...
Post by: bloc on February 03, 2015, 06:26:26 PM
Ok, I am not sure it worth "fixing" the disappearance of the plus sign. This is something the ajax code in JQuery does to the data, probably for security reasons.

Since the shoutbox use this ajax code in both ajax mode AND no-ajax mode(you need to press the input button but the code still goes to the ajax code) I would need to rewrite it a bit, just to fix this thing. I think I'll leave it be for now and focus on new code.

Has this error been reported several times other than from the team? In other words, anyone noticed it? :)
Title: Re: ShoutBox, speaking of...
Post by: lurkalot on February 03, 2015, 06:40:51 PM
Quote from: bloc on February 03, 2015, 06:26:26 PM

Has this error been reported several times other than from the team? In other words, anyone noticed it? :)

Haven't seen anyone else mention it.  Only newday, further back in this thread.  ;)
Title: Re: ShoutBox, speaking of...
Post by: newday on February 10, 2015, 05:15:05 AM
Can you tell me what lines would need to be rewritten? Also any terms I could google to get a better understanding of the cause? I'll gladly fix it myself [and do all the reading required to understand it], I just need a few pointers.

Good job on the forum btw, it's getting better and better every time I visit.

Quote from: bloc on February 03, 2015, 06:26:26 PM
Ok, I am not sure it worth "fixing" the disappearance of the plus sign. This is something the ajax code in JQuery does to the data, probably for security reasons.

Since the shoutbox use this ajax code in both ajax mode AND no-ajax mode(you need to press the input button but the code still goes to the ajax code) I would need to rewrite it a bit, just to fix this thing. I think I'll leave it be for now and focus on new code.

Has this error been reported several times other than from the team? In other words, anyone noticed it? :)
Title: Re: ShoutBox, speaking of...
Post by: WillyP on February 12, 2015, 06:32:33 PM
Quote from: bloc on February 03, 2015, 04:21:11 PM
This removal of the + sign got me very puzzled, it seems to be removed no matter what I change. Could it be something in the javascript? I wonder...

And to make it more strange, adding + do work in shoutbox admin screen.

newday, sounds to me like bloc has tried to fix it and was unable. By process of elimination, he has concluded it's in the javascript. If the Jquery Ajax function is doing this, then you should start with that.
Title: Re: ShoutBox, speaking of...
Post by: bloc on February 12, 2015, 10:47:27 PM
Yes, its not so easy as it seems..I have some plans for not using JQuery for the shoutbox, but not in the 1.1 version. So for now the curious plus-sign bug will have to remain.

Title: Re: ShoutBox, speaking of...
Post by: ZarPrime on February 12, 2015, 11:42:36 PM
I'd say just type "plus" rather than "+".
Title: Re: ShoutBox, speaking of...
Post by: ZarPrime on February 12, 2015, 11:45:57 PM
BTW, when we start working on 2.0, I'd really like for us to be able to have multiple shoutboxes, but we can talk about that later.
Title: Re: ShoutBox, speaking of...
Post by: ZarPrime on February 13, 2015, 12:58:59 AM
Hmmm, I thought we tested this one time and had it fixed a while back. Take a look at the shouftbox. I typed  " 21 ℉ tonight here which is about -6 ℃" without the quotes.
Title: Re: ShoutBox, speaking of...
Post by: ZarPrime on February 13, 2015, 01:58:20 AM
OK, I figured it out. I did indeed test this (see attached image). I used a single degree sign at that time and put a space after it, followed by the F or C, like 21° F.

I have a unicode app on my tablet that combines the degree sign and the F or C, depending on whether you search for "degrees fahrenheit" or "degrees celsius", so that it looks like 21 ℉ tonight here which is about -6 ℃. Interesting.