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

How do I allow members to ignore moderators/administrators?

Discussion in 'XenForo Questions and Support' started by CyclingTribe, Feb 15, 2012.

  1. CyclingTribe

    CyclingTribe Well-Known Member

    Since there are no ignore system settings can anyone advise on how I would be able to allow my members to ignore moderators and/or administrators?

    Thanks,
    Shaun :D
     
    dieketzer likes this.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You will need an add-on to do this properly, to override the core functionality.
     
  3. CyclingTribe

    CyclingTribe Well-Known Member

    Fair enough ... I was just wondering if there was a bit of PHP I could edit/comment out that would remove the exclusion and allow people to ignore mods/admins? (y)
     
  4. ragtek

    ragtek Guest

    XenForo_Model_UserIgnore::canIgnoreUser and remove/comment out

    if ($user['is_moderator'] || $user['is_admin'])
    {
    if ($setError)
    {
    $error = new XenForo_Phrase('staff_members_may_not_be_ignored');
    }
    return false;
    }
     
  5. Fuhrmann

    Fuhrmann Well-Known Member

    You will need too to edit a template to show the Ignore link in the admin/mod profiles.

     
  6. ragtek

    ragtek Guest

    no:p
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, you can do that using the edit ragtek posted above.
    You will have to remember to redo it on every upgrade though.
     
  8. ragtek

    ragtek Guest

  9. ragtek

    ragtek Guest

    :)
     

    Attached Files:

    jauburn, dieketzer and CyclingTribe like this.
  10. CyclingTribe

    CyclingTribe Well-Known Member

    Nice one - thanks ... (y)

    :D
     
  11. CyclingTribe

    CyclingTribe Well-Known Member

    Just a though - can I modify that first line so that you can ignore everyone except the Admin/Owner user account? (In my case, User ID: 1)

    Cheers,
    Shaun :D
     
  12. Fuhrmann

    Fuhrmann Well-Known Member


    True!:rolleyes:
     
  13. ragtek

    ragtek Guest

    PHP:
    class Ragtek_TeamIgnore_Model_UserIgnore extends XFCP_Ragtek_TeamIgnore_Model_UserIgnore
    {
    public function 
    canIgnoreUser($userId, array $user, &$error '')
    {
     
    $return parent::canIgnoreUser($userId$user$error);
    if (
    $return == false AND $error == new XenForo_Phrase('staff_members_may_not_be_ignored') AND $user['user_id'] != 1)
    {
    return 
    true;
    }
    return 
    $return;
    }
    }
     
    GeeksChat likes this.
  14. CyclingTribe

    CyclingTribe Well-Known Member

    Thanks again ... (y)
     
  15. Divvens

    Divvens Well-Known Member

    Any particular reason why you would allow users to ignore staff members? Just out of curiosity :p
     
  16. CyclingTribe

    CyclingTribe Well-Known Member

    Because staff members are forum members too ... (y)

    Of course anyone who ignores a staff member does so at their peril - which will be explained to them!! :D
     
    dieketzer and CapnLuffy like this.
  17. jauburn

    jauburn Well-Known Member

    This would make a great official mod, I believe.
     
    Gambleru likes this.

Share This Page