ElkArte Community

Extending Elk => Addons => Addons ideas and questions => Topic started by: radu81 on November 27, 2014, 03:40:50 am

Title: [Request] Merge double post
Post by: radu81 on November 27, 2014, 03:40:50 am
I have some users that are using the forum like a chat box :) I would like to have an addon that automatically merge a double post within a couple of  hours.

The smf mod (http://custom.simplemachines.org/mods/index.php?mod=1523)

Thanks in advance
Title: Re: [Request] Merge double post
Post by: meetdilip on November 27, 2014, 06:46:41 am
Nice feature request @radu81
Title: Re: [Request] Merge double post
Post by: Spuds on December 03, 2014, 12:01:01 pm
So how does this work?

Is it if the same user posts two consecutive posts in the same topic within some time period they are auto merged?

Or does it merge them in the same topic even if they are not consecutive if they are withing some short time period?  That would be messy I think, but ...

Anyway just want to understand what the features are so maybe I'll code something up.
Title: Re: [Request] Merge double post
Post by: radu81 on December 03, 2014, 02:07:30 pm
To be more clear I reply in the same way my useres use to respond on my forum ;)
Title: Re: [Request] Merge double post
Post by: radu81 on December 03, 2014, 02:08:22 pm
Quote from: Spuds – Is it if the same user posts two consecutive posts in the same topic within some time period they are auto merged?
Yes, only if the same users reply to a topic within some time
Title: Re: [Request] Merge double post
Post by: radu81 on December 03, 2014, 02:09:33 pm
Quote from: Spuds – Or does it merge them in the same topic even if they are not consecutive if they are withing some short time period?  That would be messy I think, but ...
no, it does not merge all messages, only if the same user reply to a topic where the last message is his own message. Could also be useful to reduce the "bump" replies
Title: Re: [Request] Merge double post
Post by: radu81 on December 03, 2014, 02:10:31 pm
Quote from: Spuds – Anyway just want to understand what the features are so maybe I'll code something up.
Have a look at smf mod, if I remember well also wedge has something similar ;)
Title: Re: [Request] Merge double post
Post by: radu81 on December 03, 2014, 02:12:29 pm
As you can see I made 4 useless replies instead of one like this:

To be more clear I reply in the same way my useres use to respond on my forum ;)

Quote from: Spuds – Is it if the same user posts two consecutive posts in the same topic within some time period they are auto merged?
Yes, only if the same users reply to a topic within some time

Quote from: Spuds – Or does it merge them in the same topic even if they are not consecutive if they are withing some short time period?  That would be messy I think, but ...
no, it does not merge all messages, only if the same user reply to a topic where the last message is his own message. Could also be useful to reduce the "bump" replies

Quote from: Spuds – Anyway just want to understand what the features are so maybe I'll code something up.
Have a look at smf mod, if I remember well also wedge has something similar ;)
Title: Re: [Request] Merge double post
Post by: Spuds on December 03, 2014, 03:17:10 pm
Hey could someone issue this member a warning!! ... Moderators? ? ? :P :P
Title: Re: [Request] Merge double post
Post by: radu81 on December 03, 2014, 04:02:23 pm
just delete the useless messages  ;D

or make a double post merge addon ;)
Title: Re: [Request] Merge double post
Post by: Jorin on December 04, 2014, 02:20:11 am
I know such users too. No matter how often you describe the possibility to make more then one quote in a post, they keep doing this and generate post after post.

Maybe there should be the rule to only merge posts if they are made within a maximum of 10 minutes or such and only when there's a quote in them. My users only do this when they quote multiple posts.
Title: Re: [Request] Merge double post
Post by: Spuds on December 05, 2014, 08:14:09 pm
I've been thinking about how to do this, and came up with a couple of ideas.

1) If the last post was theirs, and they are within some period set by the admin, hitting "reply" simply opens up the last message in modify mode as though they had selected more -> modify.  This has two downsides that I can think of, 1) the update does not flag the message as new to those that read it already and 2) it would not work if posting by email  Maybe there is a way to flag it as new during and update, @emanuele do you know if that can be done?

2) Clicking reply acts normally, they post but the new post and the old post are "merged".  There are several complications with this, you need to merge attachments, update like counts, update any mentions both like and @ style, remove the original post, update member post counts, update board and topic counts, etc etc .. lots of busy work.  The plus side of this is that its a new post and will be flagged as such to everyone, it would work for posting by email, it can lead to a general message merge function for moderation,
Title: Re: [Request] Merge double post
Post by: Jorin on December 05, 2014, 11:44:07 pm
Quote from: Spuds – 1) the update does not flag the message as new to those that read it already...

I thought topics with an edited post are marked as new, only the board icon is not changing? SMF did this. Elk not?

