collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 382
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Author Topic: Shoutbox can't refresh on non utf-8 languages  (Read 24954 times)

0 Members and 1 Guest are viewing this topic.

Offline ataru

  • Jr. Member
  • **
  • Posts: 63
  • Gender: Male
    • Biancocelesti.org - Sempre Forza Lazio
  • SMF Version: 2.0.10
  • SP Version: 2.3.6
Shoutbox can't refresh on non utf-8 languages
« on: February 17, 2015, 10:57:39 AM »
referring to:
http://simpleportal.net/index.php?topic=10356.0
and
http://simpleportal.net/index.php?topic=13840.0

i found that in Portalshoutbox.template.php the use of htmlspecialchars for non utf-8 languages, due to php 5.4, generates empty values in xml, so that shoutboxes can't refresh when xml is compiled with special chars:
Code: [Select]
function template_shoutbox_xml()
{
global $context, $txt, $smcFunc;

echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '>
<smf>
<shoutbox>', $context['SPortal']['shoutbox']['id'], '</shoutbox>';

if ($context['SPortal']['updated'])
{
echo '
<updated>1</updated>
<error>', empty($context['SPortal']['shouts']) ? $txt['sp_shoutbox_no_shout'] : 0, '</error>
<warning>', !empty($context['SPortal']['shoutbox']['warning']) ? $smcFunc['htmlspecialchars']($context['SPortal']['shoutbox']['warning']) : 0, '</warning>
<reverse>', !empty($context['SPortal']['shoutbox']['reverse']) ? 1 : 0, '</reverse>';

foreach ($context['SPortal']['shouts'] as $shout)
echo '
<shout>
<id>', $shout['id'], '</id>
<author>', htmlspecialchars($shout['author']['link']), '</author>
<time>', htmlspecialchars($shout['time']), '</time>
<timeclean>', htmlspecialchars(strip_tags($shout['time'])), '</timeclean>
<delete>', !empty($shout['delete_link_js']) ? htmlspecialchars($shout['delete_link_js']) : 0, '</delete>
<content>', htmlspecialchars($shout['text']), '</content>
<is_me>', $shout['is_me'] ? 1 : 0, '</is_me>
</shout>';
}
else
echo '
<updated>0</updated>';

echo '
</smf>';
using $smcFunc['htmlspecialchars'] will fix it. can you consider it in next releases?

Code: [Select]
function template_shoutbox_xml()
{
global $context, $txt, $smcFunc;

echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '>
<smf>
<shoutbox>', $context['SPortal']['shoutbox']['id'], '</shoutbox>';

if ($context['SPortal']['updated'])
{
echo '
<updated>1</updated>
<error>', empty($context['SPortal']['shouts']) ? $txt['sp_shoutbox_no_shout'] : 0, '</error>
<warning>', !empty($context['SPortal']['shoutbox']['warning']) ? $smcFunc['htmlspecialchars']($context['SPortal']['shoutbox']['warning']) : 0, '</warning>
<reverse>', !empty($context['SPortal']['shoutbox']['reverse']) ? 1 : 0, '</reverse>';

foreach ($context['SPortal']['shouts'] as $shout)
echo '
<shout>
<id>', $shout['id'], '</id>
<author>', $smcFunc['htmlspecialchars']($shout['author']['link']), '</author>
<time>', $smcFunc['htmlspecialchars']($shout['time']), '</time>
<timeclean>', $smcFunc['htmlspecialchars'](strip_tags($shout['time'])), '</timeclean>
<delete>', !empty($shout['delete_link_js']) ? $smcFunc['htmlspecialchars']($shout['delete_link_js']) : 0, '</delete>
<content>', $smcFunc['htmlspecialchars']($shout['text']), '</content>
<is_me>', $shout['is_me'] ? 1 : 0, '</is_me>
</shout>';
}
else
echo '
<updated>0</updated>';

echo '
</smf>';

thanks

Offline Raji

  • Full Member
  • ***
  • Posts: 102
  • Gender: Female
    • Baaskani Diwwan
  • SMF Version: 2.0.1
  • SP Version: 2.3.4
Re: Shoutbox can't refresh on non utf-8 languages
« Reply #1 on: July 04, 2015, 11:13:29 AM »
where is this file?
Portalshoutbox.template.php

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Shoutbox can't refresh on non utf-8 languages
« Reply #2 on: July 04, 2015, 11:16:52 AM »
A little search would have told you, but it's usually in Themes/default directory ;)
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Shoutbox can't refresh on non utf-8 languages
« Reply #3 on: August 01, 2015, 06:23:19 AM »
Thank you for the report and suggested fix. I can confirm that that's how it should have been done. This should be fixed in the next version. Until then, those who are having problems may use the suggested fix in the first post.
And slowly, you come to realize... It's all as it should be...

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Shoutbox can't refresh on non utf-8 languages
« Reply #4 on: August 08, 2015, 10:07:32 AM »
The fix for this has been committed.
And slowly, you come to realize... It's all as it should be...

Offline Delete Me

  • Newbie
  • Posts: 2
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
  • Elkarte Version: None
Re: Shoutbox can't refresh on non utf-8 languages
« Reply #5 on: December 25, 2015, 08:46:39 PM »
I've got smf 2.0.11, SP 2.3.6, php 5.5, and the shoutbox has the same issue with not refreshing.  Further, randomly upon page refresh, doesn't show the last message entered, refreshing the page repeatedly eventually yields all messages.. very random.

I've used the correct file found in one of these posts but it hasn't solved either of these issues at all.  This shoutbox is hugely bugged, can anyone help me out or point me to what I should do?

Offline Delete Me

  • Newbie
  • Posts: 2
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
  • Elkarte Version: None
Re: Shoutbox can't refresh on non utf-8 languages
« Reply #6 on: December 26, 2015, 12:00:43 PM »
Bump :/   Uninstall then reinstall, using the corrected shoutbox file linked on one of those two threads, clearing forum cache, even using a brand new forum from fresh install.... This shoutbox does not auto-refresh and still does not always load all messages.  I am using english -utf8.

Has anyone found a real working solution to this?

Offline emanuele

  • Developer
  • *
  • Posts: 293
Re: Shoutbox can't refresh on non utf-8 languages
« Reply #7 on: December 26, 2015, 05:47:29 PM »
Link to your forum?

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Shoutbox can't refresh on non utf-8 languages
« Reply #8 on: December 26, 2015, 05:53:07 PM »
Also, not to be mean, but if it works for everyone who tried that fix other than you, please don't claim it's bugged, everytime it's something else messed up by either the host or some template conflict, not the shoutbox itself.
And yes, a link to your forum could help, with a visible shoutbox of course ;)

Regards
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline FLHS

  • Newbie
  • Posts: 2
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Shoutbox can't refresh on non utf-8 languages
« Reply #9 on: June 27, 2016, 03:53:49 PM »
Hello,

the solution described doesn't works for me.
What have I done?

I transfered my server from an old hardware to a new Hardware.
  • I created a dump from the SQL database with "mysqldump -u root -p <database> > /backup/<database>.sql"
  • I got the user with "SHOW GRANTS FOR '<username>'@'localhost';"
  • I backup the folder with the installation
I restored the whole site on the new machine in the same way:
  • Copy the folder to the new location
  • Recreated the datbase with "mysql -u root -p <database> < /backup/<database>.SQL"
  • Recreated the user with the two liner from the output step 2 above.
By this way, I moved from Debian 6 and PHP 5.3.3-7+squeeze28 to Debian 8.5 and PHP 7.0.7-5.
Other things haven't changed.

Everythings runs fine - exept the shoutbox! :(

After every shout I've to refresh the site to make the shout visible.

Of course, I tried the solution described in this thread. But it doesn't work.
After changing the source, nothing changes on the shoutbox but in the error.log I found the following entry:

Quote
PHP Fatal error:  Function name must be a string in <path_to>/Sources/Load.php(2213) : eval()'d code on line 271, referer: http://www.hdb-board.de/index.php?PHPSESSID=xxxxxxxxxxxxxxxxxxxxxxxxxx;wwwRedirect

Does anyone know to solve this?

Thanks
Jens


Edit:
With the template downloaded by here, it runs fine!
« Last Edit: June 27, 2016, 04:19:39 PM by FLHS »

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Shoutbox can't refresh on non utf-8 languages
« Reply #10 on: June 27, 2016, 04:29:06 PM »
Hi FLHS and welcome to SimplePortal.

Considering that SMF itself doesn't work on php 7.0 because of (at least) sessions being broken, I can't really see how it's working, but thanks for taking the time to post.

Regards
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline Jailer

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
  • Elkarte Version: None
Degree symbol breaks shoutbox auto refresh
« Reply #11 on: December 17, 2016, 06:19:11 PM »
When a shout is entered with the degree symbol (small round circle) it breaks the auto refresh on the shoutbox. You have to refresh the entire page to see new shouts. Once the shout with the degree symbol is deleted the shoutbox starts functioning normally again. Tested with shouts posted from my iphone and my PC with the same results.

Running:
SMF 2.0.12
Simple Portal 2.3.6
SP-Shoutbox Notification Sound HTML5 0.5

ETA: It seems certain Alt characters produce the same thing. Not all of them, just certain ones. § (Alt+21) and ¶ (Alt+20) are a couple of examples that produce the same results. 


« Last Edit: December 17, 2016, 07:24:06 PM by Jailer »

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Degree symbol breaks shoutbox auto refresh
« Reply #12 on: December 17, 2016, 08:16:24 PM »
Hi Jailer,

Thanks for your report, however, next time please use the search function before posting, because the topic literally below this one is about the same exact issue (and contains a fix for it, too).
Which is why I'll merge them.

Regards
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis