Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2016-01-28 20:35:39

Creature
Member
From: The Dark Web
Joined: 2015-02-15
Posts: 9,658

New Post Notification when posting

So you're writing a message, but someone posts before you press the submit button. What about showing something like "there's a new post in this topic"?


This is a false statement.

Offline

Wooted by: (2)

#2 2016-01-28 20:39:03, last edited by some woman (2016-01-28 20:39:31)

some woman
Member
From: 4th dimension
Joined: 2015-02-15
Posts: 9,289

Re: New Post Notification when posting

a forum i go to says something along the lines of "a new message has been posted while you were typing, you should probably review this post before submitting your message" if someone posted while you were typing


10 years and still awkward. Keep it up, baby!

Offline

#3 2016-01-28 21:13:31

0176
Member
From: Brazil
Joined: 2021-09-05
Posts: 3,174

Re: New Post Notification when posting

Would it be possible to update it in real time?

Offline

#4 2016-01-28 21:31:59

TaskManager
Formerly maxi123
From: i really should update this
Joined: 2015-03-01
Posts: 9,465

Re: New Post Notification when posting

0176 wrote:

Would it be possible to update it in real time?

it would
but diff55's html nerd level is probably too low for that


i8SwC8p.png
signature by HG, profile picture by bluecloud, thank!!
previous signature by drstereos

Offline

#5 2016-01-28 23:22:09

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,854

Re: New Post Notification when posting

^diff has noted a lack of responsive webbing know-how (right?)

but that could be mitigating by simply invoking some man's response. It's clear that we already have custom responses for BBC issues, and response timeouts, so there's probably an existing hook to pass the message...

Offline

#6 2016-01-29 00:51:48, last edited by AlphaJon (2016-01-29 00:56:31)

AlphaJon
Member
From: Who knows
Joined: 2015-07-21
Posts: 1,297

Re: New Post Notification when posting

How I see a way to do it:

Inside topic pages (Javascript)

setInterval(function(){
    $.ajax({ //Assuming jQuery
        url: gettopiclastpost.php,
        data: {
            id: 33352 //have PHP dynamically put that value in a var somewhere, ID of topic
        },
        success: function(result){
            //Pseudocode: if time of last post > time of last loaded post && reply box is not empty, then warn user
        }
    });
}, 10000); //Every 10 seconds

And there there would be a PHP page with just outputs the datetime of the last post of the topic

It's also possible to make the check whenever a character is typer, but that would be too many requests per user per minute, so I won't include any pseudocode for this one

Alternative: the PHP page is called only once the user starts typing, but the page keeps the connection pending until someone else posts a reply. this is the only way I can think of for real time warning, but I don't really like forcing a server to keep connections open like that, dunno about the underlying performance issues.

Offline

#7 2016-01-29 01:07:08

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,854

Re: New Post Notification when posting

As we're humoring the responsive design, you could overcome the per-key-per-person lag wave of annihilation by polling at a certain rate.

But I'm not a huge fan of the responsive. Simply telling the user on post is good enough. and easier. by a bit.

Offline

#8 2016-01-29 01:21:57

sthegreat
Member
Joined: 2015-04-25
Posts: 409

Re: New Post Notification when posting

Pls no. It would be the terrible end of the ninjapost.


user.php?id=sthegreat

Offline

#9 2016-01-29 10:20:47

AlphaJon
Member
From: Who knows
Joined: 2015-07-21
Posts: 1,297

Re: New Post Notification when posting

Efficient and working right when you need it: make the check when submt button is clicked, and ask for confirmation if there is a new post.
Don't know why I didn't think of that before :o

Offline

AlphaJon1454059247578741

Board footer

Powered by FluxBB

[ Started around 1738461356.0886 - Generated in 0.112 seconds, 13 queries executed - Memory usage: 1.44 MiB (Peak: 1.58 MiB) ]