I like this first variation. It shows the user: "Hey, you did something slightly wrong, but we can fix that! Simply edit your post. I will help you and open the last post for you."
Title: Re: [Request] Merge double post
Post by: meetdilip on December 06, 2014, 03:30:09 am
2 ) will be right in my opinion. Lesser chance of spoiling older posts.
Title: Re: [Request] Merge double post
Post by: emanuele on December 06, 2014, 05:24:35 am
It may be a bit hackish again, but an option could be to catch action_post_before and "change" something (it should just be a matter of set a couple of things in $_REQUEST (bad, BAD, thing!... but we are bad guys. :P) in order to steer the post controller to a modify instead of a post_new. O:-)
Title: Re: [Request] Merge double post
Post by: Spuds on December 06, 2014, 09:33:54 am
QuoteI thought topics with an edited post are marked as new, only the board icon is not changing? SMF did this. Elk not?
I'll have to check, I did not think the editing of a post marked anything as unread / new in either software TBH.
Title: Re: [Request] Merge double post
Post by: radu81 on February 14, 2015, 09:46:40 am
Quote from: Spuds – 1) If the last post was theirs, and they are within some period set by the admin, hitting "reply" simply opens up the last message in modify mode as though they had selected more -> modify.  This has two downsides that I can think of, 1) the update does not flag the message as new to those that read it already and 2) it would not work if posting by email  Maybe there is a way to flag it as new during and update, @emanuele do you know if that can be done?
I like the idea to hide the "Reply" button or quick editor
Quote from: Spuds – 2) Clicking reply acts normally, they post but the new post and the old post are "merged".  There are several complications with this, you need to merge attachments, update like counts, update any mentions both like and @ style, remove the original post, update member post counts, update board and topic counts, etc etc .. lots of busy work.  The plus side of this is that its a new post and will be flagged as such to everyone, it would work for posting by email, it can lead to a general message merge function for moderation,
if the first post has attachments the double post merge could be ignored. Same for likes. We know we have some limits posting images. If a user wants to post 20 images he has to make 2 posts
Title: Re: [Request] Merge double post
Post by: Spuds on February 14, 2015, 10:09:06 am
Somewhere around I did attempt this addon, trying several different approaches, merge "up", merge "down" etc etc ... Can't remember what I concluded if anything :P ... I think I wanted to add a hook to make it easier but @emanuele was in a mean mood and would not let me :P :D
Title: Re: [Request] Merge double post
Post by: emanuele on February 16, 2015, 06:33:06 pm
/me is innocent!

Was it the integrate_action_post_after? (Or in general the problem with the "_after" not being caught in case of redirectexit/fatal_error?)
ehh... I tired to properly fix it in 1.1, but it's not very easy... anyway... since when you have to wait for my approval to add something? :P
Title: Re: [Request] Merge double post
Post by: Spuds on February 16, 2015, 08:46:03 pm
I remember it was something to do with _after not always triggering since there are some exits in the code ... don't remember what the full issue was anymore.  I was just using you as a cover for my laziness anyway  :P
Title: Re: [Request] Merge double post
Post by: radu81 on August 28, 2015, 02:55:55 pm
any news on this? if I remember well @emanuele did something similar for SMF
Title: Re: [Request] Merge double post
Post by: Spuds on August 28, 2015, 03:18:24 pm
I completely forgot about this one  :(
 
I do remember getting frustrated with which direction to merge up or down ... pros and cons for each way.  Meaning if someone double posts, should you keep the first and remove the second or remove the first and keep the second.  I can't remember the details now but it was around if either post had been liked and read or not and some other things.

Anyway I may take a look again, been putzing around with the bootstrap theme to much anyway :P
Title: Re: [Request] Merge double post
Post by: radu81 on August 28, 2015, 03:39:34 pm
Quote from: Spuds – I completely forgot about this one  :(
no problem, take your time ;)

Quote from: Spuds – Meaning if someone double posts, should you keep the first and remove the second or remove the first and keep the second. 
I could say to keep the first message.
Quote from: Spuds – I can't remember the details now but it was around if either post had been liked and read or not and some other things.

The datils were these ?
Quote from: radu81 –
Quote from: Spuds – 2) Clicking reply acts normally, they post but the new post and the old post are "merged".  There are several complications with this, you need to merge attachments, update like counts, update any mentions both like and @ style, remove the original post, update member post counts, update board and topic counts, etc etc .. lots of busy work.  The plus side of this is that its a new post and will be flagged as such to everyone, it would work for posting by email, it can lead to a general message merge function for moderation,
if the first post has attachments the double post merge could be ignored. Same for likes. We know we have some limits posting images. If a user wants to post 20 images he has to make 2 posts

Quote from: Jorin – My users only do this when they quote multiple posts.
same for me in 90% of cases.
Title: Re: [Request] Merge double post
Post by: Spuds on August 28, 2015, 03:54:28 pm
It must be!  That post lays out the issues in a well thought out and cognoscente way :D
Title: Re: [Request] Merge double post
Post by: Joshua Dickerson on August 28, 2015, 03:57:43 pm
OT: forget Bootstrap. Look at what @TE mentioned with MaterializeCSS (http://materializecss.com/). Google's Material (https://www.google.com/design/spec/material-design/introduction.html) is the new way to go with design ;)
Title: Re: [Request] Merge double post
Post by: Spuds on August 28, 2015, 05:08:18 pm
continued OT:

I saw that and have looked at it for sure.

I don't yet know how different the template structure would be between the two frameworks.   Really to get bootstrap going  you have to rip up all of the templates, at least to do it right.   Bootstrap loves div's, and grids.  It will be many months to get bootstrap'ed templates.

I never like to trust any Google stuff since they like to pull the plug on so many things, leaving you standing there with your tallywacker in your hand.
Title: Re: [Request] Merge double post
Post by: emanuele on August 28, 2015, 05:40:11 pm
OT again:
Bootstrap is "good" because it gives a certain "look&feel", and "bad" because it gives a certain "look&feel".
I think in any case, using a framework means re-do all the templates to "make it right", that is not a bad thing, but it would take ages.
The good thing is that if we plan to have a completely new theme, we can work to have it for 2.0, that means about an year and a half. :P
Title: Re: [Request] Merge double post
Post by: emanuele on August 28, 2015, 05:48:08 pm
Quote from: radu81 – any news on this? if I remember well @emanuele did something similar for SMF
If my memory serves me right, I feel you do not remember well. :P
Title: Re: [Request] Merge double post
Post by: Joshua Dickerson on August 28, 2015, 08:55:18 pm
It's not by Google. Material is just a design approach that they apply to all of their products. I was seriously impressed with the amount of thought went in to the UX https://www.google.com/design/spec/material-design/introduction.html