- New topic: hook on \IPS\forums\Topic:
public static function createFromForm( $values, \IPS\Node\Model $container = NULL, $sendNotification = TRUE )
{
$item = parent::createFromForm( $values, $container, $sendNotification );
//do your stuff
return $item;
}
- New post: hook on \IPS\forums\Topic\Post:
public static function create( $item, $comment, $first=FALSE, $guestName=NULL, $incrementPostCount=NULL, $member=NULL, \IPS\DateTime $time=NULL, $ipAddress=NULL, $hiddenStatus=NULL, $anonymous=NULL )
{
$reply = parent::create( $item, $comment, $first, $guestName, $incrementPostCount, $member, $time, $ipAddress, $hiddenStatus, $anonymous );
//do your stuff
return $reply;
}