[Elgg 1.8-1.12 & 2.X: Elggx Userpoints] v1.8.2

Release Notes

Changelog:

  • Fixed a deprecated issue introduced with Elgg 1.8.4.

TODO:

  • Thorough testing (also with 3rd party plugins as soon as they are available or I've managed to port them to Elgg 1.8)...
  • Hi Im useing elgg 1.8.5  after activating pluig I dont get the plugin settings apearing? please help

  • Plugin settings of the Elggx Userpoints plugin should be in the "Administer" - "Utilities" section in your admin adrea. Are they available there?

  • Great plugin but I have some how developed a bug.

    I have my points set to manual approval and have been using this plugin for awhile now. I get this error with one particular user Fatal error: Unsupported operand types in /home/public_html/mod/elggx_userpoints/start.php on line 338

    This error appears when assigning points or approving points, when you visit the users profile where it would normally display there total points it now displays the word array.

    Any ideas on how to solve this?

  • @Miks101: I don't manage to reproduce this error. Sorry.

    The "Array" issue has been mentioned before but apparently it had been caused by another 3rd party plugin being (previously) used on the same site. In this case it was the hypegamemechanics plugin. Even when you don't use the hypegamemechanics at the same time as the Elggx Userpoints plugin it might cause trouble due to database entries remaining.

    If it's not the hypegamemechanics plugin in your case: you mentioned that the error shows up only for one particular user. What is differened / special with this user account? It might help to find the reason for the error. Then the question: what version of Elgg are you using? If not the latest version (Elgg 1.8.8) it might help to upgrade. A previous version (I think Elgg 1.8.6) introduced a modification that resulted in many Fatal errors. This was solved in Elgg 1.8.7 again.

  • @iionly Thanks for your reply, theres nothing special about this user account, its a bog standard user whos very active on the site. I will upgrade my elgg version to the latest, I am kinda new to elgg so this will be my first upgrade so fingers crossed.I think my current version is either 1.84 or 1.85.

  • @Miks101: upgrading to the latest Elgg version is always recommended due to fixed security issues. Just backup everything (Elgg installation folder, data directory and database) in case something goes wrong. So, you don't think another 3rd party plugin might cause the Fatal error on your site?

  • @iionly I'm pretty sure that its not a 3rd party plugin as its been working for quite awhile and we havent added anything recently, the only plugin added was the gift one. I'm sure an upgrade will resolve it, although saying that I cant be 100% sure another plugin isnt affecting it.

    Out of interest is there a way to reset this users points or all users? maybe that might clear the bug? or am i being optimistic, anyway its a great plugin and this one bug hasnt put me off from using it. Its just a shame as this user being affected is very active and likes earning points

     

     

  • @Miks101: you can both reset the points of a single user and of all users at once (though that seemed a bit of an overkill).

    Resetting the points of a single user is possible via the "Reset" link on the list tab of the Elggx Userpoints admin settings page. Most likely you need to forward a few pages on the list tab to get to the user in questions (sorry, no filtering available). If you click on the username in the list you get to the userpoint details of this user. Here you can delete specific userpoint entries of this user (only the userpoints not the content they were awarded for are deleted). Maybe it helps to delete the most recent userpoint entries of the user to get rid of the error (though I would suggest to upgrade to the latest Elgg release before that - maybe this will solve the error without the need to reset any userpoints).

    If ever needed: the userpoints of all users can be reset at once on the Plugin settings tab ("Resetting all points" - sorry the link is hard to identify as link due to Elgg's admin theme...).

    If you had to delete the points of a user (either only a few or all), you can manually add the lost userpoints again on the Add tab, so the user will have the same amount of points again afterwards. Enter the username of the user, the number of points to add (or with a leading minus sign to substract). The description is optional. Of course, you can also add userpoints at any other time to any user if you feel it's right.

  • @iionly I have upgraded to 1.8.8 which unfortunatly didnt resolve the issue however I was able to find the user on the reset list and reset there points. I did try to look for the user on a previous day but must have missed them, by resetting there account it cleared the error I was getting and all i had to do was simply reassigned the user there points as you suggested.

    Thanks again for your help ☺

     

     

  • Help!

    User's points are not displaying in the profile page. Everything is working fine except for this one.

    Thanks

  • @Bryan: what exactly does not get displayed on profile pages? Do you see a field with the text "Points:" below the profile picture on profile pages but without the number of points shown behind or don't you see even this field?

    If you don't see this field, I guess that another plugin or your theme overides this view and therefore suppresses the display of the userpoints field. In this case it might help to reorder the plugins. If this does not help, it won't work without modifying the code of the other plugin.

    If you see this field but no points shown: have you set the userpoints gained to automatic approval or approval by moderation? In the latter case, the points are not added to a user's userpoints automatically, but you need to approve the points on the "Moderate" tab on the Elggx Userpoints settings page in the admin section. If you don't want the userpoints to be moderated then change the Transaction status setting from "Moderated" to "Approved" on the "Plugin Settings" tab.

  • Hi, iionly

    Great plugin. I have installed it and i think it has great potential when used together with your Badges plugin. I see two areas for improvement. The idea of badges is great to reward people for their achievements for the community, but i think you need seperate badges for different achievements. The badge itself is just too small to show any detail on the avatar. I think that badges should therefore be shown on the profile page. Then for each achievment a badge can be shown, For example a badge as a reward when the profile is complete and a badge for the most active member. These are personal rewards.

    The second improvement is then to show a persons activity and value for the community on its avatar. There a small version of the fivestar can be used as a scale. The activity numbers are already in your design. An addition could be a "value" number where each posting together with its fivestar rating adds up to a "value". These five stars can then be shown on top /bottom of the avatar. A widget is then needed to show avatars sorted in order of activity or value.

  • @Tauvic Ritter: thanks for the feedback.

    Your suggestion seem to aim rather at the Badges plugin and not to the Userpoint plugin. Nevertheless...

    I guess I will re-write the Badges plugin to allow for more than one badge to be assigned to a user at the same time. When I have time to do so... I can't promise when this will be though. I also think that separate badges to be shown on profile pages on the one hand and displayed on avatars on the other hand is the best option to start when modifying the plugin.

    Of course, you can currently already use larger pictures for badges. Though you will need to disable the option to show them also on avatars. But they (single) badge will then show at least on the profile page of that user.

    I'm not sure I fully understand what you exactly aim for with your second suggestion. It's currently already possible to automatically assign a badge when a certain number of userpoints is reached. So, you could define a number of badges that get assigned for example for 100, 1000, 5000, 10000 (etc.) userpoints. Of course, it would be best to allow for assignment of these "milestone" badges independently of the special (larger) badges.

    The list of most active users (depending on their number of userpoints) is already available in the widget that comes with the userpoints plugin. The sorting of this list does not need to take into account which badge a user currently has. It's enough to sort the most active users solely by their total number of userpoints as this corresponds to the "value" the user has gained due to postings/activity.

    I think the main point in re-writing the Badges plugin is indeed separation of automatic assignment of badges (based on userpoints, small badges pictures and only one assigned to a user at a time, used on avatars -> this would be the already implemented badges mechanism) from a new secondary mechanism of adding special badges (either assigned automatically when reaching certain userpoint-independent milestones or which the option to assign them manually as admin, multiple secondary badges at the same time, larger pictures, only shown on profile pages). Well, certainly I will try to work on that sometimes.

  • @iionly thanks for the reply. I will explain my second remark. I want to show the most active and valuable people in the website so people know who they are and connect to them. I prefer to use the standard Members and Online members widget and have the extra functionality there. My elgg site is used by elderly people and they find it difficult to see those small 16pix icons. They dont see the difference between an avatar with a beginners badge and a champion badge. So i think a scale with some little stars or a smal collored bar beneath the avatar image is much more visable to them.

    I also would like to distinguish between activity and value. The value could be determined by the items they post and the fivestar rating. Then a calculation could give the value that this person has generated for the community.

    My general idea is to make the information in Elgg (people and postings) more accesible by turning attention to what is realy valuable.

  • Am I right that you would like the most valuable (active) members to be listed on a (new) tab on the members page (among Newest, Popular and Online tabs)? Or do you really mean them to be listed in a widget? As I already said, there is already a "Top Points" widget included in the Userpoints plugin and the icons used in this widget are also not smaller than the icons used in any other widget that shows user icons.

    I plan to add such a page sometimes (when I have the time to do so...). This page would allow to display more than only the Top 10 of users regarding most userpoints including pagination to list all users ranked by their number of userpoints.

    I think what you see as "activity" is in fact almost exactly what you define as "value" already. Apart from taking into account a user based fivestar ranking which is not included (and I don't know how this ranking could be taken into account) the "activity" is solely measured by the points gained for certain action like commenting, uploading pictures, videos, writing blogs, pages etc. So, the number of userpoints is a sign how valuable this member is for the community. And of course this means that members with many userpoints have a high value for the commuity simply because they are very active.

    How to include a fivestar ranking of a user into the value calculation? The value is calculated simply by adding up the userpoints gained for any action made. Would a certain ranking correspond to a certain number of userpoints then? Would this mean that someone who has not contributed anything to the community would gain userpoints only because he has a ranking of 5 stars? What difference would it make if the fivestar ranking is due to only one vote or 1000 votes? I simply don't see any way of including a user ranking into the userpoints calculation in any practible way.

  • Here i show an example how userpoints could be shown.

    image

    The first option is to use stars. The first person has five so he is very active. But another option is to use bars. The green bar shows activity and the blue bar the rating this person got for his activity. I think this is option is the best. It is simple to implement it is easy to look at and it show two types of information.

  • Dear iionly,

    I am not sure if my ideas on calculating value are implementable. I just look at it from the point of view of the user. They (and i) want to know where the really valuable things are and who the people are that produce such value. Having active people is a good start but also the quality what they produce counts. I will think about how to calculate that value and maybe the conclusion is that it is not possible at all. I appreciate the time you take to answer my questions. Maybe this discussion should also be held somewhere on a higher level. It is maybe a core requirement.

  • I think I might begin to understand what you mean by "value". I thought you meant to only take into account a fivestar rating that is directly evaluating the value of a user. But I think now you don't mean a rating on the user but instead to take all the ratings made on the content added by this user into account. Is that what you mean?

    If it is what you mean, then I think the best way wouldn't to connect this in any way with the userpoints at all but to create a separate "value" of the user. This feature would best be implemented in the Fivestar plugin. I think it's possible to implement at least some kind of such a value calculation.

    Though I'm not yet sure about the best way to do so. One possibility would be to calculate simply the average of all ratings of a user's content ratings. Then it would also be clear how many stars a user would currently have: exactly the average of all ratings. But I'm not sure if this would be fair. If one user would have uploaded 1 single item and got only 1 single voting of 5 stars on this item, his value would be higher than the value of another users who would have uploaded 1000s of items with 10000s of ratings which would happen to have an average rating of say 4.5 starts. Would this be really show the real value of these two members?

    Another possibility would be to simply add up all stars of all items a user has added - not adding up the average rating but the number of stars of each single voting on an item over all user's items. This way the number of items and also the number of votings on these items would be taken into account. In the end this would result in a specific total number of stars for each user. But what now? You want somehow the value of users to show on a scale of 0-5 stars. Can you suggest any easy way to find such a scale based on the total number of stars of a user?

  • Hi,

    Yes i mean activity and value are different ratings. Activity is about the ammount of things a user does and value is about the quality. You can get userpoints for the login action but that does not add value to the community.

    I have look on the internet to find a solution. The problem is the same kind as five star product reviews on a website like amazon. If you want to buy a phone you could ask yourselve who has the best reviews for their phones Samsung or Apple? I l googled for algorithm confidence "product reviews" "five star" and have found some documents that i think focus on this problem:

    These are all academic papers with lots of statistics and much to complicated for me. What I found is that a simple average is indeed not a good way to calculate value because you also want to have confidence in the rating and a single review is not enough as you say. I think calculating the value number is probably possible if you understand these papers and know how to program an algorithm. If not then don't try it because it wil give just an unreliable number that is useless.
     
    I have also thought about Linkedin, there you have a profile with a list of experience and skills. People can recommend you and confirm that you realy have the skill you claim to have. There is also no rating there, it is just your own opinion on how you value the person based on the recommandations of other people and the confidence you have in them. This could be a nice addition to the profile manager plugin @jdalsum (Jeroen Dalsum).
     
    Unless you know how to implement the statistical algorithm i think value is to complicated.
     
    I think having a colored bar on the avatar image is a very usefull feature to indicate activity. The scale must be calculated as a percentage to a preset level that can be set by an administrator to a certain number of userpoints. The administrator should evaluate the higest number of user points now and then and push the number up when required. This to allways have everybody try to reach 100% but never quiet make it (pushing the carrot).
     
     
     
     

     

     

  • I update the code instart.php to show the widget also on other pages

    elgg_register_widget_type('toppoints', $toppoints_name, elgg_echo('elggx_userpoints:widget:toppoints:info'),'index,groups,profile');


    Any special reason for only show on the profile page?

  • No special reason. When I upgraded this plugin to Elgg 1.8 I simply left this part of the code as implemented by the original Userpoints plugin developer without changes. Actually, I'm also still getting to know how to better code better in Elgg and there are continously new things to learn. A short time ago I did not even know that it's possible to add several different contexts (or any different context) when registering a widget. I've only learnt about it by a discussion on the Widget Manager plugin regarding index page widgets.

    You need to keep in mind that it might not necessarily work for any widget to simply add additional contexts. Without defining a context the default is profile pages and dashboards. These pages have a "page owner" while the index page has no owner. So, if the code of the widget relies on the page owner information (e.g. "Blogs of User XXX") the widget might fail more or less on widget pages. I think for group widgets the "owner" is also not a specific user but the group as such.

    Regarding the value rating I will keep your suggestions in mind - also read your references even if they might not offer any methods that would make sense to be used directly. But please don't expect any implementations / updates within the Fivestar plugin too soon. While I need to investigate (maybe improve if possible) something in the Fivestar plugin anyway, I don't think I'll have the time within a short term. So, it might take easily some months until I can work on that.

  • :D

    Well, it would not be an avarage rating of a single item but an average rating above the average ratings of all entities of the user. Currently I think about a sorting based on the average (first criteria) and the number of total ratings gained on all entities (second criteria). Then simply listing it from top to bottom. It would be up to the viewer then how to compare an average rating of 5 stars based on 1 vote with a 5 star rating based on 1000 votes. The number of votes alone might also be an indicator of value, because people might not give a voluntary rating at all if they think it's not worth doing so (even if they would give a good rating if forced to do so).

Stats

  • Category: Misc
  • License: GNU General Public License (GPL) version 2
  • Updated: 2019-4-7
  • Downloads: 11825
  • Recommendations: 50

Other Projects

View iionly's plugins