Alert Improvements by Xon

Alert Improvements by Xon 1.5.6

No permission to download
Thanks. What do you think about this idea?

Furthermore a global "summarize when greater than" settings would be nice.

The pop-up should only show upto 25 alerts. This is hardcoded into XF.
Mhmm... It only started getting a scroll bar after the upgrade yesterday. Nevertheless a setting for that would be nice.
 
It currently only triggers if you have 2 times the unread alerts of your summary threshold, and it will only summarizes unread alerts.
 
@Xon: what are these alert types:
  • rate_summary
  • like_summary
What do they alert/tell the user?
This feature, where you have a lot of alerts and it collapses them into a few:
ratings-png.154723


(Likes vs post Ratings need a bit of different logic, so two alerts)
 
XenForo_Exception: Serialized value contains an object and this is not allowed - library/XenForo/DataWriter/Helper/Denormalization.php:40
Generated By: Alfa, A moment ago

Stack Trace
#0 /library/XenForo/DataWriter/Alert.php(86): XenForo_DataWriter_Helper_Denormalization::verifySerialized('a:4:{s:11:"prof...', Object(SV_AlertImprovements_XenForo_DataWriter_Alert), 'extra_data')
#1 /library/XenForo/DataWriter.php(995): XenForo_DataWriter_Alert->_verifyExtraData('a:4:{s:11:"prof...', Object(SV_AlertImprovements_XenForo_DataWriter_Alert), 'extra_data', Array)
#2 /library/XenForo/DataWriter.php(725): XenForo_DataWriter->_runVerificationCallback(Array, 'a:4:{s:11:"prof...', Array, 'extra_data')
#3 /library/XenForo/DataWriter.php(643): XenForo_DataWriter->_isFieldValueValid('extra_data', Array, 'a:4:{s:11:"prof...', Array)
#4 /library/OneSignal/Model/Alert.php(26): XenForo_DataWriter->set('extra_data', Array)
#5 /library/SV/UserTaggingImprovements/XenForo/Model/Alert.php(24): OneSignal_Model_Alert->alertUser(383416, 0, '', 'user', 383416, 'profile_post_de...', Array)
#6 /library/SV/DeadlockAvoidance/XenForo/Model/Alert.php(14): SV_UserTaggingImprovements_XenForo_Model_Alert->alertUser(383416, 0, '', 'user', 383416, 'profile_post_de...', Array)
#7 /library/XenForo/Model/Alert.php(425): SV_DeadlockAvoidance_XenForo_Model_Alert->alertUser(383416, 0, '', 'user', 383416, 'profile_post_de...', Array)
#8 /library/XenForo/Model/ProfilePost.php(1880): XenForo_Model_Alert::alert(383416, 0, '', 'user', 383416, 'profile_post_de...', Array)
#9 /library/XenForo/ControllerPublic/ProfilePost.php(190): XenForo_Model_ProfilePost->sendModeratorActionAlertForProfilePost('delete', Array, Array, 'read the rules....')
#10 /library/XenForo/FrontController.php(351): XenForo_ControllerPublic_ProfilePost->actionDelete()
#11 /library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#12 /index.php(13): XenForo_FrontController->run()
#13 {main}
Request State
array(3) {
["url"] => string(50) "https://forum.com/profile-posts/78460/delete"
["_GET"] => array(0) {
}
["_POST"] => array(5) {
["hard_delete"] => string(1) "1"
["send_author_alert"] => string(1) "1"
["author_alert_reason"] => string(50) "read the rules."
["_xfConfirm"] => string(1) "1"
["_xfToken"] => string(8) "********"
}
}
 
XenForo_Exception: Serialized value contains an object and this is not allowed - library/XenForo/DataWriter/Helper/Denormalization.php:40
Generated By: Alfa, A moment ago

