ElkArte Community

Elk Development => Feature Discussion => Topic started by: emanuele on October 19, 2014, 04:20:56 pm

Title: integrate_remove_message
Post by: emanuele on October 19, 2014, 04:20:56 pm
Code: [Select]
call_integration_hook('integrate_remove_message', array($message));
At the moment is run only if the recycle is not enabled.

Though in certain cases it may be quite useful to run code even if the message is just moved to the bin.
I was thinking to suggest to move the hook outside the if and then add another parameter, though it may be necessary to do something more (e.g. some new hook where the recycle is used, both adding or reverting), or something else.

What do you think?
Title: Re: integrate_remove_message
Post by: ahrasis on October 20, 2014, 03:58:38 am
I like it. (Though there must be a lot of hooks out there that I don't know :) )
Title: Re: integrate_remove_message
Post by: Spuds on October 20, 2014, 12:24:46 pm
I'd say move it, that can be useful and it should not be tied to the recycle bin (solely)
Title: Re: integrate_remove_message
Post by: emanuele on October 21, 2014, 05:05:04 am
And now I'm starting again thinking I don't like the recycle bin... xD
Title: Re: integrate_remove_message
Post by: Spuds on October 21, 2014, 09:32:48 am
You mean in general or just the crazy way its implemented :P
Title: Re: integrate_remove_message
Post by: emanuele on October 21, 2014, 10:52:57 am
Both? O:-)

As usual I can't decide what I like.
On one side I would prefer to keep the messages "there" (I mean in the database) and just add a field "deleted" to filter them with a query. But I guess this may not be too good for the query itself in certain specific cases (i.e a topic with many messages removed).
Another option would be to completely remove these messages/topics from the messages table, keep all the details intact and just "move" them out or in.
Both possibilities would have the advantage of not requiring new topics and a specific board.

Then there is the "visualization aspect". Mainly two problems here.

The last problem could be fixed more or less easily with some hackish link somewhere in the deleted topic, it would be a bit odd in the original topic, but it could work as well.
Title: Re: integrate_remove_message
Post by: ahrasis on October 21, 2014, 09:54:29 pm
I don't think there is a real need for recycle bin too (and I don't the philosophy behind it too lol). You can always move old topics to a created recycle board on your own and locked the board for further reply.
Title: Re: integrate_remove_message
Post by: emanuele on October 22, 2014, 03:17:39 am
It's not that I think the RB is useless, I myself use it, though I find the way is implemented not very useful.
Title: Re: integrate_remove_message
Post by: ahrasis on October 22, 2014, 10:20:15 am
I didn't say that it is useless either, just that I have no real need for it.