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.
Pages: 1
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
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
Would it be possible to update it in real time?
Offline
Offline
^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
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
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
Pls no. It would be the terrible end of the ninjapost.
Offline
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
Pages: 1
[ Started around 1738472435.6306 - Generated in 0.106 seconds, 12 queries executed - Memory usage: 1.43 MiB (Peak: 1.58 MiB) ]