Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
625 views
in Plugins by

I have tried:

            // edit state, remove 'edit silent' option
            if($this->template=='question' && strpos(qa_get_state(),'edit')!==false) {
                unset($this->content['form_q_edit']['fields']['silent']);
                // remove email notify from q and a
                unset($this->content['form_q_edit']['fields']['notify']);
                unset($this->content['a_form']['fields']['notify']); // does not work!
            }

Using var_dump($this->content['a_form']['fields']['notify']); shows me the content. But the unset() does not work in this case. Strange.
 

Q2A version: 1.7
by
Note: Under admin/permissions you find "Editing posts silently:" - but you need to choose a user group. Here is the option missing: *nobody*

1 Answer

0 votes
by
edited by
For answers:

unset($this->content['a_form']['fields']['silent']);

For questions:

unset($this->content['form_q_edit']['fields']['silent']);

For comments on questions:

unset($this->content['q_view']['c_form']['fields']['silent']);

For comments on answers:

if(!empty($this->content['a_list']['as']))
{
    foreach($this->content['a_list']['as'] as &$answ)
    {
        unset($answ['c_form']['fields']['silent']);
    }
}
...