sonnb - Prevent double post

sonnb - Prevent double post 1.0.1

No permission to download

sonnb

Well-known member
sonnb submitted a new resource:

sonnb - Prevent double post (version 1.0.0) - Prevent double thread and post due to lag or slow connection

Description:
You might see that there are many cases that might lead to double post and thread in XenForo. Eg: Sever slow, connection between server and user is slow... And user only see that: "Server not response in time" even that post/thread was successfully created. This addon would allow you to set for double checking with specified duration.

Functions:
- Prevent double thread
- Prevent double reply.

Donation and Support:...

Read more about this resource...
 
Thanks yavuz for the suggestion.

As I have used "Merge double post" on vBB, this addon's purpose is to merge 2 posts that posted next to together by the same user. While my addon is to prevent double content due to server error, network error or some unexpected errors. By looking at this comparison we can see that they are doing 2 different jobs.

But... it is a good idea to choose which option should make when double post was triggered: Show error or merge posts. Maybe we could see this in the next version (wherever possible).
 
Thanks yavuz for the suggestion.

As I have used "Merge double post" on vBulletin, this addon's purpose is to merge 2 posts that posted next to together by the same user. While my addon is to prevent double content due to server error, network error or some unexpected errors. By looking at this comparison we can see that they are doing 2 different jobs.

But... it is a good idea to choose which option should make when double post was triggered: Show error or merge posts. Maybe we could see this in the next version (wherever possible).

I think it could be achieved either way knowing that some admins will prefer this way, perfectly legitimate. Merging option is a more practical approach to prevent double posts and I got use to the other addons way of merging posts. I'm glad you are considering it. I'll keep this thread watched. Thanks again :)
 
So basically I could set the timer to 5 or 10 seconds etc so that a double post isn't made in that time frame?
 
Has this been testing on Androids yet? I had an earlier version of this on my site (loved it, by the way) but when users are posting twice from Android it deletes the first post.

If this has been fixed I'm all over it!

edit: This is different than the one I had loaded. The one I had merged double posts. Sorry if I caused any confusion.
 
Very nice sonnb, a good alternative to the currently buggy and unsuported merge double post addon. Instead of promting an error it would be awesome if the messages would get merged with the previous one. Maybe the addon can inherit those feature of the addon I gave the link of. Thanks for making this one available for free :)
+1 to this.... please
 
For now I've installed both

First one (this one) keeps double post from happening in X time ... A default feature in XenForo, but not always 100%

2nd is the merge post mod (which I've always had). Good to help prevent bumping and general abuse.

Would be very thankful if this did both some how, but for now this solution works. :)
 
Hi, thank for addon :)

French translate =>

you_may_not_perform_this_action_because_double_post

Votre message a probablement déjà été posté plus tôt. Ce message ne peut être dupliqué.
<br />
Vérifiez <a href="{link_post}"><span style="color: #B40000;">ICI</span></a> si votre message a bien été enregistré.


Example:

1bUBR.jpg


1bUDY.jpg
 
For now I've installed both

First one (this one) keeps double post from happening in X time ... A default feature in XenForo, but not always 100%

2nd is the merge post mod (which I've always had). Good to help prevent bumping and general abuse.

Would be very thankful if this did both some how, but for now this solution works. :)
Yep. I know that but... he has it so... ^_^
 
Got this error when attempting to post three attachments in a private forum where no one has been tagged.

It worked fine after I disabled bdTagMe
Code:
The following error occurred:
Undefined index:
 
    XenForo_Application::handlePhpError() in bdTagMe/Engine.php at line 153
    bdTagMe_Engine->searchTextForTagged() in bdTagMe/XenForo/DataWriter/DiscussionMessage/Post.php at line 18
    bdTagMe_XenForo_DataWriter_DiscussionMessage_Post->set() in XenForo/ControllerPublic/Thread.php at line 492
    XenForo_ControllerPublic_Thread->actionAddReply() in sonnbPreventDoublePost/ControllerPublic/Thread.php at line 35
    sonnbPreventDoublePost_ControllerPublic_Thread->actionAddReply() in XenForo/FrontController.php at line 310
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    XenForo_FrontController->run() in /home/user/public_html/index.php at line 13
 
Got this error when attempting to post three attachments in a private forum where no one has been tagged.

It worked fine after I disabled bdTagMe
Code:
The following error occurred:
Undefined index:
 
    XenForo_Application::handlePhpError() in bdTagMe/Engine.php at line 153
    bdTagMe_Engine->searchTextForTagged() in bdTagMe/XenForo/DataWriter/DiscussionMessage/Post.php at line 18
    bdTagMe_XenForo_DataWriter_DiscussionMessage_Post->set() in XenForo/ControllerPublic/Thread.php at line 492
    XenForo_ControllerPublic_Thread->actionAddReply() in sonnbPreventDoublePost/ControllerPublic/Thread.php at line 35
    sonnbPreventDoublePost_ControllerPublic_Thread->actionAddReply() in XenForo/FrontController.php at line 310
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    XenForo_FrontController->run() in /home/user/public_html/index.php at line 13
This is bgTagMe not this addon :)
 
Mình chuyển sang Tiếng Việt ở đâu anh Sơn ơi!
1. 0.gif

2.1.gif

Còn nếu tìm trực tiếp you_may_not_perform_this_action_because_double_post trong Team thì không có kết quả.
2.gif

Anh chỉ giúp mình với
 
như hình ở dưới đó anh, click vào đó trắng trơn.

1-gif.42490
You should enable debug mode to see if any error occurred. Maybe have some addons that caused this.
(Đây là diễn đàng tiếng Anh nên có gì bạn PM hỏi riêng mình nhé, đừng nói tiếng Việt ở đây).
 
To make this silently reject double posts instead of giving an error, then in /library/sonnbPreventDoublePost/ControllerPublic/Thread.php function actionAddReply()
replace the line:
PHP:
        $this->_assertIsDoublePost($message, $visitorId, $threadId, $timeDiff);
with
PHP:
        // Mick Modification to silently ignore double posts (in last 30 seconds, as per above)
        if ($post = $this->_getPostModel()->isDoublePost($message, $visitorId, $threadId, $timeDiff))
        {
            $controllerResponse = new XenForo_ControllerResponse_Redirect();
            $controllerResponse->redirectType = XenForo_ControllerResponse_Redirect::SUCCESS;
            $controllerResponse->redirectTarget = XenForo_Link::buildPublicLink('full:posts', $post);;
            return $controllerResponse;
        }

Instead of an error it redirects back to the duplicate post, so you get a screen refresh, but it's basically invisible.
 
Last edited:
To make this silently reject double posts instead of giving an error, then in /library/sonnbPreventDoublePost/ControllerPublic/Thread.php function actionAddReply()
replace the line:
PHP:
        $this->_assertIsDoublePost($message, $visitorId, $threadId, $timeDiff);
with
PHP:
        // Mick Modification to silently ignore double posts (in last 30 seconds, as per above)
        if ($post = $this->_getPostModel()->isDoublePost($message, $visitorId, $threadId, $timeDiff))
        {
            $controllerResponse = new XenForo_ControllerResponse_Redirect();
            $controllerResponse->redirectType = XenForo_ControllerResponse_Redirect::SUCCESS;
            $controllerResponse->redirectTarget = XenForo_Link::buildPublicLink('full:posts', $post);;
            return $controllerResponse;
        }

Instead of an error it redirects back to the duplicate post, so you get a screen refresh, but it's basically invisible.
Wow that's pretty cool. @sonnb can you add this feature?
 
Top Bottom