Welcome, Guest. Please Login or Register.
April 30, 2025, 01:52:39 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Time limit for post edit « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Time limit for post edit  (Read 1208 times)
andrea
Global Moderator
YaBB God
*****
Posts: 4400


Peace on Earth

WWW
Time limit for post edit
« on: March 15, 2002, 11:02:21 AM »
Reply with quote

As is now everybody can edit or delete his/her posts forever.

How would I have to implement a time limit for the edit/deletion of posts?

For example: own posts can be edited or deleted within the next 24 hours (or the next 7 days), as long as the thread is not closed by a moderator or an admin.
Logged

David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:Time limit for post edit
« Reply #1 on: March 15, 2002, 05:07:39 PM »
Reply with quote

Or posts can't be edited or deleted once responded tol.
Logged

andrea
Global Moderator
YaBB God
*****
Posts: 4400


Peace on Earth

WWW
Re:Time limit for post edit
« Reply #2 on: March 16, 2002, 07:42:09 AM »
Reply with quote

Maybe one of the admins could move this thread into the "mod ideas" board?
Logged

Dave Smulders
YaBB SE Developer
YaBB God
*****
Posts: 608


WWW
Re:Time limit for post edit
« Reply #3 on: March 16, 2002, 11:52:30 AM »
Reply with quote

As long as it stays optional :)

I use the editing of posts to keep track of lists of people which will participate in sports tournaments and so on....these change during a timespan of a month or two :)

Maybe so that only normal users have the time limit. Admins and mod's then could keep editing posts even after that period of time.
Logged

andrea
Global Moderator
YaBB God
*****
Posts: 4400


Peace on Earth

WWW
Re:Time limit for post edit
« Reply #4 on: March 16, 2002, 12:43:41 PM »
Reply with quote

Quote from: Dave Smulders on March 16, 2002, 11:52:30 AMMaybe so that only normal users have the time limit. Admins and mod's then could keep editing posts even after that period of time.
Yes, I agree with that.
Logged

seth4chaos
Noobie
*
Posts: 22


YaBB SE Rulez!!!

Re:Time limit for post edit
« Reply #5 on: March 23, 2002, 03:27:04 PM »
Reply with quote

This mod gives a normal user 1 hour the time to edit/delete his post. After that only Mods/Global Mods/Admins can edit/delete a post.

<id>
ModifyTimeLimit
</id>

<edit file>
Sources/Display.php
</edit file>

<search for>
      if(in_array($username,$moderators) || $settings[7] == 'Administrator' || $settings[7] == 'Global Moderator'|| ($ID_MEMBER==$muserID && $ID_MEMBER != -1))

</search for>

<replace>
      if(in_array($username,$moderators) || $settings[7] == 'Administrator' || $settings[7] == 'Global Moderator'|| ($ID_MEMBER==$muserID && $ID_MEMBER != -1 && (($mdate+3600) >= time())))

</replace>

<edit file>
Sources/ModifyMessage.php
</edit file>

<search for>
   if($row['ID_MEMBER'] != $ID_MEMBER && !in_array($username,$moderators) && $settings[7] != 'Administrator' && $settings[7] != 'Global Moderator' )

</search for>

<replace>
   if( !($row['ID_MEMBER'] == $ID_MEMBER && ($row['posterTime']+3600) >= time()) && !in_array($username,$moderators) && $settings[7] != 'Administrator' && $settings[7] != 'Global Moderator' )

</replace>

<search for>
   if(($settings[7] != 'Administrator') && ($settings[7] != 'Global Moderator') && !in_array($username,$moderators) && $row['ID_MEMBER'] != $ID_MEMBER) {

</search for>

<replace>
   if(($settings[7] != 'Administrator') && ($settings[7] != 'Global Moderator') && !in_array($username,$moderators) && !($row['ID_MEMBER'] == $ID_MEMBER && ($row['posterTime']+3600) >= time())) {

</replace>

<search for>
   # Make sure the user is allowed to edit this post.
   if($row['ID_MEMBER'] != $ID_MEMBER && !in_array($username,$moderators) && $settings[7] != 'Administrator' && $settings[7] != 'Global Moderator' )
      fatal_error($txt[67]);

</search for>

<replace>
//   # Make sure the user is allowed to edit this post.
//   if($row['ID_MEMBER'] != $ID_MEMBER && !in_array($username,$moderators) && $settings[7] != 'Administrator' && $settings[7] != 'Global Moderator' )
//      fatal_error($txt[67]);

</replace>
Logged
sydney078
Sr. Member
****
Posts: 279


WWW
Re:Time limit for post edit
« Reply #6 on: March 24, 2002, 07:17:38 AM »
Reply with quote

Has anyone tested this?  And where does it go exactly?

Thank you
Logged

groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:Time limit for post edit
« Reply #7 on: March 24, 2002, 09:14:18 AM »
Reply with quote

<edit file>
Sources/Display.php
</edit file>

so u r editing display.php
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
seth4chaos
Noobie
*
Posts: 22


YaBB SE Rulez!!!

Re:Time limit for post edit
« Reply #8 on: March 24, 2002, 12:27:11 PM »
Reply with quote

Quote from: groundup on March 24, 2002, 09:14:18 AM<edit file>
Sources/Display.php
</edit file>

so u r editing display.php

Yep, this is to hide the 'edit' and 'delete' image after 1 hour
Logged
groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:Time limit for post edit
« Reply #9 on: March 24, 2002, 08:11:34 PM »
Reply with quote

sorry, i forgot to quote sydney.
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Time limit for post edit « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.031 seconds with 17 queries.