[WMTech] Double Post Merge

[WMTech] Double Post Merge 1.3.1

No permission to download
  • Thread starter Thread starter Syndol
  • Start date Start date
You could add:
PHP:
if ($this->_input->filterSingle('post_as_user_id', XenForo_Input::UINT) || $this->_input->filterSingle('post_as_username', XenForo_Input::STRING))
    return parent::actionAddReply();
to the very top of the actionAddReply() function in DoublePost/ControllerPublic/Thread

If you want your post as user to actually merge with other post as user posts then you will have to modify the function to fetch the user, process their permissions, and replace the relevant visitor code.
 
Well, I only know how to add the code to the file, the rest is voodoo for me.
 
Last edited:
This may have a small incompatibility with "Anonymous post"
http://xenforo.com/community/resources/bd-anonymous-posting.970/
Insert the following to the very top of the actionAddReply() function in DoublePost/ControllerPublic/Thread
PHP:
if ($this->_input->filterSingle('anonymous_posting', XenForo_Input::STRING))
    return parent::actionAddReply();

Edit:
Or use the latest version of Anonymous Posting which includes instructions on how to make both add-ons work together a little better.
 
Last edited by a moderator:
Do you know how to fix your plugin and Tapatalk interactions?

When you check the forum via Tapatalk they show:

[DOUBLEPOST=1376667471][/DOUBLEPOST]
 
Sorry, no idea. I don't use Tapatalk.
I guess they don't extend the BbCode class as would be expected.
 
  • Will not merge when attachments, images, or media in the double post will bring the merged post above the per post set limit for such items.

Thank you! *downloads*
 
Not working for me at all for some reason. Uninstalls for now.
Yet another useless post from DRE.
Once again you provide no information and thus your post is simply pointless other than perhaps an attempt to seek some attention.
Due to the seemingly high volume of add-ons that do not work on your forum, perhaps you should take a closer look at which add-on(s) or style(s) you have installed which are causing this conflict.
Thanks for letting us know you've uninstalled this add-on. At least we now know that part works just fine for you ;)
 
Two of your addons no longer work for me since I upgraded and I'm not getting any errors in my server error logs related to your addons. Both addons don't work with my default Xenforo style either. When I have some time I'll disable all the addons and turn them on one by one. I only have 54 addons running right now compared to 130 from last year so it's not a big deal.
 
Ok this addon seems to work great on XenForo 1.2.1...it merges double posts, no problem at all.
However, I set it to not merge after a set amount of time. Unfortunately, it still merges the post.
I have to disable the addon for now until this can be fixed.

P.S.
I did configure it correctly as I have used this addon in the past.
It has worked up until now. :(

EDIT: My bad...I forgot about usergroup hierarchy.
I can confirm the addon works 100% on XF 1.2.1 :D
 
Last edited:
Sorry, no idea. I don't use Tapatalk.
I guess they don't extend the BbCode class as would be expected.

I dont need Double Post tags inside the post code, i just want a simple merge. Nor any styling to show it was merged.. simply text merge that is it. How do i go about it?
 
I do believe that if you remove the text from the first two options of the add-on then nothing will be displayed between the original and new post messages.
 
I do believe that if you remove the text from the first two options of the add-on then nothing will be displayed between the original and new post messages.

I did remove it, i still see double post tags in the edit post option. Though they are useless, they show up in tapatalk.
 
To achieve what you want you will have to edit the DoublePost/ControllerPublic/Thread.php file
Replace
Code:
// DIVIDER TAG
if ($doBumpThread && !preg_match('/\bDOUBLEPOST=\b\d+,+\d/i', $previousMessage)) // only include original post date once
    $mergedMessage = $previousMessage . '[DOUBLEPOST=' . $timeNow . ',' . $previousPostDate . '][/DOUBLEPOST]' . $message;
else
    $mergedMessage = $previousMessage . '[DOUBLEPOST=' . $timeNow . '][/DOUBLEPOST]' . $message;
With
Code:
$mergedMessage = $previousMessage . "\n\n" . $message;
 
To achieve what you want you will have to edit the DoublePost/ControllerPublic/Thread.php file
Replace
Code:
// DIVIDER TAG
if ($doBumpThread && !preg_match('/\bDOUBLEPOST=\b\d+,+\d/i', $previousMessage)) // only include original post date once
    $mergedMessage = $previousMessage . '[DOUBLEPOST=' . $timeNow . ',' . $previousPostDate . '][/DOUBLEPOST]' . $message;
else
    $mergedMessage = $previousMessage . '[DOUBLEPOST=' . $timeNow . '][/DOUBLEPOST]' . $message;
With
Code:
$mergedMessage = $previousMessage . "\n\n" . $message;

Perfect. :)
 
Code:
ErrorException: Fatal Error: Class 'DoublePost_ControllerPublic_Thread' not found - library/XenForo/Application.php(513) : eval()'d code:1
Generated By: Unknown Account, Today at 9:10 PM
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(106) "http://xxx.com/threads/indonesias-economy-political-social-and-science-development-thread.240866/page-8"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

Got this once since the edit.
 
Top Bottom