NodeBB referral system plugin
vatsal last edited by vatsal
I am creating a plugin for Nodebb forum which works like this:
User(A) created his account - > he gets a referral code (his username)
Anyone(B) uses his referral code while registration + earns 150 currency -> User(A) gets 20 points for each such user.
I have already created the repository and following modules:
Registration screen has input for referral code.
If referral is entered is cross checked against all registered user names.
If founds a matching username, inside a new hash the new user and original users are mapped.
Else displays the message the wrong "referral code entered".
If no referral code was entered user is registered as normal and no mapping happens.
here is the link to the repository https://github.com/ethicalvats/nodebb-plugin-ds-refferal
Nice idea, might play nice with that money plugin that I think @psychobunny was developing. Maybe you could fire your own custom hook for other plugins to listen to?
Your custom registration field should be in the userData object with the ID that you gave it as key.
It's also better to require NodeBB modules using module.parent.require, rather than going up a few paths. This makes sure that your plugin will still work when people npm link it.
ankitpr89 last edited by
This plugin will work more like a referral system.
Hope you guys would have used in case of "Uber" Cab App.
Nice plugin. Will be really helpful in certain niche.
charles last edited by
-referral code can be autogenerated AND option to use username
-use code to join/enter private forum