News:

Wondering if this will always be free?  See why free is better.

Main Menu

SMFPacks.com Shoutbox

Started by Nibogo, October 19, 2008, 11:41:06 AM

Previous topic - Next topic

michalm

Hi,
I just installed Shoutbox and noticed that when I use special characters like: ę ł ą I get this: ł ż ń
SMF 2.1.4.
How to check if Shoutbox is UTF-8?
Thank you
Mike

michalm

It looks like my friend fixed it. Maybe someone will need information on how to do this...

In the file Shoutbox.php in a method that adds messages - Shoutbox_SendMsg, we commented on the line:

$msg = $smcFunc['htmlspecialchars']($msg, ENT_QUOTES);

Why? htmlspecialchars do not work correctly with utf8 characters and htmlentites explained here:

hxxp:stackoverflow.com/a/4786568/22302252 [nonactive]

Oldiesmann

$smcFunc['htmlspecialchars'] isn't the same as htmlspecialchars and will specifically handle UTF8 if you tell it to. The problem is that parameter isn't specified there, so it defaults to ISO-8859-1.

Try this:
$msg = $smcFunc['htmlspecialchars']($msg, ENT_QUOTES, 'UTF-8');
Michael Eshom
Christian Metal Fans

bethl

Hi I have tried to install the chat on my 2.14 default curve 2 theme forum and when I install it my Likes system doesn't work.  What do I need to do to get my Likes working with the chat installed?

TheKrandall

Just posting this in the event someone else runs into this issue:
Just updated my site from 2.0.19 to 2.1.4. I just installed this chat/shoutbox and was instantly receiving this error in the error logs every time my page refreshed: something something "Subs-Shoutbox.php (Line 93)" was mentioning



// we need this be faster...
==>93:
if (!empty($_SESSION['shoutbox_lastget']) && $_SESSION['shoutbox_lastget'] > $shoutbox['banUpadte'])
94:    
return false;

If line should be replaced with:
if (!empty($_SESSION['shoutbox_lastget']) && !empty($shoutbox['banUpadte']) && $_SESSION['shoutbox_lastget'] > $shoutbox['banUpadte'])
Thanks to random post'er here: https://www.simplemachines.org/community/index.php?msg=4150260

Arantor

That random poster is the maintainer of the mod...
Holder of controversial views, all of which my own.

Advertisement: