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.


Mooby The Golden Sock

Quote from: bethl on May 30, 2024, 02:41:13 PMHi 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?
I'm running into the same issue.  Any solution for this?

Steve

Read through the posts on this page. I think you'll see your answer there.
My pet rock is not feeling well. I think it's stoned.

Mooby The Golden Sock

Quote from: Steve on October 23, 2024, 09:54:34 AMRead through the posts on this page. I think you'll see your answer there.
I did. I didn't see any replies that actually addressed the issue. Which post are you referring to?

If you're referring to the error log, fixing line 93 in the file did resolve that, but does not fix the issue with likes.

Jailer

So I tried installing this on my test site and I get the white screen of death. Admin area is still functioning but the main page is a no go.

Simple Machines 2.1.4
PHP 8.2.27
Mods installed: Tiny Portal, message bookmarks, Forum width setting, Snow and Garland (not active currently).


Checked the server error log per @Kindred post above and this is the output.

Stack trace:
#0 /usr/local/www/nginx/Sources/Subs-Shoutbox.php(33): strtolower(Array)
#1 /usr/local/www/nginx/index.php(185): Shoutbox_Load(Array)
#2 {main}
  thrown in /usr/local/www/nginx/Sources/Subs-Shoutbox.php on line 33" while reading response header from upstream, client: 149.102.242.28, server: test.mlcnfriends.com, request: "GET /index.php HTTP/1.0", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "test.mlcnfriends.com", referrer: "https://test.mlcnfriends.com/index.php?action=profile;u=2;area=theme"

Tried from my iphone with Safari and this is the error it produced:

Stack trace:
#0 /usr/local/www/nginx/Sources/Subs-Shoutbox.php(33): strtolower(Array)
#1 /usr/local/www/nginx/index.php(185): Shoutbox_Load(Array)
#2 {main}
  thrown in /usr/local/www/nginx/Sources/Subs-Shoutbox.php on line 33" while reading response header from upstream, client: 154.47.25.245, server: test.mlcnfriends.com, request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "test.mlcnfriends.com"
2025/01/25 10:06:50 [error] 99039#103210: *754 open() "/usr/local/www/nginx/Themes/Bend/css/minified_9ef4bcf6f6c9ba29e3ea9b61f6780eb9.css" failed (2: No such file or directory), client: 154.47.25.245, server: test.mlcnfriends.com, request: "GET /Themes/Bend/css/minified_9ef4bcf6f6c9ba29e3ea9b61f6780eb9.css?smf214_1724424702 HTTP/1.0", host: "test.mlcnfriends.com", referrer: "https://test.mlcnfriends.com/"
2025/01/25 10:06:50 [error] 99039#103210: *755 open() "/usr/local/www/nginx/Themes/Bend/scripts/minified_03d00c26327a30ef3c3e0a67e92e8d85.js" failed (2: No such file or directory), client: 154.47.25.245, server: test.mlcnfriends.com, request: "GET /Themes/Bend/scripts/minified_03d00c26327a30ef3c3e0a67e92e8d85.js?smf214_1724424702 HTTP/1.0", host: "test.mlcnfriends.com", referrer: "https://test.mlcnfriends.com/"

Anyone got any ideas what may be the issue? Would like to get a shoutbox going that has sound notification hence my reason from trying to get this working as opposed to using the shoutbox in Tiny Portal.

Cola-Coca

I have a similar problem, it shows me:

QuoteWarning: strtolower() expects parameter 1 to be string, array given in /xxxxx/Sources/Subs-Shoutbox.php on line 33

I have the latest version of SMF 2.1.4 , and I only have one mod installed 'HideContent_2.3.2'.
Looks like 'SMFPacks.com Shoutbox' it needs a new update for v. 2.1.4.
I LOVE SMF

Advertisement: