[Beta] Edit Last Post Only

MOD Authors: Discuss and post updates on new MODs in development for phpBB3, Receive feedback and Feature requests for MODs in development.

To submit your MOD or style, go to the STG MOD Manager
Forum rules
go to the STG MOD Manager to post your MOD in development.
Discuss and receive feedback for any MOD in development for phpBB3.
Suggest features for MODs in development.

No Support or MOD Requests
-- exceptions for MODs only posted here as Beta or Alpha.
Support requests for a MOD should be requested in the respective MOD topic.

[Beta] Edit Last Post Only

Postby Kjell » 19 Dec 2007, 12:13

MOD Title: Edit Last Post Only
MOD Description: Block users rights to edit his older post after that have a reply
- The user can only edit his last post
- Exact as the delete bottom works
- Admin and moderator can still edit all post.
The reason to using this is: You have members that change the question and blames on other things since

MOD Version: 0.1.0
MOD Format: txt

Last Stable version: None

Demo Board:
Look at Attachments

Open <forumroot>\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)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;f=$forum_id&amp;p={$row['post_id']}") : ''),     


Find in line:
Code: Select all
((($user->data['user_id'] == $poster_id


Put in after in line:
Code: Select all
&& $topic_data['topic_last_post_id'] == $row['post_id']     

Save

edit_message.png
(16.67 KiB) Downloaded 32 times


12-19-2007 - New subject


Need same help with the descriptions :)
Last edited by Kjell on 20 Dec 2007, 00:13, edited 9 times in total.
Kjelle
My work - My farm - Ware I live - phpBB support Sweden
"The globe is round, think global", My rules: Be teased is okay on a funny way ;)
User avatar
Kjell    
Supporter
Supporter
 
Posts: 490
Joined: 14 Feb 2007, 13:09
Location: Nordic of Sweden
Favorite Team: NHL N-ville,Forsberg
Gender: Male
phpBB Knowledge: 8




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: Edit Last Topic Only

Postby Sniper_E » 19 Dec 2007, 12:27

I hope this isn't the user can only edit the last post, but instead the user can edit his last post.

If it's the last post and I post.... and someone else posts somewhere else right after me,
then I want be able to edit my misspelled or incorrect post error I just made.

I can't tell by your code. Is it after 60 sec. you can't edit any of your posts? That would work.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6985
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: Edit Last Topic Only

Postby Kjell » 19 Dec 2007, 12:32

Sniper_E wrote:I hope this isn't the user can only edit the last post, but instead the user can edit his last post.

If it's the last post and I post.... and someone else posts somewhere else right after me,
then I want be able to edit my misspelled or incorrect post error I just made.

I can't tell by your code. Is it after 60 sec. you can't edit any of your posts? That would work.


"The user can only edit his last post." is more correct.

The user cant edit any of the older post after that have ha replay in the topics even after 60 sec.
Kjelle
My work - My farm - Ware I live - phpBB support Sweden
"The globe is round, think global", My rules: Be teased is okay on a funny way ;)
User avatar
Kjell    
Supporter
Supporter
 
Posts: 490
Joined: 14 Feb 2007, 13:09
Location: Nordic of Sweden
Favorite Team: NHL N-ville,Forsberg
Gender: Male
phpBB Knowledge: 8

Edit last post

Postby Kjell » 21 Dec 2007, 02:38

I need some help here :grin:
Can someone convert this so that it goes to change in ACP for each forum category?
Kjelle
My work - My farm - Ware I live - phpBB support Sweden
"The globe is round, think global", My rules: Be teased is okay on a funny way ;)
User avatar
Kjell    
Supporter
Supporter
 
Posts: 490
Joined: 14 Feb 2007, 13:09
Location: Nordic of Sweden
Favorite Team: NHL N-ville,Forsberg
Gender: Male
phpBB Knowledge: 8

Re: [Beta] Edit Last Post Only

Postby poppertom69 » 07 Jan 2008, 14:45

Can you explain more so I can try and help.

Edit: Do you mean so they can turn it on and off depending which forum they are on!
Image
Image
poppertom69    
Supporter
Supporter
 
Posts: 326
Joined: 13 Apr 2007, 08:08
Location: bucks, UK
Favorite Team: STG
Gender: Male
phpBB Knowledge: 8

Re: [Beta] Edit Last Post Only

Postby poppertom69 » 10 Jan 2008, 07:30

Kjell did you work it out?
Image
Image
poppertom69    
Supporter
Supporter
 
Posts: 326
Joined: 13 Apr 2007, 08:08
Location: bucks, UK
Favorite Team: STG
Gender: Male
phpBB Knowledge: 8

Re: [Beta] Edit Last Post Only

Postby Kjell » 12 Jan 2008, 01:11

poppertom69 wrote:Can you explain more so I can try and help.

Edit: Do you mean so they can turn it on and off depending which forum they are on!

Yes, that is what i mean.

Exampel:
Forum 1 Users can only edit own last post before he gets a replay (this mod) (examplel a support forum)
Forum 2 Users can edit all own post (function in phpbb3 today) (exemplel a mod forum)
Forum 3 Users can not edit edit post (function in phpbb3 today) (exampel a chat forum)

To have switch in ACP to do that is my problem.
Thank you Tom for all help i can get :hello:
Last edited by Kjell on 12 Jan 2008, 02:23, edited 3 times in total.
Kjelle
My work - My farm - Ware I live - phpBB support Sweden
"The globe is round, think global", My rules: Be teased is okay on a funny way ;)
User avatar
Kjell    
Supporter
Supporter
 
Posts: 490
Joined: 14 Feb 2007, 13:09
Location: Nordic of Sweden
Favorite Team: NHL N-ville,Forsberg
Gender: Male
phpBB Knowledge: 8

Re: [Beta] Edit Last Post Only

Postby Kjell » 12 Jan 2008, 01:30

Sorry for my bad English :grin: I hope you can understand what a wrote, if not I can ask John Hjorth to help me out ;)
Kjelle
My work - My farm - Ware I live - phpBB support Sweden
"The globe is round, think global", My rules: Be teased is okay on a funny way ;)
User avatar
Kjell    
Supporter
Supporter
 
Posts: 490
Joined: 14 Feb 2007, 13:09
Location: Nordic of Sweden
Favorite Team: NHL N-ville,Forsberg
Gender: Male
phpBB Knowledge: 8

Re: [Beta] Edit Last Post Only

Postby John Hjorth » 12 Jan 2008, 03:31

Hi Kjell and other in this topic :wave:

This is about the *issue* I have been nagging about in some forums (the support forums) on the Swedish phpBB support board, right, Kjell ? :) [Because I'm a typing idiot, and really don't want to appear as such on the board, despite I really am :rotfl: ].

As I have understood the situation : I have communicated with both Kjell and Marcus about it on the Swedish support site by PM's - and when you look at the issue, for practical implications obtaining almost the same result, I do not see the need for MODding here, as already and also mentioned above by Tom :

As I have understood the situation it is about getting the right balance on the board in the support forums between some users having a really bad habit of editing their questions with making notes in the starting posts of a topic, the question asked has been edited, and thereby creating condusion for other readers of the topic and on the other end of the scale leave some slack posting wise for typing idiots like me.

The decision so far by the Swedish suppport site has been to set the forumbased permissions for the support forums for the group registered users to edit own posts to : "No".

I think in practice the same result could be obtained the remove the annoying phenomen of suers editing own questions and at the same time take a bit conderation for typing idiots like me by setting the forum based permissions for the group registered users for the support forum to "Yes", and then limit the time span a user have avaialble for editing own posts on global level :

ACP => General (tab) => Post settings => Limit editing time: Limits the time available to edit a new post. Setting the value to 0 disables this behaviour. (Which I suppose is set to zero minutes right now) By setting it to a suiable number of minutes , perhaps based on some trial and error over time, perhaps starting with 15 minutes or something like that, I think the wanted (from a pratical point of view, but totally Kjell's request, I know) would be obtained, without anything about the users behavior in any forums beeing regulated in a way that for any user seems too harsh.

If you really want to do it strict [your explantion is quite clear to me, Kjell :) ], I think it a quite complated matter, because it does not fit into the whole system and idea of the permission system ion a detailed level, because all persmissions setting that are not structured so that they are on local level (forum based level) can be phrased a setting like YES - NO or NEVER, has to be a global setting, bacause it to some extent be in conflict with the existing permission setting on local level :

"Can edit own posts"

to have a separate permission called :

"Can edit own last post in topics, when there is still no reply".
Image Image ImageImage
User avatar
John Hjorth    
STG Moderator
STG Moderator
 
Posts: 1587
Joined: 27 Oct 2006, 22:23
Location: Odense, Denmark, EU
Favorite Team: Olympus DK Team
Gender: Male
phpBB Knowledge: 7

Re: [Beta] Edit Last Post Only

Postby AJ Quick » 17 Aug 2009, 22:29

I just want to bump this thread.

As an FYI this mod will not work with the "Limit Edit Time" turned on. This mod only toggles the Edit Post icon.

Additional modifications are required in the actual posting file which will figure out if they can edit it or not.

Otherwise.. this is a good mod to do!
User avatar
AJ Quick    
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 103
Joined: 10 Dec 2006, 12:20
Gender: Male

Next

Return to MODs in Development

Who is online

Users browsing this forum: Bingbot, Google Adsense [Bot] and 9 guests