Nudaii
Well-known member
Howdy i am extending
with this, however not sure if there is a better way to do it, it adds one extra checkbox to the forum_edit, is this part correct/optimal
with this, however not sure if there is a better way to do it, it adds one extra checkbox to the forum_edit, is this part correct/optimal
Code:
<?php
class Nudaii_ContentControl_DataWriter_CCDW extends XFCP_Nudaii_ContentControl_DataWriter_CCDW
{
protected function _getFields()
{
$fields = parent::_getFields();
$fields['xf_forum']['nudaii_do_not_index'] = array('type' => self::TYPE_UINT, 'default' => 0);
return $fields;
}
protected function _preSave()
{
$parent = parent::_preSave();
if (isset($GLOBALS['nudaii_do_not_index']))
{
$this->set('nudaii_do_not_index', $GLOBALS['nudaii_do_not_index']->getInput()->filterSingle('nudaii_do_not_index', XenForo_Input::UINT));
}
return $parent;
}
}