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

Report Improvements by Xon 1.3.7

A Collection of improvements to XF's reporting system

  1. Xon

    Xon Well-Known Member

    Xon submitted a new resource:

    Report Improvements by Xon - A Collection of improvements to XF's reporting system

    Read more about this resource...
     
  2. Xon

    Xon Well-Known Member

    Thanks @kontrabass for helping with testing and clearing up some front-end CSS issues with linking reports & warnings.
     
  3. Xon

    Xon Well-Known Member

  4. Rob

    Rob Well-Known Member

    @Xon.... I'm getting an error here when clicking to the reports area...
    Code:
    Parse error: syntax error, unexpected 'finally' (T_STRING), expecting catch (T_CATCH) in/var/www/vhosts/xxxxxx.net/httpdocs/library/SV/ReportImprovements/XenForo/ControllerPublic/Report.php on line 13
     
  5. Rob

    Rob Well-Known Member

    I suspected it was the php version.... so here's a report.php modification for anyone not on php 5.5
    Xon, feel free to include this... or not :)

    replace everything in report.php with
    Code:
    <?php
    
    class SV_ReportImprovements_XenForo_ControllerPublic_Report extends XFCP_SV_ReportImprovements_XenForo_ControllerPublic_Report
    {
        public function actionComment()
        {
            $stored_exc = null;
            $visitor = XenForo_Visitor::getInstance();
            SV_ReportImprovements_Globals::$Report_MaxAlertCount = $visitor->hasPermission('general', 'maxTaggedUsers');
            try
            {
                return parent::actionComment();
            } catch (Exception $exc) {
                $stored_exc = $exc;
            }
            if ($stored_exc)
            {
                SV_ReportImprovements_Globals::$Report_MaxAlertCount = 0;
            }
        }
    
        public function actionUpdate()
        {
            $stored_exc = null;
            $visitor = XenForo_Visitor::getInstance();
            SV_ReportImprovements_Globals::$Report_MaxAlertCount = $visitor->hasPermission('general', 'maxTaggedUsers');
            try
            {
                return parent::actionUpdate();
            } catch (Exception $exc) {
                $stored_exc = $exc;
            }
            if ($stored_exc)
            {
                SV_ReportImprovements_Globals::$Report_MaxAlertCount = 0;
            }
        }
    }
     
  6. Xon

    Xon Well-Known Member

    @Rob, thanks for the heads up. That try/finally construct can actually be removed entirely as there is no point on resetting the max alert count. I'll release a patched version which cleans that up.

    Note; you missed "SV/ReportImprovements/XenForo/Model/Warning.php" which had a finally statement.
     
  7. Xon

    Xon Well-Known Member

  8. Xon

    Xon Well-Known Member

    kontrabass and Rob like this.
  9. Rob

    Rob Well-Known Member

    Great catch with that update.... I was going to suggest that as I just spotted that in testing :)
     
    Xon likes this.
  10. okhello

    okhello Member

    Is it technically possible to add a feature to allow reports in the report center to be merged? When our moderators discover a troll/toxic user, they'll typically report the offending posts that the troll has left throughout the forum. Being able to merge the multiple reports into a single report so it can all be viewed and commented on in one place would be essential. As it is, we're stuck with continuing to use the vbulletin style of reporting content, which creates a thread in a moderator forum every time something is reported.
     
    Nutz likes this.
  11. Xon

    Xon Well-Known Member

    @okhello that is a feature I'm very much interested in. But I just haven't had the time to implement it yet.
     
    Nutz and Rob like this.
  12. Xon

    Xon Well-Known Member

  13. Mouth

    Mouth Well-Known Member

    Seems also to conflict with Auto Hide Reported Posts by Iversia ...

    Code:
    ErrorException: Fatal Error: Call to undefined method Iversia_HideReportedPosts_Extend_Model_Report::getReportCommentUserIds() - library/SV/ReportImprovements/XenForo/DataWriter/ReportComment.php:89
    Generated : 2 minutes ago
    Stack Trace
    #0 [internal function]: XenForo_Application::handleFatalError()
    #1 {main}
    Request State
    array(3) {
      ["url"] => string(42) "/reports/879/update"
      ["_GET"] => array(1) {
        ["/reports/879/update"] => string(0) ""
      }
      ["_POST"] => array(4) {
        ["report_state"] => string(8) "resolved"
        ["comment"] => string(0) ""
        ["save"] => string(13) "Update Report"
        ["_xfToken"] => string(8) "********"
      }
    }
    ... when updating a report
     
  14. Xon

    Xon Well-Known Member

    @Mouth This is an issue with the Auto Hide Reports addon. I've posted details in the addon thread.

    It is not possible for me to fix the conflict and requires the Auto Hide Reports addon have changes done to it.
     
    Mouth likes this.
  15. Xon

    Xon Well-Known Member

  16. caoanh204

    caoanh204 Active Member

    Hi @Xon , I dont uderstand "Only view Alerts/Reports for forums the moderator can see"? "Can see" means that user is that forum's moderator?
     
  17. Xon

    Xon Well-Known Member

    I haven't actually tested with how it handles forum's moderators. But it means if the moderator can't see a forum (aka the view node permission), do not see any reports or alerts from that forum.

    This allows super-moderators who can ignore particular forums to be setup.
     
  18. Slind

    Slind Active Member

    Does the staff member need to be an moderator for the permissions to work? As I was looking for a way to give staff members permissions for the reports without adding them to the ACP moderator group.
     
  19. Xon

    Xon Well-Known Member

    They still need to be a moderator to access reports, there is just explicit permissions governing which reports they can see.
     
  20. Rob

    Rob Well-Known Member

    @Xon I'm now getting this:

    Server Error Log
    Error Info
    ErrorException: Declaration of SV_ReportImprovements_XenForo_Model_Report::getReportComments() should be compatible with XenForo_Model_Report::getReportComments($reportId, $orderDirection = 'ASC') -library/SV/ReportImprovements/XenForo/Model/Report.php:4
    Generated By: USERX Yesterday at 11:17 AM
    Stack Trace
    #0 /var/www/vhosts/XXXX.net/httpdocs/library/SV/ReportImprovements/XenForo/Model/Report.php(4): XenForo_Application::handlePhpError(2048, 'Declaration of ...', '/var/www/vhosts...', 4, Array)
    #1 /var/www/vhosts/xxxx.net/httpdocs/library/XenForo/Autoloader.php(119): include('/var/www/vhosts...')
    #2 /var/www/vhosts/xxxx.net/httpdocs/library/XenForo/Application.php(1050): XenForo_Autoloader->autoload('SV_ReportImprov...')
    #3 /var/www/vhosts/xxxx.net/httpdocs/library/XenForo/Application.php(529): XenForo_Application::autoload('SV_ReportImprov...')
    #4 /var/www/vhosts/xxxx.net/httpdocs/library/XenForo/Model.php(189): XenForo_Application::resolveDynamicClass('XenForo_Model_R...', 'model')
    #5 /var/www/vhosts/xxxx.net/httpdocs/library/XenForo/Model.php(113): XenForo_Model::create('XenForo_Model_R...')
    #6 /var/www/vhosts/xxxx.net/httpdocs/library/XenForo/Model/SpamCleaner.php(65): XenForo_Model->getModelFromCache('XenForo_Model_R...')
    #7 /var/www/vhosts/xxxx.net/httpdocs/library/XenForo/ControllerPublic/SpamCleaner.php(53): XenForo_Model_SpamCleaner->cleanUp(Array, Array, Array, NULL)
    #8 /var/www/vhosts/xxxx.net/httpdocs/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_SpamCleaner->actionIndex()
    #9 /var/www/vhosts/xxxx.net/httpdocs/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #10 /var/www/vhosts/xxxx.net/httpdocs/index.php(13): XenForo_FrontController->run()
    #11 {main}
    Request State
    array(3) {
    ["url"] => string(55) "https://xxxx.net/spam-cleaner/david-chen.26157/"
    ["_GET"] => array(0) {
    }
    ["_POST"] => array(11) {
    ["action_threads"] => string(1) "1"
    ["delete_messages"] => string(1) "1"
    ["delete_conversations"] => string(1) "1"
    ["ban_user"] => string(1) "1"
    ["check_ips"] => string(1) "1"
    ["noredirect"] => string(1) "0"
    ["_xfToken"] => string(8) "********"
    ["_xfConfirm"] => string(1) "1"
    ["_xfRequestUri"] => string(17) "/recent-activity/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
    }
    }
     

Share This Page