Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewards API #2751

Closed
7 tasks done
psychobunny opened this issue Feb 20, 2015 · 12 comments
Closed
7 tasks done

Rewards API #2751

psychobunny opened this issue Feb 20, 2015 · 12 comments
Assignees
Milestone

Comments

@psychobunny
Copy link
Contributor

Rewards API

A simple logic engine in the ACP to allow you to do actions based on events.

This was originally part of the badge system plugin but I decided to remove this and make it core, and have other plugins be able to build on top of it (badges plugin, achievements plugin, etc)

This is just a basic iteration and I'm sure there's a ton more we can do to make this cooler in future.

  • Basic Rewards ACP interface
  • Allow plugins to define conditions (ex. "If user's reputation is over X")
  • Allow plugins to define conditionals (ex. "greater than", "smaller than")
  • Allow plugins to define rewards/actions (ex. "Add user to group", "Send alert to user")
  • Plugins can define custom parameters in the Rewards ACP (ex. the Message / Title field for the alert reward)
  • Rewards Essentials plugin with samples on how to do all of the above
  • Allow to define a reward as claimable only once or multiple / infinite times
@psychobunny psychobunny self-assigned this Feb 20, 2015
@psychobunny psychobunny added this to the 0.7.0 milestone Feb 20, 2015
@psychobunny
Copy link
Contributor Author

@MegaGM
Copy link
Contributor

MegaGM commented Feb 21, 2015

Thank you!

@pichalite
Copy link
Contributor

@psychobunny Should I be able to create some basic rewards with this or do I need to wait for plugins to be implemented? Right now nothing happens when I click "New Reward".

@psychobunny
Copy link
Contributor Author

./nodebb upgrade

should have installed the plugin, if not then npm install nodebb-rewards-essentials

@pichalite
Copy link
Contributor

nodebb-rewards-essentials plugin is already installed and activated.

@psychobunny
Copy link
Contributor Author

Just double checking, you did restart forum after activating etc right?

Do you get any error messages in the console when clicking on "New Reward"?

@pichalite
Copy link
Contributor

Yes, I did restart. I just restarted it again.

I don't see any error messages in the console when I click "New Reward". It just doesn't do anything.

After I come to the "Rewards" page, every link I click in the ACP throws this error in the console.

Uncaught SyntaxError: Unexpected token u

@psychobunny
Copy link
Contributor Author

I committed a fix for that second error, but I can't reproduce the first one. Tried it on an older db that I had upgraded to latest. Going to try on a fresh install now

@psychobunny
Copy link
Contributor Author

Got it to work on a completely fresh install as well. Try and see if the fix I posted above for the other error somehow resolves the first issue?

@pichalite
Copy link
Contributor

pulled the latest code and the "New Reward" button works now.

The default "Then:" is set to "Add to Group" but it doesn't display the "Group Name:" select list unless I pick "Send alert message" and then change it to "Add to Group".

In the "Group Name:" select list, in addition to groups, all the categories are listed with privileges. Is that how it's going to be?

screen shot 2015-02-23 at 12 30 06 pm

@psychobunny
Copy link
Contributor Author

The first one is a minor bug (although I thought I fixed that), will look into it shortly

The second is intended, permissions are actually "groups". So a use case could be, if you gained enough reputation, you'd be able to allow a user to post in Category X

It needs better UX / design though, which is something I'll focus on as we go along

psychobunny added a commit that referenced this issue Feb 24, 2015
@psychobunny
Copy link
Contributor Author

The first one is a minor bug (although I thought I fixed that), will look into it shortly

Was working on FF but broken on chrome - fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants