Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Создаем новую опцию в разделе "Дополнительные параметры темы" в административной панели
- class YourAddOn_Model_Thread extends XFCP_YourAddOn_Model_Thread
- {
- public function prepareThreadFields(array $forum, array $nodePermissions = null)
- {
- $fields = parent::prepareThreadFields($forum, $nodePermissions);
- $fields['custom_reply_fields'] = array(
- 'title' => 'Отображать дополнительные поля',
- 'type' => 'radio',
- 'default' => 'thread_only',
- 'description' => 'Выберите, где отображать дополнительные поля: только в теме, в теме и ответах или только в ответах.',
- 'required' => false,
- 'options' => array(
- 'thread_only' => 'Только в теме',
- 'thread_and_replies' => 'В теме и ответах',
- 'replies_only' => 'Только в ответах'
- )
- );
- return $fields;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement