$Page = \cs\Page::instance(); $Comments = null; \cs\Event::instance()->fire( 'Comments/instance', [ 'Comments' => &$Comments ] ); /** * @var \cs\modules\Disqus\Disqus $Comments */ $Page->content( $Comments ? $Comments->block($id) : '' );
Where $id is integer identifier of article, page or anything else, that will be commented. $Comments - is object created by module, but you can use own object of class, which inherits cs\modules\Disqus\Disqus class.
$Comments = null; \cs\Event::instance()->fire( 'Comments\instance', [ 'Comments' => &$Comments ] ); /** * @var \cs\modules\Disqus\Disqus $Comments */ if ($Comments) { //Some work here }
Returns count of comments for specified item
There are several other methods, but they are used directly not so frequent, so, you can find them with description in source code and IDE suggestions.