Jump to content

Forum ID in Post object


Recommended Posts

In the post return, you'll get the item ID. You can do an additional call to "/forums/topics/{id}", where you'll get info about the forum too.

Or if this is for your own site, you can create a hook that overloads \IPS\Content\Comment::apiOutput(), and add the forum ID to what it returns.

public function apiOutput( \IPS\Member $authorizedMember = NULL )
	$parentReturn = parent::apiOutput( $authorizedMember );
	$parentReturn['forum'] = $this->item()->container()->apiOutput( $authorizedMember );

	return $parentReturn;


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...