Double post prevention mod????

Discussion in 'PHP' started by Sarsones, Feb 3, 2010.

  1. #1
    Hi, i m looking for Double post prevention mod for Invision power board script

    Detail about this mod: this mod don't let members double post in a row (I mean without waiting for somebody else to post after him before he can post again) in a targeted thread

    I hope somebody can help me in it :)
     
    Sarsones, Feb 3, 2010 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Basically select the last inserted post and see if it is their id.

    SELECT id FROM my_table WHERE post = $POST_ID ORDER BY post_date DESC LIMIT 1;

    if($id == $users_id) {
    //throw an error that they need to wait.
    //Also redisplay their post so they don't lose it.
    }
     
    jestep, Feb 4, 2010 IP
  3. thtarcman

    thtarcman Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I would check the last post made by the user, and see if the text of the new post matches the old post.
     
    thtarcman, Feb 4, 2010 IP