View Thread
All MODs and their Supported Threads goes here in this Section.
 Print Thread
[MOD]Delayed edit lock for members
Wanabo
In admin panel /settings / forum enable Lock Edit: YES
(Prevent users from editing their posts)

The mod below allows a member to edit his post for 2 hours after his initial post.

forum/viewthread.php line 297 find


if (iMOD || ($lock_edit && $last_post['post_id'] == $data['post_id'] && $userdata['user_id'] == $data['post_author']) || (!$lock_edit && $userdata['user_id'] == $data['post_author'])) {


and replace with:


if (iMOD || ($lock_edit && $last_post['post_id'] == $data['post_id'] && $userdata['user_id'] == $data['post_author']) || (!$lock_edit && $userdata['user_id'] == $data['post_author']) || ($data['post_datestamp']+(2*60*60) > (time( )) == $data['post_id'] && $userdata['user_id'] == $data['post_author'])) {


2 hours = 2*60*60
3 hours = 3*60*60
etc.

I felt this was necessary on my sites because users edited their post and the thread became unreadable afterwards. This way a member can correct typo's, but ensures older post won't get altered or deleted.

I rather would have this as an option in the admin panel.
Edited by Wanabo on 10-02-2011 21:47
Cool
 
Ankur
Hey ! Thanks for this MOD Wanabo !!! Smile

Yeah, this is useful for heavy Forums too... Cool

EDITED :

Done !!! Set upped to 3 Hours Wink
Edited by Ankur on 05-02-2011 08:15
Be What you want to be...Wink
 
www.php-fusion.in
Wanabo

Quote

Ankur wrote:
Yeah, this is useful for heavy Forums too... Cool


Lets hope this will be a heavy forum then. Wink

I thought lets get this forum started with a mod. It's rather empty.
Do we need more categories on this site?
Cool
 
Ankur
Hmm... May be..... Actually, I am a Little Confused Confused and afraid about this Licensing of using stuff under AGPL... I didn't get the whole concept/statements given on the AGPL(and its a bit boring to read them too... Pfft) that what kind of Stuff can be hosted on this site ?

As it is unofficial right now, then is it ok/permitted to host the addons made by our self ? Is it ok to upload the addons n our site made by other users on official sites or MOD sites of fusion, as uploaded on this mod site : http://www.phpfusion-mods.net/ ?

Aah ! Too many queries.... Sad Thats Y a little bit scared of any unwanted action by the Officials .... Shock

BTW, you may know better than me about this... Wink
Be What you want to be...Wink
 
www.php-fusion.in
Wanabo
Quote from the AGPL.txt file in the download package.

Quote

GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007

Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble

The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.

The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program
--to make sure it remains free
software for all its users.


Quote

A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate.


So no need to worry.
Edited by Wanabo on 06-02-2011 09:50
Cool
 
Ankur
Hey ya ! Thanks Wanabo ! Smile

You always help me ..... Wink
Be What you want to be...Wink
 
www.php-fusion.in
Jump to Forum
New Thread Post Reply
Use BBcode or HTML to refer to; '[MOD]Delayed edit lock for members'
BBcode:
HTML: