2008-10-09, 10:12 AM
I just tried to realise the a plugin which warns you if someone posted before you in the same thread while you were writing your post
(Inspired by this idea: http://ideas.mybboard.net/idea/warning-i...the-same-t)
So I wrote the following code and hooked it into newreply_do_newreply_start:
(postdate is the time the "New Reply" button is clicked)
The problem is: I cant find a way to redirect the user back to the newreply.php and show an info box without any code change in the newreply.php file.
Can anyone image a way to realise this with only using the plugin file and making no code changes?
(Inspired by this idea: http://ideas.mybboard.net/idea/warning-i...the-same-t)
So I wrote the following code and hooked it into newreply_do_newreply_start:
$posttime = $mybb->input['posttime'];
$reply = $db->fetch_array($db->simple_select("posts", "dateline", "visible='1' AND tid='".$tid."' AND dateline > ".$posttime));
if($reply)
{
$post_errors[] = "Something";
}
(postdate is the time the "New Reply" button is clicked)
The problem is: I cant find a way to redirect the user back to the newreply.php and show an info box without any code change in the newreply.php file.
Can anyone image a way to realise this with only using the plugin file and making no code changes?