This hook is used to output comments for type of entity, post or object.

~~~
<?php
function my_component_init(){
ossn_add_hook('post', 'comments:entity', 'my_component_hook');
ossn_add_hook('post', 'comments:object', 'my_component_object_hook');
ossn_add_hook('post', 'comments', 'my_component_post_hook');
}
function my_component_hook($hook, $type, $return = null, $params){
// $params['entity_guid'] contains entity guid you wanted to show comment for
//return template;
}
function my_component_object_hook($hook, $type, $return = null, $params){
// $params['object_guid'] contains object guid you wanted to show comment for
//return template;
}
function my_component_post_hook($hook, $type, $return = null, $postObject){
//$postObject contain OssnWall instance.
//postObject->guid contains wall post guid.
//this is bit different then above two hooks in terms of paramters.
//return template;
}
ossn_register_callback('ossn', 'init', 'my_component_init');
~~~

Working example
https://github.com/opensource-socialnetwork/opensource-socialnetwork/blob/v6.x/components/OssnLikes/ossn_com.php#L50-L53

Comments output for entity , object or post