Only Admin Edit Post

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Extensions Robot
Extensions Robot
Extensions Robot
Posts: 29220
Joined: Sat Aug 16, 2003 7:36 am

Only Admin Edit Post

Post by Extensions Robot »

Modification name: Only Admin Edit Post
Author: RMcGirr83
Modification description: Makes it so that only an Administrator that made a post can edit/delete his/her own post. Active for as long as the user is Administrator or has any Administrative Permission. Does not allow a Moderator to edit an Administrator's post. Other Administrator's can still edit posts which will be logged in the ACP.

In the attached pic RMcGirr83 is the administrator and this is being viewed from a Global Moderator account.

Custom support is given at this forum
Modification version: 1.0.5
Tested on phpBB version: 3.0.11

Download file: only_admin_edit_post_1_0_5.zip
File size: 43.89 KiB

Modification overview page: View

The phpBB Team is not responsible nor required to provide support for this modification. By installing this MOD, you acknowledge that the phpBB Support Team or phpBB Extension Customisations Team may not be able to provide support.

-->Modification support<--
Last edited by Extensions Robot on Mon Sep 19, 2022 7:33 pm, edited 27 times in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18316
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Only Admin Edit Post

Post by DavidIQ »

Modification validated/released

Notes:
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Only Admin Edit Post

Post by RMcGirr83 »

Thank you David and validation team.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
A_O_C
Registered User
Posts: 2383
Joined: Sun Jul 01, 2007 11:26 pm
Location: phpbb_

Re: Only Admin Edit Post

Post by A_O_C »

Rich,

Any changes from the package I tested? ;) :D
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Only Admin Edit Post

Post by RMcGirr83 »

Don't believe so and thanks for being the guinea pig!! :D
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
Richazey
Registered User
Posts: 823
Joined: Mon Oct 27, 2008 9:03 pm

Re: Only Admin Edit Post

Post by Richazey »

Cool mod, installed fine, thanks
Gadget27
Registered User
Posts: 22
Joined: Mon May 18, 2009 8:53 am
Location: France (Eure)
Contact:

Re: Only Admin Edit Post

Post by Gadget27 »

Cool mod very easy to install. Thanks

But Is it possible to enable the founder to edit all the posts admin :?:

Many thanks to your answer ;)
I learn english with phpbb.com :)
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Only Admin Edit Post

Post by RMcGirr83 »

Gadget27 wrote:But Is it possible to enable the founder to edit all the posts admin :?:
OPEN

posting.php

FIND

Code: Select all

if ($is_authed && ($mode == 'edit' || $mode == 'delete') && (in_array($post_data['poster_id'], $admin_only_arry) && $user->data['user_id'] != $post_data['poster_id']))
REPLACE WITH

Code: Select all

if ($is_authed && ($mode == 'edit' || $mode == 'delete') && (in_array($post_data['poster_id'], $admin_only_arry) && $user->data['user_id'] != $post_data['poster_id']) && !$user->data['user_type'] == USER_FOUNDER)
OPEN

viewtopic.php

FIND

Code: Select all

'U_EDIT'			=> (!$user->data['is_registered']) ? '' : ((($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || ($auth->acl_get('m_edit', $forum_id) && !in_array($poster_id, $admin_only_arry) || $user->data['user_id'] == $poster_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&p={$row['post_id']}") : ''),
REPLACE WITH

Code: Select all

'U_EDIT'			=> (!$user->data['is_registered']) ? '' : ((($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || ($auth->acl_get('m_edit', $forum_id) && !in_array($poster_id, $admin_only_arry) || $user->data['user_id'] == $poster_id) || $user->data['user_type'] == USER_FOUNDER) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&p={$row['post_id']}") : ''),
FIND

Code: Select all

'U_DELETE'			=> (!$user->data['is_registered']) ? '' : ((($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id'] && !$row['post_edit_locked'] && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || ($auth->acl_get('m_delete', $forum_id) && !in_array($poster_id, $admin_only_arry) || $user->data['user_id'] == $poster_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&f=$forum_id&p={$row['post_id']}") : ''),
REPLACE WITH

Code: Select all

'U_DELETE'			=> (!$user->data['is_registered']) ? '' : ((($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id'] && !$row['post_edit_locked'] && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || ($auth->acl_get('m_delete', $forum_id) && !in_array($poster_id, $admin_only_arry) || $user->data['user_id'] == $poster_id) || $user->data['user_type'] == USER_FOUNDER) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&f=$forum_id&p={$row['post_id']}") : ''),
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
Gadget27
Registered User
Posts: 22
Joined: Mon May 18, 2009 8:53 am
Location: France (Eure)
Contact:

Re: Only Admin Edit Post

Post by Gadget27 »

That's good. Many Thanks RMcGirr83 ;)
I learn english with phpbb.com :)
Jarex
Registered User
Posts: 7
Joined: Thu Nov 01, 2007 5:33 pm

Re: Only Admin Edit Post

Post by Jarex »

Hi. I am trying to find out why it does not work for me. I installed as stated but when testing Moderator's rights can still edit Admin's posts. Does it depend on leaders group settings?
PHPBB 3.0.9
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Only Admin Edit Post

Post by RMcGirr83 »

No it does not....just if the user editing is an Administrator or not.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
Jarex
Registered User
Posts: 7
Joined: Thu Nov 01, 2007 5:33 pm

Re: Only Admin Edit Post

Post by Jarex »

It means this mod does not aply for Moderators editing Admins posts, am I right?
PHPBB 3.0.9
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Only Admin Edit Post

Post by RMcGirr83 »

Jarex wrote:It means this mod does not aply for Moderators editing Admins posts, am I right?
It means that only the Admin user that made the post can edit their own post. Moderators can not and other Admins can not edit that Admin's post.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
Jarex
Registered User
Posts: 7
Joined: Thu Nov 01, 2007 5:33 pm

Re: Only Admin Edit Post

Post by Jarex »

Ok, so why It does not work for me? I am an Admin and do not want to have my posts to be edited by Mods. When testing Mods rights still can do that.
PHPBB 3.0.9
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Only Admin Edit Post

Post by RMcGirr83 »

Jarex wrote:When testing Mods rights still can do that.
I am assuming you are testing by clicking on the link that allows an Admin to assume anothers permissions? I'm not sure how that works but I would sign up another user, change that users permissions to global moderator (make the new user hidden). Then log in as that user and try to edit one of your admin posts.

If it isn't working, then you need to double check the edits the mod has you do as you have installed it incorrectly.

The mod simply disallows anyone but the original Admin user from editing that Admin users post. Once the Admin user loses their permissions as an Admin, then anyone properly authorized to edit posts can edit that users posts.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
Locked

Return to “[3.0.x] MOD Database Releases”