Snippets for phpBB3
martin
Admin
Status:
Offline
User theme: Dark
Posts: 5060 Joined: Apr 6th, '14, 14:12
Post by martin » Sep 4th, '14, 12:56
Post
by martin » Sep 4th, '14, 12:56
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,
Raheem
Users
Status:
Offline
User theme: Dark
Posts: 37 Joined: Feb 10th, '17, 21:34
Post by Raheem » Feb 12th, '17, 18:41
Post
by Raheem » Feb 12th, '17, 18:41
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!
martin
Admin
Status:
Offline
User theme: Dark
Posts: 5060 Joined: Apr 6th, '14, 14:12
Post by martin » Feb 12th, '17, 20:37
Post
by martin » Feb 12th, '17, 20:37
Did you look at the date of this topic ?
Raheem
Users
Status:
Offline
User theme: Dark
Posts: 37 Joined: Feb 10th, '17, 21:34
Post by Raheem » Feb 12th, '17, 21:23
Post
by Raheem » Feb 12th, '17, 21:23
Yes what's the problem then?
Sniper_E
VIP
Status:
Offline
User theme: Dark
Posts: 1151 Joined: Oct 14th, '14, 17:01
Post by Sniper_E » Feb 13th, '17, 22:58
Post
by Sniper_E » 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!"
[ Post made via Samsung Galaxy S5 Active ]
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™
dmzx
Founder
Status:
Offline
User theme: Dark
Posts: 6365 Joined: Jan 13th, '14, 20:45
Post by dmzx » Feb 13th, '17, 22:59
Post
by dmzx » Feb 13th, '17, 22:59
martin
Admin
Status:
Offline
User theme: Dark
Posts: 5060 Joined: Apr 6th, '14, 14:12
Post by martin » Dec 11th, '17, 20:44
Post
by martin » Dec 11th, '17, 20:44
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!"
[ Post made via Samsung Galaxy S5 Active ]
Might add it back but allow admins to carry on with out a reason.
Sniper_E
VIP
Status:
Offline
User theme: Dark
Posts: 1151 Joined: Oct 14th, '14, 17:01
Post by Sniper_E » Dec 11th, '17, 20:48
Post
by Sniper_E » Dec 11th, '17, 20:48
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!
martin
Admin
Status:
Offline
User theme: Dark
Posts: 5060 Joined: Apr 6th, '14, 14:12
Post by martin » Dec 11th, '17, 20:58
Post
by martin » Dec 11th, '17, 20:58
Got it working on 3.2.1
Sniper_E
VIP
Status:
Offline
User theme: Dark
Posts: 1151 Joined: Oct 14th, '14, 17:01
Post by Sniper_E » Dec 12th, '17, 00:21
Post
by Sniper_E » Dec 12th, '17, 00:21
I was afraid that might happen.
dmzx
Founder
Status:
Offline
User theme: Dark
Posts: 6365 Joined: Jan 13th, '14, 20:45
Post by dmzx » Dec 12th, '17, 13:02
Post
by dmzx » Dec 12th, '17, 13:02
Sniper_E wrote: Dec 12th, '17, 00:21
I was afraid that might happen.
martin
Admin
Status:
Offline
User theme: Dark
Posts: 5060 Joined: Apr 6th, '14, 14:12
Post by martin » Dec 12th, '17, 13:55
Post
by martin » Dec 12th, '17, 13:55
Edits are in my admin section
Dont steal them Ed