• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Allow moderators to ban users [Deleted]

Markos

Well-known member
#2
I want a version that can allow this:
A Moderator of X forum/node can ban user ONLY for a specific forum/node;
A moderator of Y forum/node can ban user ONLY for a specific forum/node;
very useful for a multi-can/community project.
 

Rigel Kentaurus

Well-known member
#3
I want a version that can allow this:
A Moderator of X forum/node can ban user ONLY for a specific forum/node;
A moderator of Y forum/node can ban user ONLY for a specific forum/node;
very useful for a multi-can/community project.
That seems like a whole different set of requirements :) This add-on actually only moves the admincp functionality to the frontend so mods can use it
 

Rigel Kentaurus

Well-known member
#4
I want a version that can allow this:
A Moderator of X forum/node can ban user ONLY for a specific forum/node;
A moderator of Y forum/node can ban user ONLY for a specific forum/node;
very useful for a multi-can/community project.
Plus, you can already ban a user from a specific node. Just remove view privileges to that single user at the node. :)
 
#13
Hi Rigel!
Please correct

Code:
  <phrase title="easyban_user_already_banner" version_id="100" version_string="1.0.0"><![CDATA[Banned for {hours} more hours by {banning_username}: {user_reason}]]></phrase>
easyban_user_already_banner - easyban_user_already_banneD

Also missing xen:prhase
phrase easyban_user_already_banned_days
phrase easyban_user_already_banned_hours
 

Floren

Well-known member
#14
As an alternative, you can setup the warning system to ban the user at x number of points.
Here it is what I used as settings on my forums:
  • 5 points - user is placed in Discouraged mode
  • 10 points - user receives a temp ban for 1 week
  • 15 points - user receives a temp ban for 1 month
  • 20 points - user receives a temp ban for 6 months
  • 25 points - user receives a temp ban for 1 year
  • 30 points - user receives a permanent ban
This eliminates the need of installing the add-on and any future code conflicts or maintenance.
 

STORMS

Active member
#16
upload the "library" file to the forum root or the library folder?

I uploaded it to our forum root and have all permissions set, but it's not working... meaning, there's no "Ban User" option.
 

andrewkm

Active member
#19
Still missing two phrases and has banned misspelled as banner in XML.
Ive fixed it by using the following XML
HTML:
<?xml version="1.0" encoding="utf-8"?>
<addon addon_id="cz_easyban" title="Easy ban users" version_string="1.0.1" version_id="101" url="" install_callback_class="" install_callback_method="" uninstall_callback_class="" uninstall_callback_method="">
  <admin_navigation/>
  <admin_permissions/>
  <admin_style_properties/>
  <admin_templates/>
  <code_events/>
  <code_event_listeners>
    <listener event_id="template_hook" execute_order="10" callback_class="CemZoo_EasyBan_Template_Hook" callback_method="template" active="1" description="Modify templates to add the &quot;Ban User&quot; option to member page"/>
  </code_event_listeners>
  <cron/>
  <email_templates/>
  <optiongroups/>
  <permissions>
    <permission_groups/>
    <permissions>
      <permission permission_group_id="general" permission_id="cz_easyban" permission_type="flag" default_value="unset" interface_group_id="generalModeratorPermissions" display_order="95000"/>
    </permissions>
    <interface_groups/>
  </permissions>
  <phrases>
    <phrase title="cz_ban_requires_user" version_id="100" version_string="1.0.0"><![CDATA[Please specify the user you intend to ban]]></phrase>
    <phrase title="cz_unspecified_error_ban_user" version_id="100" version_string="1.0.0"><![CDATA[An error occurred while trying to ban the user]]></phrase>
    <phrase title="easyban_ban_user" version_id="100" version_string="1.0.0"><![CDATA[Ban User]]></phrase>
    <phrase title="easyban_mod_options" version_id="100" version_string="1.0.0"><![CDATA[Moderator options]]></phrase>
    <phrase title="easyban_reason" version_id="100" version_string="1.0.0"><![CDATA[Reason]]></phrase>
    <phrase title="easyban_user_already_banned" version_id="100" version_string="1.0.0"><![CDATA[Banned for {hours} more hours by {banning_username}: {user_reason}]]></phrase>
    <phrase title="easyban_user_already_banned_days" version_id="100" version_string="1.0.0"><![CDATA[User banned for {days} more days.]]></phrase>
    <phrase title="easyban_user_already_banned_hours" version_id="100" version_string="1.0.0"><![CDATA[User banned for {hours} more hours.]]></phrase>
    <phrase title="easyban_user_has_been_banned" version_id="100" version_string="1.0.0"><![CDATA[The user has been banned]]></phrase>
    <phrase title="easyban_violation_terms_service" version_id="100" version_string="1.0.0"><![CDATA[Violation of the terms of service]]></phrase>
    <phrase title="permission_general_cz_easyban" version_id="100" version_string="1.0.0"><![CDATA[Can ban users from the forum]]></phrase>
  </phrases>
  <route_prefixes>
    <route_type type="public">
      <prefix original_prefix="cz-easyban" class="CemZoo_EasyBan_Route_Prefix_Page" build_link="data_only"/>
    </route_type>
  </route_prefixes>
  <style_properties/>
  <templates>
    <template title="easyban_member_sidebar" version_id="101" version_string="1.0.1"><![CDATA[<div class="section infoBlock">
    <dl class="secondaryContent pairs">
        <dt>{xen:phrase easyban_mod_options}:</dt>
        <xen:if is="{$isBanned}">
            <dd>
                <xen:if is="{$days}">
                    {xen:phrase easyban_user_already_banned_days, 'days={$days}', 'banning_username={$banning_username}', 'user_reason={$user_reason}'}
                <xen:else />
                    {xen:phrase easyban_user_already_banned_hours, 'hours={$hours}', 'banning_username={$banning_username}', 'user_reason={$user_reason}'}
                </xen:if>
            </dd>
        <xen:else />
            <dd><a href="{xen:link cz-easyban/index, $user}" class="OverlayTrigger item control ban" data-cacheOverlay="false"><span></span>{xen:phrase easyban_ban_user}</a></dd>     
        </xen:if>
    </dl>
</div>]]></template>
    <template title="easyban_overlay" version_id="101" version_string="1.0.1"><![CDATA[<xen:title>{xen:phrase easyban_ban_user}</xen:title>
<xen:h1>{xen:phrase easyban_ban_user}</xen:h1>
<form action="{xen:link 'cz-easyban/ban', $user}" method="post" class="xenForm formOverlay AutoValidator">
  <dl class="ctrlUnit">
    <dt>{xen:phrase easyban_reason}</dt>
    <dd><input id="reason" name="reason" type="text" value="{xen:phrase easyban_violation_terms_service}" class="textCtrl" maxlength="255" /></dd>
  </dl>
  <dl class="ctrlUnit">
    <dt>{xen:phrase ban_length}, {xen:phrase until}:</dt>
    <dd><input type="date" name="end_date" value="" class="textCtrl" id="ctrl_date" /></dd>
  </dl>
  <dl class="ctrlUnit submitUnit">
    <dt></dt>
    <dd><input type="submit" class="button primary" value="{xen:phrase easyban_ban_user}" /></dd>
  </dl>
  <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>]]></template>
  </templates>
</addon>
<phrase title="easyban_user_already_banned_days" version_id="100" version_string="1.0.0"><![CDATA[User banned for {days} more days.]]></phrase>
<phrase title="easyban_user_already_banned_hours" version_id="100" version_string="1.0.0"><![CDATA[User banned for {hours} more hours.]]></phrase>