Welcome, Guest. Please Login or Register.
June 17, 2024, 03:05:41 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  |  Completed mods  |  [Beta 1.5.4] Maximum Edit Time « previous next »
Pages: [1] Reply Ignore Print
Author Topic: [Beta 1.5.4] Maximum Edit Time  (Read 3995 times)
Scorpion
Noobie
*
Posts: 33


WWW
[Beta 1.5.4] Maximum Edit Time
« on: August 24, 2003, 10:05:40 PM »
Reply with quote

This mod lets the board admin choose how long (in minutes) a member can edit his/her post after it's posted. It excludes administrators, global moderators, and moderators. The max post edited time can be changed in "Installed Mods & Settings".

Download board mod file: here
« Last Edit: August 24, 2003, 10:09:06 PM by Scorpion » Logged
FaSan
Jr. Member
**
Posts: 67


Re:[Beta 1.5.4] Maximum Edit Time
« Reply #1 on: September 03, 2003, 06:21:09 PM »
Reply with quote

Great !!!

Logged
Abominator
Noobie
*
Posts: 15


WWW
Re:[Beta 1.5.4] Maximum Edit Time
« Reply #2 on: September 04, 2003, 06:29:54 PM »
Reply with quote

brilliant... i've been lookin for something like this ever since i switched to SE...
Logged
BrandonMiller
Jr. Member
**
Posts: 52


I'm a llama!

Re:[Beta 1.5.4] Maximum Edit Time
« Reply #3 on: October 24, 2003, 09:10:09 PM »
Reply with quote

I ran it with boardmod, but there is no settings in my mod settings and nothing appears to have happened  ???
Logged
Scorpion
Noobie
*
Posts: 33


WWW
Re:[Beta 1.5.4] Maximum Edit Time
« Reply #4 on: October 24, 2003, 10:19:37 PM »
Reply with quote

Quote from: BrandonMiller on October 24, 2003, 09:10:09 PM
I ran it with boardmod, but there is no settings in my mod settings and nothing appears to have happened  ???
If nothing changed in mod settings, you probably didn't install the mod right.
Logged
BrandonMiller
Jr. Member
**
Posts: 52


I'm a llama!

Re:[Beta 1.5.4] Maximum Edit Time
« Reply #5 on: October 24, 2003, 10:50:13 PM »
Reply with quote

 ;D

yea, but it isn't that tough - and this is the second mod to do this. the who's browsing mod just broke (it was functional and then it just dissapeared but all of the files are still right)

weird

:P
Logged
PioneeR
Llama Hunter
YaBB God
*****
Posts: 767


Re:[Beta 1.5.4] Maximum Edit Time
« Reply #6 on: October 27, 2003, 07:14:44 PM »
Reply with quote

Will this mod stop the user deleting their post after x mins??
Logged
Scorpion
Noobie
*
Posts: 33


WWW
Re:[Beta 1.5.4] Maximum Edit Time
« Reply #7 on: October 27, 2003, 07:30:08 PM »
Reply with quote

Quote from: PioneeR on October 27, 2003, 07:14:44 PM
Will this mod stop the user deleting their post after x mins??
no it's only for modifying posts
Logged
BrandonMiller
Jr. Member
**
Posts: 52


I'm a llama!

Re:[Beta 1.5.4] Maximum Edit Time
« Reply #8 on: October 27, 2003, 07:46:01 PM »
Reply with quote

I figured it out, for some reason my board mod was not reading a step on the .mod file - it came across blank but when I open the .mod file in notepad I can read it just fine and made the change as it said, works fine..
Logged
PioneeR
Llama Hunter
YaBB God
*****
Posts: 767


Re:[Beta 1.5.4] Maximum Edit Time
« Reply #9 on: October 27, 2003, 07:46:11 PM »
Reply with quote

Any chance of a little tweak to stop them doing anything to it after x mins??  ;D
Logged
BrandonMiller
Jr. Member
**
Posts: 52


I'm a llama!

Re:[Beta 1.5.4] Maximum Edit Time
« Reply #10 on: October 27, 2003, 07:50:45 PM »
Reply with quote

Quote from: PioneeR on October 27, 2003, 07:46:11 PM
Any chance of a little tweak to stop them doing anything to it after x mins??  ;D

I'd like that option..

honestly a guy just tried to sue a lot of people for stuff said about him (libel and slander) on a bbs, of course he went and deleted everything HE said first..
Logged
Scorpion
Noobie
*
Posts: 33


WWW
Re:[Beta 1.5.4] Maximum Edit Time
« Reply #11 on: October 27, 2003, 11:20:24 PM »
Reply with quote

Ok, make the following modifications for this mod so users can't delete their posts or modify their messages after x amount of minutes.

Edit file: Sources/ModifyMessage.php

Find:
   $request = mysql_query("
         SELECT m.ID_MSG, m.ID_MEMBER, m.attachmentSize, m.attachmentFilename, t.locked, t.ID_FIRST_MSG, t.ID_LAST_MSG, t.ID_TOPIC, t.ID_POLL, t.numReplies, b.ID_BOARD, b.count
         FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b
         WHERE m.ID_MSG=$postid
            AND t.ID_TOPIC=m.ID_TOPIC
            AND b.ID_BOARD=t.ID_BOARD
         LIMIT 1;") or database_error(__FILE__, __LINE__);
   $row = mysql_fetch_assoc($request);


Replace with:
   $request = mysql_query("
         SELECT m.ID_MSG, m.ID_MEMBER, m.attachmentSize, m.attachmentFilename, t.locked, t.ID_FIRST_MSG, t.ID_LAST_MSG, m.posterTime, t.ID_TOPIC, t.ID_POLL, t.numReplies, b.ID_BOARD, b.count
         FROM {$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b
         WHERE m.ID_MSG=$postid
            AND t.ID_TOPIC=m.ID_TOPIC
            AND b.ID_BOARD=t.ID_BOARD
         LIMIT 1;") or database_error(__FILE__, __LINE__);
   $row = mysql_fetch_assoc($request);


Find:
   if ($row['ID_MEMBER'] != $ID_MEMBER && $settings[7] != 'Administrator' && $settings[7] != 'Global Moderator' && !in_array($username, $moderators))
      fatal_error($txt[67]);


Add after:
 $maxEditTime = $modSettings[maxtime];
 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 delete your post after ".$maxEditTime." minutes.");


That should work. :) Let me know if you have any problems.
« Last Edit: October 27, 2003, 11:21:25 PM by Scorpion » Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Beta 1.5.4] Maximum 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.036 seconds with 21 queries.