Disqus module (integration of Disqus commenting service), adds comments functionality to other modules

Disqus module is compatible with Comments module by interface, but even simpler in usage.

Integration of comments displaying:

$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.

Event for getting instance of Comments class:

$Comments	= null;
\cs\Event::instance()->fire(
	'Comments\instance',
	[
		'Comments'	=> &$Comments
	]
);
/**
 * @var \cs\modules\Disqus\Disqus $Comments
 */
if ($Comments) {
	//Some work here
}

Other methods of Disqus class:

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.