Stack Trace
#0 /library/XenForo/DataWriter/Alert.php(86): XenForo_DataWriter_Helper_Denormalization::verifySerialized('a:4:{s:11:"prof...', Object(SV_AlertImprovements_XenForo_DataWriter_Alert), 'extra_data')
#1 /library/XenForo/DataWriter.php(995): XenForo_DataWriter_Alert->_verifyExtraData('a:4:{s:11:"prof...', Object(SV_AlertImprovements_XenForo_DataWriter_Alert), 'extra_data', Array)
#2 /library/XenForo/DataWriter.php(725): XenForo_DataWriter->_runVerificationCallback(Array, 'a:4:{s:11:"prof...', Array, 'extra_data')
#3 /library/XenForo/DataWriter.php(643): XenForo_DataWriter->_isFieldValueValid('extra_data', Array, 'a:4:{s:11:"prof...', Array)
#4 /library/OneSignal/Model/Alert.php(26): XenForo_DataWriter->set('extra_data', Array)
#5 /library/SV/UserTaggingImprovements/XenForo/Model/Alert.php(24): OneSignal_Model_Alert->alertUser(383416, 0, '', 'user', 383416, 'profile_post_de...', Array)
#6 /library/SV/DeadlockAvoidance/XenForo/Model/Alert.php(14): SV_UserTaggingImprovements_XenForo_Model_Alert->alertUser(383416, 0, '', 'user', 383416, 'profile_post_de...', Array)
#7 /library/XenForo/Model/Alert.php(425): SV_DeadlockAvoidance_XenForo_Model_Alert->alertUser(383416, 0, '', 'user', 383416, 'profile_post_de...', Array)
#8 /library/XenForo/Model/ProfilePost.php(1880): XenForo_Model_Alert::alert(383416, 0, '', 'user', 383416, 'profile_post_de...', Array)
#9 /library/XenForo/ControllerPublic/ProfilePost.php(190): XenForo_Model_ProfilePost->sendModeratorActionAlertForProfilePost('delete', Array, Array, 'read the rules....')
#10 /library/XenForo/FrontController.php(351): XenForo_ControllerPublic_ProfilePost->actionDelete()
#11 /library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#12 /index.php(13): XenForo_FrontController->run()
#13 {main}
Request State
array(3) {
["url"] => string(50) "https://forum.com/profile-posts/78460/delete"
["_GET"] => array(0) {
}
["_POST"] => array(5) {
["hard_delete"] => string(1) "1"
["send_author_alert"] => string(1) "1"
["author_alert_reason"] => string(50) "read the rules."
["_xfConfirm"] => string(1) "1"
["_xfToken"] => string(8) "********"
}
}
This add-on (with my add-ons) doesn't trigger this, I suspect this is spooky action at a distance where another add-on is doing something weird. I've PM'ed you some details.
 
v1.4.5

@Xon With the add-on active, users are unable to save /account/alert-preferences page. Pop-up error of ....

Please correct the following errors:
  • The field 'sv_alerts_page_skips_mark_read' was not recognised.
  • The field 'sv_alerts_page_skips_summarize' was not recognised.
  • The field 'sv_alerts_summarize_threshold' was not recognised.
I have re-installed the add-on, to make sure there wasn't an install related issue.
 
Last edited:
@Mouth this sounds like an add-on/theme conflict issue. Does it occur with the default theme? You might need to PM me a list of add-ons, and likely provide login details so I can inspect the site code to check for code conflicts.
 
Xon updated Alert Improvements by Xon with a new update entry:

1.4.6 - Maintenance update

  • Fix race condition where unsummarizing alerts would result in incorrect alert counts
  • Option/link to re-summarize alerts
    • Normal alert summarization ignores read alerts and already summarized alerts, this functionality doesn't.
    • Automatically marks summary alerts as read.
    • Has a configurable flood timer (default 10 seconds), as this functionality is implemented as unsummarize all alerts, mark them as unread, and then summarize.
      • Note; if you need a flood...

Read the rest of this update entry...
 
How can I force all users to have (SQL Query):
  1. Alerts page skips mark read = enabled
  2. Alerts summarize threshold = 2

I just set it for Default Registration Values and would like to set for all existing members.
Thanks!
 
How can I force all users to have (SQL Query):
  1. Alerts page skips mark read = enabled
  2. Alerts summarize threshold = 2

I just set it for Default Registration Values and would like to set for all existing members.
Thanks!

I just run:

update xf_user_option set sv_alerts_page_skips_mark_read = 1

update xf_user_option set sv_alerts_summarize_threshold = 2
I hope I did it right. :unsure:
Yup, that is it
 
  • Like
Reactions: rdn
Top Bottom