Not signed in (Sign In)

Categories

Vanilla 1.1.4 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.
    • CommentAuthorGrahack
    • CommentTimeNov 18th 2007 edited
     # 1
    Hi,
    Here are Delegates and Delegate Parameters I need (I can reformat this list if needed, or provide the files).
    Names are just what I choosed, consistency can be bad.

    /themes/discussions.php
    just before line 35: include($ThemeFilePath);
    $this->DelegateParameters['Discussion'] = &$Discussion;
    $this->CallDelegate( 'PreSingleDiscussionRender' );
    /library/Vanilla/Vanilla.Control.SearchForm.php
    after line 184: if ($Counter < $this->Context->Configuration['SEARCH_RESULTS_PER_PAGE']) {
    $this->DelegateParameters['Discussion'] = &$Discussion;
    $this->CallDelegate( 'PreSingleDiscussionRender' );
    /library/Vanilla/Vanilla.Class.DiscussionManager.php
    at the end of the constructor
    $this->CallDelegate('PostConstructor');
    after line 465: if ($this->Context->WarningCollector->Count() == 0) {
    $this->DelegateParameters['SqlBuilder'] = &$s;
    $this->CallDelegate( 'PreSaveDiscussion' );
    /library/Vanilla/Vanilla.Class.Discussion.php
    after line 168: // Define the last page
    $this->CallDelegate('PreDefineLastPage');
    /library/Vanilla/Vanilla.Class.CommentManager.php
    before line 357: $Comment->CommentID = $this->Context->Database->Insert
    $this->DelegateParameters['SqlBuilder'] = &$s;
    $this->CallDelegate('PreInsertNewComment');

    I also have a problem of passing a variable by ref or not: in /library/Vanilla/Vanilla.Class.Discussion.php, I need to pass $Configuration by ref in this function (add the '&')
    function GetPropertiesFromDataSet($DataSet, &$Configuration)

    That's because I need to break pagination and change $conf['COMMENTS_PER_PAGE'] on the fly.
    Is there a simple workaround ?

    Now that you have all modifications needed, you could test it ;)
    alpha-release
    • CommentAuthorGrahack
    • CommentTimeNov 20th 2007
     # 2
    This was quick.
    Big thanks to Dinoboff, every request was achieved (including the $configuration by ref). PostConstructor was renamed to Constructor though.
Add your comments
    Username Password
  • Format comments as