Log in

Pedro Prez

elgg developer / php / ajax and more


  • Category: Communication
  • License: GNU General Public License (GPL) version 2
  • Updated: 2010-7-12
  • Downloads: 13624
  • Recommendations: 55

Other Projects

View Pedro Prez's plugins

Likes for Elgg 1.7

This module allows to mark the objects as "I like it" as facebook style ;)

Last updated 1383 days ago

The module allow a user to mark objects by default on its creation, for example, when a blog creates or a pages, etc.

There is a easy way to put it in another views just take a look to the INSTRUCTIONS.txt file.

You can test this module logging in on http://demo.keetup.com Thanks!

if you really like this plugin recommend it, I would really appreciate it

Release Notes:

  • Better integration with the river_comments module.
  • I have separated the button of the like action, as facebook does.

I also recommend the update of the last river_comment plugin (if you use it)




  • Stoney 1383 days ago

    Pedro - would you please update your demo site at demo.keetup.com with the new Likes and River Comments plugins so we can see the changes live?

    Thanks again for awesome plugins.

  • Pedro Prez 1382 days ago


    You are right, I just update http://demo.keetup.com


  • Brian Jorgensen 1375 days ago

    Hi, Pedro:

    Two quick comments: firstly, can you please update the version in the manifest.xml file to 0.3.3 so it is a bit easier to keep track of what version is installed? Thanks.

    Secondly, riverdashboardjs -- which tries to call lkPrepareItems() on document load  -- is a view that is loaded in start.php, but if ajax is disabled, the ajaxsupport.php file which contains that method is *not* loaded and javascript errors occur. This seems like a contradiction: either the enable_ajaxsupport pluginsetting should disable these methods or not?



  • Madiha Nahal 1375 days ago

    Hey Pedro, just want to tell you that I love this plugin. Great Job! I have a few issues though:

    When I have Ajax enabled: I click on "Like" and the command is completed successfully. The problem though is that after I click on "Like", I navigate to a different page on the site, and I get logged out. The same issue happens when I "Unlike" and navigate to a different page, logged out again.

    When I have Ajax Disabled: Like and Unlike work perfect... only issue is that I get the dreadful message on IE8 on the bottom left hand corner of the browser saying "Error on Page". 

    Is there a simple fix to this? Again... great work Pedro. Thank you.

  • Madiha Nahal 1375 days ago

    Sorry, i forgot to add that i'm using Elgg 1.7.1

  • [cim] 1375 days ago

    Fatal error: Call to a member function getURL() on a non-object in /home/manacim/public_html/mod/likes/views/default/likes/likes.php on line 85

    i get this error. why? help please

  • [cim] 1375 days ago

    anyone? it's happening again -_-

  • alysami 1373 days ago

    would it be better to show the Like-Dislike Buttoms on the entity page as well as the river item, because after some posts and activity on the river you just lose the track of the entity, and the entity ( whatever it is ) may just get more Like-Dislike from the vistors to its page ???

  • alysami 1373 days ago

    by the way, great work, thanx for sharing such a code to elgg community

  • Trajan 1366 days ago

    I'm getting logged in as the user whose content I like after liking it. Serious security issue.

  • Madiha Nahal 1365 days ago

    Why do I keep getting logged out when I click on "Like" with Ajax turned on?

  • triout 1345 days ago

    I want to add 'likes' to all the messageboard posts, adding: echo elgg_view('input/like', array('entity' => $vars['entity']));  to the messageboard view doesn't seem to make it appear...any ideas??



  • yaboi 1334 days ago

    doesnt work well with riverfaces plugin

  • Pedro Prez 1332 days ago

    Hello All,

    I am sorry for the delay of my reply. I am not having so much time this week, I will try to catch some time on the weekend to give you all a more detailed answer. Thanks again for your comments and feedback. Regards.

  • justme 1320 days ago

    hi ;) thx for your pluging, it is great... but i found the same problem of Madiha Nahal

    When I have Ajax enabled: I click on "Like" and the command is completed successfully. The problem though is that after I click on "Like", I navigate to a different page on the site, and I get logged out. The same issue happens when I "Unlike" and navigate to a different page, logged out again.

    I hope you can solve this issue, contact me in private if u want to see the error on my web site

    thx in advance


  • phooe 1309 days ago

    This seems to only adds the like/dislike to the "river item" not the entity, it would be much more useful if it was adding the like/dislike to the "entity" so that the like/dislike would be present for both the river item and the object entity, as did the older non AJAX versions.

    Thanks for your work on this and other plugins Pedro.

  • namezero 1307 days ago


    thanks for this awsome plugin

    i want to know how to add this to the wire and tidypic?

  • ocean oc 1271 days ago

    Thanks  Pedro for the plugin.

    same question as @namezero how to add like/dislike on tidypics?


  • Pedro Prez 1271 days ago


    Thanks, I am glad you like it. Did you read the INSTRUCTIONS.txt file to add it to tidypics? Let me know if you have problems with it.


  • Simon ST 1269 days ago

    Hi Pedro!

    Seems like I get some PHP-errors on the 1.7.4!

    Check here:

    [02-Nov-2010 12:12:17] PHP WARNING: 2010-11-02 12:12:17 (PDT): "Invalid argument supplied for foreach()" in file /home/**/public_html/*.com/mod/likes/start.php (line 134)
    [02-Nov-2010 12:14:45] PHP WARNING: 2010-11-02 12:14:45 (PDT): "array_keys() [<a href='function.array-keys'>function.array-keys</a>]: The first argument should be an array" in file /home/**/public_html/*.com/mod/likes/start.php (line 121)
    [02-Nov-2010 12:14:45] PHP WARNING: 2010-11-02 12:14:45 (PDT): "array_filter() [<a href='function.array-filter'>function.array-filter</a>]: The first argument should be an array" in file /home/**/public_html/*.com/mod/likes/start.php (line 122)
    [02-Nov-2010 12:14:45] PHP WARNING: 2010-11-02 12:14:45 (PDT): "array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #2 is not an array" in file /home/**/public_html/*.com/mod/likes/start.php (line 132)
    [02-Nov-2010 12:14:45] PHP WARNING: 2010-11-02 12:14:45 (PDT): "Invalid argument supplied for foreach()" in file /home/**/public_html/*.com/mod/likes/start.php (line 134)


    Hope you'll fix it! My server is getting spammed with these errors xO

  • Pedro Prez 1268 days ago


    Those are not errors, those are warnings, you should disable them from your php configuration.

  • ocean oc 1265 days ago

    Hello all,

    Sorry pedro I still didnn't get it :) Yes I saw the instuctions.txt file.

    Can you tell me please where exactly I should add the exteding view code to inable Likes for tidypics?

  • japes00 1250 days ago

    this is good but i get loged out when using it or worse signed into some body elses account please help with this?

  • Joe 1245 days ago

    I need to make some changes to this plugin and need some help. Total novice here, so I'll need detailed instructions of a resource that can help me out directly.

    I have a bodywork trade site (MassageClub.org) I'd like to change this plug in so the text reads, "I traded with". Then have it only apply to profiles. Each member could then display a list of the people who whom they have traded bodywork.

    How should I go about this? 

  • M.R.A. Welkers 1241 days ago

    How do I get to see the nr3 screenshot? I can't find it anywhere after I enabled the plugin.