PUN_ADMIN) message($lang_common['No permission']); if (isset($_POST['form_sent'])) { // Custom referrer check (so we can output a custom error message) if (!preg_match('#^'.preg_quote(str_replace('www.', '', $pun_config['o_base_url']).'/admin_options.php', '#').'#i', str_replace('www.', '', (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '')))) message('Bad HTTP_REFERER. If you have moved these forums from one location to another or switched domains, you need to update the Base URL manually in the database (look for o_base_url in the config table) and then clear the cache by deleting all .php files in the /cache directory.'); $form = array_map('trim', $_POST['form']); if ($form['board_title'] == '') message('You must enter a board title.'); // Clean default_lang $form['default_lang'] = preg_replace('#[\.\\\/]#', '', $form['default_lang']); require PUN_ROOT.'include/email.php'; $form['admin_email'] = strtolower($form['admin_email']); if (!is_valid_email($form['admin_email'])) message('The admin e-mail address you entered is invalid.'); $form['webmaster_email'] = strtolower($form['webmaster_email']); if (!is_valid_email($form['webmaster_email'])) message('The webmaster e-mail address you entered is invalid.'); if ($form['mailing_list'] != '') $form['mailing_list'] = strtolower(preg_replace('/[\s]/', '', $form['mailing_list'])); // Make sure base_url doesn't end with a slash if (substr($form['base_url'], -1) == '/') $form['base_url'] = substr($form['base_url'], 0, -1); // Clean avatars_dir $form['avatars_dir'] = str_replace("\0", '', $form['avatars_dir']); // Make sure avatars_dir doesn't end with a slash if (substr($form['avatars_dir'], -1) == '/') $form['avatars_dir'] = substr($form['avatars_dir'], 0, -1); if ($form['additional_navlinks'] != '') $form['additional_navlinks'] = trim(pun_linebreaks($form['additional_navlinks'])); if ($form['announcement_message'] != '') $form['announcement_message'] = pun_linebreaks($form['announcement_message']); else { $form['announcement_message'] = 'Enter your announcement here.'; if ($form['announcement'] == '1') $form['announcement'] = '0'; } if ($form['rules_message'] != '') $form['rules_message'] = pun_linebreaks($form['rules_message']); else { $form['rules_message'] = 'Enter your rules here.'; if ($form['rules'] == '1') $form['rules'] = '0'; } if ($form['maintenance_message'] != '') $form['maintenance_message'] = pun_linebreaks($form['maintenance_message']); else { $form['maintenance_message'] = 'The forums are temporarily down for maintenance. Please try again in a few minutes.\n\n/Administrator'; if ($form['maintenance'] == '1') $form['maintenance'] = '0'; } $form['timeout_visit'] = intval($form['timeout_visit']); $form['timeout_online'] = intval($form['timeout_online']); $form['redirect_delay'] = intval($form['redirect_delay']); $form['topic_review'] = intval($form['topic_review']); $form['disp_topics_default'] = intval($form['disp_topics_default']); $form['disp_posts_default'] = intval($form['disp_posts_default']); $form['indent_num_spaces'] = intval($form['indent_num_spaces']); $form['avatars_width'] = intval($form['avatars_width']); $form['avatars_height'] = intval($form['avatars_height']); $form['avatars_size'] = intval($form['avatars_size']); if ($form['timeout_online'] >= $form['timeout_visit']) message('The value of "Timeout online" must be smaller than the value of "Timeout visit".'); while (list($key, $input) = @each($form)) { // Only update values that have changed if (array_key_exists('o_'.$key, $pun_config) && $pun_config['o_'.$key] != $input) { if ($input != '' || is_int($input)) $value = '\''.$db->escape($input).'\''; else $value = 'NULL'; $db->query('UPDATE '.$db->prefix.'config SET conf_value='.$value.' WHERE conf_name=\'o_'.$db->escape($key).'\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error()); } } // Regenerate the config cache require_once PUN_ROOT.'include/cache.php'; generate_config_cache(); redirect('admin_options.php', 'Options updated. Redirecting …'); } $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Options'; $form_name = 'update_options'; require PUN_ROOT.'header.php'; generate_admin_menu('options'); ?>


Board title The title of this bulletin board (shown at the top of every page). This field may not contain HTML.
Board description A short description of this bulletin board (shown at the top of every page). This field may contain HTML.
Base URL The complete URL of the forum without trailing slash (i.e. http://www.mydomain.com/forums). This must be correct in order for all admin and moderator features to work. If you get "Bad referer" errors, it's probably incorrect.
Server timezone The timezone of the server where PunBB is installed.
Default language This is the default language style used if the visitor is a guest or a user that hasn't changed from the default in his/her profile. If you remove a language pack, this must be updated.
Default style This is the default style used for guests and users who haven't changed from the default in their profile.
Time and timeouts
Time format [Current format: ] See here for formatting options.
Date format [Current format: ] See here for formatting options.
Visit timeout Number of seconds a user must be idle before his/hers last visit data is updated (primarily affects new message indicators).
Online timeout Number of seconds a user must be idle before being removed from the online users list.
Redirect time Number of seconds to wait when redirecting. If set to 0, no redirect page will be displayed (not recommended).
Version number /> Yes    /> No Show version number in footer.
User info in posts /> Yes    /> No Show information about the poster under the username in topic view. The information affected is location, register date, post count and the contact links (e-mail and URL).
User post count /> Yes    /> No Show the number of posts a user has made (affects topic view, profile and userlist).
Smilies /> Yes    /> No Convert smilies to small icons.
Smilies in signatures /> Yes    /> No Convert smilies to small icons in user signatures.
Make clickable links /> Yes    /> No When enabled, PunBB will automatically detect any URL's in posts and make them clickable hyperlinks.
Topic review Maximum number of posts to display when posting (newest first). 0 to disable.
Topics per page default The default number of topics to display per page in a forum. Users can personalize this setting.
Posts per page default The default number of posts to display per page in a topic. Users can personalize this setting.
Indent size If set to 8, a regular tab will be used when displaying text within the [code][/code] tag. Otherwise this many spaces will be used to indent the text.
Quick post /> Yes    /> No When enabled, PunBB will add a quick post form at the bottom of topics. This way users can post directly from the topic view.
Users online /> Yes    /> No Display info on the index page about guests and registered users currently browsing the forums.
Censor words /> Yes    /> No Enable this to censor specific words in the forum. See Censoring for more info.
User ranks /> Yes    /> No Enable this to use user ranks. See Ranks for more info.
User has posted earlier /> Yes    /> No This feature displays a dot in front of topics in viewforum.php in case the currently logged in user has posted in that topic earlier. Disable if you are experiencing high server load.
Quick jump /> Yes    /> No Enable the quick jump (jump to forum) drop list.
GZip output /> Yes    /> No If enabled, PunBB will gzip the output sent to browsers. This will reduce bandwidth usage, but use a little more CPU. This feature requires that PHP is configured with zlib (--with-zlib). Note: If you already have one of the Apache modules mod_gzip or mod_deflate set up to compress PHP scripts, you should disable this feature.
Search all forums /> Yes    /> No When disabled, searches will only be allowed in one forum at a time. Disable if server load is high due to excessive searching.
Additional menu items By entering HTML hyperlinks into this textbox, any number of items can be added to the navigation menu at the top of all pages. The format for adding new links is X = <a href="URL">LINK</a> where X is the position at which the link should be inserted (e.g. 0 to insert at the beginning and 2 to insert after "User list"). Separate entries with a linebreak.
Report method /> Internal    /> E-mail    /> Both Select the method for handling topic/post reports. You can choose whether topic/post reports should be handled by the internal report system, e-mailed to the addresses on the mailing list (see below) or both.
Report new registrations /> Yes    /> No If enabled, PunBB will notify users on the mailing list (see below) when a new user registers in the forums.
Mailing list A comma separated list of subscribers. The people on this list are the recipients of reports.
Use avatars /> Yes    /> No When enabled, users will be able to upload an avatar which will be displayed under their title/rank.
Upload directory The upload directory for avatars (relative to the PunBB root directory). PHP must have write permissions to this directory.
Max width The maximum allowed width of avatars in pixels (60 is recommended).
Max height The maximum allowed height of avatars in pixels (60 is recommended).
Max size The maximum allowed size of avatars in bytes (10240 is recommended).
Admin e-mail The e-mail address of the forum administrator.
Webmaster e-mail This is the address that all e-mails sent by the forum will be addressed from.
Subscriptions /> Yes    /> No Enable users to subscribe to topics (recieve e-mail when someone replies).
SMTP server address The address of an external SMTP server to send e-mails with. You can specify a custom port number if the SMTP server doesn't run on the default port 25 (example: mail.myhost.com:3580). Leave blank to use the local mail program.
SMTP username Username for SMTP server. Only enter a username if it is required by the SMTP server (most servers do not require authentication).
SMTP password Password for SMTP server. Only enter a password if it is required by the SMTP server (most servers do not require authentication).
Allow new registrations /> Yes    /> No Controls whether this forum accepts new registrations. Disable only under special circumstances.
Verify registrations /> Yes    /> No When enabled, users are e-mailed a random password when they register. They can then log in and change the password in their profile if they see fit. This feature also requires users to verify new e-mail addresses if they choose to change from the one they registered with. This is an effective way of avoiding registration abuse and making sure that all users have "correct" e-mail addresses in their profiles.
Use forum rules /> Yes    /> No When enabled, users must agree to a set of rules when registering (enter text below). The rules will always be available through a link in the navigation table at the top of every page.
Rules Here you can enter any rules or other information that the user must review and accept when registering. If you enabled rules above you have to enter something here, otherwise it will be disabled. This text will not be parsed like regular posts and thus may contain HTML.
Display announcement /> Yes    /> No Enable this to display the below message in the forums.
Announcement message This text will not be parsed like regular posts and thus may contain HTML.
Maintenance mode /> Yes    /> No When enabled, the board will only be available to administrators. This should be used if the board needs to taken down temporarily for maintenance. WARNING! Do not log out when the board is in maintenance mode. You will not be able to login again.
Maintenance message The message that will be displayed to users when the board is in maintenance mode. If left blank a default message will be used. This text will not be parsed like regular posts and thus may contain HTML.