SimplePortal
Support => English Support => Topic started by: PokemonS on August 19, 2014, 10:52:26 AM
-
SMF 2.0.8
SP 2.3.5
Hi,
My current code in Subs-Portal.php:
if (preg_match('~^/(.+?)/~' . ($context['utf8'] ? 'u' : ''), $shout['text'], $target) && $smcFunc['strtolower']($target[1]) !== $smcFunc['strtolower']($user_info['name']) && $shout['author']['id'] != $user_info['id'] && !$user_info['is_admin'])
{
unset($shouts[$shout['id']]);
continue;
}
elseif (preg_match('~^/(.+?)/~' . ($context['utf8'] ? 'u' : ''), $shout['text'], $target))
$shouts[$shout['id']]['text'] = '<p style="background-color:#afa;padding:2px 4px;border:2px solid green">' . $shouts[$shout['id']]['text'] . '</p>';
I want a membergroup (for example, Global Moderator, id = 21) to see whispers. So, only admin and membergroup Global Moderator which can see whispers.
What code should I modify? And I don't need modify code out of Subs-Portal.php, such as ManageMembergroups.php
-
&& !$user_info['is_admin'])
&& !$user_info['is_admin'] && !in_array(21, $user_info['groups']))