Mikey
Well-known member
I am creating an add on.
I want to run a custom action to save the post ID to a custom table based on an algorithm I am developing.
However, I have looked at XenForo_DataWriter, and I see the _preSave method, and this is where my understanding goes a bit hazy.
I see in XenForo_ControllerPublic_Post the DataWriter is loaded as so
However, I don't know how I'd get the contents of the post by hooking into the _preSave method. Do I need to extend XenForo_ControllerPublic_Post and hook into the _preSave method on the DataWriter somehow?
Then I'll have the post ID? Help
I want to run a custom action to save the post ID to a custom table based on an algorithm I am developing.
However, I have looked at XenForo_DataWriter, and I see the _preSave method, and this is where my understanding goes a bit hazy.
I see in XenForo_ControllerPublic_Post the DataWriter is loaded as so
PHP:
XenForo_DataWriter::create('XenForo_DataWriter_DiscussionMessage_Post');
However, I don't know how I'd get the contents of the post by hooking into the _preSave method. Do I need to extend XenForo_ControllerPublic_Post and hook into the _preSave method on the DataWriter somehow?
Then I'll have the post ID? Help