Welcome, Guest. Please Login or Register.
May 13, 2025, 09:56:08 PM
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  |  Users delete their own Post « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Users delete their own Post  (Read 755 times)
Surfy
Sr. Member
****
Posts: 458


I'm a llama!

Users delete their own Post
« on: April 01, 2003, 10:18:30 AM »
Reply with quote


Is it possible to dissallow the Users to delete their own Posts after a period of time?

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


My $txt[228]

Re:Users delete their own Post
« Reply #1 on: April 01, 2003, 10:44:05 AM »
Reply with quote

open ModifyMessage

search for   if ($deletepost)
   {

add after      $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 delete your post after ".$maxEditTime." minutes of posting time.");
Logged

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


I'm a llama!

Re:Users delete their own Post
« Reply #2 on: April 01, 2003, 10:52:58 AM »
Reply with quote

thank you!!!

Surfy
Logged
Surfy
Sr. Member
****
Posts: 458


I'm a llama!

Re:Users delete their own Post
« Reply #3 on: May 01, 2003, 12:05:33 PM »
Reply with quote

Now, im modding on my 1.5.1 Final since over a Week, and now is a little Bug inside, i didn`t see bevore..

I have installed this code & all works fine. After 10 min, the Users get a Message, that their not allwowed to edit their Posts after xx min.

But since then, something must do an error:

If someone try to edit their Poste between the xx Minutes, he can reopen the Post and do the Changes, but if he will save a Message appears:

( $txt[67])
Quotetxt[67] = 'You are not allowed to change this message';

My Modifimessage.php is here

http://snow.prohosting.com/hcoreblo/ModifyMessage.txt

I hope someone could find the error.

***********
Now the Message in German as well  :o

Leider hat sich danach irgendwann ein Bug eingeschlichen. Sobald ein Member ein Post editieren will, kommt immer (beim Speichern) die Meldung:

Quote:
"Du hast keine Berechtigung, diese Mitteilung zu ändern"


Wenn ein Member es nach 10 minuten probiert, kommt die richtige Meldung:

Quote:
Du hast keine Berechtigung um eigene Postings nach 10 Minuten zu editieren.


Meine Modifimessage.php findet ihr hier:

http://snow.prohosting.com/hcoreblo/ModifyMessage.txt

Ich hoffe jemand sieht den Fehler!!

Surfy
« Last Edit: May 01, 2003, 01:54:21 PM by Surfy » Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Users delete their own Post « 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.029 seconds with 17 queries.