Entities list to river list ?

I have a code to order entities list by likes count ( i got the code from Liked Content plugin)

This is the code

$dbprefix = elgg_get_config('dbprefix');
$likes_metastring = elgg_get_metastring_id('likes');

$options = array(
    'annotation_names' => array('likes'),
    'selects' => array("(SELECT count(distinct l.id) FROM {$dbprefix}annotations l WHERE l.name_id = $likes_metastring AND l.entity_guid = e.guid) AS likes"),
    'order_by' => 'likes DESC',
    'full_view' => false,
    'no_results' => elgg_echo('liked_content:noresults')

$content = elgg_list_entities_from_annotations($options);

But i don't know how to order river list by likes count

I prefer river list to entities list, because i will put the list in "activity" tab

Any suggestion ?



Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking