Hi,
I want to add new field in add articles in admin. Can anyone let me know how I can add that.
Thanks in advance.
Hi,
I want to add new field in add articles in admin. Can anyone let me know how I can add that. Thanks in advance. |
The array which describes article add form is located in the beginning of inc/classes/BxDolTextData.php file: $this->_aForm = array( 'form_attrs' => array( 'id' => 'text_data', 'name' => 'text_data', 'action' => bx_html_attribute($_SERVER['PHP_SELF']), 'method' => 'post', 'enctype' => 'multipart/form-data' ), 'params' => array ( 'db' => array( 'table' => '', 'key' => 'id', 'uri' => 'uri', 'uri_title' => 'caption', 'submit_name' => 'post' ), ), 'inputs' => array ( 'author_id' => array( 'type' => 'hidden', 'name' => 'author_id', 'value' => $this->_iOwnerId, 'db' => array ( 'pass' => 'Int', ), ), 'caption' => array( 'type' => 'text', 'name' => 'caption', 'caption' => _t("_td_caption"), 'value' => '', 'required' => 1, 'checker' => array ( 'func' => 'length', 'params' => array(3,64), 'error' => _t('_td_err_incorrect_length'), ), 'db' => array ( 'pass' => 'Xss', ), ), 'snippet' => array( 'type' => 'textarea', 'html' => 0, 'name' => 'snippet', 'caption' => _t("_td_snippet"), 'value' => '', 'required' => 1, 'checker' => array ( 'func' => 'length', 'params' => array(3,200), 'error' => _t('_td_err_incorrect_length'), ), 'db' => array ( 'pass' => 'Xss', ), ), 'content' => array( 'type' => 'textarea', 'html' => 2, 'name' => 'content', 'caption' => _t("_td_content"), 'value' => '', 'required' => 1, 'checker' => array ( 'func' => 'length', 'params' => array(3,65536), 'error' => _t('_td_err_incorrect_length'), ), 'db' => array ( 'pass' => 'XssHtml', ), ), 'when' => array( 'type' => 'datetime', 'name' => 'when', 'caption' => _t("_td_date"), 'value' => date('Y-m-d H:i'), 'required' => 1, 'checker' => array ( 'func' => 'DateTime', 'error' => _t('_td_err_empty_value'), ), 'db' => array ( 'pass' => 'DateTime', ), ), 'tags' => array( 'type' => 'text', 'name' => 'tags', 'caption' => _t("_td_tags"), 'value' => '', 'required' => 1, 'checker' => array ( 'func' => 'length', 'params' => array(3,64), 'error' => _t('_td_err_incorrect_length'), ), 'info' => _t('_sys_tags_note'), 'db' => array ( 'pass' => 'Xss', ), ), 'categories' => $oCategories->getGroupChooser($this->_oModule->_oConfig->getCategoriesSystemName(), $this->_iOwnerId, true), 'allow_comment_to' => array(), 'allow_vote_to' => array(), 'post' => array( 'type' => 'submit', 'name' => 'post', 'value' => _t("_td_post"), ), ) ); but do not touch this array - or different modules will be affected, it;s better make appropriate changes in modules/boonex/articles/classes/BxArlData.php file. Rules → http://www.boonex.com/terms |