Various modifications for phpBB3Reason for editing post required

Snippets for phpBB3
Previous topicNext topic
User avatar

Topic Author
martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5060
Joined: Apr 6th, '14, 14:12
    unknown unknown

Reason for editing post required

Post by martin »

Force user's to fill out the reason for editing a post.

Open /posting.php

Find This may be a partial find and not the whole line (spaces may differ)

Code: Select all

if (sizeof($message_parser->warn_msg))
    {
        $error[] = implode('<br />', $message_parser->warn_msg);
    }
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

// When editing, a reason is mandatory for all users
        if( $mode== 'edit'&& !$post_data['post_edit_reason'] ) 
        {
        $error[]= 'Edit reason is required!';
        }
(around line 666):
Find This may be a partial find and not the whole line (spaces may differ)

Code: Select all

$post_data['post_edit_reason']   = (!empty($_POST['edit_reason']) && $mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? utf8_normalize_nfc(request_var('edit_reason', '', true)) : '';
Replace with Replace the preceding lines with the following

Code: Select all

$post_data['post_edit_reason']   = (!empty($_POST['edit_reason']) && $mode == 'edit'/* && $auth->acl_get('m_edit', $forum_id)*/) ? utf8_normalize_nfc(request_var('edit_reason', '', true)) : '';
(around like 1448):
Find This may be a partial find and not the whole line (spaces may differ)

Code: Select all

'S_EDIT_REASON'            => ($mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? true : false,
Replace with Replace the preceding lines with the following

Code: Select all

'S_EDIT_REASON'            => ($mode == 'edit'/* && $auth->acl_get('m_edit', $forum_id)*/) ? true : false,
User avatar

Raheem
Users
Users
Status: Offline
User theme: Dark
Posts: 37
Joined: Feb 10th, '17, 21:34
    Windows 7 Chrome

Re: Reason for editing post required

Post by Raheem »

Better than forcing him write reason, you can make it like in vBulletin if member edited his post without write the reason it will be:
Last edited by USERNAME; 06-09-2013 at 08:03.

And if he wite the reason it will be like: Last edited by USERNAME; 10-12-2009 at 20:35. Reason: REASON!
User avatar

Topic Author
martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5060
Joined: Apr 6th, '14, 14:12
    Ubuntu Chrome

Re: Reason for editing post required

Post by martin »

Did you look at the date of this topic ?
User avatar

Raheem
Users
Users
Status: Offline
User theme: Dark
Posts: 37
Joined: Feb 10th, '17, 21:34
    Windows 7 Chrome

Re: Reason for editing post required

Post by Raheem »

Yes what's the problem then?
User avatar

Sniper_E
VIP
VIP
Status: Offline
User theme: Dark
Posts: 1151
Joined: Oct 14th, '14, 17:01
    Android Chrome

Re: Reason for editing post required

Post by Sniper_E »

I did not like this modification when you were using it on your site awhile back. But I did love entering in "I don't need a reason fool!" :rolling:

[ Post made via Samsung Galaxy S5 Active ] Image
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™
User avatar

dmzx
Founder
Founder
Status: Offline
User theme: Dark
Posts: 6365
Joined: Jan 13th, '14, 20:45
    Windows 10 Chrome

Re: Reason for editing post required

Post by dmzx »

Sniper_E wrote: Feb 13th, '17, 22:58 I did not like this modification when you were using it on your site awhile back. But I did love entering in "I don't need a reason fool!" :rolling:

[ Post made via Samsung Galaxy S5 Active ] Image
:rolling:
User avatar

Topic Author
martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5060
Joined: Apr 6th, '14, 14:12
    Ubuntu Chrome

Re: Reason for editing post required

Post by martin »

Sniper_E wrote: Feb 13th, '17, 22:58 I did not like this modification when you were using it on your site awhile back. But I did love entering in "I don't need a reason fool!" :rolling:

[ Post made via Samsung Galaxy S5 Active ] Image

Might add it back but allow admins to carry on with out a reason.
User avatar

Sniper_E
VIP
VIP
Status: Offline
User theme: Dark
Posts: 1151
Joined: Oct 14th, '14, 17:01
    Windows 10 Firefox

Re: Reason for editing post required

Post by Sniper_E »

martin wrote: Dec 11th, '17, 20:44 Might add it back but allow admins to carry on with out a reason.
You might give me another reason to call you a fool! :rolling:
User avatar

Topic Author
martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5060
Joined: Apr 6th, '14, 14:12
    Ubuntu Chrome

Re: Reason for editing post required

Post by martin »

Got it working on 3.2.1 :rolling:
User avatar

Sniper_E
VIP
VIP
Status: Offline
User theme: Dark
Posts: 1151
Joined: Oct 14th, '14, 17:01
    Windows 10 Firefox

Re: Reason for editing post required

Post by Sniper_E »

I was afraid that might happen. :rolling:
User avatar

dmzx
Founder
Founder
Status: Offline
User theme: Dark
Posts: 6365
Joined: Jan 13th, '14, 20:45
    Windows 10 Chrome

Re: Reason for editing post required

Post by dmzx »

Sniper_E wrote: Dec 12th, '17, 00:21 I was afraid that might happen. :rolling:
:rolling:
User avatar

Topic Author
martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5060
Joined: Apr 6th, '14, 14:12
    Ubuntu Chrome

Re: Reason for editing post required

Post by martin »

Edits are in my admin section :rolling: Dont steal them Ed :rolling:
Previous topicNext topic