/* If the editing user is the author, show him the subscribe checkbox */
if($this->discuss->user->get('id') == $this->post->get('author')
&& ($this->thread->canSubscribe() || $this->thread->canUnsubscribe())) {
$checked = !empty($_POST) ? !empty($_POST['notify']) : $this->thread->hasSubscription();
$placeholders['notify'] = $checked ? ' checked="checked"' : '';
$placeholders['notify_cb'] = $this->discuss->getChunk('form/disCheckbox',array(
'name' => 'notify',
'value' => 1,
'text' => $this->getOption('textCheckboxNotify'),
'attributes' => $placeholders['notify'],
));
$placeholders['can_subscribe'] = true;
}
$this->getThreadSummary();
/* output form to browser */...
$placeholders['notify_cb'] = $this->discuss->getChunk('form/disCheckbox',array(
'name' => 'notify',
'value' => 0,This question has been answered by nuan88. See the first response.
// show subscribe checkbox
$notify = !empty($_POST['notify']) ? ' checked="checked"' : '';
$this->setPlaceholders(array(
'notify_cb' => $this->discuss->getChunk('form/disCheckbox',array(
'name' => 'notify',
'value' => 1,
'text' => $this->getOption('textCheckboxNotify'),
'attributes' => $notify,
)),
));