|
Warning of someone posted before you
|
|
10-09-2008, 10:12 AM
Post: #1
|
|||
|
|||
|
Warning of someone posted before you
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...he-same-t) So I wrote the following code and hooked it into newreply_do_newreply_start: PHP Code: $posttime = $mybb->input['posttime'];(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? |
|||
|
10-09-2008, 10:17 AM
Post: #2
|
|||
|
|||
|
RE: Warning of someone posted before you
Ya I saw this feature in SMF.
![]() Forum | Sitemap |
|||
|
10-11-2008, 01:16 AM
Post: #3
|
|||
|
|||
|
RE: Warning of someone posted before you
Are you trying to do this from the quick reply, or the new reply page? If the latter, does "posttime" refer to the time they clicked on the "Post Reply" link, or the time they entered the thread?
Who is Yumi? It's still the KFC crazed person who can't spell names properly with annoying AlTeRnAtInG CaPiTaLs in the NaMe
|
|||
|
10-11-2008, 06:27 AM
Post: #4
|
|||
|
|||
|
RE: Warning of someone posted before you
I first wanted to do this from the new reply page and posttime id the time the user clicked the "new reply" button.
|
|||
|
10-11-2008, 07:40 AM
Post: #5
|
|||
|
|||
|
RE: Warning of someone posted before you
Alright, first things first
- intval the incomming 'posttime' to prevent an SQL injection - $post_errors is overwritten after the hook PHP Code: $post_errors = array(); Who is Yumi? It's still the KFC crazed person who can't spell names properly with annoying AlTeRnAtInG CaPiTaLs in the NaMe
|
|||
|
« Next Oldest | Next Newest »
|
Search
Member List
Calendar
Help



![[Image: certcollection_org_banner.gif]](http://certcollection.org/images/certcollection_org_banner.gif)

