Not signed in (Sign In)

Categories

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthoriamtheari
    • CommentTimeAug 29th 2008
     # 1
    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>';
    •  
      CommentAuthorDinoboff
    • CommentTimeAug 29th 2008
     # 2
    I could not use your patch (I wish we add a way to get user's patches):


    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?
    • CommentAuthoriamtheari
    • CommentTimeAug 29th 2008
     # 3
    I should have quotified it to get the indentation right. Yes, that is what I wanted. Thank you. :)
    • CommentAuthoriamtheari
    • CommentTimeAug 29th 2008
     # 4
    Of course, a Pre*OptionsRender on both of those could also make sense for others. I only happened to need the Post*OptionsRender for each.
    •  
      CommentAuthorDinoboff
    • CommentTimeAug 30th 2008
     # 5
    added Vanilla r742
    • CommentAuthoriamtheari
    • CommentTimeSep 2nd 2008
     # 6
    Thank you!
Add your comments
    Username Password
  • Format comments as