Report Improvements by Xon

Report Improvements by Xon 1.11.0

No permission to download

Xon

Well-known member
Xon submitted a new resource:

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

This is a formally private addon which has been in use for about 6 months before being released.

A Collection of improvements to XF's reporting system. Fully phrased.

Feature list:
  • User tagging in report comments.
  • Adds Spam Cleaner links in AdminCP (under actions) and to the Moderation Queue front-end
  • Sends an Alert to moderators who have commented/reported on a report.
    • Only sends an alert if the previous alert hasn't been viewed.
    • Report Alerts link to the...

Read more about this resource...
 
@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
 
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;
        }
    }
}
 
@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.
 
Great catch with that update.... I was going to suggest that as I just spotted that in testing :)
 
  • Like
Reactions: Xon
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.
 
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
 
@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.
 
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?
 
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?
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.
 
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.
 
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.
They still need to be a moderator to access reports, there is just explicit permissions governing which reports they can see.
 
@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"
}
}
 
Back
Top Bottom