HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Points going into negative territory

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#111001 (In Topic #22298)
TQ
Avatar

Honoured member

I noticed this after the December upgrade 9.0.22 but I cannot say it was attributed to that.

It appears that, if a user has more than 0 points they are able to use the points for an item with a greater value than their balance. Once this has been downloaded, the difference is registered as negative points.

eg, Users balance = 3 point, download value = 5 point. They are able to download the item and then have a -2 balance.

I don't know if it was fixed in .23 or .24 as I think the current members points that I have noticed could be historic.

TQ
Back to the top
 
Posted
Rating:
#111004
Avatar

Hi,

Could you have given them the "Have negative gift-points" privilege?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#111011
TQ
Avatar

Honoured member

Nope, all unchecked.

I'll look into it a bit more deeply.

TQ
Back to the top
 
Posted
Rating:
#111012
Avatar

Thos code in sources/downloads2.php should prevent it:

Code

            $dif=$cost-available_points($member);
            if (($dif>0) && (!has_specific_permission(get_member(),'have_negative_gift_points')))
               warn_exit(do_lang_tempcode('LACKING_POINTS',integer_format($dif)));
            require_code('points2');
            charge_member($member,$cost,do_lang('DOWNLOADED_THIS',get_translated_text($myrow['name'])));


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#111013
TQ
Avatar

Honoured member

Hi Chris,

The code is in place and hasn't been damaged so it must be something else.

It could be an uncanny coincidence, I have deleted a few users posts for spamming, I just couldn't imagine that I'd come across these users a second time so quickly.

I've yet to find where the points are stored in the db so that I can look to see who and how many users have negative points.

Not quite off-topic, I did notice whilst browsing downlaod2.php that users can resume or re-download without points being deducted, something I didn't previously know. Is the download count updated in this situation?

EDIT: I've answered my own question, points are not deducted or awarded for a repeat download but the download count IS incremented.

Thanks as always.

TQ


Last edit: by TQ
Back to the top
 
Posted
Rating:
#111014
Avatar

Could it be they lost points by e.g. having posts deleted?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#111015
TQ
Avatar

Honoured member

Sort of what I was suggesting in that I used to give points automatically for making posts. That was being abused to accumulate points to exchange for DL's.

TQ said

It could be an uncanny coincidence, I have deleted a few users posts for spamming, I just couldn't imagine that I'd come across these users a second time so quickly.

I'm suggesting that when I deleted their posts/comments the points were deducted after they had made use of them sending their total negative.

Still haven't found the members points in the db tables but when I do I'll cross reference them with the logs.

TQ
Back to the top
 
Posted
Rating:
#111020
Avatar

Right, so the thing about points is they're not in the DB per-se. Individual things are tracked in the DB then scaled and added up. Posts is a good example - it's saved as a post count, and that gets included in the dynamic calculation.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#111024
TQ
Avatar

Honoured member

Hi Chris,

After an hour or so of wading through the tables and scripts I sorta' gathered that, well beyond my skill level to untangle and, as I don't much care if it's only a case of people that have abused the comments, I'm going to leave it at that.

Sorry to have taken up your time unnecessarily, especially as I have more questions in the pipe-line.

TQ
Back to the top
 
Posted
Rating:
#111362
TQ
Avatar

Honoured member

Sorry to bring this subject back to life but I've got another member complaining about their -72 points and it's not the first in recent days.

I've now proved how I've caused this problem on a test site. Due to the dynamic way points are calculated, if I change the settings Points Options> Make Post> from 5 to 0, all of the points awarded to the member for posts prior to the change date are no longer available.

A quick search of the database for forum posts tells me I have 903 members that have made posts prior to 1454025600 and I'm assuming this doesn't include comments as my complaining user is not amongst this number.

I'd like to give back these points to those members that legitimately earnt them before I made the change, in the form of a points adjustment.

I thought I could work out how to correct this with an SQL script until I discovered that I was not including the comments but now I realise that this is beyond my skill level. All I want to do is give x points to the appropriate users at a rate of 5 points per post prior to 1454025600 with the reason 'Point correction'.

Is there any kind soul out there that could put together a script to achieve this?

Thanks

TQ
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: