SMFPacks.com Shoutbox

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

Previous topic - Next topic

Nibogo

If you're using a dedicated mobile theme then you'd need to add the shoutbox to the index.template.php from that theme. Keep in mind that only the pro version is responsive, so this lite version may not look that well on a responsive theme.

Steve

I've started getting this error:

............../index.php?action=shoutbox;sa=send;sesc;xml;row=14
Apply Filter: Only show the errors with the same message
8192: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
Apply Filter: Only show the errors from this file
File: /home/steve/public_html/forums/Sources/Shoutbox.php
Line: 309

What does it mean?
DO NOT pm me for support!

Kindred

It means that your host upgraded php and this mod is still using deprecated functions
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Steve

Which means what? That I live with the errors (which I can) or uninstall this mod?
DO NOT pm me for support!

Kindred

Well, it means that the author needs to upgrade his mod

although it may continue to work (with errors) now, with will soon fail completely.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Steve

DO NOT pm me for support!

Steve

Kindred is right of course ... the errors are getting worse and worse.

Any plans of updating this?
DO NOT pm me for support!

Nibogo

Try opening Shoutbox.php and replacing:

if (strlen($msg) > $shoutbox['fixLongWords'])
{
$msg = strtr($msg, array($breaker => '< >', '&nbsp;' => $context['utf8'] ? "\xC2\xA0" : "\xA0"));
$msg = preg_replace(
'~(?<=[>;:!? ' . $non_breaking_space . '\]()]|^)([\w\.]{' . $shoutbox['fixLongWords'] . ',})~e' . ($context['utf8'] ? 'u' : ''),
'preg_replace(\'/(.{' . ($shoutbox['fixLongWords'] - 1) . '})/' . ($context['utf8'] ? 'u' : '') . '\', \'\\$1< >\', \'$1\')',
$msg);
$msg = strtr($msg, array('< >' => $breaker, $context['utf8'] ? "\xC2\xA0" : "\xA0" => '&nbsp;'));
}


With:

if ($smcFunc['strlen']($msg) > $shoutbox['fixLongWords'])
{
// This is done in a roundabout way because $breaker has "long words" :P.
$msg = strtr($msg, array($breaker => '< >', '&nbsp;' => $context['utf8'] ? "\xC2\xA0" : "\xA0"));
$msg = preg_replace_callback(
'~(?<=[>;:!? ' . $non_breaking_space . '\]()]|^)([\w' . ($context['utf8'] ? '\pL' : '') . '\.]{' . $shoutbox['fixLongWords'] . ',})~' . ($context['utf8'] ? 'u' : ''),
'word_break__preg_callback',
$msg);
$msg = strtr($msg, array('< >' => $breaker, $context['utf8'] ? "\xC2\xA0" : "\xA0" => '&nbsp;'));
}

Steve

Thanks Nibogo. Made the change and will report back this evening when it's been tested a few times. :)
DO NOT pm me for support!

Steve

Looks like a winner. Thanks again. :)
DO NOT pm me for support!


Deprecated

Does this mod work on SMF 2.0.11?

I noted Nibogo's fix in reply #2607 and instead of editing my forum I unpacked the mod, modified the file, repacked it and installed that.

I'm using the default Curve theme. The pre-installation checks looked fine, I installed it, forwarded to the settings page which I didn't change.

But no shout box. Are there any other necessary fixes? I hope you won't consider me lazy but this topic is 131 pages long and maybe my solution is hiding a few or several or a dozen pages back.

It appears to me that if this shout box doesn't work then there is no viable shout box mod on the Mod Site for 2.0.11 since the only other likely looking candidate support topic indicates it has so many problems that it's not worth trying. And no, I don't want to buy a mod.

Oh, and if I can get help finding any/all the fixes required to make it work on 2.0.11 I'll post the updated mod in this topic if Nibogo doesn't mind.

I think I can probably do it right considering I have a couple dozen mods on the Mod Site myself. :)

Steve

I'm using it with no problem (after Nibogo's fix) on 2.0.11 :)
DO NOT pm me for support!

Deprecated

Well it doesn't work for me. I got the idea it might be related to Adobe Flash so I updated that (PITA) but still no joy.

I checked the index template file and the inserted code is there.

Anybody have any ideas?

@rjen

I am using the Shoutbox succesfully since 2011 currently on 2.0.11.

Maybe a silly question but did you activate the shoutbox using the settings in the admin section?
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Sir Osis of Liver

IIRC, had the same problem a while back installing this mod on a forum I was assisting.  Installation was successful, but shoutbox was nowhere to be seen.  Uninstalled it with package manager, reinstalled it, and it worked.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

TSF666

How to add avatar picture in this southbox on darkbreak theme in smf 2.0.11??
Please help.

Nibogo

Quote from: Sir Osis of Liver on February 08, 2016, 09:37:12 PM
IIRC, had the same problem a while back installing this mod on a forum I was assisting.  Installation was successful, but shoutbox was nowhere to be seen.  Uninstalled it with package manager, reinstalled it, and it worked.


That's indeed really strange, maybe something was changed during installations or something was wrong with the theme file.

Quote from: Steve on February 07, 2016, 07:06:29 PM
I'm using it with no problem (after Nibogo's fix) on 2.0.11 :)

I'm really glad it's working nicely :)

Quote from: Deprecated on February 07, 2016, 05:42:50 PM
Does this mod work on SMF 2.0.11?

I noted Nibogo's fix in reply #2607 and instead of editing my forum I unpacked the mod, modified the file, repacked it and installed that.

I'm using the default Curve theme. The pre-installation checks looked fine, I installed it, forwarded to the settings page which I didn't change.

But no shout box. Are there any other necessary fixes? I hope you won't consider me lazy but this topic is 131 pages long and maybe my solution is hiding a few or several or a dozen pages back.

It appears to me that if this shout box doesn't work then there is no viable shout box mod on the Mod Site for 2.0.11 since the only other likely looking candidate support topic indicates it has so many problems that it's not worth trying. And no, I don't want to buy a mod.

Oh, and if I can get help finding any/all the fixes required to make it work on 2.0.11 I'll post the updated mod in this topic if Nibogo doesn't mind.

I think I can probably do it right considering I have a couple dozen mods on the Mod Site myself. :)

Verify all manual edits and that database was added, besides that only template files could be causing issues.

Quote from: TSF666 on February 09, 2016, 01:42:45 PM
How to add avatar picture in this southbox on darkbreak theme in smf 2.0.11??
Please help.

That's a feature exclusive for Shoutbox Pro

Deprecated

Quote from: @rjen on February 08, 2016, 04:56:25 PM
I am using the Shoutbox succesfully since 2011 currently on 2.0.11.

Maybe a silly question but did you activate the shoutbox using the settings in the admin section?

It is default activated.  Disable Shoutbox = unchecked, factory default.

Deprecated

QuoteVerify all manual edits and that database was added, besides that only template files could be causing issues.

I'm running a plain jane forum, no manual edits, default Curve style.

I have never edited any theme. In fact most or all of my mods are removed on the test system. Actually I think ALL mods are removed.

Still doesn't work. Plain 2.0.11 forum.

Advertisement: