Edit Only Your Unanswered Posts

Allows users to edit their posts only if they haven't been replied to
User avatar
Darloup
Donor
Posts: 62
Joined: 20 Oct 2016, 18:21
Location: Barranquilla (Colombia)

Re: Edit Only Your Unanswered Posts

#21

Post by Darloup » 15 Dec 2016, 00:49

Hello,

So, if I wish to keep all my settings :

1) I disable the original extension (the one with the old name)
2) I install and activate the new extension (the one with the new name)
3) And I then delete completely the original extension (the one with the old name)

Is this correct?

H.

User avatar
kasimi
mChat developer
Posts: 340
Joined: 06 Oct 2016, 09:56
Contact:

Re: Edit Only Your Unanswered Posts

#22

Post by kasimi » 15 Dec 2016, 03:46

Actually I only tested it with the old extension enabled the whole time. Just leave it enabled until the new extension is installed and running correctly.

As long as you don't delete the data of the old extension you can always repeat the process if the new extension fails to pick up the existing permissions.

User avatar
Dianna
Posts: 1
Joined: 17 Mar 2017, 17:35
Location: Renfrew, Renfrewshire, Scotland

Re: Edit Only Your Unanswered Posts

#23

Post by Dianna » 17 Mar 2017, 17:44

So .. Kasimi?
Is this the code you are using? :D

Code: Select all

	if ($post_data['post_id'] != $post_data['topic_last_post_id'])
	{
		trigger_error('CANNOT_EDIT_REPLIED');
	}

Code: Select all

'U_EDIT'         => (!$user->data['is_registered']) ? '' : ((($user->data['user_id'] == $poster_id && $topic_data['topic_last_post_id'] == $row['post_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)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&p={$row['post_id']}") : ''),

User avatar
kasimi
mChat developer
Posts: 340
Joined: 06 Oct 2016, 09:56
Contact:

Re: Edit Only Your Unanswered Posts

#24

Post by kasimi » 17 Mar 2017, 17:51

No. :P But your code might do something similar. This extension here adds a permission so that the administrator can decide what users can edit only unanswered posts, and what users can edit all posts.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest