MyBB Community Forums

Full Version: Advice
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
newreply.php

I am making a mod that requires me to edit the email sent out when someone is subscribed to a thread. However, it needs the id of the post. Since mymail is called BEFORE the newreply is inserted, I'm stuck with a big dilemna. It would require a huge modification as far as I can see. The best way being to split the email bit and the posting bit up into functions, and then depending on settings, call them in a certain order.

Is this true (that the emails are sent out first before inserting)? Can anyone think of a better way to do this?
Bump?
My appologies for not posting a reply sooner.

It is unfortunately true that subscription emails are sent out before the new reply is inserted into the database. I'm not entirely sure what the best way to do what you need to would be.

Perhaps you could comment out the existing code for sending out subscription emails and instead place it underneath the code that inserts the new reply into the database, or by using the plugin hook newreply_do_newreply_process.

Let us know how you get on.