Warning Improvements by Xon

Verified Warning Improvements by Xon 2.1.12

No permission to download
  • On upgrading, always ensure extra phrases (warning title 0 & category title 0) are check and always created if they do not exist.
  • Update installer to use shared libraries used my my other add-ons.
    • Ensure the src/addons/SV/Utils folder is also uploaded! If it exists, just overwrite.
Fix for "Trying to get property 'Category' of non-object" which could crop up.

  • Remove 'custom warning' definition row on add-on uninstall
  • Fix deleting warning categories
Fix User Merging not applying/copying any Warning Actions group changes to the target account
  • Fix uninstaller
  • Fix error when computing when a banned user's ban expires
Thanks to @Recep Baltaş for funding this feature update :)

  • Allow "hourly" option for warnings, warning definitions, and warning actions.
  • Better compute the effective expiry date of warning actions when using "at or above point threshold" based off warning expires.
  • Add option to control redirect after issuing a warning (to content or reported last referrer)
  • Improve installer robustness when XF1 legacy placeholder add-on is removed.
This add-on is no longer in beta and can be considered feature complete and stable.

Changes from beta:

  • Only send warning email if the user has an email address
  • Fix category sorting
  • Add {userId} as replacable for warning conversation
  • On issuing a warning, redirect back to the content via the getContentUrl() instead of referrer
  • Display user's warning count on the "previous warning" bar, make the previous warning count configurable (default 5) and link to the rest of the warnings if not all are displayed.
  • Improve installer
    • Ensure phrases are not reset on upgrades
    • Setup defaults for the Custom Warning on install
    • Tweaks to prevent unexpected __conflict column renames on upgrade
Note; this is likely the last release candidate baring unexpected bugs.
Fix "Cannot use \XF\Entity\User As User because the name is already in use"