SimplePortal

Support => English Support => Topic started by: Skaty on July 02, 2013, 07:16:52 AM

Title: Shoutbox Smiley Limit
Post by: Skaty on July 02, 2013, 07:16:52 AM
Sometimes users using too much smileys in one time so it is little frustrating.  How can i limit smileys in one shout ?
Title: Re: Shoutbox Smiley Limit
Post by: [SiNaN] on July 30, 2013, 04:44:31 AM
Sources/PortalShoutbox.php

Code: (Find) [Select]
sportal_create_shout($context['SPortal']['shoutbox'], $_REQUEST['shout']);
Code: (Replace) [Select]
{
$temp = $_REQUEST['shout'];
parsesmileys($temp);
if (substr_count($temp, '<img') > 3)
$context['SPortal']['shoutbox']['warning'] = 'You can only have 3 smileys in your shouts!';
else
sportal_create_shout($context['SPortal']['shoutbox'], $_REQUEST['shout']);
}

Change the instances of 3s in the code as the maximum number of smileys you would like to allow.
Title: Re: Shoutbox Smiley Limit
Post by: Skaty on August 01, 2013, 02:32:48 PM
Works! Thank you.
Title: Re: Shoutbox Smiley Limit
Post by: [SiNaN] on August 01, 2013, 03:20:37 PM
Good to hear that. You're welcome. ;)
SimplePortal 2.3.8 © 2008-2024, SimplePortal