Easy User Ban by Siropu

Easy User Ban by Siropu [Paid] 1.4.4

No permission to buy (€14.99)
Could you add 1 hour or 1 minute option here. Actually bought this mod because I saw you had the 1 hour option and then it turns out it's only available on one specific page.
That is the warning page. It has nothing to do with my add-on. This add-on adds the option to easy ban/unban users.
 
If you ban that user again with different reason/period, it should update it.
Yes, this function is present in ACP.

Realization:
library/Siropu/EasyUserBan/ControllerPublic/Member.php

Find:
PHP:
if (!$user = $this->_getUserModel()->getUserById($input['user_id']))
{
    return $this->responseError(new XenForo_Phrase('requested_user_not_found'));
}

Add after:
PHP:
if ($user['is_banned'])
{
    $user += $this->_getBanningModel()->getBannedUserById($user['user_id']);
}

Add button in template:
PHP:
<xen:if is="{$user.is_banned}">
    <a href="{xen:link 'members/quick-ban', '', 'user_id={$user.user_id}'}" class="button full siropuManageBan OverlayTrigger">{xen:phrase manage_ban}</a>
</xen:if>

And need to add {$user.user_reason} in template siropu_easy_user_ban_quick_ban
<input type="text" name="user_reason" value="{xen:if $user.user_reason, $user.user_reason}" maxlength="255" class="textCtrl" id="ctrl_user_reason">

When clicks on button overlay will be opened with current ban reason.
 
Top Bottom