PDA

View Full Version : Miscellaneous Hacks - Require Edit Reason


MarkFL
06-09-2016, 09:00 PM
Overview:

This product will allow you to require users to give a reason for editing posts, and you may set the minimum allowed characters in the reason, and define a list of edit reasons which they can select from a drop-down menu. This list of suggested reasons will appear for all users, whether required to give a reason or not, as an aid. If you have suggested reasons for moderators defined, then anyone who has moderating privileges in the forum in which a post reside will see these reasons in the drop-down menu as well.

You may select usergroups whose members will be exempt, and in addition members of usergroups who have "Show edited by note on edited messages?" set to "No" in the "General Permissions" section of the Usergroup Manager" will be exempt, since requiring a reason would defeat that setting.

Also, anyone editing a post within the time limit defined in the setting "Time to Wait Before Starting to Display 'Last Edited by...'" under "Message Posting and Editing Options" will be exempt.

A user required to give an edit reason will see something like this in the quick editor:

https://vborg.vbsupport.ru/attachment.php?attachmentid=155119&stc=1&d=1465539099

And something like this in the advanced editor:

https://vborg.vbsupport.ru/attachment.php?attachmentid=155120&stc=1&d=1465539099

Updates:

Version 1.1:


Added setting for suggested reasons for moderators/administrators.
Drop-down menu section titles now phrased.


Version 1.2:


Fixed bug causing interference with activity stream.


Compatibility:

Tested and working on VB 4.2.x and may work on all 4.x versions of vBulletin.

Backup/Warning:

This product does not alter your database, however it is always good practice to make regular backups and you should make a backup before installing ANY new mod.

As always, products are USE AT YOUR OWN RISK. I will provide support and do my best to help but no absolute guarantee is offered.

To Install:


Download and extract the attached .zip file.
Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
Click "Import."
You MUST enable the product in the settings before it will function.
Configure the remaining settings to your liking. Each setting has a detailed explanation of its use.


https://vborg.vbsupport.ru/attachment.php?attachmentid=155134&stc=1&d=1465701010

Support for this product can be found here:


MHB - Require Edit Reason (http://mathhelpboards.com/vbulletin-products-61/require-edit-reason-21794.html)
TAZ - Require Edit Reason (https://theadminzone.com/threads/require-edit-reason.145030/)

Stratis
06-10-2016, 05:45 AM
Works fine, in vb4.2 (tested in all browsers).

Thanks a lot :)

MarkFL
06-10-2016, 06:26 AM
Works fine, in vb4.2 (tested in all browsers).

Thanks a lot :)

Thank you, Stratis, for making the initial suggestion, and for all of your support and patience with testing all along the development process/incremental updates...your input was greatly appreciated and invaluable! :up:

BrettC Frontier
06-11-2016, 11:34 PM
Would it be possible to add in a "special" group segment where Moderators and Administrators have their own special dropdown box segment in addition to the normal users segment?

So as per your image here (https://vborg.vbsupport.ru/attachment.php?attachmentid=155119&d=1465539113)... the moderators would see:

-- Select an Option --
Correct Spelling/Grammar
Add Relevant Content
Remove Controversial Content
Attach Image Inline
Wrap LaTeX In Tags
-- Moderators --
Reason for Edit 1
Reason for Edit 2
Reason for Edit 3
Reason for Edit 4
Reason for Edit 5

Normal (non-special/non-elevated) users would see just the Select an Option portion with out the moderators portion. I think that would complete this addon. :-)

MarkFL
06-12-2016, 01:12 AM
Would it be possible to add in a "special" group segment where Moderators and Administrators have their own special dropdown box segment in addition to the normal users segment?

So as per your image here (https://vborg.vbsupport.ru/attachment.php?attachmentid=155119&d=1465539113)... the moderators would see:

-- Select an Option --
Correct Spelling/Grammar
Add Relevant Content
Remove Controversial Content
Attach Image Inline
Wrap LaTeX In Tags
-- Moderators --
Reason for Edit 1
Reason for Edit 2
Reason for Edit 3
Reason for Edit 4
Reason for Edit 5

Normal (non-special/non-elevated) users would see just the Select an Option portion with out the moderators portion. I think that would complete this addon. :-)

Great suggestion! :up:

Update - Version 1.1:


Added setting for suggested reasons for moderators/administrators.
Drop-down menu section titles now phrased.

Stratis
06-12-2016, 09:39 AM
Thanks for the update.
How can i make these dimensions smaller?

155137
As you see its very wide :D

Thanks

MarkFL
06-12-2016, 11:31 AM
Thanks for the update.
How can i make these dimensions smaller?

155137
As you see its very wide :D

Thanks

Is it doing that in all browsers, or just one?

Stratis
06-12-2016, 01:05 PM
Sorry Mark I thought i mention that, in IE11 is huge space.
In the other browsers it has a little space but its ok.

BrettC Frontier
06-12-2016, 01:33 PM
You have a bug in the template_render_output hook.

While the mod is active, the template_render_output hook code causes activity.php to fail to render forum ID's, Forum Names, and text previews from the .\vb\activitystream\view\perm\forum\post.php file. The new thread data still functions.

In which, it is apparently interfering with this line:
$foruminfo =& vB::$vbulletin->forumcache[$threadinfo['forumid']]; on post.php at line 88.

I've not a clue how those two correlated, but when i disable that hook from the addon of Require Edit Reason, activity.php renders new post text and forum ID/name without issue.

MarkFL
06-12-2016, 03:20 PM
Sorry Mark I thought i mention that, in IE11 is huge space.
In the other browsers it has a little space but its ok.

IE...what can I say...it does its own thing. ;)

You have a bug in the template_render_output hook.

While the mod is active, the template_render_output hook code causes activity.php to fail to render forum ID's, Forum Names, and text previews from the .\vb\activitystream\view\perm\forum\post.php file. The new thread data still functions.

In which, it is apparently interfering with this line:
$foruminfo =& vB::$vbulletin->forumcache[$threadinfo['forumid']]; on post.php at line 88.

I've not a clue how those two correlated, but when i disable that hook from the addon of Require Edit Reason, activity.php renders new post text and forum ID/name without issue.

Thank you...I have fixed this issue. :)

Update - Version 1.2:


Fixed bug causing interference with activity stream.

MarkFL
06-12-2016, 04:16 PM
Sorry Mark I thought i mention that, in IE11 is huge space.
In the other browsers it has a little space but its ok.

Against my better judgement, I just took a look at this in IE11, and it was no wider than it is in modern standards compliant browsers like Firefox/Chrome. :confused:

Techno Cowboy
07-08-2016, 09:23 PM
Installed & voted...:up:

Thanks Mark!