Report Improvements by Xon

Report Improvements by Xon 1.11.0

No permission to download
Can you add the option to show new reports in the find-new posts area?

Members want to know who are reporting their posts, so i think they should be allowed to view the reports and who reports them, and the outcome,

they want to yell at who is reporting their posts, it shouldn't be a secret

so i think this is a good idea

and also a sidebar on the forum list called new reports!!

Capture.webp


Sidebar.webp



tank you sir!!


.
.
 
Last edited:
@joey_tbf I've actually got a branch which is a work in progress which allows non-moderators to view reports (without commenting or being able to assign them), while there are options to hid the username of the reporter.

There isn't yet an option to hid moderator comments in the report comments bits.
 
Code:
Error Info
XenForo_Exception: Please enter a valid title. - library/XenForo/DataWriter.php:1345
Generated By: Unknown Account, Yesterday at 7:28 AM
Stack Trace
#0 /srv/www/theadminzone.com/public_html/library/XenForo/DataWriter.php(1387): XenForo_DataWriter->_haveErrorsPreventSave()
#1 /srv/www/theadminzone.com/public_html/library/SV/ReportImprovements/Model/WarningLog.php(64): XenForo_DataWriter->save()
#2 /srv/www/theadminzone.com/public_html/library/SV/ReportImprovements/Deferred/WarningLogMigration.php(75): SV_ReportImprovements_Model_WarningLog->LogOperation('new', Array, true)
#3 /srv/www/theadminzone.com/public_html/library/XenForo/Model/Deferred.php(295): SV_ReportImprovements_Deferred_WarningLogMigration->execute(Array, Array, 7.9999990463257, 'sv_ri_migrating...')
#4 /srv/www/theadminzone.com/public_html/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9999990463257, 'sv_ri_migrating...', false)
#5 /srv/www/theadminzone.com/public_html/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, 'sv_ri_migrating...', false)
#6 /srv/www/theadminzone.com/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#7 {main}
Request State
array(3) {
  ["url"] => string(37) "https://theadminzone.com/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(94) "/admin.php?tools/run-deferred&redirect=https%3A%2F%2Ftheadminzone.com%2Fadmin.php%3Fadd-ons%2F"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
It seems the bug still exists.

Code:
Error Info
XenForo_Exception: Please enter a valid title. - library/XenForo/DataWriter.php:1359
Generated By: Unknown Account, 45 minutes ago
Stack Trace
#0 /home/xenforo/forum/library/XenForo/DataWriter.php(1401): XenForo_DataWriter->_haveErrorsPreventSave()
#1 /home/xenforo/forum/library/SV/ReportImprovements/Model/WarningLog.php(68): XenForo_DataWriter->save()
#2 /home/xenforo/forum/library/SV/ReportImprovements/XenForo/DataWriter/Warning.php(58): SV_ReportImprovements_Model_WarningLog->LogOperation('expire', Array)
#3 /home/xenforo/forum/library/SV/ReportImprovements/XenForo/DataWriter/Warning.php(31): SV_ReportImprovements_XenForo_DataWriter_Warning->_logOperation('expire')
#4 /home/xenforo/forum/library/ModEss/DataWriter/Warning.php(15): SV_ReportImprovements_XenForo_DataWriter_Warning->_postSave()
#5 /home/xenforo/forum/library/XenForo/DataWriter.php(1423): ModEss_DataWriter_Warning->_postSave()
#6 /home/xenforo/forum/library/XenForo/Model/Warning.php(654): XenForo_DataWriter->save()
#7 /home/xenforo/forum/library/SV/ReportImprovements/XenForo/Model/Warning.php(16): XenForo_Model_Warning->processExpiredWarnings()
#8 /home/xenforo/forum/library/XenForo/CronEntry/Warnings.php(7): SV_ReportImprovements_XenForo_Model_Warning->processExpiredWarnings()
#9 [internal function]: XenForo_CronEntry_Warnings::expireWarnings(Array)
#10 /home/xenforo/forum/library/XenForo/Model/Cron.php(357): call_user_func(Array, Array)
#11 /home/xenforo/forum/library/XenForo/Deferred/Cron.php(24): XenForo_Model_Cron->runEntry(Array)
#12 /home/xenforo/forum/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_Cron->execute(Array, Array, 7.9999959468842, '')
#13 /home/xenforo/forum/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.9999959468842, '', false)
#14 /home/xenforo/forum/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#15 /home/xenforo/forum/deferred.php(23): XenForo_Model_Deferred->run(false)
#16 {main}
Request State
array(3) {
  ["url"] => string(43) "https://*****/forum/deferred.php"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(29) "/forum/forums/*****/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
I don't use the warning feature. Is this update needed?
Only required if you have warnings from a very old version of XenForo or imported from another board which do not have a warning title set.

This shouldn't be needed for most users IMO.
 
Last edited:
@Xon great add-on, thank you for sharing. (y)

I have an inquiry: In REPORT VIEW, the report comment section is in its concept more like commenting on a media item in the gallery or commenting on one's profile posts. Therefore I would rather like to see this being CSS-classed as "Message Simple" instead of "Message".

Speaking in code, the template mod should rather be like this:

Code:
<xen:require css="message_simple.css" />
$1 messageSimple $2 id="reportComment-{$comment.report_comment_id}"

It does not make a difference in the default style whereas the like links look the same, but with UI.X for example it is the difference between a button and a simple link.

If you could change that in future releases I would appreciate that! Thank you. :)
 
I truncated the "xf_report" and the "xf_report_comments" tables in phpMyAdmin and it worked well with no errors in XF, but I now have a MySQL error whenever I search report comments by "user name" on the search pages. I get the following Server Error when searching User Names that actually had commented before the truncation and if I search user names that have no comments in reports it just says "no results found" (as expected).

Please note that I also have "Warning Improvements" installed, just mentioning it if it makes any difference, because it has its own table in the database.

Code:
Server Error Log
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 7 - library/Zend/Db/Statement/Mysqli.php:77
Generated By: xxxxx xxxxxxx, 1 minute ago
Stack Trace
#0 /var/www/clients/client180/web812/web/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\n            SE...')
#1 /var/www/clients/client180/web812/web/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\n            SE...')
#2 /var/www/clients/client180/web812/web/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\n            SE...')
#3 /var/www/clients/client180/web812/web/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\n            SE...', Array, 2)
#4 /var/www/clients/client180/web812/web/library/SV/ReportImprovements/XenForo/Model/Report.php(156): XenForo_Model->fetchAllKeyed('\n            SE...', 'report_id')
#5 /var/www/clients/client180/web812/web/library/SV/ReportImprovements/XenForo/Model/Report.php(106): SV_ReportImprovements_XenForo_Model_Report->getReportsByIds(Array)
#6 /var/www/clients/client180/web812/web/library/SV/ReportImprovements/Search/DataHandler/ReportComment.php(160): SV_ReportImprovements_XenForo_Model_Report->getReportCommentsByIdsForUser(Array, Array)
#7 /var/www/clients/client180/web812/web/library/XenForo/Model/Search.php(297): SV_ReportImprovements_Search_DataHandler_ReportComment->getDataForResults(Array, Array, Array)
#8 /var/www/clients/client180/web812/web/library/XenForo/Model/Search.php(331): XenForo_Model_Search->getViewableSearchResultData(Array, Array, false, NULL)
#9 /var/www/clients/client180/web812/web/library/XenForo/Search/Searcher.php(114): XenForo_Model_Search->getViewableSearchResults(Array, NULL)
#10 /var/www/clients/client180/web812/web/library/XenForo/ControllerPublic/Search.php(240): XenForo_Search_Searcher->searchType(Object(SV_ReportImprovements_Search_DataHandler_ReportComment), '', Array, 'date', 0)
#11 /var/www/clients/client180/web812/web/library/XenForo/FrontController.php(351): XenForo_ControllerPublic_Search->actionSearch()
#12 /var/www/clients/client180/web812/web/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#13 /var/www/clients/client180/web812/web/index.php(13): XenForo_FrontController->run()
#14 {main}
Request State
array(3) {
  ["url"] => string(45) "https://www.xxxxxxxxxxxxxxxxx.com/search/search"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(11) {
    ["keywords"] => string(0) ""
    ["users"] => string(15) "XXXXXXXXX, "
    ["date"] => string(0) ""
    ["include_report_comments"] => string(1) "1"
    ["include_user_reports"] => string(1) "1"
    ["order"] => string(4) "date"
    ["type"] => string(14) "report_comment"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(28) "/search/?type=report_comment"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Top Bottom