There is a XenForo user-group permission "Delete all warnings", and this add-on adds the following user-group permissions; "Delete all warnings for Moderators" and "Delete all warnings for Administrators"
I'm just a tad unclear on the phrasing, as 'delete all' sounds like mass deleting. Can I use this to prevent them from deleting individual warnings that they've issued? How about editing the warning expiration?
No big deal if not as I can add a conditional to the templates to show those options only to admins, I just try to avoid template edits when I can
1. When you disable the "View own warnings" option, it gives an error when viewing someone else's profile with the "View Warning Actions" option enabled in the "User group permissions" settings:
Oops! We ran into some problems.
The requested user could not be found.
I’m sure this option check is superfluous in the canViewWarningActions function of the \src\addons\SV\WarningImprovements\XF\Entity\User.php file. Without which everything works correctly:
PHP:
if ($visitor->user_id == $this->user_id)
{
return \XF::options()->sv_view_own_warnings;
}
При отключении опции "View own warnings", выдаёт ошибку при просмотре чужого профиля с включённой опцией "View Warning Actions" в настройках "User group permissions"
Oops! We ran into some problems.
The requested user could not be found.
Я уверен, эта проверка опции лишняя в функции canViewWarningActions файла \src\addons\SV\WarningImprovements\XF\Entity\User.php. Без которой всё работает правильно:
PHP:
if ($visitor->user_id == $this->user_id)
{
return \XF::options()->sv_view_own_warnings;
}
2. When the checkbox in the option "Points and expiry time are editable when giving warning" is checked, the options "Warning Escalating Defaults" do not work correctly, do not increase the warning days by the number of points, if the options are disabled, then everything works correctly. Watch the video, I hope it will be clear, or ask clarifying questions.
При установке флажка в опции "Points and expiry time are editable when giving warning", некорректно работают опции "Warning Escalating Defaults", не увеличивают дни предупреждений на количество баллов, если опции отключить, то всё работает правильно. Смотрите видео, надеюсь будет понятно, или задайте уточняющие вопросы.
Xenforo: v2.1.2
Mod's: Warning Improvements by Xon 2.2.12
PHP: 7.2.10
1. When you disable the "View own warnings" option, it gives an error when viewing someone else's profile with the "View Warning Actions" option enabled in the "User group permissions" settings:
I’m sure this option check is superfluous in the canViewWarningActions function of the \src\addons\SV\WarningImprovements\XF\Entity\User.php file. Without which everything works correctly:
PHP:
if ($visitor->user_id == $this->user_id)
{
return \XF::options()->sv_view_own_warnings;
}
При отключении опции "View own warnings", выдаёт ошибку при просмотре чужого профиля с включённой опцией "View Warning Actions" в настройках "User group permissions"
View attachment 205705
Я уверен, эта проверка опции лишняя в функции canViewWarningActions файла \src\addons\SV\WarningImprovements\XF\Entity\User.php. Без которой всё работает правильно:
PHP:
if ($visitor->user_id == $this->user_id)
{
return \XF::options()->sv_view_own_warnings;
}
This isn't the correct fix. The issue is the warning action list and individual warning actions are not checking against the same user.
Should be fixed for the next release
2. When the checkbox in the option "Points and expiry time are editable when giving warning" is checked, the options "Warning Escalating Defaults" do not work correctly, do not increase the warning days by the number of points, if the options are disabled, then everything works correctly. Watch the video, I hope it will be clear, or ask clarifying questions.
При установке флажка в опции "Points and expiry time are editable when giving warning", некорректно работают опции "Warning Escalating Defaults", не увеличивают дни предупреждений на количество баллов, если опции отключить, то всё работает правильно. Смотрите видео, надеюсь будет понятно, или задайте уточняющие вопросы.
Xenforo: v2.1.2
Mod's: Warning Improvements by Xon 2.2.12
PHP: 7.2.10
I'm not able to reproduce this. please check the console (network tab) to see what values are being sent to the browser as I suspect there may be some client-side scripting breaking things
I'm not able to reproduce this. please check the console (network tab) to see what values are being sent to the browser as I suspect there may be some client-side scripting breaking things
I did not particularly delve into the essence of the error (there is no time for this).
Here’s how it looks in the getCategoryPoints function (but time is defined "above" by code, somewhere in other functions):
Correct, those are the values you need to confirm are being changed as expected.
I did not particularly delve into the essence of the error (there is no time for this).
Here’s how it looks in the getCategoryPoints function (but time is defined "above" by code, somewhere in other functions):
This add-on extends XF\ControllerPlugin\Warn::getWarningFillerReply and adjusts the expiry duration by calling a custom function escalateDefaultExpirySettingsForUser and changing the definition response value which is used when populating formValues entries.
I apologize, I did not understand this phrase, how exactly should I use it?
If possible, set an example.
This add-on extends XF\ControllerPlugin\Warn::getWarningFillerReply and adjusts the expiry duration by calling a custom function escalateDefaultExpirySettingsForUser and changing the definition response value which is used when populating formValues entries.
Sorry, wrong translation. Carefully look at the entire video (which I recorded last), how variables are defined in the $input array, and as a result it turns out over time.
I think for the data in the array $input you need to do an additional check, with filling in the correct data.