Warning Improvements by Xon

Warning Improvements by Xon 2.9.5

No permission to download
You've got "Only send warning email if user is banned" checked so if they aren't banned but warned it will respect their profile email settings
Yes, I did mean if the user is banned, I edited at the same time you posted! ;)

When the user is banned it cuts off all email.
 
Xon updated Warning Improvements by Xon with a new update entry:

2.8.2 - Feature update

  • Require XenForo 2.2+
  • php 8.2 compatibility update
  • Add "Spoiler contents" and "Disable reactions" content action options when issuing warnings. Per-warning defaults can be configured on the warning definitions.
    • "Disable reactions" prevents new reactions, and prevents viewing existing reactions. It does not change if existing reactions count to the user's reaction totals.
    • "Spoiler contents" injects the spoiler during the rendering pipeline, and can't be edited...

Read the rest of this update entry...
 
Error when trying to upgrade to the latest version

Screen Shot 2022-10-07 at 4.16.53 AM.png

Code:
XF\Db\InvalidQueryException: xf_warning: MySQL statement prepare error [1101]: BLOB/TEXT column 'sv_content_spoiler_title' can't have a default value in src/XF/Db/AbstractStatement.php at line 230
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 41
XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 56
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
XF\Db\AbstractAdapter->query() in src/XF/Db/Schema/AbstractDdl.php at line 158
XF\Db\Schema\AbstractDdl->apply() in src/XF/Db/SchemaManager.php at line 148
XF\Db\SchemaManager->alterTable() in src/addons/SV/WarningImprovements/Setup.php at line 44
SV\WarningImprovements\Setup->installStep2() in src/addons/SV/WarningImprovements/Setup.php at line 275
SV\WarningImprovements\Setup->upgrade2080001Step1() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 124
SV\WarningImprovements\Setup->upgradeStepRunner() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 73
SV\WarningImprovements\Setup->upgrade() in src/XF/Admin/Controller/AddOn.php at line 597
XF\Admin\Controller\AddOn->actionUpgrade() in src/XF/Mvc/Dispatcher.php at line 352
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2353
XF\App->run() in src/XF.php at line 524
XF::runApp() in admin.php at line 13
 
Hello,
I just translate this add-on to French.

This phrase...
The User Id to post as. 0 to user the user triggering the warning.
...should be
The User Id to post as. 0 to use the user triggering the warning.

And for those two phrases...
The warning for <a {warning_attributes}>{warning_title}</a> for {points} points, expiring {expiry}, has been edited.
{name} issued you a warning for <a {warning_attributes}>{warning_title}</a> for {points} points, expiring {expiry}.
...isn't the href="" missing?

Thank you !
 
@Xon can you explain me a little what this phrase Warning Escalating Defaults means ?
I have a little trouble translating this notion of escalating, what exactly does it represent?

Thank you.
 
Hello,
I just translate this add-on to French.

This phrase...

...should be
Fixed for the next version.

And for those two phrases...


...isn't the href="" missing?

Thank you !
That phase is used like this:
Code:
{{ phrase('svWarningImprov_warning_alert', {
		'name': username_link($issuer, false, {'defaultname': $issuer.username}),
		'warning_attributes': $content.canView() ? 'href="' . link('warnings', $content) . '" class="fauxBlockLink-blockLink"' : '',
		'points': {$content.points},
		'warning_title': $content.hasOption('hasCensoredTitle') ? $content.title_censored : phrase('n_a'),
		'expiry': $content.expiry_date_rounded ? date_time($content.expiry_date_rounded) : phrase('never')
	})
}}
The href is passed in, and is conditional on the user being able to see the content.

@Xon can you explain me a little what this phrase Warning Escalating Defaults means ?
I have a little trouble translating this notion of escalating, what exactly does it represent?

Thank you.
It really should be "Escalating default warning expiry". It increases the default warning expiry based on points issued against that user.

I've changed the phase contents for the next version (same phase key however)
 
@Xon i've got a weird one. i'm setup as an admin and all my permissions are set to YES for anything related to a warning. yet when this addon is active i'm being blocked from giving users a warning directly from their profile. I get this warning:

Oops! We ran into some problems.​

You don't have permission to any warnings.

When I turn off the addon, it works fine. I've been staring at this for 20 minutes and cannot for the life of me figure out what possible setting could be off to get this behavior. Any thoughts?
 
@Xon i've got a weird one. i'm setup as an admin and all my permissions are set to YES for anything related to a warning. yet when this addon is active i'm being blocked from giving users a warning directly from their profile. I get this warning:

Oops! We ran into some problems.​

You don't have permission to any warnings.

When I turn off the addon, it works fine. I've been staring at this for 20 minutes and cannot for the life of me figure out what possible setting could be off to get this behavior. Any thoughts?
Check the user's permission and see if they have been granted the permission to not be warned. I've tried to not use negative permissions, but this is an older one I haven't gotten rid of.
 
Check the user's permission and see if they have been granted the permission to not be warned. I've tried to not use negative permissions, but this is an older one I haven't gotten rid of.
not sure what permission you're referring to here. is it this one?

"Allow bypassing reaction list restriction from warning"?

if so, that's set to no.
 
I was thinking about my "Can warn staff" add-on which has the "Prevent posts being warned" permission.
 
I just noticed this:

I have an immediate ban warning (ie applies 20 points point to trigger the immediate ban warning action I have set uo)


Screenshot 2022-10-14 at 16.21.15.webp

Screenshot 2022-10-14 at 16.18.56.webp

Although when used it adds the 20 points, the user is not getting banned.

If the addon is disabled, then this warning works as expected and does ban the user.
 
Depending on how you've got warning categories setup, that could be expected. You've truncated too much information from those screenshots to tell.
 
Sorry, here are screenshots with just usergroups removed

Screenshot 2022-10-14 at 17.17.06.png

Screenshot 2022-10-14 at 17.17.25.png


So if this warning is applied it should ban immediately I think? But right now

  • with addon enabled it just gives 20 points
  • with addon disabled it gives points and bans as expected

Screenshot 2022-10-14 at 17.19.18.png
 
Last edited:
Top Bottom