News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SMFPacks.com Shoutbox

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

Previous topic - Next topic

Branko.

Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

Pudders

Hi,
This mod was installed for me and I have been told it is working correctly, however members are complaining they cannot turn the sound OFF.  It's like the sound/mute button is not responding at all.  We can all see the button but it does nothing when clicked.  I've had a look through this thread and can see various issues where people want to disable the sound button etc but I cannot see anyone with a similar problem to me.

Can anyone tell me how to get the sound/mute button to work?

Thanks

margarett

To remove the sound completely should be more or less easy. That requires some more serious investigation...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Pudders

Quote from: margarett on March 20, 2014, 01:03:31 PM
To remove the sound completely should be more or less easy. That requires some more serious investigation...

I'm happy to have the sound removed completely but my knowledge of php/smf is very limited, if you can let me know how to do this I will give it a try :)

Thanks for the reply

margarett

Let us see if Nibogo is cool with that. It's his MOD and he's an active supporter.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Branko.

Quote from: Pudders on March 20, 2014, 01:19:18 PM
I'm happy to have the sound removed completely...
In Themes/default find shoutbox.mp3 and remove this file.
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

br360

Quote from: Branko. on March 20, 2014, 04:21:43 PM
Quote from: Pudders on March 20, 2014, 01:19:18 PM
I'm happy to have the sound removed completely...
In Themes/default find shoutbox.mp3 and remove this file.

I deleted that file, and the sounds were still happening. This was on both chrome and IE if that helps.


br360

Quote from: Nibogo on March 20, 2014, 07:29:59 PM
If you remove it and do a hard refresh it should do it.

edit: nevermind- It did work. I had so many test sites going at once, I deleted the file from the wrong test site  ::)

Thank You.

OzzyMozzy

Every time someone puts a link in the shoutbox that is a https link it doesn't work.

How can this be fixed?

I did do a search but got confused with it all...... sorry bit of a newbie with changing codes

br360

From this earlier post- http://www.simplemachines.org/community/index.php?topic=269091.msg3546528#msg3546528

To get https links to work, go to Sources/Shoutbox.php

Find-
$length = 7;
$string = 'http://';
if (strstr($msg, 'http://') !== false)
{
if (strstr($msg, 'https://') !== false)
{
$string = 'https://';
$length = 8;
}

$links = array();
foreach (explode(' ', $msg) as $w)
if (substr($w, 0, $length) == $string && $smcFunc['strlen']($w) > $length)
$links[] = '<a href="' . $w . '" target="_blank">' . ($smcFunc['strlen']($w) > $shoutbox['maxLinkLenght'] ? substr($w, 0, $shoutbox['maxLinkLenght'] - ($length - 1)) . '...' . substr($w, -($length - 1)) : $w) . '</a>';
else
$links[] = $w;
$msg = implode(' ', $links);
}


and replace with-

if (strstr($msg, 'http://') !== false || strstr($msg, 'https://') !== false)
{

$links = array();
foreach (explode(' ', $msg) as $w)
{
if (strstr($w, 'https://') !== false)
{
$string = 'https://';
$length = 8;
}
if (strstr($w, 'http://') !== false)
{
$string = 'http://';
$length = 7;
}
if (substr($w, 0, $length) == $string && $smcFunc['strlen']($w) > $length)
$links[] = '<a href="' . $w . '" target="_blank">' . ($smcFunc['strlen']($w) > $shoutbox['maxLinkLenght'] ? substr($w, 0, $shoutbox['maxLinkLenght'] - ($length - 1)) . '...' . substr($w, -($length - 1)) : $w) . '</a>';
else
$links[] = $w;
}
$msg = implode(' ', $links);
}



OzzyMozzy

Awesome thanks for that, ill try it out tonight

OzzyMozzy

It worked, thanks heaps for that

Steve

#2233
@br360

Awesome! I do have a question though since I know nothing about coding. If I type in:

this is another test of an https link: https://www.google.com

Each word becomes a link. Obviously clicking on any of the words except the https link gives you an error page but I'm wondering if this can be tweaked to ignore everything except the https link. Is this even possible?

Edit: I missed your link to the original post so I went to it and read for a couple of pages and found the corrected code that prevents other text from becoming links:

http://www.simplemachines.org/community/index.php?topic=269091.msg3582191#msg3582191
DO NOT pm me for support!

GamePersia

Quote from: Nuttysman on March 24, 2014, 10:45:11 AM
Awesome! I do have a question though since I know nothing about coding. If I type in:

this is another test of an https link: https://www.google.com

Each word becomes a link. Obviously clicking on any of the words except the https link gives you an error page but I'm wondering if this can be tweaked to ignore everything except the https link. Is this even possible?
:)
If You Leave a space between words and then write http links,..then i suppose you will free from this problem. :-\

Steve

I just edited my post to give the link to the corrected code. :)
DO NOT pm me for support!

br360

Quote from: Nuttysman on March 24, 2014, 10:55:45 AM
I just edited my post to give the link to the corrected code. :)

Good catch, thanks. I had already edited the file before I saw his update, but this additional code edit fixed it-  (same shoutbox.php file) http://www.simplemachines.org/community/index.php?topic=269091.msg3582191#msg3582191

find-
if (strstr($w, 'http://') !== false)

replace-
if (strstr($w, 'http://') !== false || !isset($string))

AumoeLooure

Yeah...uh....I have it set up. Working beautifully for me, but I'm baffled because absolutely no one else can see it. I've checked the settings multiple times. Everything looks fine there. What is going on???

Virgo4

Quote from: AumoeLooure on March 24, 2014, 01:40:48 PM
Yeah...uh....I have it set up. Working beautifully for me, but I'm baffled because absolutely no one else can see it. I've checked the settings multiple times. Everything looks fine there. What is going on???

You will need to go into your permissions for each membergroup and allow them to see it.  When you first install it, it's only available to the Administration membergroup.

br360

I've been using this mod for a few days now, and am liking it more and more.

One question I have though is; would there be anyway to have a history link for members to go back and check older chat messages? I know mods can go into the moderation center and do it, but it would be great if regular members could be able to as well.

I know I could change permissions and check the "Delete messages in Shoutbox" option; which would give members the ability to see history- but of course I don't want them to be able to edit or delete chats, just view older chats.

Is there any way to do this? Maybe even add a message link (without the edit or delete option) in the popup menu?

Advertisement: