1. 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]

Discussion in 'Add-on Releases' started by Rigel Kentaurus, Jan 30, 2012.

  1. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    Markos likes this.
  2. Markos

    Markos Well-Known Member

    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.
     
  3. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    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
     
  4. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    Plus, you can already ban a user from a specific node. Just remove view privileges to that single user at the node. :)
     
  5. Markos

    Markos Well-Known Member

    I need to allow the moderators to do that...without admin cp access.
     
  6. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    I see.
    If I have some time I will update this add-on for that. No promises, though :)
     
    Markos likes this.
  7. electrogypsy

    electrogypsy Active Member

    can you add the option to post a thread to a particular forum section when a moderator bans a user?
     
  8. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    I'm not adding major options to this mod, but people are free to modify anything themselves and redistribute it.
     
  9. PeterT

    PeterT Active Member

    Could a moderator also un-ban a member using this mod?
     
  10. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    No, he can't. He can specify a duration for the ban, though.
     
  11. planetmaster

    planetmaster Member

    Is the ban done by moderators undo-able? Just like Spam-cleaner?
     
  12. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    No
     
  13. phpclub

    phpclub Member

    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
     
  14. Floren

    Floren Well-Known Member

    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.
     
    KevinEssence, robart and Mark3121 like this.
  15. mistypants

    mistypants Well-Known Member

    Is there any way to let moderators permanently ban as well?
     
  16. STORMS

    STORMS Active Member

    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.
     
  17. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    did you upload the xml for the addon? and gave permissions to the person?
     
  18. STORMS

    STORMS Active Member

    yes, both... I even double check my permissions twice and still no dice. It's like I never installed it.
     
  19. andrewkm

    andrewkm Active Member

    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>
     
  20. andrewkm

    andrewkm Active Member

    Also an unban option for moderators would be great! :)
     
    md_5 and PeterT like this.

Share This Page