I was wondering how can users individually delete their messages? I created a wall just like on Facebook and I'm unable to achieve this.



semei’s picture

Maybe Views Bulk Operations can help? I used it to create a view that lists all logged messages so the admin (me) can delete a bunch of logged messages at once.

alesr’s picture

I think this should be put in Message core.
/me thinking of writing a patch if @Amitaibu would accept it ;)

RoySegall’s picture

I think that this would need some custom code because there is no UI for the message module. There was an issue for that but things got in the way.

The solution that i can suggest to is to create a menu callback that will display a delete confirm form. Deleting a message can be done with the message_delete function, just add a link that lead the user to that page that will be appear on you "Facebook" wall along with the message that is presented to the user.

alesr’s picture

There is a view "Message" in Message module and you can view it if you have Views installed (/admin/content/message).
What we actually need is a message_delete($message_id) function and a link in the Message view that will use it.

amitaibu’s picture

For now you can use VBO module.

alesr’s picture

I am using VBO now but this somethinig that would fit nicely in Message core.

murat_halici’s picture

All you need to do is download Views Bulk Operations, clone the "Message" View located at admin/structure/views/view/message/edit, and add a "Delete Item" bulk operation field to the newly cloned view.

RoySegall’s picture

In the Message UI module there is a page where you can delete massive amount of messages or delete a single instance of message.

murat_halici’s picture

Thank you!

Andre-B’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)
amitaibu’s picture

thanks @Andre-B for the issue queue cleanup!

kopeboy’s picture

How to hide the message?

Example use case: I want a system/site message to display an update to every user. If the user deletes it with VBO the message will be deleted for all users.

Am I missing something?

RoySegall’s picture

If you want to display message to every use you need to create a message for each user. This could be done with Entity reference field.