HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Search
-
Re: Award a badge when posting in certain category
Sure! That would be awesome :) $Definition['Yaga.Rules.DiscussionCategoryId'] = 'Post in category';$Definition['Yaga.Rules.DiscussionCategoryId.Desc'] = 'Award this badge if the user has started a discussion in the specified category.';$Definition['Yaga.Rules.DiscussionCategoryId.Criteria.Head'] = 'Select category:'; -
Re: Award a badge when posting in certain category
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… -
Re: Award a badge when posting in certain category
I've made the posting in a certain category badge <3 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… -
Re: Award a badge when posting in certain category
You can get the categories into a pull down with the following snippet: $String = $Form->Label('Yaga.Rules.DiscussionCategoryId.Criteria.Head', 'DiscussionCategoryId');$String .= $Form->CategoryDropDown('CategoryID');return $String; Then the selected category ID will be in $Criteria->CategoryID. EDIT - Be sure to change… -
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… -
Re: Award a badge when posting in certain category
-
Re: Award a badge when posting in certain category
I was trying, but its not working for me on safari :( <?php if(!defined('APPLICATION')) exit();/** * This rule awards badges if a discussion is posted in the right category * * @author Zachary Doll * @since 1.0 * @package Yaga */class DiscussionCategoryId implements YagaRule{ public function Award($Sender, $User,… -
Re: Award a badge when posting in certain category
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 :( : <?php if(!defined('APPLICATION')) exit();/** * This rule awards badges if a discussion is posted in the right… -
Re: Award a badge when posting in certain category
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…
9 results