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.
Forcing Discussions to be Whispered
This discussion has been closed.
Comments
I've just added a delegate parameter to GetDiscussionForm so you can do it...
$this->DelegateParameters['Discussion'] = &$Discussion;
So, now your function should be something like:
function DiscussionForm_WhisperToMyself(&$DiscussionForm) { $d = &$DiscussionForm->DelegateParameters['Discussion']; $d->WhisperUsername = $DiscussionForm->Context->Session->User->Name; } $Context->AddToDelegate('DiscussionForm', 'DiscussionForm_PreRender', 'DiscussionForm_WhisperToMyself');
I've committed that delegate parameter to svn.
$Context->Configuration['PERMISSION_WHATEVER'] = '0'; //Can't do it by default $Context->Dictionary['PERMISSION_WHATEVER'] = 'Can do it'; ... if ( $Context->Session->User->Permission("PERMISSION_WHATEVER") ) Do_It();
if ( $DiscussionForm->Context->Session->User->Permission("PERMISSION_WHATEVER") ) Do_It();