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
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
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… -
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
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…
4 results