latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Database access to view: Download Options

Home Forums Community Forum Database access to view: Download Options

Tagged: 

This topic contains 9 replies, has 2 voices. Last updated by  Bruce 3 years, 8 months ago.

Topic Author Topic
Posted: Wednesday Apr 17th, 2013 at 11:32 pm #47722

I am looking to buy the pro plugin, but have run into a snag.

So i will be selling digital content and plan to use

Dashboard -› s2Member® -› Download Options -› Advanced Download Restrictions

to limit activations. For this i need to be able to log into the database and find this value?

It is not there in the user table. Could you tell me where i can find this value?

Thanks.

List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Thursday Apr 18th, 2013 at 12:29 am #47750
Bruce
Username: Bruce
Staff Member

It is not there in the user table. Could you tell me where i can find this value?

s2Member generates a new value every time a link is generated. It isn’t in your database.

Why do you need the value? We may be able to help you find a workaround.

Posted: Thursday Apr 18th, 2013 at 12:32 am #47752

Basically i want to have a 100 activations for subscribers.

I would then from my game check to see if the value is greater than zero, if it is, activate the game and deduct by one.

This would reset to 100 every month the user is active just like the downloads value does.

Posted: Thursday Apr 18th, 2013 at 12:37 am #47753
Bruce
Username: Bruce
Staff Member

I would then from my game check to see if the value is greater than zero, if it is, activate the game and deduct by one.

You might just hook into s2Member’s action hook within the file downloads functionality. This hook should work just fine:

ws_plugin__s2member_during_file_download_access

That hook’s in this file:

/s2member/includes/classes/files-in.inc.php

See: Knowledge Base » Hacking s2Member® Via Hooks/Filters

Posted: Friday Apr 19th, 2013 at 5:09 am #47859

I was unable to get this to work. My game is Android based and that could be the problem.

I can get it to directly access the database though.

FYI i have been using this for reference: http://www.s2member.com/kb/remote-user-status-custom-api/

So would it be possible for that hook to check if the value is greater than 0 for downloads and if so reply yes and deduct it by one?

Thanks.

Posted: Friday Apr 19th, 2013 at 10:44 pm #47918
Bruce
Username: Bruce
Staff Member

My game is Android based and that could be the problem.

This shouldn’t affect anything. Your site will still load hooks.

FYI i have been using this for reference: http://www.s2member.com/kb/remote-user-status-custom-api/

This is a separate thing. You’d only need this if you’re changing something with the User’s allowed downloads directly, which you shouldn’t be. And even if you wanted to, I’m not sure why you would use s2Member’s download counter. It would be easier to create your own meta value.


I think I could help you better if you could explain the flow you’re looking for.

Posted: Friday Apr 19th, 2013 at 11:27 pm #47932

So if i create a new meta field in the database for user field , would it reset to 100 every time the subscription is renewed?

Here is what i am looking for:

1. User buys subscription – I need a value of 100 created that i can check and reduce externally from my game, like the database (I would be using their username to check for the same)
2. If subscription is renewed, this value is reset to 100

That is all.

Thanks.

Posted: Friday Apr 19th, 2013 at 11:30 pm #47936
Bruce
Username: Bruce
Staff Member

So if i create a new meta field in the database for user field , would it reset to 100 every time the subscription is renewed?

Not unless you make it. You could use Payment Notifications to reset the counter. It should be fairly simple to do.

See: Dashboard -› s2Member® -› API / Notifications -› Payment Notifications
See Also: Knowledge Base » Building An API Notification Handler

Posted: Saturday Apr 20th, 2013 at 12:22 pm #48004

Perfect. I got this to work with cubepoints for adding points on every purchase. I used this example if anyone else wants to take a look: http://dev.efieldguide.com/using-the-cubepoints-plugin-api/

Quick question though: Is this Dashboard -› s2Member® -› API / Notifications -› Payment Notifications
backend process hidden and secure? I ask this as i am also running the cubepoints secure api key which i would not like anyone knowing of. If not i will need to create a module to hide it.

Thanks.

Posted: Saturday Apr 20th, 2013 at 12:52 pm #48007
Bruce
Username: Bruce
Staff Member

Quick question though: Is this Dashboard -› s2Member® -› API / Notifications -› Payment Notifications
backend process hidden and secure? I ask this as i am also running the cubepoints secure api key which i would not like anyone knowing of. If not i will need to create a module to hide it.

Yes s2Member’s connections via API Notifications are done behind-the-scenes and aren’t displayed anywhere but in your logs (if you choose to enable them). :-)

Viewing 9 replies - 1 through 9 (of 9 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.