MyBB Community Forums
Advice - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: Advice (/thread-22813.html)



Advice - decswxaqz - 2005-08-31

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?


RE: Advice - decswxaqz - 2005-09-08

Bump?


RE: Advice - Alan Crisp - 2005-09-08

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.