Wedge

Public area => Features => The Pub => Features: Posts & Topics => Topic started by: Nao on May 9th, 2011, 06:34 PM

Title: Merge Double Posts
Post by: Nao on May 9th, 2011, 06:34 PM
Feature: Merge Double Posts
Developer: Nao
Target: users
Status: 100% (complete.)
Comment:

Some admins don't like when users post multiple messages in a row on a topic. This feature allows them to automatically merge these posts until after a certain delay has passed. Users can also choose to merge posts manually with a Merge button.
Title: Re: Merge Double Posts
Post by: Dismal Shadow on May 9th, 2011, 06:44 PM
épique
Title: Re: Merge Double Posts
Post by: Arantor on May 9th, 2011, 06:46 PM
This version should, if I remember right, also reflag the topic as having new items if you'd already read the old one.
Title: Re: Merge Double Posts
Post by: Dismal Shadow on May 9th, 2011, 06:55 PM
Even more better. :D
Title: Re: Merge Double Posts
Post by: Arantor on May 9th, 2011, 07:45 PM
Yeah, this isn't based on my code, but the other one that's since been tweaked and improved (and unlike the version on sm.org, it actually works with our current release!)
Title: Re: Merge Double Posts
Post by: Nao on May 9th, 2011, 08:29 PM
There are three merge mods that I know of:
- Pete's
- An Italian modder's (I posted on his topic a lot at the time)
- Din1031's mod, which he gave up to me. I never released it officially as a mod for SMF, but my own rewrite is to be found in Wedge.
Title: Re: Merge Double Posts
Post by: moyack on June 6th, 2011, 11:38 PM
Quote from Nao/Gilles on May 9th, 2011, 06:34 PM
Feature: Merge Double Posts
Developer: Nao
Target: users
Status: 100% (complete.)
Comment:

Some admins don't like when users post multiple messages in a row on a topic. This feature allows them to automatically merge these posts until after a certain delay has passed. Users can also choose to merge posts manually with a Merge button.
That's something totally neccesary. :D
Title: Re: Merge Double Posts
Post by: Nao on June 7th, 2011, 06:44 AM
It's not. It's vital Eheh.
Title: Re: Merge Double Posts
Post by: live627 on June 7th, 2011, 07:27 AM
Without it, the world would implode. Chaos would rule everywhere! Our little drama episodes would be nothing. :P
Title: Re: Merge Double Posts
Post by: Vekseid on June 11th, 2011, 08:20 AM
Could this be setup as a sort of bump limiter?

E.g. have an option to prevent it from updating the timestamp or anything, so it doesn't get bumped. The user will have to wait so many hours/days before their next post actually sends the topic to the top.
Title: Re: Merge Double Posts
Post by: spoogs on June 11th, 2011, 08:46 AM
AFAIK the options are
Merge the 2 post... no bumping
Or
Prevent the user from posting again for X hours, unless someone else posts... again no bumping

Or.. Disable the feature and allow bumping,

These are per board settings.
Title: Re: Merge Double Posts
Post by: Roz on June 22nd, 2011, 08:13 PM
Quote from Arantor on May 9th, 2011, 06:46 PM
This version should, if I remember right, also reflag the topic as having new items if you'd already read the old one.
But should it really? If there's no change of content with the post merger, I don't see the reason the unread flag should stay up. It warns the user for new content, when there isn't any, just a change of post structure. A minor quirk, but a quirk nontheless.
Title: Re: Merge Double Posts
Post by: spoogs on June 22nd, 2011, 08:22 PM
There is new content, the new post that got merged is new... so it's like making a post and editing it, it gets flagged as unread.
Title: Re: Merge Double Posts
Post by: Arantor on June 23rd, 2011, 12:10 AM
The only case that could be made for not flagging it unread is if you already read the later post, then happened to manually merge after the event.

When the new post is made and auto merged, it is new content you won't have seen, so it should be marked unread.
Title: Re: Merge Double Posts
Post by: Roz on June 23rd, 2011, 01:57 AM
I see where you come from, but say for example I have these two posts, the second one right after the first:

Post 1:
"Hello friends, this is my first post!"

Post 2:
"And I forgot to say, this forum rocks!"

So I come to the thread, read the double post and warn the user double posting is to be avoided. I then merge the posts using the super bulletin software Wedge and it becomes one like this:

Post 1+2
"Hello friends, this is my first post!
And I forgot to say, this forum rocks!"

There is no new real content if you will. I have no new information. I have already read what he had to say in Post 1 and Post 2. The fact that both informations are merged into a "new" post doesn't change the fact that I already have read it. For me, as a user, the fact the topic gets flagged for new information and there is none in reality, is a minor quirk.

