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.

request: new delegate/parameters for Threaded Discussions addon + alpha release

edited November 2007 in Vanilla 1.0 Help
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.

just before line 35: include($ThemeFilePath);
$this->DelegateParameters['Discussion'] = &$Discussion;
$this->CallDelegate( 'PreSingleDiscussionRender' );
after line 184: if ($Counter < $this->Context->Configuration['SEARCH_RESULTS_PER_PAGE']) {
$this->DelegateParameters['Discussion'] = &$Discussion;
$this->CallDelegate( 'PreSingleDiscussionRender' );
at the end of the constructor
after line 465: if ($this->Context->WarningCollector->Count() == 0) {
$this->DelegateParameters['SqlBuilder'] = &$s;
$this->CallDelegate( 'PreSaveDiscussion' );
after line 168: // Define the last page
before line 357: $Comment->CommentID = $this->Context->Database->Insert
$this->DelegateParameters['SqlBuilder'] = &$s;

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 ;)


  • This was quick.
    Big thanks to Dinoboff, every request was achieved (including the $configuration by ref). PostConstructor was renamed to Constructor though.
This discussion has been closed.