Welcome, Guest. Please Login or Register.
May 16, 2025, 02:53:21 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Limited edit time « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Limited edit time  (Read 1107 times)
chaozz
Noobie
*
Posts: 26


dodge this

Limited edit time
« on: March 31, 2003, 09:08:10 AM »
Reply with quote

i would like users to be able to edit their post for a period of time. in phpBB this option could be added with a mod, so i guess it could be done for yabb too..

what i mean is this:
if a user posts something offensive, and i (as a moderator) edit his post, but don't close the thread, than he can re-edit his post and remove what i wrote.

i would like to be able to set a time, say 10 minutes. after that, a user can no longer edit his own post.


can this be done?
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:Limited edit time
« Reply #1 on: March 31, 2003, 08:21:21 PM »
Reply with quote

open ModifyMessage.php
search for   $lastmodification = (isset($row['modifiedTime']) ? timeformat($row['modifiedTime']) : '-');
add before   $maxEditTime = 10;   // in minutes
  if ($row['ID_MEMBER'] == $ID_MEMBER && $row['posterTime'] < (time() - 60 * $maxEditTime) && $settings[7] != 'Administrator' && $settings[7] != 'Global Moderator' && !in_array($username, $moderators))
     fatal_error("You are not allowed to edit your post after ".$maxEditTime." minutes.");

« Last Edit: April 27, 2003, 02:04:31 AM by Spaceman-Spiff » Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
chaozz
Noobie
*
Posts: 26


dodge this

Re:Limited edit time
« Reply #2 on: April 01, 2003, 07:29:14 AM »
Reply with quote

excellent! thank you. will test it once my host is back up..
Logged
Surfy
Sr. Member
****
Posts: 458


I'm a llama!

Re:Limited edit time
« Reply #3 on: April 01, 2003, 09:48:02 AM »
Reply with quote

should this also work in YaBB 1.4.1??

Great little Mod!!

Surfy
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:Limited edit time
« Reply #4 on: April 01, 2003, 10:02:43 AM »
Reply with quote

not sure, why don't u try it?
i think it will work fine...
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Surfy
Sr. Member
****
Posts: 458


I'm a llama!

Re:Limited edit time
« Reply #5 on: April 01, 2003, 10:12:13 AM »
Reply with quote

it woks well  :-*

thx a lot!!
Logged
Surfy
Sr. Member
****
Posts: 458


I'm a llama!

Re:Limited edit time
« Reply #6 on: April 01, 2003, 10:27:07 AM »
Reply with quote

Big trouble:

Now i cant edit my own Post... I am Admin...

Surfy
Logged
chaozz
Noobie
*
Posts: 26


dodge this

Re:Limited edit time
« Reply #7 on: April 01, 2003, 10:32:12 AM »
Reply with quote

there should be made a difference between a moderator/admin and a normal user.
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:Limited edit time
« Reply #8 on: April 01, 2003, 10:35:50 AM »
Reply with quote

modified the code above
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Surfy
Sr. Member
****
Posts: 458


I'm a llama!

Re:Limited edit time
« Reply #9 on: April 01, 2003, 10:51:05 AM »
Reply with quote

it must be a little bug.. now all can edit their Posts angain
Logged
Surfy
Sr. Member
****
Posts: 458


I'm a llama!

Re:Limited edit time
« Reply #10 on: April 01, 2003, 11:00:18 AM »
Reply with quote

Now all works well!!  :D

Thank you!


Surfy
Logged
chaozz
Noobie
*
Posts: 26


dodge this

Re:Limited edit time
« Reply #11 on: April 01, 2003, 11:36:08 AM »
Reply with quote

this indeed works excellent. but i also read the topic about disabling users to delete their posts. this seems to affect the same part of code.

could someone combine these codes so users can:
- only edit withing 10 minutes
- not delete their posts

i know i'm pushing the envelope, so if you're tired of coding, let me know.. ;)
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Limited edit time « 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.068 seconds with 21 queries.