[TH] Auto Merge Double Posts [Deleted]

Lukas W.

Well-known member
katsulynx submitted a new resource:

Auto Merge Double Posts - Permission-controlled double post merger.

[KL] Auto Merge Double Posts
Description

V4RV5pW.png
Automatically merge posts from people that haven't yet understood what this dubious edit function is.

Features
  • Permission-controlled automated double post merger.
[COLOR=rgb(251, 160...[/SIZE]


Read more about this resource...
 
Thanks!! Finally :D

Maybe you can change "---- Automatically Merged Double Post ----" with an bbcode and the text: "---- Dubble post merged on xx-xx-xxxx ----"
Like:
fo_divider_examples-png.116274
 
Last edited:
The text is available as phrase, so you can style it to your liking. I think I can expose the edit time as unix timestamp to the phrase in a future version, but it'll be rendered on post creation, so stuff like 'a moment ago' won't work.
 
Give the phrase a bbcode like [doublepost]unixtime[/doublepost] or [doublepost='unxitime'][/doublepost] and then a bbcode with an php file that gives it 'a moment ago' etc.
Just an idea :p
 
So the merge time is permission based, correct? How have you accounted for the same issue with the other author's version of this for XF1 where when you set this for multiple groups, the one with the highest number wins? Their solution was complicated, the permission was a reverse number calculated by the addon. So in order for the permission to work correctly, and you wanted an admin group to not get merged ever, you would set that to 1500 and the lower group (like registered) to 1400 and then the addon subtracts that value from 1500 to determine if a merge happens. So 1500-1500=0 minutes, 1500-1400 = 100 minute merge window

The way the default permissions work, if you had registered=100 and admin=0 the resultant permission is 100 and the admin posts get merged
 
Give the phrase a bbcode like [doublepost]unixtime[/doublepost] or [doublepost='unxitime'][/doublepost] and then a bbcode with an php file that gives it 'a moment ago' etc.
Just an idea :p

Lame! :p Will consider.

So the merge time is permission based, correct? How have you accounted for the same issue with the other author's version of this for XF1 where when you set this for multiple groups, the one with the highest number wins?

It's highest number wins. See the FAQ.

This add-on does not seem to work for me?
You have to configure it first, there's no functionality out of the box. Make sure you've set up the permission correctly.
 
Lame! :p Will consider.



It's highest number wins. See the FAQ.


You have to configure it first, there's no functionality out of the box. Make sure you've set up the permission correctly.

By configuration you mean user permissions? As there are no options menu for this apart from the permissions set for usergroup. Which by default is set to 0 for Merge double posts within X hours and No for Never auto merge double posts. Which I assume should make it work every time.
 
By configuration you mean user permissions? As there are no options menu for this apart from the permissions set for usergroup. Which by default is set to 0 for Merge double posts within X hours and No for Never auto merge double posts. Which I assume should make it work every time.
You'll have to set it to unlimited if you want to have it merged every single time, not to 0. It's the number of hours, that have to be between two posts until they are no longer merged. If you leave it at 0, that means as soon as "0 hours have passed" (= instantly), the next post will no longer merged into the one before.
 
Ok so adjusting the "Merge double posts within X hours" to 1, worked. But the unlimited option does not seem to work, so could be that the option is faulty.
 
It's highest number wins. See the FAQ.
XF's permission system only takes the highest number for numeric permissions into account, meaning that a user with two user groups, one with the number of hours set to 10 and the other one set to 5 hours will have his double posts merged for 10 hours.
This is exactly my point. The addon does not work as one would like because of the nature of the XF permissions system. Therefore, this addon is useless when you want to force a merge to occur for a longer period of time for someone who is part of only the "registered" group, but for a shorter period of time when a user is, say, an admin.

If all users are in Registered and that is set to 1 hour, and Admin is set to 0, or an inbetween set to say 30 minutes, everyone will be at 1 hour and this addon will appear broken.

Please look at how WMTech approached this issue if you want to resolve this.
 
This is exactly my point. The addon does not work as one would like because of the nature of the XF permissions system. Therefore, this addon is useless when you want to force a merge to occur for a longer period of time for someone who is part of only the "registered" group, but for a shorter period of time when a user is, say, an admin.

If all users are in Registered and that is set to 1 hour, and Admin is set to 0, or an inbetween set to say 30 minutes, everyone will be at 1 hour and this addon will appear broken.

Please look at how WMTech approached this issue if you want to resolve this.
It's not an issue, it's a matter of preference. You can argue exactly the other way round as well. If you want to have posts merged in the first hour for everyone except for your spammers who are most likely to double post, and you put them in an extra spammer group with a 24 hours time restriction, that won't work because your spammers will still be in the registered group with a 1 hour time limit.
I understand your point however, and I have a workaround for this kind of situation that I already utilized in my User Improvements add-on in the latest release. I might add an option in the future which allows you to change that to your preference.

If all users are in Registered and that is set to 1 hour, and Admin is set to 0, or an inbetween set to say 30 minutes, everyone will be at 1 hour and this addon will appear broken.

Setting the merge time to 0 by the way has no effect whatsoever. If you want admins to bypass the merge, you need to make use of the "Never auto merge posts" permission.
 
Last edited:
so any possibility i can remove the entire ---- ---- part along with the line breaks? i would prefer to have nothing between merged posts. i have removed the phrase but the dashes still appear.
 
yeah. i got that. consider providing an option to remove the entire separator (maybe have the separator completely inside the phrase including line breaks for more end user control?). had been looking for a double-post merging add-on since i migrated to xf2. thanks for this.
also, is there a possibility to have this feature work without reloading the entire page? like editing post feature works on xf2? the add-on i used on xf1 just created a new post with merged content. it was not very neat but it worked without a page reload. cheers.
 
If you want to have posts merged in the first hour for everyone except for your spammers who are most likely to double post, and you put them in an extra spammer group with a 24 hours time restriction, that won't work because your spammers will still be in the registered group with a 1 hour time limit.
Yes, there is a way, if you have a verified group and don't put the spammers in it (or remove them from it if they are suspected)

In priority order
Registered gets long time to double-post merge (say 24 hours)
Spammers get same time (24 hours)
Verified group gets less time (4 hours)
Mod group gets less time than verified (1 hour)
Admin exempt

You can't do this with your addon if someone is part of Reg, Ver, Mod, Admin

You would have to re-work it such that:

Registered is a base with 0 merge time
unverified user is a secondary group with a high merge time (24 hrs), spammers might never get out of this group
promotion to a verified group could happen, but you can't remove someone from a group as part of a usergroup promotion
If someone is a mod, you have to remove them from the verified group then back in the permissions they would get to the Mod group, which defeats the purpose of using secondary usergroups to grant successive permissions
Admin exempt per permission works because they can be in all groups and it doesn't matter - so that feature is very nice actually. But you are forced to do that because if an Admin is not a Mod then they can't see the mod log due to the way XF works in that regard

So as you can see, not doing it the WMTech way creates a lot more problems than it solves, you have to re-work your entire philosophy about how to structure usergroups just so you can use this addon the way that it should logically work. Unless you only use it to post-merge one or maybe 2 usergroups, and exempt most others. But if you incorporated this addon into an existing usergroup framework with 30 usergroups and successive permissions for less time to merge as you progress up the "ladder" with users being added to groups but not removed from lower groups, this addon won't work at all for that...

Does that make sense?

The reason I'm bringing this up is that this was a really big deal with the older version of the XF1 addon that WMTech took over - it was originally structured exactly the way you've structured this one (without the exemption permission) and everyone complained. So I'm trying to help spare you that whole argument again. The only way to make this work in a manner that is instantly and easily integratable with an existing usergroup structure/philosophy is the way they did it.
 
In priority order
Registered gets long time to double-post merge (say 24 hours)
Spammers get same time (24 hours)
Verified group gets less time (4 hours)
Mod group gets less time than verified (1 hour)
Admin exempt

We can lead this discussion for ages. As already said, it's a matter of preference. I personally don't see a reason why moderators should need a merge time at all, they should be aware of the forum rules, as they're there to enforce them, and as such only make double posts if explicitly necessary. If my moderators wouldn't know what the edit function is there for, I'd question their eligibility for the job.
As such, I'm not going to change the way the add-on works now. It's XenForos default way of handling integer type permissions, so it also makes sense in a performance manner. Either way, I didn't say I'm not going to build it in at all. As stated before, I already have a solution at hand, as such, it will be an easy task to make this an optional choice in the (near) future. You'll be able to activate that from the options menu by then, but as it needs to completely reparse the permission time on every post, it'll have an impact on performance.
 
Top Bottom