Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Delegate Request (Search Results Rendering)
I am adding some functionality to my CommunityModeration extension that requires two delegates to be added. These both end up in the SearchForm class. Here is a patch against r741:
Index: themes/search_results_comments.php
===================================================================
--- themes/search_results_comments.php (revision 741)
+++ themes/search_results_comments.php (working copy)
@@ -22,7 +22,11 @@
<li class="CommentAdded">
<span>'.$this->Context->GetDefinition('Added').'</span>
'.TimeDiff($this->Context, $Comment->DateCreated,mktime()).'
- </li>
+ </li>';
+$this->DelegateParameters['Comment'] = &$Comment;
+$this->DelegateParameters['CommentList'] = &$CommentList;
+$this->CallDelegate('PostCommentOptionsRender');
+$CommentList .= '
</ul>
</li>
';
Index: themes/search_results_users.php
===================================================================
--- themes/search_results_users.php (revision 741)
+++ themes/search_results_users.php (working copy)
@@ -23,7 +23,12 @@
</li>
<li class="User CommentsAdded">
<span>'.$this->Context->GetDefinition('CommentsAdded').'</span> '.$u->CountComments.'
- </li>
+ </li>';
+$this->DelegateParameters['User'] = &$u;
+$this->DelegateParameters['UserList'] = &$UserList;
+$this->CallDelegate('PostUserOptionsRender');
+
+$UserList .= '
</ul>
</li>';
0
This discussion has been closed.
Comments
Index: themes/search_results_comments.php =================================================================== --- themes/search_results_comments.php (revision 741) +++ themes/search_results_comments.php (working copy) @@ -22,7 +22,12 @@ <li class="CommentAdded"> <span>'.$this->Context->GetDefinition('Added').'</span> '.TimeDiff($this->Context, $Comment->DateCreated,mktime()).' - </li> + </li>'; +$this->DelegateParameters['Comment'] = &$Comment; +$this->DelegateParameters['CommentList'] = &$CommentList; +$this->CallDelegate('PostCommentOptionsRender'); + +$CommentList .= ' </ul> </li> '; Index: themes/search_results_users.php =================================================================== --- themes/search_results_users.php (revision 741) +++ themes/search_results_users.php (working copy) @@ -23,7 +23,12 @@ </li> <li class="User CommentsAdded"> <span>'.$this->Context->GetDefinition('CommentsAdded').'</span> '.$u->CountComments.' - </li> + </li>'; +$this->DelegateParameters['User'] = &$u; +$this->DelegateParameters['UserList'] = &$UserList; +$this->CallDelegate('PostUserOptionsRender'); + +$UserList .= ' </ul> </li>';
Is it what you wanted?