Hello,

At the moment, the trail table userpoint_txn doesn't have any searchable field a part from the txn_id.
I am a module developer myself, and need such a field.
Find attached two patches to:

* Change the .install file, so that the database has a new field called "reference" which is 128 characters long and it's indexable

* Change userpoints.module so that it allows people to define a "reference".

Note that the API is compatible, since $reference is added right at the end in the API function:

function userpoints_userpointsapi($op, $points = 0, $uid = 0, $event = NULL, $description = NULL, $reference=NULL){

Bye!

Merc.

Comments

mercmobily’s picture

StatusFileSize
new1.01 KB

Hi,

Here is the patch for userpoints.install...
I didn't put NOT NULL default '0', for "reference". But, maybe you want it there?

Bye,

Merc.

mercmobily’s picture

StatusFileSize
new4.55 KB

IGNORE the previous module.patch - sorry.
I don't know what happened, it was a preliminary version.

This is the good one.

Merc.

mercmobily’s picture

Status: Active » Closed (fixed)

Hi,

I closed this issue, since http://drupal.org/node/142956 ha a patch (written by me) which fixes this issue and more.

Bye,

Merc.