Log in

Project Info

Stats

  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 2
  • Updated: 2013-3-14
  • Downloads: 954
  • Recommendations: 9

Releases


Previous releases:

Other Projects

View Matt Beckett's plugins

Liked Content for Elgg 1.8

Display liked content in groups, user profiles, and widgets

Last updated 386 days ago

Gives group owners the option to show a page with content from within the group with the most number of 'likes'

User profile pages link to user liked content pages - one page for content that the user has liked, and one page for the users content that is most liked

Additionally a widget is available for profile/dashboard/groups/index to show liked content with a number of configuration options (Note: au_widgets_framework is required for the widget)

 

Produced for and with the support of Athabasca University, Canada.

Release Notes:

- adds sensible defaults for widgets in various contexts

- fixes 'my liked' option bug due to strict check for int(0) when it's actually a string

- adds number of likes to entity menu in liked_widget

Comments

  • ura soul 370 days ago

    just noticed that the 'only show items that you liked' checkbox in the liked content widget does not show in the default widgets panel in the admin area.

  • ura soul 176 days ago

    i'm looking at enhancing this plugin presently..
    i am unable to login to phpmyadmin presently to look at the database configuration so this is not as easy as it might be.
    i was looking to make the change i referred to in our conversation against v1.1 of this plugin where i was seeking to exclude 'self liked' items from the list in the 2nd tab of the user view of liked_content.. i appreciate this is a minor thing to 'fix', however i thought it would be simple..
    i added the line:

    AND l.owner_guid <> " . $entity->guid

    to the query that fetches the liked items to exclude like annotations that are set by the user (the $entity in this case).. i thought it would be ok, yet when i view the page, the self-liked items continue to be listed.

    any idea why this isn't functioning?
    thanks

          if ($filter == 'most_liked') {
            $options = array(
              'owner_guid' => $entity->guid,
              '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 AND l.owner_guid <> " . $entity->guid . ") AS likes"),
              'order_by' => 'likes DESC',
              'full_view' => false
            );
  • [cim] 176 days ago

    does it write an entry to the river as well?

  • Matt Beckett 176 days ago

    @ura - you want "l.owner_guid <> " . $entity->owner_guid

    @Cim - this plugin doesn't add anything to the river

  • [cim] 176 days ago

    indeed

  • ura soul 176 days ago

    the entity in this case is a user.. so wouldn't the owner_guid for the entity be irrelevant? or possibly set to the site guid?

  • Matt Beckett 176 days ago

    sorry, mistyped while looking at what you wrote

    "l.owner_guid <> e.owner_guid"

  • ura soul 176 days ago

    yes, that looks to be the right idea.. except when i run it the list still includes items with one self-like.. hmm..

  • Krischan 176 days ago

    Any chance the this also works with coldtrick's widget manager instead of the AU_framework?

  • Matt Beckett 175 days ago

    This will work just fine with widget manager, but still needs au_widget_framework - it's just for some shared functions that are used between the AU widgets - it's not a framework that modifies anything about elgg

  • Shah 139 days ago

    Getting error, plz help....

    "Fatal Error.
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND l.entity_guid = e.guid) AS likes, max(n_table.time_created) as maxtime FROM ' at line 1

    QUERY: SELECT DISTINCT e.*, (SELECT count(distinct l.id) FROM elgg_annotations l WHERE l.name_id = AND l.entity_guid = e.guid) AS likes, max(n_table.time_created) as maxtime FROM elgg_entities e JOIN elgg_annotations n_table on
    e.guid = n_table.entity_guid JOIN elgg_metastrings msn on n_table.name_id = msn.id WHERE (((msn.string IN ('likes')) AND ( (1 = 1) and n_table.enabled='yes')) AND (n_table.owner_guid IN (67))) AND (e.site_guid IN (1)) AND ( (1 = 1) and e.enabled='yes') GROUP BY n_table.entity_guid ORDER BY likes DESC LIMIT 0, 10

    ......

  • Matt Beckett 139 days ago

    you have nothing liked in your database.  I believe this is fixed in the repo, but the quick fix is just to like something once, even if you go and unlike it afterward.

  • Shah 139 days ago

    Ok let me try... BTW Thanksss :-)

  • Shah 139 days ago

    Its working now.... ThanQ Matt Backett....

  • Shah 139 days ago

    Is it possible to show most liked blogs at blog page?

  • Shah 78 days ago

    Hi Matt Beckett,

    Is it possible to show only "most_liked" content of all user separately?

  • disha 29 days ago

    I am able to delete 'like' by others which should not happen.

    Elgg 1.8.19 - default setup.

    I ( as an ordinary member, not as admin) am able to delete 'like' by another member on my content (say, blog post)

    I am able to delete/undo my own 'like' which is okay, but I should not be able to delete/undo like by another person. Please some fix is needed.