Of course I'm assuming the flag in question is for "unread" content. If the flag means unchecked activity then I concede.
Title: Re: Merge Double Posts
Post by: spoogs on June 23rd, 2011, 02:02 AM
And how is the software suppose to determine what is so called 'real' content. Fact is there is new content no matter how you slice it. The 2nd post would have been automatically merged with the first, so you would not have seen the content added by the 2nd post.
Title: Re: Merge Double Posts
Post by: Arantor on June 23rd, 2011, 08:45 AM
Funny, you managed to take what I already said and managed to miss the point.
Quote from Arantor on June 23rd, 2011, 12:10 AM
The only case that could be made for not flagging it unread is if you already read the later post, then happened to manually merge after the event.

When the new post is made and auto merged, it is new content you won't have seen, so it should be marked unread.
That is exactly what you described and I believe it's already accounted for, it certainly is for the person doing the merging. In all other cases, it would be new content for people to read - especially if you happen to reply just after it which causes all the normal behaviours to be triggered anyway.
Title: Re: Merge Double Posts
Post by: Nao on August 11th, 2011, 12:10 PM
Hey.
I've been thinking of an alternative way of doing double-post merging... One that might be less disruptive, although needs discussing.

Instead of actually merging posts, we could simply show them together... i.e. if the current post is by the same author as the previous one, we don't 'close' the postbox for the previous message, then we add our message, and we close the postbox, only if the next one is not by the same person. Etc.

We could keep showing buttons for each individual post, meaning we'd show a link, a date and quote/edit etc. buttons on each post inside the pseudo-merged post.

Pros:
- you can easily split posts into new topics, even after they're been pseudo-merged with others...
- you can answer a sub-post and its parent ID will be easily found, i.e. you can track a conversation's parents more easily.

Some cons:
- doesn't fix database space
- can't easily determine if you want to pseudo-merge your posts, it's all automatic. Maybe we could have a 'merge' field in the message table though.
- if someone posts 15 messages in a row, the entire page will be filled by their pseudo-unique post, and then the next one will be on the following page.

The latter is a pro rather than a con, to me. I'm not a big fan of overly long topic pages!
Title: Re: Merge Double Posts
Post by: Arantor on August 11th, 2011, 12:17 PM
Interesting approach.
Quote
- you can easily split posts into new topics, even after they're been pseudo-merged with others...
You could do that with existing merged posts if the merge code has been retained.
Quote
- you can answer a sub-post and its parent ID will be easily found, i.e. you can track a conversation's parents more easily.
True, though it would make the actual process of handling threaded replies a lot more complex overall.
Quote
- doesn't fix database space
The difference on InnoDB isn't particularly significant.
Quote
- can't easily determine if you want to pseudo-merge your posts, it's all automatic. Maybe we could have a 'merge' field in the message table though.
Could do that, yes. I think you'd populate it automatically in the same cases that it'd be done now.
Quote
- if someone posts 15 messages in a row, the entire page will be filled by their pseudo-unique post, and then the next one will be on the following page.
Yeah, that to me is quite a big con; personally if posts are merged, I'd expect them to be treated as atomic units, i.e. as a single post.
Title: Re: Merge Double Posts
Post by: Nao on August 11th, 2011, 12:40 PM
Quote from Arantor on August 11th, 2011, 12:17 PM
You could do that with existing merged posts if the merge code has been retained.
Hmm... But you'd have to create new posts to accommodate for that, and you know what happens with old posts that have a higher ID...
Quote
True, though it would make the actual process of handling threaded replies a lot more complex overall.
I don't see where?
Quote
The difference on InnoDB isn't particularly significant.
Because it doesn't delete the old post anyway, right? If that's true then the new solution would actually be better...
Quote
Yeah, that to me is quite a big con; personally if posts are merged, I'd expect them to be treated as atomic units, i.e. as a single post.
Are you sure?
Here are two quickly made mockups.
The first has the same layout as on the blog here. The second shows what it would be with an alternating color. You'd basically get the exact same layout and results as a regular page -- the only thing is that the avatar, user details and signature aren't repeated on each and every post. Which, I think everyone will agree, is the main reason why we hate double posts with a passion... :P
Title: Re: Merge Double Posts
Post by: Arantor on August 11th, 2011, 12:51 PM
Quote
Hmm... But you'd have to create new posts to accommodate for that, and you know what happens with old posts that have a higher ID...
Store the original id; when it's reinserted it will take its original place.
Quote
I don't see where?
With a single post being formed, any threaded replies would also be merged into that branch. If you retain the two posts, you have to figure out how the final thread would be shown.
Quote
Because it doesn't delete the old post anyway, right? If that's true then the new solution would actually be better...
It probably would make a little difference, but I wasn't pointing it out as a pro/con, more that it can make a difference that shouldn't be forgotten.
Quote
Are you sure?
To me I think of posts as atomic items and merging double posts does seem logical to make the result atomic.

The whole double post thing isn't just about dealing with the signature and avatar and so on... it's also about keeping it a single post, in terms of management, in terms of replying to it, splitting and so on. I can see the wisdom of being able to split two merged posts, but at the same time I'm not keen on it looking like two posts; if I merge two posts I want one physical post.

Let's just say for now that I'm not against the idea but I'm not entirely sold on it yet.
Title: Re: Merge Double Posts
Post by: Nao on August 11th, 2011, 04:16 PM
Quote from Arantor on August 11th, 2011, 12:51 PM
Store the original id; when it's reinserted it will take its original place.
Oh, that sounds messy to me... How so? [merge id=12345 date=67890]?
And even then, it can be a problem if someone starts playing with the tag to use an existing message ID in it, things like that... Things could go wrong. That's not something I'd see myself do, really -- the potential mess is horrible.
Heck, I don't even think we can insert a message ID and set the id_msg manually. It'll always rely on autoincrement. And I don't see myself modifying the table on the fly to remove the autoincrement flag and reset it later... :P
Quote
With a single post being formed, any threaded replies would also be merged into that branch.
Err... No?
Quote
If you retain the two posts, you have to figure out how the final thread would be shown.
Hmm...?

Post 1 by Nao
Post 2 by Arantor
Post 3 by Nao
Post 4 by Nao

Becomes, to the user:

Post 1 by Nao
Post 2 by Arantor
Post 3 by Nao
Post 4

Post 4 has its own quote, edit buttons etc. Now, let's say I (not Nao) want to answer the part that is in post 3... I click the quote button there. I submit. I'll thus create a Post 5 with a parent ID that is post 3, not post 4 (it would be post 4 if posts 3 & 4 were actually merged like they are now.)
That is -- if I want to show a threaded view, I'll get this:

Post 1 by Nao
Post 2 by Arantor
Post 3 by Nao
  Post 5 by Someone
Post 4 by Nao

(Whether or not we should show "by Nao" on Post 4 in threaded view is something we'd decide later on, depending on the layout and design.)
Quote
To me I think of posts as atomic items and merging double posts does seem logical to make the result atomic.
I'd like to know our users' opinion on this.
Quote
The whole double post thing isn't just about dealing with the signature and avatar and so on... it's also about keeping it a single post, in terms of management, in terms of replying to it, splitting and so on. I can see the wisdom of being able to split two merged posts, but at the same time I'm not keen on it looking like two posts; if I merge two posts I want one physical post.
We can always add a profile setting to view posts as a single one, as a series of separate posts, or as an in-between version with posts merged together but all buttons available for all posts.
Quote
Let's just say for now that I'm not against the idea but I'm not entirely sold on it yet.
'kay ;)
Title: Re: Merge Double Posts
Post by: Arantor on August 11th, 2011, 04:25 PM
Quote
Oh, that sounds messy to me... How so? [merge id=12345 date=67890]?
Yup. Then when you de-merge the post, you insert a new row in the messages table with id 12345. Then again, not recommended for InnoDB which will cause trouble since it'll force the entire messages table after that point to be rewritten.
Quote
Heck, I don't even think we can insert a message ID and set the id_msg manually. It'll always rely on autoincrement
Yes you can, it works as you'd expect: supply an id and it'll use it, don't supply it and you get the benefit of auto-increment.
Quote
Err... No?
So...

Post 1 by Arantor
  Post 2 by Arantor
  Post 3 by Nao
    Post 4 by Nao

If you merge posts 1 & 2, surely you'd end up with:
Post 1 & 2 by Arantor
  Post 3 by Nao
    Post 4 by Nao
Quote
(Whether or not we should show "by Nao" on Post 4 in threaded view is something we'd decide later on, depending on the layout and design.)
This is the bit I'm referring to.
Quote
I'd like to know our users' opinion on this.
Sure thing :) That's part of the reason I'm not entirely against the idea.
Quote
We can always add a profile setting to view posts as a single one, as a series of separate posts, or as an in-between version with posts merged together but all buttons available for all posts.
Works for me :)
Title: Re: Merge Double Posts
Post by: Nao on August 11th, 2011, 04:32 PM
Quote from Arantor on August 11th, 2011, 04:25 PM
Yes you can, it works as you'd expect: supply an id and it'll use it, don't supply it and you get the benefit of auto-increment.
Didn't remember that :)
Quote
If you merge posts 1 & 2, surely you'd end up with:
Post 1 & 2 by Arantor
  Post 3 by Nao
    Post 4 by Nao
No...? Because we wouldn't be merging the posts physically. That's exactly the point. If you're in threaded mode, you'll see Post 2 after Post 4 in that hierarchy, and in flat mode, you'll see posts 1 & 2 together.
Quote
Sure thing :) That's part of the reason I'm not entirely against the idea.
I think we lost them at disruptive(http://wedge.org/pub/feats/posts/6671/merge-double-posts/msg265485/#msg265485) :P
Quote
Works for me :)
As long as we don't add too many options everywhere eheh... :P
Title: Re: Merge Double Posts
Post by: Arantor on August 11th, 2011, 04:38 PM
Quote
No...? Because we wouldn't be merging the posts physically. That's exactly the point. If you're in threaded mode, you'll see Post 2 after Post 4 in that hierarchy, and in flat mode, you'll see posts 1 & 2 together.
Why? That's my point. Post 2 came before post 3 or 4, why would it be after?
Title: Re: Merge Double Posts
Post by: Nao on August 11th, 2011, 04:46 PM
Because it's another 'thread' in the list...?

Well, of course if you simply added more details to Post 1 by sending Post 2, you can then physically merge them (manually though)...

I agree it would possibly be a bit confusing to newcomers, having manual & automatic merging done this way, but if we're gonna have threads in the future, might as well think about these details ;)
Title: Re: Merge Double Posts
Post by: Arantor on August 11th, 2011, 04:48 PM
It is another thread, but it's older than the post 3/4 thread, so I still don't see why it would become further down the chain - doubly so if you're merging the posts?
Title: Re: Merge Double Posts
Post by: Nao on August 11th, 2011, 05:18 PM
Uhhh...

Posted April 1 by Nao
I saw a great movie called Deep Throat. Beautiful and very moving!

    Posted June 12 by StupidSoccerMomWhoDoesntReadFullTopics
    You pedophile! I'm gonna press charges!!!

Posted April 2 by Nao
(By the way... April's fool!)
Title: Re: Merge Double Posts
Post by: Arantor on August 11th, 2011, 05:24 PM
That wasn't my example :P

My example specifically had post 1 owning post 2 owning post 3 etc.
Title: Re: Merge Double Posts
Post by: Nao on August 11th, 2011, 06:30 PM
Looks like a conversation between deaf people :P

Sorry, I have no idea what you're trying to convey at this point..... :^^;:
Title: Re: Merge Double Posts
Post by: Arantor on August 11th, 2011, 06:52 PM
I got a little confused.

Post 1 is the parent of posts 2 and 3, and 3 is the parent of post 4, what happens if 1 and 2 are merged? They were posted in order by number, but your example seemed to put the 3/4 chain higher up in importance than 1/2.
Title: Re: Merge Double Posts
Post by: Nao on August 11th, 2011, 07:40 PM
Flat mode: Nothing. 1 and 2 are merged, followed by 3 and 4.
Threaded mode: 1 shows up, followed with 2 and 3 as indented posts. Then post 4 indented under 3. Nothing is shown as 'merged'.
Title: Re: Merge Double Posts
Post by: Nao on August 13th, 2011, 12:06 AM
Did I lose you? ;)
Title: Re: Merge Double Posts
Post by: Arantor on August 13th, 2011, 12:15 AM
No, I just got caught up in some other stuff.

So, merging doesn't do anything in threaded mode then? Seems to beg the question why you'd bother doing it in that circumstance...
Title: Re: Merge Double Posts
Post by: Nao on August 13th, 2011, 09:48 AM
Virtual or real merging?
Title: Re: Merge Double Posts
Post by: Arantor on August 13th, 2011, 10:11 AM
Virtual merging. Real merging, you'd still end up physically merging stuff, but in virtual merging, it sounds like you would be putting all this effort in only not to merge on threaded replies, which to me seems to defeat the point a bit.
Title: Re: Merge Double Posts
Post by: Nao on August 13th, 2011, 11:20 AM
Virtual merging is effortless. ???

The only CPU load it takes is to test whether to show the post footer and next post header.
Title: Re: Merge Double Posts
Post by: Arantor on August 13th, 2011, 12:05 PM
The effort of coding/testing it ;)
Title: Re: Merge Double Posts
Post by: Nao on August 13th, 2011, 12:20 PM
It's not going to be much. (Says me after I said the same about smiley sprites... :whistle:)
Most of the work would be inside the rewrite for threaded views anyway.