Forum Replies Created
-
I know this is an old post, but I hope this reply can help someone.
There is a free plugin that allow to send Mass Messaging to all members of the site, and also to filter them, you can find it here: https://wordpress.org/plugins/mass-messaging-for-buddypress-by-alkaweb/
Hi, I am one of the guys behind Woffice. On Woffice seems that the problem is not a conflict with “Buddypress Cover Photo”, the issue happens also without the plugin if the component “groups” is disabled.
So the solution proposed by @r-a-y doesn’t work for us, instead the solution proposed by @kaab321 solved the issue.
Bruce you can use this code in your functions.php
function get_id_of_last_message_current_thread() { $thread = new BP_Messages_Thread( bp_get_the_thread_id() ); end($thread->messages)->id; } add_action('bp_after_message_thread_content', 'get_id_of_last_message_current_thread');
Maybe it could helps someone:
I solved with:
$thread = new BP_Messages_Thread( bp_get_the_thread_id() ); end($thread->messages)->id
last_id_message was null 🙂
Hi Henry,
Thanks a lot. After that I get the id of the thread, how I can get the id of the last message in the thread?There is an hook called when e message is marked as read? It would be great for me.
Thank you in advantage.
Hi Henry and r-a-y, I have the same request and I have to thank you for the replies.
Specifically I would add a notification when a user read a received message, so i guess whene a message (or thread?) is marked as read.
If I have to use these functions and hook as well, I understand how to use them, the only thing that I don’t know is how to get IDs. For example when I perform
bp_after_message_thread_content
, in the function that I call, how can I get the id of the thread? Adter I gues I have to get the id of the last message of that thread for change its meta, how can I get that id?Please give me some suggestions and let me know if there are better ways for this.
Sorry for my poor english.