Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
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.
Thanks
Comments
Comment #1
semei CreditAttribution: semei commentedMaybe 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.
Comment #2
alesr CreditAttribution: alesr commentedI think this should be put in Message core.
/me thinking of writing a patch if @Amitaibu would accept it ;)
Comment #3
RoySegall CreditAttribution: RoySegall commentedI 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.
Comment #4
alesr CreditAttribution: alesr commentedThere 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.
Comment #5
amitaibuFor now you can use VBO module.
Comment #6
alesr CreditAttribution: alesr commentedI am using VBO now but this somethinig that would fit nicely in Message core.
Comment #7
murat_halici CreditAttribution: murat_halici commentedAll 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.
Comment #8
RoySegall CreditAttribution: RoySegall commentedIn the Message UI module there is a page where you can delete massive amount of messages or delete a single instance of message.
Comment #9
murat_halici CreditAttribution: murat_halici commentedThank you!
Comment #10
Andre-BComment #11
amitaibuthanks @Andre-B for the issue queue cleanup!
Comment #12
kopeboy CreditAttribution: kopeboy commentedHow 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?
Comment #13
RoySegall CreditAttribution: RoySegall commentedIf 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.