Handle 'movePosts' operation

Stepel

Member
I have to count posts in "specific forum".
It should count when posts are moved from any forum to this specific forum(+) and vice versa(-).
Which is the best moment to do that and how to handle "moving" ?

I extened DataWritter/DiscussionMessage/Post and DataWritter/Discussion/Thread and counting works OK :
- add new post/thread in specific forum
- accept/reject posts/threads,
- delete post/threads,
- move THREADS

the last one thing is moving Post..
 
Last edited:
I'm fairly sure it already updates counts (I would have to verify), but the code to actually move posts is in XenForo_Model_Post::_moveOrCopyPosts(). Extending that method should help you out if necessary. Or extend the DataWriter directly to perform your manipulations.
 
Top Bottom