[TH] Auto Merge Double Posts [Deleted]

No risk there, the plugin works with 2.1 just fine.

I'd like to have just a blank line/paragraph inserted between the original post and the addition. Can I do that myself? At this moment, if I configure the plugin not to insert the bb code line, the text is appended with no space between the old and new, and that's not really neat. Thanks!
 
I think to add a blank line/paragraph we need to enable the message between merged posts and edit the phrase to be a bb code [/br]

I haven’t exactly figured it out though.
 
Also, do you think it would be possible to change the double post time from hours to minutes? We'd like to have 15 minutes instead of an hour, but that's just our preference.
It only supports X amount of hours for now.
I could use minutes also. One hour is too long on a very busy forum, plus, this would match the edit/delete timeout in the permissions system, which also uses minutes.

This wouldn't be too hard to modify from my end, would it?
 
Modification so permissions settings work in minutes, not hours. Roughly tested, it seems to work. I found a value that seemed to relate to the number of seconds per hour (3,600); I changed that, edited the permission to read "5" (as in minutes), and the test thread I made would put not merge posts after five minutes had elapsed. @JoyFreak

Open src/addons/KL/AutoMergeDoublePost/MergeTime.php .

Find: return $minTime * 3600;
Replace with: return $minTime * 60;
Find: return $mergeTime * 3600;
Replace with: return $mergeTime * 60;
Save file.​

In the admin control panel, go to Phrases. Find the phrase permission.forum_klAMDPMergeTime.

Phrase text: "Merge double posts within X hours"​
Replace with: "Time limit to merge double posts (minutes)"​
Save and exit.​

Return to your permissions settings, and set it to the number of minutes you would like for your merged post time limit.​

Done! Note that file health check might throw a warning for the edited file.


Here is one way to put space between the merged posts, until it is fixed by the developer. @puterfixer @upnet

In the options for the add-on, leave "Include merge message" enabled. Do not disable it.*​
195575
Open the extra.less template. Add the following:​

CSS:
.kl_amdp_merge_message {
    border: none;
    display: none;
    margin: 0;
    padding: 0;
}
* It seems that when the merge message is enabled, it inserts a line break before the merged posts. You can also use visibility: hidden; in place of display: none: which will make it appear as though there are two lines between the merged posts. (One of those "lines" is the hidden merge message, the other is the line break.)​

As always, use at your own risk, and this code is unsupported and without any guarantees for suitability or fitness to the application. :)
 
Modification so permissions settings work in minutes, not hours. Roughly tested, it seems to work. I found a value that seemed to relate to the number of seconds per hour (3,600); I changed that, edited the permission to read "5" (as in minutes), and the test thread I made would put not merge posts after five minutes had elapsed. @JoyFreak

Open src/addons/KL/AutoMergeDoublePost/MergeTime.php .

Find: return $minTime * 3600;
Replace with: return $minTime * 60;
Find: return $mergeTime * 3600;
Replace with: return $mergeTime * 60;
Save file.​

In the admin control panel, go to Phrases. Find the phrase permission.forum_klAMDPMergeTime.

Phrase text: "Merge double posts within X hours"​
Replace with: "Time limit to merge double posts (minutes)"​
Save and exit.​

Return to your permissions settings, and set it to the number of minutes you would like for your merged post time limit.​

Done! Note that file health check might throw a warning for the edited file.


Here is one way to put space between the merged posts, until it is fixed by the developer. @puterfixer @upnet

In the options for the add-on, leave "Include merge message" enabled. Do not disable it.*​
Open the extra.less template. Add the following:​
CSS:
.kl_amdp_merge_message {[/INDENT]
[INDENT]    border: none;[/INDENT]
[INDENT]    display: none;[/INDENT]
[INDENT]    margin: 0;[/INDENT]
[INDENT]    padding: 0;[/INDENT]
[INDENT]}
* It seems that when the merge message is enabled, it inserts a line break before the merged posts. You can also use visibility: hidden; in place of display: none: which will make it appear as though there are two lines between the merged posts. (One of those "lines" is the hidden merge message, the other is the line break.)​

As always, use at your own risk, and this code is unsupported and without any guarantees for suitability or fitness to the application. :)
Thanks, that does work. Good thinking to hide the merge message and use it for the spacer! It gives a little extra space than standard line spacing, but I actually like that.
 
Thanks for this addon
Can you tell me simply how to set the permission for my registered group to merge immediatly two post. Is it like this

Capture d’écran 2019-04-10 à 08.43.41.webp

Because in my opinion the phrase "Never auto merge double posts" should rather be : Auto merge double posts" Yes or No
It' more logical
 
Because in my opinion the phrase "Never auto merge double posts" should rather be : Auto merge double posts" Yes or No
The permission seems to be exclusive, though. Set this to "Yes" for your administrators so their posts don't get automatically merged.
 
0 for an integer permission is the same as "not set". Hence if any other group the user is in has a merge time, his posts would always be merged, even if you set the add-on to use minimum merge time of all permissions. Hence this permission exists.
 
It should be possible to migrate if you run an SQL query to change the bb code our add-on inserts to the bb code this add-on uses. Otherwise you will see raw bb code in all old merged posts (if you haven't switched off the divider in the options of our add-on).

We plan to release an XF2 version of our add-on, but there is no ETA currently.

Can anyone help with migrating from wmtech's version to ThemeHouse's version of the add-on? What's the MySQL query that needs to be run to replace wmtech's syntax with this add-on's syntax? This is what the raw text of a post merged by wmtech's add-on looks like:

Code:
This is the first post.
[doublepost=postid000001,postid000002][/doublepost]This is the second post.
[doublepost=postid000003][/doublepost]This is the third post.
 
Can you guys add an option to Mark threads which contain merged double posts as new? In my opinion it’s kinda confusing the way it works right now. Maybe you could add it as an optional setting for the next update? :)
Hi @wmtech, can you please share the code for the query?
I’d be interested in that query as well.
 
Bug:
If you reply to your last post again without typing anything into the Reply field, it will not check if the Message field is empty and an empty Reply will be created.


Screen_20191125020915.webp
 
Top Bottom