Jump to content

Question about Adding Points through API or plug-in?


Recommended Posts

Hope I'm posting this in the correct spot. 

We're spending some time working on the ranks/badges section of IPS, and the options in there are really great. 
The major part of our website is not on IPS and is a trading pin database. Users are able to add to that database, and our database programmer has put in a way to count "points" for different actions in the database. Originally, my idea was to see about getting a plug-in made by one of the great devs here to take the points from our database and add them to the appropriate accounts in the IPS software. However, my developer thinks he may be able to do that. Here's the info that he sent me, and I'm wondering if you can answer his questions there? He's talking about the info stored for assigning points. Thanks so much!!

------------------------------------------------

It’s stored in a MySQL table.  If they had an API they have where we could write the points, that would work too. 

We write them to a polymorphic table with the maximum number of points awarded for that item (pin, image, etc) and the number of points that were actually awarded. 

Here’s an example of what it looks like.  So for a PIN, the max points were 5 and 0 were awarded to the user as no checkboxes were selected.  We store the user + the pointable id (pin, image suggestion, comment, etc). 

Could contain: Blackboard, Chart, Plot, Text

If they had an API, we could inject the code that writes to the forum for the amount of points awarded and to what.  OR they can read from this table [for a plug-in]!

Link to comment
Share on other sites

6 minutes ago, Nathan Explosion said:

https://invisioncommunity.com/developers/rest-api?endpoint=core/members/POSTitem_achievements_awardbadge

Award them a badge, you can send over the number of achievements_points to be given.

 

I will send him this link. We don't want a badge for every point, though. There are points awarded for different successfully completed steps in submitting to the database. We want members to gain points that they will then be able to trade in for actual items. The points would then be manually removed from their accounts when the item is shipped to them. Will it still be possible to just award points, without a badge?

Link to comment
Share on other sites

11 minutes ago, PinPics said:

 

I will send him this link. We don't want a badge for every point, though. There are points awarded for different successfully completed steps in submitting to the database. We want members to gain points that they will then be able to trade in for actual items. The points would then be manually removed from their accounts when the item is shipped to them. Will it still be possible to just award points, without a badge?

I would not advise using the Achievement system for reward points that they can spend. The system isn't really built to do that.

Link to comment
Share on other sites

Yeah, a badge for every point would be a bit too much. 😅

 

You can use this instead: https://invisioncommunity.com/developers/rest-api?endpoint=core/members/POSTitem

It's possible to alter the number of points a user has by using the rawProperties parameter. You'll need to first GET how many points the user (API link) has and then save the value including your extra points, though.

Link to comment
Share on other sites

22 hours ago, teraßyte said:

Yeah, a badge for every point would be a bit too much. 😅

 

You can use this instead: https://invisioncommunity.com/developers/rest-api?endpoint=core/members/POSTitem

It's possible to alter the number of points a user has by using the rawProperties parameter. You'll need to first GET how many points the user (API link) has and then save the value including your extra points, though.

Thanks for the above! I've sent that to the developer. He's going to look at it next week. If he can't do it, then you'll probably be hearing from me about the possibilities of a plug-in. 🙂

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...