HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Award a badge when posting in certain category
Hi @hgtonight,
Here I am again with another question/feedback topic.
Is it possible right now, to give out a badge when a visitor posts in a certain categorie? For instance, the introduce yourself categorie on our forums?
I think I havent seen that in the options list but I might be mistaken.
I also mistakenly took the award combo option for an option where you could select 2 badges, and let the system award a badge because of that "unlocked" combination. Might be a lot of work to program that in, and I'm not sure how often you'd use something like that. But maybe it can spark your imagination for your, already, massive to do list
Tagged:
1
Comments
You mean something like that? http://vanillaforums.org/badge/combo
Well, slightly like that.
Instead I want to specify what awards someone must have, in order to unlock the combo award.
I run an airsoft team so we have roles like squad member, squad leader and even commander. At this moment, I, or another admin, can give out manual badges for the before mentioned roles.
When an individual played all the roles for instance, I want to give them an: "rising through the ranks" award. It would safe some time, and make the system more fool proof, if we can give the rising through the ranks badge automatically through a combo award.
The ranks are not permanent in our team so we can run with different squad leaders every other day. So I want to promote people trying out squad leader or commander for a day so they can unlock the rising through the ranks combo badge.
As I said in my opening post, this is more of a fine tuning situation. As its clearly possible to make the through the ranks badge a manual award
But the posting in a specified categorie is something I would like to see, or someday try to build myself. But first, I'll try to see if I can hack my way in to a "pick 3 badges your proud of and show 'm off" plugin.
For posting in a category, copy the discussion body length rule, change the form to output a category list, validate should require an in, and check the submitted discussion's category against the criteria.
Oh, and rename it to something else, like category post or something.
As far as the badge combo, the UI would be the toughest thing to do there. Show a list of the current badges with checkboxes? That seems pretty meh. Any ideas?
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Thanks for the points for the category award.
hmmm good question. I was thinking about the checkboxes but I guess there would be a lot...
Like I said, the combo award is something that I can fix by just going manual
I found that little js fiddle: http://jsfiddle.net/eUDRV/3/
Maybe close to what is done there only that the input field below the right select box is replaced with a thumb of the selected badges?
Wauw @R_J ! That would also be a good place to start with for a plugin where a visitor can select 3 of the badges they are most proud of, and want to display!
I've made the posting in a certain category badge
I took the body length rule like you said @hgtonight, but made it so the user can manually input the id of the category. That can be found at the category edit page. I could not figure out how to load in categories from a pulldown menu so I went with this approach, as I knew I could be able to fix it this way.
And of course added the definition's in English.
Thanks for showing the way ^_^
EDIT: I want to post the code but because of the ' characters in the code its not working.
You should use the code format under the paragraph button on the editor to post multi-line code. It will preserve format and escape html code so it looks right and is safe.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
I was trying, but its not working for me on safari
You can get the categories into a pull down with the following snippet:
Then the selected category ID will be in
$Criteria->CategoryID
.EDIT - Be sure to change the author credits to you!
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Oh wauw! Its that simple haha! That looks a lot like the way Wordpress handles things!
Well, if you want me to change it so you are not associated with it then I will. But I did not want to steal credit as its 90% your code ^_^
Working with the Garden framework is really great, not going to lie.
I didn't mean it like that. I love collaborative works! Your idea, your implementation, your credit.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
haha cool I'll change it right now together with your addition. Thanks again!
It worked! I had to change the validation process a bit, you sly dog @hgtonight
Heres how it looks for the admin:
And heres the final code (EDIT: Sorry... not sure how you fixed the above code insert :
Awesome!
If you want me to include it in the next Yaga release, let me know what all the translation definitions are and I will sneak it in there.
EDIT - If you are a GitHub users, feel free to submit a PR. What is GitHub?
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Sure! That would be awesome
Added to Yaga here: https://github.com/hgtonight/Application-Yaga/commit/fcb166abb6af71d3f62dd5d57d0665ede391e1c2
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.