Attached is a very simple add-on module that provides integration with userpoints.

A user receives a configurable number of userpoints for adding a friend. The same number of userpoints are deducted when a friend is deleted. This module could also live in the userpoints_contrib project, so if you don't feel it belongs here just let me know.

The file name will need to be renamed to .tar.gz before opening.

I look forward to everyone's thoughts & comments on this,

Thomas

CommentFileSizeAuthor
userpoints_friendlist.tar_.gz1.77 KBtom_o_t

Comments

mariusooms’s picture

Thanks...this is a welcome addition. Look forward to testing, but have to admit, never used user points yet. Always ends up on the last thing to implement within my development. Help appreciated.

Thanks again for contributing,

Marius

davidseth’s picture

I just want to point out that this can easily be done with Rules alone. No extra code layer needed. I have done exactly what you did, assign UserPoints when people make Friendlist relationships, but all with Rules. It was great!

I think creating an add-on module is good, but pushing Rules should be the way to go. Perhaps Friendlist could ship with a number of Rules pre-configured to other modules. I can provide my Rule definition if you or Marius would like to take a look.

Rules has also let me give points when people Flag things (with Flag.module) and create Nodes, etc. There is no real end to the applications really...

Cheers,

David

mariusooms’s picture

Hi David...sure, I don't know when I will get to it, but just attach your example rule here, so we can review both solutions. I would also prefer a solution that already exists rather than include more contrib modules. As long as both can achieve the same outcome.

Regards,

Marius

mercmobily’s picture

Status: Needs review » Closed (works as designed)

Hi,

I think UserPoint users will just need to spend those 10 minutes adding Rules to have those points assigned... and I think we all agree with this.

Writing default rules will assume that UserPoint is installed, which is not the case. THat's another level of complication... I don't think we need to go there.

Bye!

Merc.

As If’s picture

I have no interest in installing and configuring another large and complex module on a high-traffic site owned by a client, and I just need to add this one function, so Thomas - THANK YOU for providing this mini-module!