question about groups ?

hi guys ,

i am new to elgg and i was really hoping that you'll point me to the right direction.

i was wondering if there is  a plugin for groups which can display posts  in order of how many likes they got.

thank you  .


  • As far as I know, there is no plugin for that. You can use this function to rank (blogs in this case) based on the number of likes.

    function blog_get_page_content_popular($guid = NULL) {

    $return = array();

    $options = array(
            'types' => 'object',
            'subtypes' => 'blog',
            'limit' => 10,
            'offset' => $offset,
            'full_view' => false,
            'pagination' => TRUE,
            'annotation_names' => 'likes',
            'annotation_values' => 'likes',
            'order_by' => 'annotation_calculation desc',
            'calculation' => 'count',
    );

    $list = elgg_list_entities_from_annotation_calculation($options);

  • thank you for the answer