Executing Code When Warning Given

Brent W

Well-known member
I am looking to simply run code when a warning is issued. I have never done this before with XenForo so looking for the best place to start. I've done some searching but don't think I have found what I was looking for. (I am sure I have but it probably didn't make sense to me.)
 

Mike

XenForo developer
Staff member
What sort of code are you trying to run?

The easiest option is to extend XenForo_DataWriter_Warning::_postSave and add additional behaviors. (When $this->isInsert() is true, it's a newly inserted warning.)

Since you're just adding behaviors, the first thread you linked to is generally more along the lines, though the specific implementation is a bit different.
 
Top