vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Require Edit Reason (https://vborg.vbsupport.ru/showthread.php?t=322820)

MarkFL 06-09-2016 09:00 PM

Require Edit Reason
 
1 Attachment(s)
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/attachmen...1&d=1465539099

And something like this in the advanced editor:

https://vborg.vbsupport.ru/attachmen...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:
  1. Download and extract the attached .zip file.
  2. Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
  3. Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
  4. Click "Import."
  5. You MUST enable the product in the settings before it will function.
  6. Configure the remaining settings to your liking. Each setting has a detailed explanation of its use.

https://vborg.vbsupport.ru/attachmen...1&d=1465701010

Support for this product can be found here:

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

Quote:

Originally Posted by Stratis (Post 2571900)
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... 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

Quote:

Originally Posted by BrettC Frontier (Post 2571952)
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... 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

1 Attachment(s)
Thanks for the update.
How can i make these dimensions smaller?

Attachment 155137
As you see its very wide :D

Thanks

MarkFL 06-12-2016 11:31 AM

Quote:

Originally Posted by Stratis (Post 2571968)
Thanks for the update.
How can i make these dimensions smaller?

Attachment 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:
Code:

$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

Quote:

Originally Posted by Stratis (Post 2571975)
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. ;)

Quote:

Originally Posted by BrettC Frontier (Post 2571977)
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:
Code:

$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

Quote:

Originally Posted by Stratis (Post 2571975)
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!


All times are GMT. The time now is 06:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01127 seconds
  • Memory Usage 1,755KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete