Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Your Custom Badges?
PFAFF
✭
I'm interested to see what others have done with this plugin for their forum's custom badges and also so I can see some examples of how people have done it to learn to code some myself. The default badges are an incredible start, but I can see wanting to give badges for all kinds of other stuff.
Is anyone interested in sharing their custom badge code and explain what it does / how you use it on your forum?
Tagged:
0
Comments
A very simple one:
Since I migrated from @peregrine 's badges plugin which had a charter member badge (given to the first 100 users), I had to recreate it.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
Awesome! Thanks for sharing that one!
A little bit offtopc, but could you explain
return $user->UserID <= $criteria->Target;
, @Bleistivt?Yes, the settings (criteria) for the badge are defined by the form in the
form()
function of the YagaRule object. The inputs are validated invalidate()
once you submit the form and then serialized in an object.That object is always passed to the award function where you can check if the criteria defined in the form are met by the user.
In the example above the UserID where a user stops being a "charter" member is configurable (it was 100 in the original badge) in the "Target" field.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
Shit, you already answered... It's late at night and it took me way too much time to see that the <= is a simple logical operator. I was thinking of some complicated language construct like an inverted associative array...
On a related plugin. I had custom badges for red herrings and vampire bats that were given to certain individuals. Rules were subjective.
badge design by vrijvlinder
given to individuals that provided these
also had a vampire bat badge (you can guess the reason or choose your own).
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Yeah, I've been considering a "You Know Nothing" badge with Jon Snow on it as a subjective badge like that.
Has anyone implemented a badge that grants automatically when a post reaches a certain number of reactions? Like, "Get 5 Awesomes on a comment".
Check out the included 'post reactions' rule.
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, perfect!