I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).
If you are new here, please see some information on how to ask for support. Thank you!
-
AnonymousInactive
Hi Alex. I’m talking with a developer to customize my website. I would like to know if it is possible to use the faucet referral system to reward a user for other actions of their referrals. For example, rewarding a user if a referral completes a task. I do not want to have several referral systems on the same website.
Thank you very much.
Unfortunately the referral system built into the faucet is meant to be used only by the faucet.
However, with some coding it can be used for other stuff.
The extension maintains an association of users to their referrers via a user meta value.
Every user who is referred from another user should have a user meta with name wallets-faucet-referrer-id
, and value the id of the user who referred them. You can tell this to your developer.
hope this helps
kind regards
AnonymousInactive
AnonymousInactive
is that something we can call from the wordpress and if so how?
User meta is accessible with the WordPress function get_user_meta().
AnonymousInactive
yes i knew that but i meant is there a easy way maybe via php to use
wallets-faucet-referrer-id
say i want to give a user 10 coins for logging in?
There is no easy way to do this.
You could hook into whatever event you are interested in rewarding, then use get_user_meta to retrieve the referrer id. Finally, use the move action to transfer coins from one account to another.
If you are going to reward users for logging in you must rate-limit this somehow, otherwise your users will be logging in constantly. I would store the last login timestamp in another user meta and check if some time has elapsed.
kind regards
AnonymousInactive
that was just an example
i found in the claim php a way to move funds etc.
is there a php call to move funds as well using your php api?
The claim.php
file in the faucet code uses the wallets_api_move
action to perform internal transfers.
This is documented here: https://wallets-phpdoc.dashed-slug.net/classes/Dashed_Slug_Wallets_PHP_API.html#method_api_move_action
AnonymousInactive
thanks i really like the notify if funds are low in the claim.php!
- You must be logged in to reply to this topic.