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