PageRenderTime 59ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 1ms

/admin/settings.php

https://bitbucket.org/gencer/punbb
PHP | 1480 lines | 1264 code | 162 blank | 54 comment | 355 complexity | ccd58c0ee35570ee51455f7215f7df25 MD5 | raw file
Possible License(s): GPL-2.0

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. /**
  3. * Forum settings management page.
  4. *
  5. * Allows administrators to control many of the settings used in the site.
  6. *
  7. * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org
  8. * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
  9. * @package PunBB
  10. */
  11. if (!defined('FORUM_ROOT'))
  12. define('FORUM_ROOT', '../');
  13. require FORUM_ROOT.'include/common.php';
  14. require FORUM_ROOT.'include/common_admin.php';
  15. ($hook = get_hook('aop_start')) ? eval($hook) : null;
  16. if ($forum_user['g_id'] != FORUM_ADMIN)
  17. message($lang_common['No permission']);
  18. // Load the admin.php language file
  19. require FORUM_ROOT.'lang/'.$forum_user['language'].'/admin_common.php';
  20. require FORUM_ROOT.'lang/'.$forum_user['language'].'/admin_settings.php';
  21. $section = isset($_GET['section']) ? $_GET['section'] : null;
  22. if (isset($_POST['form_sent']))
  23. {
  24. $form = array_map('trim', $_POST['form']);
  25. ($hook = get_hook('aop_form_submitted')) ? eval($hook) : null;
  26. // Validate input depending on section
  27. switch ($section)
  28. {
  29. case 'setup':
  30. {
  31. ($hook = get_hook('aop_setup_validation')) ? eval($hook) : null;
  32. if ($form['board_title'] == '')
  33. message($lang_admin_settings['Error no board title']);
  34. // Clean default_lang, default_style, and sef
  35. $form['default_style'] = preg_replace('#[\.\\\/]#', '', $form['default_style']);
  36. $form['default_lang'] = preg_replace('#[\.\\\/]#', '', $form['default_lang']);
  37. $form['sef'] = preg_replace('#[\.\\\/]#', '', $form['sef']);
  38. // Make sure default_lang, default_style, and sef exist
  39. if (!file_exists(FORUM_ROOT.'style/'.$form['default_style'].'/'.$form['default_style'].'.php'))
  40. message($lang_common['Bad request']);
  41. if (!file_exists(FORUM_ROOT.'lang/'.$form['default_lang'].'/common.php'))
  42. message($lang_common['Bad request']);
  43. if (!file_exists(FORUM_ROOT.'include/url/'.$form['sef'].'/forum_urls.php'))
  44. message($lang_common['Bad request']);
  45. if (!isset($form['default_dst']) || $form['default_dst'] != '1')
  46. $form['default_dst'] = '0';
  47. $form['timeout_visit'] = intval($form['timeout_visit']);
  48. $form['timeout_online'] = intval($form['timeout_online']);
  49. $form['redirect_delay'] = intval($form['redirect_delay']);
  50. if ($form['timeout_online'] >= $form['timeout_visit'])
  51. message($lang_admin_settings['Error timeout value']);
  52. $form['disp_topics_default'] = (intval($form['disp_topics_default']) > 0) ? intval($form['disp_topics_default']) : 1;
  53. $form['disp_posts_default'] = (intval($form['disp_posts_default']) > 0) ? intval($form['disp_posts_default']) : 1;
  54. if ($form['additional_navlinks'] != '')
  55. $form['additional_navlinks'] = forum_trim(forum_linebreaks($form['additional_navlinks']));
  56. break;
  57. }
  58. case 'features':
  59. {
  60. ($hook = get_hook('aop_features_validation')) ? eval($hook) : null;
  61. if (!isset($form['search_all_forums']) || $form['search_all_forums'] != '1') $form['search_all_forums'] = '0';
  62. if (!isset($form['ranks']) || $form['ranks'] != '1') $form['ranks'] = '0';
  63. if (!isset($form['censoring']) || $form['censoring'] != '1') $form['censoring'] = '0';
  64. if (!isset($form['quickjump']) || $form['quickjump'] != '1') $form['quickjump'] = '0';
  65. if (!isset($form['show_version']) || $form['show_version'] != '1') $form['show_version'] = '0';
  66. if (!isset($form['show_moderators']) || $form['show_moderators'] != '1') $form['show_moderators'] = '0';
  67. if (!isset($form['users_online']) || $form['users_online'] != '1') $form['users_online'] = '0';
  68. if (!isset($form['quickpost']) || $form['quickpost'] != '1') $form['quickpost'] = '0';
  69. if (!isset($form['subscriptions']) || $form['subscriptions'] != '1') $form['subscriptions'] = '0';
  70. if (!isset($form['force_guest_email']) || $form['force_guest_email'] != '1') $form['force_guest_email'] = '0';
  71. if (!isset($form['show_dot']) || $form['show_dot'] != '1') $form['show_dot'] = '0';
  72. if (!isset($form['topic_views']) || $form['topic_views'] != '1') $form['topic_views'] = '0';
  73. if (!isset($form['show_post_count']) || $form['show_post_count'] != '1') $form['show_post_count'] = '0';
  74. if (!isset($form['show_user_info']) || $form['show_user_info'] != '1') $form['show_user_info'] = '0';
  75. if (!isset($form['message_bbcode']) || $form['message_bbcode'] != '1') $form['message_bbcode'] = '0';
  76. if (!isset($form['message_img_tag']) || $form['message_img_tag'] != '1') $form['message_img_tag'] = '0';
  77. if (!isset($form['smilies']) || $form['smilies'] != '1') $form['smilies'] = '0';
  78. if (!isset($form['make_links']) || $form['make_links'] != '1') $form['make_links'] = '0';
  79. if (!isset($form['message_all_caps']) || $form['message_all_caps'] != '1') $form['message_all_caps'] = '0';
  80. if (!isset($form['subject_all_caps']) || $form['subject_all_caps'] != '1') $form['subject_all_caps'] = '0';
  81. $form['indent_num_spaces'] = intval($form['indent_num_spaces']);
  82. $form['quote_depth'] = intval($form['quote_depth']);
  83. if (!isset($form['signatures']) || $form['signatures'] != '1') $form['signatures'] = '0';
  84. if (!isset($form['sig_bbcode']) || $form['sig_bbcode'] != '1') $form['sig_bbcode'] = '0';
  85. if (!isset($form['sig_img_tag']) || $form['sig_img_tag'] != '1') $form['sig_img_tag'] = '0';
  86. if (!isset($form['smilies_sig']) || $form['smilies_sig'] != '1') $form['smilies_sig'] = '0';
  87. if (!isset($form['sig_all_caps']) || $form['sig_all_caps'] != '1') $form['sig_all_caps'] = '0';
  88. $form['sig_length'] = intval($form['sig_length']);
  89. $form['sig_lines'] = intval($form['sig_lines']);
  90. if (!isset($form['avatars']) || $form['avatars'] != '1') $form['avatars'] = '0';
  91. // Make sure avatars_dir doesn't end with a slash
  92. if (substr($form['avatars_dir'], -1) == '/')
  93. $form['avatars_dir'] = substr($form['avatars_dir'], 0, -1);
  94. $form['avatars_width'] = intval($form['avatars_width']);
  95. $form['avatars_height'] = intval($form['avatars_height']);
  96. $form['avatars_size'] = intval($form['avatars_size']);
  97. if (!isset($form['check_for_updates']) || $form['check_for_updates'] != '1') $form['check_for_updates'] = '0';
  98. if (!isset($form['check_for_versions']) || $form['check_for_versions'] != '1') $form['check_for_versions'] = '0';
  99. if (!isset($form['mask_passwords']) || $form['mask_passwords'] != '1') $form['mask_passwords'] = '0';
  100. if (!isset($form['gzip']) || $form['gzip'] != '1') $form['gzip'] = '0';
  101. break;
  102. }
  103. case 'email':
  104. {
  105. ($hook = get_hook('aop_email_validation')) ? eval($hook) : null;
  106. if (!defined('FORUM_EMAIL_FUNCTIONS_LOADED'))
  107. require FORUM_ROOT.'include/email.php';
  108. $form['admin_email'] = strtolower($form['admin_email']);
  109. if (!is_valid_email($form['admin_email']))
  110. message($lang_admin_settings['Error invalid admin e-mail']);
  111. $form['webmaster_email'] = strtolower($form['webmaster_email']);
  112. if (!is_valid_email($form['webmaster_email']))
  113. message($lang_admin_settings['Error invalid web e-mail']);
  114. if (!isset($form['smtp_ssl']) || $form['smtp_ssl'] != '1') $form['smtp_ssl'] = '0';
  115. break;
  116. }
  117. case 'announcements':
  118. {
  119. ($hook = get_hook('aop_announcements_validation')) ? eval($hook) : null;
  120. if (!isset($form['announcement']) || $form['announcement'] != '1') $form['announcement'] = '0';
  121. if ($form['announcement_message'] != '')
  122. $form['announcement_message'] = forum_linebreaks($form['announcement_message']);
  123. else
  124. $form['announcement_message'] = $lang_admin_settings['Announcement message default'];
  125. break;
  126. }
  127. case 'registration':
  128. {
  129. ($hook = get_hook('aop_registration_validation')) ? eval($hook) : null;
  130. if (!isset($form['regs_allow']) || $form['regs_allow'] != '1') $form['regs_allow'] = '0';
  131. if (!isset($form['regs_verify']) || $form['regs_verify'] != '1') $form['regs_verify'] = '0';
  132. if (!isset($form['allow_banned_email']) || $form['allow_banned_email'] != '1') $form['allow_banned_email'] = '0';
  133. if (!isset($form['allow_dupe_email']) || $form['allow_dupe_email'] != '1') $form['allow_dupe_email'] = '0';
  134. if (!isset($form['regs_report']) || $form['regs_report'] != '1') $form['regs_report'] = '0';
  135. if (!isset($form['rules']) || $form['rules'] != '1') $form['rules'] = '0';
  136. if ($form['rules_message'] != '')
  137. $form['rules_message'] = forum_linebreaks($form['rules_message']);
  138. else
  139. $form['rules_message'] = $lang_admin_settings['Rules default'];
  140. break;
  141. }
  142. case 'maintenance':
  143. {
  144. ($hook = get_hook('aop_maintenance_validation')) ? eval($hook) : null;
  145. if (!isset($form['maintenance']) || $form['maintenance'] != '1') $form['maintenance'] = '0';
  146. if ($form['maintenance_message'] != '')
  147. $form['maintenance_message'] = forum_linebreaks($form['maintenance_message']);
  148. else
  149. $form['maintenance_message'] = $lang_admin_settings['Maintenance message default'];
  150. break;
  151. }
  152. default:
  153. {
  154. ($hook = get_hook('aop_new_section_validation')) ? eval($hook) : null;
  155. break;
  156. }
  157. }
  158. ($hook = get_hook('aop_pre_update_configuration')) ? eval($hook) : null;
  159. foreach ($form as $key => $input)
  160. {
  161. // Only update permission values that have changed
  162. if (array_key_exists('p_'.$key, $forum_config) && $forum_config['p_'.$key] != $input)
  163. {
  164. $query = array(
  165. 'UPDATE' => 'config',
  166. 'SET' => 'conf_value='.intval($input),
  167. 'WHERE' => 'conf_name=\'p_'.$forum_db->escape($key).'\''
  168. );
  169. ($hook = get_hook('aop_qr_update_permission_conf')) ? eval($hook) : null;
  170. $forum_db->query_build($query) or error(__FILE__, __LINE__);
  171. }
  172. // Only update option values that have changed
  173. if (array_key_exists('o_'.$key, $forum_config) && $forum_config['o_'.$key] != $input)
  174. {
  175. if ($input != '' || is_int($input))
  176. $value = '\''.$forum_db->escape($input).'\'';
  177. else
  178. $value = 'NULL';
  179. $query = array(
  180. 'UPDATE' => 'config',
  181. 'SET' => 'conf_value='.$value,
  182. 'WHERE' => 'conf_name=\'o_'.$forum_db->escape($key).'\''
  183. );
  184. ($hook = get_hook('aop_qr_update_permission_option')) ? eval($hook) : null;
  185. $forum_db->query_build($query) or error(__FILE__, __LINE__);
  186. }
  187. }
  188. // Regenerate the config cache
  189. if (!defined('FORUM_CACHE_FUNCTIONS_LOADED'))
  190. require FORUM_ROOT.'include/cache.php';
  191. generate_config_cache();
  192. // If changed sef - remove quick-jump cache
  193. if (!empty($forum_config['o_sef']) && !empty($form['sef']))
  194. {
  195. if ($forum_config['o_sef'] != $form['sef'])
  196. {
  197. clean_quickjump_cache();
  198. }
  199. }
  200. // Add flash message
  201. $forum_flash->add_info($lang_admin_settings['Settings updated']);
  202. ($hook = get_hook('aop_pre_redirect')) ? eval($hook) : null;
  203. redirect(forum_link($forum_url['admin_settings_'.$section]), $lang_admin_settings['Settings updated']);
  204. }
  205. if (!$section || $section == 'setup')
  206. {
  207. // Setup the form
  208. $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;
  209. // Setup breadcrumbs
  210. $forum_page['crumbs'] = array(
  211. array($forum_config['o_board_title'], forum_link($forum_url['index'])),
  212. array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])),
  213. array($lang_admin_common['Settings'], forum_link($forum_url['admin_settings_setup'])),
  214. array($lang_admin_common['Setup'], forum_link($forum_url['admin_settings_setup']))
  215. );
  216. ($hook = get_hook('aop_setup_pre_header_load')) ? eval($hook) : null;
  217. define('FORUM_PAGE_SECTION', 'settings');
  218. define('FORUM_PAGE', 'admin-settings-setup');
  219. require FORUM_ROOT.'header.php';
  220. // START SUBST - <!-- forum_main -->
  221. ob_start();
  222. ($hook = get_hook('aop_setup_output_start')) ? eval($hook) : null;
  223. ?>
  224. <div class="main-content main-frm">
  225. <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_settings_setup']) ?>">
  226. <div class="hidden">
  227. <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_settings_setup'])) ?>" />
  228. <input type="hidden" name="form_sent" value="1" />
  229. </div>
  230. <div class="content-head">
  231. <h2 class="hn"><span><?php echo $lang_admin_settings['Setup personal'] ?></span></h2>
  232. </div>
  233. <?php ($hook = get_hook('aop_setup_pre_personal_fieldset')) ? eval($hook) : null; ?>
  234. <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
  235. <legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup personal legend'] ?></strong></legend>
  236. <?php ($hook = get_hook('aop_setup_pre_board_title')) ? eval($hook) : null; ?>
  237. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  238. <div class="sf-box text">
  239. <label for="fld<?php echo ++$forum_page['fld_count'] ?>">
  240. <span><?php echo $lang_admin_settings['Board title label'] ?></span>
  241. </label><br />
  242. <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[board_title]" size="50" maxlength="255" value="<?php echo forum_htmlencode($forum_config['o_board_title']) ?>" /></span>
  243. </div>
  244. </div>
  245. <?php ($hook = get_hook('aop_setup_pre_board_descrip')) ? eval($hook) : null; ?>
  246. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  247. <div class="sf-box text">
  248. <label for="fld<?php echo ++$forum_page['fld_count'] ?>">
  249. <span><?php echo $lang_admin_settings['Board description label'] ?></span>
  250. </label><br />
  251. <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[board_desc]" size="50" maxlength="255" value="<?php echo forum_htmlencode($forum_config['o_board_desc']) ?>" /></span>
  252. </div>
  253. </div>
  254. <?php ($hook = get_hook('aop_setup_pre_default_style')) ? eval($hook) : null; ?>
  255. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  256. <div class="sf-box select">
  257. <label for="fld<?php echo ++$forum_page['fld_count'] ?>">
  258. <span><?php echo $lang_admin_settings['Default style label'] ?></span>
  259. </label><br />
  260. <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="form[default_style]">
  261. <?php
  262. $styles = get_style_packs();
  263. foreach ($styles as $style)
  264. {
  265. if ($forum_config['o_default_style'] == $style)
  266. echo "\t\t\t\t\t\t\t\t".'<option value="'.$style.'" selected="selected">'.str_replace('_', ' ', $style).'</option>'."\n";
  267. else
  268. echo "\t\t\t\t\t\t\t\t".'<option value="'.$style.'">'.str_replace('_', ' ', $style).'</option>'."\n";
  269. }
  270. ?>
  271. </select></span>
  272. </div>
  273. </div>
  274. <?php ($hook = get_hook('aop_setup_pre_personal_fieldset_end')) ? eval($hook) : null; ?>
  275. </fieldset>
  276. <?php
  277. ($hook = get_hook('aop_setup_personal_fieldset_end')) ? eval($hook) : null;
  278. // Reset counter
  279. $forum_page['group_count'] = $forum_page['item_count'] = 0;
  280. ?>
  281. <div class="content-head">
  282. <h2 class="hn"><span><?php echo $lang_admin_settings['Setup local'] ?></span></h2>
  283. </div>
  284. <?php ($hook = get_hook('aop_setup_pre_local_fieldset')) ? eval($hook) : null; ?>
  285. <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
  286. <legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup local legend'] ?></strong></legend>
  287. <?php ($hook = get_hook('aop_setup_pre_default_language')) ? eval($hook) : null; ?>
  288. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  289. <div class="sf-box select">
  290. <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Default language label'] ?></span><small><?php echo $lang_admin_settings['Default language help'] ?></small></label><br />
  291. <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="form[default_lang]">
  292. <?php
  293. $languages = get_language_packs();
  294. foreach ($languages as $lang)
  295. {
  296. if ($forum_config['o_default_lang'] == $lang)
  297. echo "\t\t\t\t\t\t\t\t".'<option value="'.$lang.'" selected="selected">'.$lang.'</option>'."\n";
  298. else
  299. echo "\t\t\t\t\t\t\t\t".'<option value="'.$lang.'">'.$lang.'</option>'."\n";
  300. }
  301. // Load the profile.php language file
  302. require FORUM_ROOT.'lang/'.$forum_user['language'].'/profile.php';
  303. ?>
  304. </select></span>
  305. </div>
  306. </div>
  307. <?php ($hook = get_hook('aop_setup_pre_default_timezone')) ? eval($hook) : null; ?>
  308. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  309. <div class="sf-box select">
  310. <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Default timezone label'] ?></span></label><br />
  311. <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="form[default_timezone]">
  312. <option value="-12"<?php if ($forum_config['o_default_timezone'] == -12) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-12:00'] ?></option>
  313. <option value="-11"<?php if ($forum_config['o_default_timezone'] == -11) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-11:00'] ?></option>
  314. <option value="-10"<?php if ($forum_config['o_default_timezone'] == -10) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-10:00'] ?></option>
  315. <option value="-9.5"<?php if ($forum_config['o_default_timezone'] == -9.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-09:30'] ?></option>
  316. <option value="-9"<?php if ($forum_config['o_default_timezone'] == -9) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-09:00'] ?></option>
  317. <option value="-8"<?php if ($forum_config['o_default_timezone'] == -8) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-08:00'] ?></option>
  318. <option value="-7"<?php if ($forum_config['o_default_timezone'] == -7) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-07:00'] ?></option>
  319. <option value="-6"<?php if ($forum_config['o_default_timezone'] == -6) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-06:00'] ?></option>
  320. <option value="-5"<?php if ($forum_config['o_default_timezone'] == -5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-05:00'] ?></option>
  321. <option value="-4"<?php if ($forum_config['o_default_timezone'] == -4) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-04:00'] ?></option>
  322. <option value="-3.5"<?php if ($forum_config['o_default_timezone'] == -3.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-03:30'] ?></option>
  323. <option value="-3"<?php if ($forum_config['o_default_timezone'] == -3) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-03:00'] ?></option>
  324. <option value="-2"<?php if ($forum_config['o_default_timezone'] == -2) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-02:00'] ?></option>
  325. <option value="-1"<?php if ($forum_config['o_default_timezone'] == -1) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC-01:00'] ?></option>
  326. <option value="0"<?php if ($forum_config['o_default_timezone'] == 0) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC'] ?></option>
  327. <option value="1"<?php if ($forum_config['o_default_timezone'] == 1) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+01:00'] ?></option>
  328. <option value="2"<?php if ($forum_config['o_default_timezone'] == 2) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+02:00'] ?></option>
  329. <option value="3"<?php if ($forum_config['o_default_timezone'] == 3) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+03:00'] ?></option>
  330. <option value="3.5"<?php if ($forum_config['o_default_timezone'] == 3.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+03:30'] ?></option>
  331. <option value="4"<?php if ($forum_config['o_default_timezone'] == 4) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+04:00'] ?></option>
  332. <option value="4.5"<?php if ($forum_config['o_default_timezone'] == 4.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+04:30'] ?></option>
  333. <option value="5"<?php if ($forum_config['o_default_timezone'] == 5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+05:00'] ?></option>
  334. <option value="5.5"<?php if ($forum_config['o_default_timezone'] == 5.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+05:30'] ?></option>
  335. <option value="5.75"<?php if ($forum_config['o_default_timezone'] == 5.75) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+05:45'] ?></option>
  336. <option value="6"<?php if ($forum_config['o_default_timezone'] == 6) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+06:00'] ?></option>
  337. <option value="6.5"<?php if ($forum_config['o_default_timezone'] == 6.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+06:30'] ?></option>
  338. <option value="7"<?php if ($forum_config['o_default_timezone'] == 7) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+07:00'] ?></option>
  339. <option value="8"<?php if ($forum_config['o_default_timezone'] == 8) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+08:00'] ?></option>
  340. <option value="8.75"<?php if ($forum_config['o_default_timezone'] == 8.75) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+08:45'] ?></option>
  341. <option value="9"<?php if ($forum_config['o_default_timezone'] == 9) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+09:00'] ?></option>
  342. <option value="9.5"<?php if ($forum_config['o_default_timezone'] == 9.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+09:30'] ?></option>
  343. <option value="10"<?php if ($forum_config['o_default_timezone'] == 10) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+10:00'] ?></option>
  344. <option value="10.5"<?php if ($forum_config['o_default_timezone'] == 10.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+10:30'] ?></option>
  345. <option value="11"<?php if ($forum_config['o_default_timezone'] == 11) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+11:00'] ?></option>
  346. <option value="11.5"<?php if ($forum_config['o_default_timezone'] == 11.5) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+11:30'] ?></option>
  347. <option value="12"<?php if ($forum_config['o_default_timezone'] == 12) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+12:00'] ?></option>
  348. <option value="12.75"<?php if ($forum_config['o_default_timezone'] == 12.75) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+12:45'] ?></option>
  349. <option value="13"<?php if ($forum_config['o_default_timezone'] == 13) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+13:00'] ?></option>
  350. <option value="14"<?php if ($forum_config['o_default_timezone'] == 14) echo ' selected="selected"' ?>><?php echo $lang_profile['UTC+14:00'] ?></option>
  351. </select></span>
  352. </div>
  353. </div>
  354. <?php ($hook = get_hook('aop_setup_pre_default_dst')) ? eval($hook) : null; ?>
  355. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  356. <div class="sf-box checkbox">
  357. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[default_dst]" value="1"<?php if ($forum_config['o_default_dst'] == 1) echo ' checked="checked"' ?> /></span>
  358. <label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['DST label'] ?></label>
  359. </div>
  360. </div>
  361. <?php ($hook = get_hook('aop_setup_pre_time_format')) ? eval($hook) : null; ?>
  362. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  363. <div class="sf-box text">
  364. <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Time format label'] ?></span><small><?php printf($lang_admin_settings['Current format'], format_time(time(), 2, null, $forum_config['o_time_format']), $lang_admin_settings['External format help']) ?></small></label><br />
  365. <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[time_format]" size="25" maxlength="25" value="<?php echo forum_htmlencode($forum_config['o_time_format']) ?>" /></span>
  366. </div>
  367. </div>
  368. <?php ($hook = get_hook('aop_setup_pre_date_format')) ? eval($hook) : null; ?>
  369. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  370. <div class="sf-box text">
  371. <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Date format label'] ?></span><small><?php printf($lang_admin_settings['Current format'], format_time(time(), 1, $forum_config['o_date_format'], null, true), $lang_admin_settings['External format help']) ?></small></label><br />
  372. <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[date_format]" size="25" maxlength="25" value="<?php echo forum_htmlencode($forum_config['o_date_format']) ?>" /></span>
  373. </div>
  374. </div>
  375. <?php ($hook = get_hook('aop_setup_pre_local_fieldset_end')) ? eval($hook) : null; ?>
  376. </fieldset>
  377. <?php
  378. ($hook = get_hook('aop_setup_local_fieldset_end')) ? eval($hook) : null;
  379. // Reset counter
  380. $forum_page['group_count'] = $forum_page['item_count'] = 0;
  381. ?>
  382. <div class="content-head">
  383. <h2 class="hn"><span><?php echo $lang_admin_settings['Setup timeouts'] ?></span></h2>
  384. </div>
  385. <?php ($hook = get_hook('aop_setup_pre_timeouts_fieldset')) ? eval($hook) : null; ?>
  386. <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
  387. <legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup timeouts legend'] ?></strong></legend>
  388. <?php ($hook = get_hook('aop_setup_pre_visit_timeout')) ? eval($hook) : null; ?>
  389. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  390. <div class="sf-box text">
  391. <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Visit timeout label'] ?></span><small><?php echo $lang_admin_settings['Visit timeout help'] ?></small></label><br />
  392. <span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[timeout_visit]" size="5" maxlength="5" value="<?php echo $forum_config['o_timeout_visit'] ?>" /></span>
  393. </div>
  394. </div>
  395. <?php ($hook = get_hook('aop_setup_pre_online_timeout')) ? eval($hook) : null; ?>
  396. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  397. <div class="sf-box text">
  398. <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Online timeout label'] ?></span><small><?php echo $lang_admin_settings['Online timeout help'] ?></small></label><br />
  399. <span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[timeout_online]" size="5" maxlength="5" value="<?php echo $forum_config['o_timeout_online'] ?>" /></span>
  400. </div>
  401. </div>
  402. <?php ($hook = get_hook('aop_setup_pre_redirect_time')) ? eval($hook) : null; ?>
  403. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  404. <div class="sf-box text">
  405. <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Redirect time label'] ?></span><small><?php echo $lang_admin_settings['Redirect time help'] ?></small></label><br />
  406. <span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[redirect_delay]" size="5" maxlength="5" value="<?php echo $forum_config['o_redirect_delay'] ?>" /></span>
  407. </div>
  408. </div>
  409. <?php ($hook = get_hook('aop_setup_pre_timeouts_fieldset_end')) ? eval($hook) : null; ?>
  410. </fieldset>
  411. <?php
  412. ($hook = get_hook('aop_setup_timeouts_fieldset_end')) ? eval($hook) : null;
  413. // Reset counter
  414. $forum_page['group_count'] = $forum_page['item_count'] = 0;
  415. ?>
  416. <div class="content-head">
  417. <h2 class="hn"><span><?php echo $lang_admin_settings['Setup pagination'] ?></span></h2>
  418. </div>
  419. <?php ($hook = get_hook('aop_setup_pre_pagination_fieldset')) ? eval($hook) : null; ?>
  420. <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
  421. <legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup pagination legend'] ?></strong></legend>
  422. <?php ($hook = get_hook('aop_setup_pre_topics_per_page')) ? eval($hook) : null; ?>
  423. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  424. <div class="sf-box text">
  425. <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Topics per page label'] ?></span></label><br />
  426. <span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[disp_topics_default]" size="5" maxlength="3" value="<?php echo $forum_config['o_disp_topics_default'] ?>" /></span>
  427. </div>
  428. </div>
  429. <?php ($hook = get_hook('aop_setup_pre_posts_per_page')) ? eval($hook) : null; ?>
  430. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  431. <div class="sf-box text">
  432. <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Posts per page label'] ?></span></label><br />
  433. <span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[disp_posts_default]" size="5" maxlength="3" value="<?php echo $forum_config['o_disp_posts_default'] ?>" /></span>
  434. </div>
  435. </div>
  436. <?php ($hook = get_hook('aop_setup_pre_topic_review')) ? eval($hook) : null; ?>
  437. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  438. <div class="sf-box frm-short text">
  439. <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Topic review label'] ?></span><small><?php echo $lang_admin_settings['Topic review help'] ?></small></label><br />
  440. <span class="fld-input"><input type="number" id="fld<?php echo $forum_page['fld_count'] ?>" name="form[topic_review]" size="5" maxlength="3" value="<?php echo $forum_config['o_topic_review'] ?>" /></span>
  441. </div>
  442. </div>
  443. <?php ($hook = get_hook('aop_setup_pre_pagination_fieldset_end')) ? eval($hook) : null; ?>
  444. </fieldset>
  445. <?php
  446. ($hook = get_hook('aop_setup_pagination_fieldset_end')) ? eval($hook) : null;
  447. // Reset counter
  448. $forum_page['group_count'] = $forum_page['item_count'] = 0;
  449. ?>
  450. <div class="content-head">
  451. <h2 class="hn"><span><?php echo $lang_admin_settings['Setup reports'] ?></span></h2>
  452. </div>
  453. <?php ($hook = get_hook('aop_setup_pre_reports_fieldset')) ? eval($hook) : null; ?>
  454. <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
  455. <legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup reports legend'] ?></strong></legend>
  456. <fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>">
  457. <legend><span><?php echo $lang_admin_settings['Reporting method'] ?></span></legend>
  458. <div class="mf-box">
  459. <div class="mf-item">
  460. <span class="fld-input"><input type="radio" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[report_method]" value="0"<?php if ($forum_config['o_report_method'] == '0') echo ' checked="checked"' ?> /></span>
  461. <label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Report internal label'] ?></label>
  462. </div>
  463. <div class="mf-item">
  464. <span class="fld-input"><input type="radio" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[report_method]" value="1"<?php if ($forum_config['o_report_method'] == '1') echo ' checked="checked"' ?> /></span>
  465. <label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Report email label'] ?></label>
  466. </div>
  467. <div class="mf-item">
  468. <span class="fld-input"><input type="radio" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[report_method]" value="2"<?php if ($forum_config['o_report_method'] == '2') echo ' checked="checked"' ?> /></span>
  469. <label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Report both label'] ?></label>
  470. </div>
  471. <?php ($hook = get_hook('aop_setup_new_reporting_method')) ? eval($hook) : null; ?>
  472. </div>
  473. </fieldset>
  474. <?php ($hook = get_hook('aop_setup_pre_reports_fieldset_end')) ? eval($hook) : null; ?>
  475. </fieldset>
  476. <?php
  477. ($hook = get_hook('aop_setup_reports_fieldset_end')) ? eval($hook) : null;
  478. // Reset counter
  479. $forum_page['group_count'] = $forum_page['item_count'] = 0;
  480. ?>
  481. <div class="content-head">
  482. <h2 class="hn"><span><?php echo $lang_admin_settings['Setup URL'] ?></span></h2>
  483. </div>
  484. <div class="ct-box">
  485. <p class="warn"><?php echo $lang_admin_settings['URL scheme info'] ?></p>
  486. </div>
  487. <?php ($hook = get_hook('aop_setup_pre_url_scheme_fieldset')) ? eval($hook) : null; ?>
  488. <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
  489. <legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup URL legend'] ?></strong></legend>
  490. <?php ($hook = get_hook('aop_setup_pre_url_scheme')) ? eval($hook) : null; ?>
  491. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  492. <div class="sf-box select">
  493. <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['URL scheme label'] ?></span><small><?php echo $lang_admin_settings['URL scheme help'] ?></small></label><br />
  494. <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="form[sef]">
  495. <?php
  496. $url_schemes = get_scheme_packs();
  497. foreach ($url_schemes as $schema)
  498. {
  499. if ($forum_config['o_sef'] == $schema)
  500. echo "\t\t\t\t\t\t\t\t".'<option value="'.$schema.'" selected="selected">'.str_replace('_', ' ', $schema).'</option>'."\n";
  501. else
  502. echo "\t\t\t\t\t\t\t\t".'<option value="'.$schema.'">'.str_replace('_', ' ', $schema).'</option>'."\n";
  503. }
  504. ?>
  505. </select></span>
  506. </div>
  507. </div>
  508. <?php ($hook = get_hook('aop_setup_pre_url_scheme_fieldset_end')) ? eval($hook) : null; ?>
  509. </fieldset>
  510. <?php
  511. ($hook = get_hook('aop_setup_url_scheme_fieldset_end')) ? eval($hook) : null;
  512. // Reset counter
  513. $forum_page['group_count'] = $forum_page['item_count'] = 0;
  514. ?>
  515. <div class="content-head">
  516. <h2 class="hn"><span><?php echo $lang_admin_settings['Setup links'] ?></span></h2>
  517. </div>
  518. <div class="ct-box">
  519. <p class="warn"><?php echo $lang_admin_settings['Setup links info'] ?></p>
  520. </div>
  521. <?php ($hook = get_hook('aop_setup_pre_links_fieldset')) ? eval($hook) : null; ?>
  522. <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
  523. <legend class="group-legend"><strong><?php echo $lang_admin_settings['Setup links legend'] ?></strong></legend>
  524. <?php ($hook = get_hook('aop_setup_pre_additional_navlinks')) ? eval($hook) : null; ?>
  525. <div class="txt-set set<?php echo ++$forum_page['item_count'] ?>">
  526. <div class="txt-box textarea">
  527. <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Enter links label'] ?></span></label>
  528. <div class="txt-input"><span class="fld-input"><textarea id="fld<?php echo $forum_page['fld_count'] ?>" name="form[additional_navlinks]" rows="3" cols="55"><?php echo forum_htmlencode($forum_config['o_additional_navlinks']) ?></textarea></span></div>
  529. </div>
  530. </div>
  531. <?php ($hook = get_hook('aop_setup_pre_links_fieldset_end')) ? eval($hook) : null; ?>
  532. </fieldset>
  533. <?php ($hook = get_hook('aop_setup_links_fieldset_end')) ? eval($hook) : null; ?>
  534. <div class="frm-buttons">
  535. <span class="submit primary"><input type="submit" name="save" value="<?php echo $lang_admin_common['Save changes'] ?>" /></span>
  536. </div>
  537. </form>
  538. </div>
  539. <?php
  540. }
  541. else if ($section == 'features')
  542. {
  543. // Setup the form
  544. $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0;
  545. // Setup breadcrumbs
  546. $forum_page['crumbs'] = array(
  547. array($forum_config['o_board_title'], forum_link($forum_url['index'])),
  548. array($lang_admin_common['Forum administration'], forum_link($forum_url['admin_index'])),
  549. array($lang_admin_common['Settings'], forum_link($forum_url['admin_settings_setup'])),
  550. array($lang_admin_common['Features'], forum_link($forum_url['admin_settings_features']))
  551. );
  552. ($hook = get_hook('aop_features_pre_header_load')) ? eval($hook) : null;
  553. define('FORUM_PAGE_SECTION', 'settings');
  554. define('FORUM_PAGE', 'admin-settings-features');
  555. require FORUM_ROOT.'header.php';
  556. // START SUBST - <!-- forum_main -->
  557. ob_start();
  558. ($hook = get_hook('aop_features_output_start')) ? eval($hook) : null;
  559. ?>
  560. <div class="main-content main-frm">
  561. <form class="frm-form" method="post" accept-charset="utf-8" action="<?php echo forum_link($forum_url['admin_settings_features']) ?>">
  562. <div class="hidden">
  563. <input type="hidden" name="csrf_token" value="<?php echo generate_form_token(forum_link($forum_url['admin_settings_features'])) ?>" />
  564. <input type="hidden" name="form_sent" value="1" />
  565. </div>
  566. <div class="content-head">
  567. <h2 class="hn"><span><?php echo $lang_admin_settings['Features general'] ?></span></h2>
  568. </div>
  569. <?php ($hook = get_hook('aop_features_pre_general_fieldset')) ? eval($hook) : null; ?>
  570. <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
  571. <legend class="group-legend"><strong><?php echo $lang_admin_settings['Features general legend'] ?></strong></legend>
  572. <?php ($hook = get_hook('aop_features_pre_search_all_checkbox')) ? eval($hook) : null; ?>
  573. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  574. <div class="sf-box checkbox">
  575. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[search_all_forums]" value="1"<?php if ($forum_config['o_search_all_forums'] == '1') echo ' checked="checked"' ?> /></span>
  576. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Searching'] ?></span> <?php echo $lang_admin_settings['Search all label'] ?></label>
  577. </div>
  578. </div>
  579. <?php ($hook = get_hook('aop_features_pre_ranks_checkbox')) ? eval($hook) : null; ?>
  580. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  581. <div class="sf-box checkbox">
  582. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[ranks]" value="1"<?php if ($forum_config['o_ranks'] == '1') echo ' checked="checked"' ?> /></span>
  583. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['User ranks'] ?></span> <?php echo $lang_admin_settings['User ranks label'] ?></label>
  584. </div>
  585. </div>
  586. <?php ($hook = get_hook('aop_features_pre_censoring_checkbox')) ? eval($hook) : null; ?>
  587. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  588. <div class="sf-box checkbox">
  589. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[censoring]" value="1"<?php if ($forum_config['o_censoring'] == '1') echo ' checked="checked"' ?> /></span>
  590. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Censor words'] ?></span> <?php echo $lang_admin_settings['Censor words label'] ?></label>
  591. </div>
  592. </div>
  593. <?php ($hook = get_hook('aop_features_pre_quickjump_checkbox')) ? eval($hook) : null; ?>
  594. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  595. <div class="sf-box checkbox">
  596. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[quickjump]" value="1"<?php if ($forum_config['o_quickjump'] == '1') echo ' checked="checked"' ?> /></span>
  597. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Quick jump'] ?></span> <?php echo $lang_admin_settings['Quick jump label'] ?></label>
  598. </div>
  599. </div>
  600. <?php ($hook = get_hook('aop_features_pre_show_version_checkbox')) ? eval($hook) : null; ?>
  601. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  602. <div class="sf-box checkbox">
  603. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[show_version]" value="1"<?php if ($forum_config['o_show_version'] == '1') echo ' checked="checked"' ?> /></span>
  604. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Show version'] ?></span> <?php echo $lang_admin_settings['Show version label'] ?></label>
  605. </div>
  606. </div>
  607. <?php ($hook = get_hook('aop_features_pre_show_moderators_checkbox')) ? eval($hook) : null; ?>
  608. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  609. <div class="sf-box checkbox">
  610. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[show_moderators]" value="1"<?php if ($forum_config['o_show_moderators'] == '1') echo ' checked="checked"' ?> /></span>
  611. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Show moderators'] ?></span> <?php echo $lang_admin_settings['Show moderators label'] ?></label>
  612. </div>
  613. </div>
  614. <?php ($hook = get_hook('aop_features_pre_users_online_checkbox')) ? eval($hook) : null; ?>
  615. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  616. <div class="sf-box checkbox">
  617. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[users_online]" value="1"<?php if ($forum_config['o_users_online'] == '1') echo ' checked="checked"' ?> /></span>
  618. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Online list'] ?></span> <?php echo $lang_admin_settings['Users online label'] ?></label>
  619. </div>
  620. </div>
  621. <?php ($hook = get_hook('aop_features_pre_general_fieldset_end')) ? eval($hook) : null; ?>
  622. </fieldset>
  623. <?php
  624. ($hook = get_hook('aop_features_general_fieldset_end')) ? eval($hook) : null;
  625. // Reset counter
  626. $forum_page['group_count'] = $forum_page['item_count'] = 0;
  627. ?>
  628. <div class="content-head">
  629. <h2 class="hn"><span><?php echo $lang_admin_settings['Features posting'] ?></span></h2>
  630. </div>
  631. <?php ($hook = get_hook('aop_features_pre_posting_fieldset')) ? eval($hook) : null; ?>
  632. <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
  633. <legend class="group-legend"><span><?php echo $lang_admin_settings['Features posting legend'] ?></span></legend>
  634. <?php ($hook = get_hook('aop_features_pre_quickpost_checkbox')) ? eval($hook) : null; ?>
  635. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  636. <div class="sf-box checkbox">
  637. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[quickpost]" value="1"<?php if ($forum_config['o_quickpost'] == '1') echo ' checked="checked"' ?> /></span>
  638. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Quick post'] ?></span> <?php echo $lang_admin_settings['Quick post label'] ?></label>
  639. </div>
  640. </div>
  641. <?php ($hook = get_hook('aop_features_pre_subscriptions_checkbox')) ? eval($hook) : null; ?>
  642. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  643. <div class="sf-box checkbox">
  644. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[subscriptions]" value="1"<?php if ($forum_config['o_subscriptions'] == '1') echo ' checked="checked"' ?> /></span>
  645. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Subscriptions'] ?></span> <?php echo $lang_admin_settings['Subscriptions label'] ?></label>
  646. </div>
  647. </div>
  648. <?php ($hook = get_hook('aop_features_pre_force_guest_email_checkbox')) ? eval($hook) : null; ?>
  649. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  650. <div class="sf-box checkbox">
  651. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[force_guest_email]" value="1"<?php if ($forum_config['p_force_guest_email'] == '1') echo ' checked="checked"' ?> /></span>
  652. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Guest posting'] ?></span> <?php echo $lang_admin_settings['Guest posting label'] ?></label>
  653. </div>
  654. </div>
  655. <?php ($hook = get_hook('aop_features_pre_show_dot_checkbox')) ? eval($hook) : null; ?>
  656. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  657. <div class="sf-box checkbox">
  658. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[show_dot]" value="1"<?php if ($forum_config['o_show_dot'] == '1') echo ' checked="checked"' ?> /></span>
  659. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['User has posted'] ?></span> <?php echo $lang_admin_settings['User has posted label'] ?></label>
  660. </div>
  661. </div>
  662. <?php ($hook = get_hook('aop_features_pre_topic_views_checkbox')) ? eval($hook) : null; ?>
  663. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  664. <div class="sf-box checkbox">
  665. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[topic_views]" value="1"<?php if ($forum_config['o_topic_views'] == '1') echo ' checked="checked"' ?> /></span>
  666. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['Topic views'] ?></span> <?php echo $lang_admin_settings['Topic views label'] ?></label>
  667. </div>
  668. </div>
  669. <?php ($hook = get_hook('aop_features_pre_show_post_count_checkbox')) ? eval($hook) : null; ?>
  670. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  671. <div class="sf-box checkbox">
  672. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[show_post_count]" value="1"<?php if ($forum_config['o_show_post_count'] == '1') echo ' checked="checked"' ?> /></span>
  673. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['User post count'] ?></span> <?php echo $lang_admin_settings['User post count label'] ?></label>
  674. </div>
  675. </div>
  676. <?php ($hook = get_hook('aop_features_pre_show_user_info_checkbox')) ? eval($hook) : null; ?>
  677. <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>">
  678. <div class="sf-box checkbox">
  679. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[show_user_info]" value="1"<?php if ($forum_config['o_show_user_info'] == '1') echo ' checked="checked"' ?> /></span>
  680. <label for="fld<?php echo $forum_page['fld_count'] ?>"><span><?php echo $lang_admin_settings['User info'] ?></span> <?php echo $lang_admin_settings['User info label'] ?></label>
  681. </div>
  682. </div>
  683. <?php ($hook = get_hook('aop_features_pre_posting_fieldset_end')) ? eval($hook) : null; ?>
  684. </fieldset>
  685. <?php
  686. ($hook = get_hook('aop_features_posting_fieldset_end')) ? eval($hook) : null;
  687. // Reset counter
  688. $forum_page['group_count'] = $forum_page['item_count'] = 0;
  689. ?>
  690. <div class="content-head">
  691. <h2 class="hn"><span><?php echo $lang_admin_settings['Features posts'] ?></span></h2>
  692. </div>
  693. <?php ($hook = get_hook('aop_features_pre_message_fieldset')) ? eval($hook) : null; ?>
  694. <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>">
  695. <legend class="group-legend"><span><?php echo $lang_admin_settings['Features posts legend'] ?></span></legend>
  696. <?php ($hook = get_hook('aop_features_pre_message_content_fieldset')) ? eval($hook) : null; ?>
  697. <fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>">
  698. <legend><span><?php echo $lang_admin_settings['Post content group'] ?></span></legend>
  699. <div class="mf-box">
  700. <div class="mf-item">
  701. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[message_bbcode]" value="1"<?php if ($forum_config['p_message_bbcode'] == '1') echo ' checked="checked"' ?> /></span>
  702. <label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Allow BBCode label'] ?></label>
  703. </div>
  704. <div class="mf-item">
  705. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[message_img_tag]" value="1"<?php if ($forum_config['p_message_img_tag'] == '1') echo ' checked="checked"' ?> /></span>
  706. <label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Allow img label'] ?></label>
  707. </div>
  708. <div class="mf-item">
  709. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[smilies]" value="1"<?php if ($forum_config['o_smilies'] == '1') echo ' checked="checked"' ?> /></span>
  710. <label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Smilies in posts label'] ?></label>
  711. </div>
  712. <div class="mf-item">
  713. <span class="fld-input"><input type="checkbox" id="fld<?php echo ++$forum_page['fld_count'] ?>" name="form[make_links]" value="1"<?php if ($forum_config['o_make_links'] == '1') echo ' checked="checked"' ?> /></span>
  714. <label for="fld<?php echo $forum_page['fld_count'] ?>"><?php echo $lang_admin_settings['Make clickable links label'] ?></label>
  715. </div>
  716. <?php ($hook = get_hook('aop_features_new_message_content_option')) ? eval($hook) : null; ?>
  717. </div>
  718. <?php ($hook = get_hook('aop_features_pre_message_content_fieldset_end')) ? eval($hook) : null; ?>
  719. </fieldset>
  720. <?php ($hook = get_hook('aop_features_message_content_fieldset_end')) ? eval($hook) : null; ?>
  721. <fieldset class="mf-…

Large files files are truncated, but you can click here to view the full file