Jump to content

How do I load a content item object?

Featured Replies

Posted

Im just trying to get my head around the namespaces and how to use them.

How would I go about loading the post comment object? Am I close?

$post = \IPS\Content\Item::load( pid );

pid is obviously being the post id.

Also is there any documentation for seeking the namespace classes and what methods are available to each of them?

$post = \IPS\forums\Topic\Post::load(1);

or

try
{
	$post = \IPS\forums\Topic\Post::loadAndCheckPerms(1);
}
catch (\Exception $e)
{
}

 

Archived

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

Recently Browsing 0

  • No registered users viewing this page.