Too much code.
Common scheme is:
1 - Take all comments:
$comments = elgg_get_entities(array(
'type' => 'object',
'subtype' => 'comment',
'container_guid' => $object->getGUID(),
'limit' => false,
'order_by' => 'e.time_created desc'
));
2 - Count comments:
$comment_count = $object->countComments();
3 - Create button
if ($comment_count > 1)
4 - List comments with 'rel' => 'toggle' and hide it class='hidden'
...briefly ;)
Where would i change this code in what page and line?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.