Beehive PHP Cross Reference Discussion Forums

Source: /admin_forum_settings.php - 1157 lines - 67111 bytes - Summary - Text - Print

   1  <?php
   2  
   3  /*======================================================================
   4  Copyright Project Beehive Forum 2002
   5  
   6  This file is part of Beehive Forum.
   7  
   8  Beehive Forum is free software; you can redistribute it and/or modify
   9  it under the terms of the GNU General Public License as published by
  10  the Free Software Foundation; either version 3 of the License, or
  11  (at your option) any later version.
  12  
  13  Beehive Forum is distributed in the hope that it will be useful,
  14  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16  GNU General Public License for more details.
  17  
  18  You should have received a copy of the GNU General Public License
  19  along with Beehive; if not, write to the Free Software
  20  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  21  USA
  22  ======================================================================*/
  23  
  24  // Bootstrap
  25  require_once  'boot.php';
  26  
  27  // Required includes
  28  require_once  BH_INCLUDE_PATH . 'admin.inc.php';
  29  require_once  BH_INCLUDE_PATH . 'adsense.inc.php';
  30  require_once  BH_INCLUDE_PATH . 'constants.inc.php';
  31  require_once  BH_INCLUDE_PATH . 'emoticons.inc.php';
  32  require_once  BH_INCLUDE_PATH . 'fixhtml.inc.php';
  33  require_once  BH_INCLUDE_PATH . 'form.inc.php';
  34  require_once  BH_INCLUDE_PATH . 'format.inc.php';
  35  require_once  BH_INCLUDE_PATH . 'forum.inc.php';
  36  require_once  BH_INCLUDE_PATH . 'header.inc.php';
  37  require_once  BH_INCLUDE_PATH . 'html.inc.php';
  38  require_once  BH_INCLUDE_PATH . 'lang.inc.php';
  39  require_once  BH_INCLUDE_PATH . 'session.inc.php';
  40  require_once  BH_INCLUDE_PATH . 'styles.inc.php';
  41  require_once  BH_INCLUDE_PATH . 'timezone.inc.php';
  42  // End Required includes
  43  
  44  // Check we're logged in correctly
  45  if (!session::logged_in()) {
  46      html_guest_error();
  47  }
  48  
  49  // Check we have Admin / Moderator access
  50  if (!(session::check_perm(USER_PERM_ADMIN_TOOLS, 0))) {
  51      html_draw_error(gettext("You do not have permission to use this section."));
  52  }
  53  
  54  // Perform additional admin login.
  55  admin_check_credentials();
  56  
  57  // Get the user's post page preferences.
  58  $page_prefs = session::get_post_page_prefs();
  59  
  60  // Content Ratings
  61  $content_ratings_array = array(
  62      FORUM_RATING_GENERAL => 'General',
  63      FORUM_RATING_FOURTEEN => '14 Years',
  64      FORUM_RATING_MATURE => 'Mature',
  65      FORUM_RATING_RESTRICTED => 'Restricted'
  66  );
  67  
  68  // Array of valid Google Adsense ad user account types
  69  $adsense_user_type_array = array(
  70      ADSENSE_DISPLAY_NONE => gettext("No-one (disabled)"),
  71      ADSENSE_DISPLAY_ALL_USERS => gettext("All Users"),
  72      ADSENSE_DISPLAY_GUESTS => gettext("Guests only")
  73  );
  74  
  75  // Array of valid Google Adsense ad page types
  76  $adsense_page_type_array = array(
  77      ADSENSE_DISPLAY_TOP_OF_ALL_PAGES => gettext("Top of every page"),
  78      ADSENSE_DISPLAY_TOP_OF_MESSAGES => gettext("Top of messages"),
  79      ADSENSE_DISPLAY_BOTTOM_OF_ALL_PAGES => gettext("Bottom of every page"),
  80      ADSENSE_DISPLAY_BOTTOM_OF_MESSAGES => gettext("Bottom of messages"),
  81      ADSENSE_DISPLAY_ONCE_AFTER_NTH_MSG => gettext("Once only after the nth post"),
  82      ADSENSE_DISPLAY_AFTER_EVERY_NTH_MSG => gettext("After every nth post"),
  83      ADSENSE_DISPLAY_AFTER_RANDOM_MSG => gettext("Once after a random post")
  84  );
  85  
  86  // Array to hold error messages.
  87  $error_msg_array = array();
  88  
  89  // Get an array of available emoticon sets
  90  $available_emoticons = emoticons_get_available();
  91  
  92  // Get an array of available languages
  93  $available_langs = lang_get_available(false);
  94  
  95  // Get an array of available timezones.
  96  $available_timezones = get_available_timezones();
  97  
  98  // Get the forum settings
  99  $forum_settings = forum_get_settings();
 100  
 101  // Get the global forum settings
 102  $forum_global_settings = forum_get_global_settings();
 103  
 104  // Submit code starts here
 105  if (isset($_POST['changepermissions'])) {
 106  
 107      $redirect_uri = "admin_forum_access.php?webtag=$webtag&fid={$forum_settings['fid']}";
 108      $redirect_uri .= "&ret=" . rawurlencode(get_request_uri(true, false));
 109  
 110      header_redirect($redirect_uri);
 111      exit;
 112  
 113  } else if (isset($_POST['changepassword'])) {
 114  
 115      $redirect_uri = "admin_forum_set_passwd.php?webtag=$webtag&fid={$forum_settings['fid']}";
 116      $redirect_uri .= "&ret=" . rawurlencode(get_request_uri(true, false));
 117  
 118      header_redirect($redirect_uri);
 119      exit;
 120  
 121  } else if (isset($_POST['save'])) {
 122  
 123      $valid = true;
 124  
 125      if (isset($_POST['forum_name']) && strlen(trim($_POST['forum_name'])) > 0) {
 126          $new_forum_settings['forum_name'] = trim($_POST['forum_name']);
 127      } else {
 128          $error_msg_array[] = gettext("You must supply a forum name");
 129          $valid = false;
 130      }
 131  
 132      if (isset($_POST['forum_email']) && strlen(trim($_POST['forum_email'])) > 0) {
 133          $new_forum_settings['forum_email'] = trim($_POST['forum_email']);
 134      } else {
 135          $error_msg_array[] = gettext("You must supply a forum email address");
 136          $valid = false;
 137      }
 138  
 139      if (isset($_POST['forum_desc']) && strlen(trim($_POST['forum_desc'])) > 0) {
 140          $new_forum_settings['forum_desc'] = trim($_POST['forum_desc']);
 141      } else {
 142          $new_forum_settings['forum_desc'] = "";
 143      }
 144  
 145      if (isset($_POST['forum_content_rating']) && is_numeric($_POST['forum_content_rating'])) {
 146          $new_forum_settings['forum_content_rating'] = $_POST['forum_content_rating'];
 147      } else {
 148          $new_forum_settings['forum_content_rating'] = FORUM_RATING_GENERAL;
 149      }
 150  
 151      if (isset($_POST['forum_keywords']) && strlen(trim($_POST['forum_keywords'])) > 0) {
 152          $new_forum_settings['forum_keywords'] = trim($_POST['forum_keywords']);
 153      } else {
 154          $new_forum_settings['forum_keywords'] = "";
 155      }
 156  
 157      if (isset($_POST['default_style']) && style_exists(trim($_POST['default_style']))) {
 158  
 159          $new_forum_settings['default_style'] = trim($_POST['default_style']);
 160  
 161      } else {
 162  
 163          $error_msg_array[] = gettext("You must choose a default forum style");
 164          $valid = false;
 165      }
 166  
 167      if (isset($_POST['default_emoticons']) && strlen(trim($_POST['default_emoticons'])) > 0) {
 168  
 169          $new_forum_settings['default_emoticons'] = trim($_POST['default_emoticons']);
 170  
 171          if (!emoticons_set_exists($new_forum_settings['default_emoticons'])) {
 172              $error_msg_array[] = gettext("Unknown emoticons name");
 173              $valid = false;
 174          }
 175  
 176      } else {
 177  
 178          $error_msg_array[] = gettext("You must choose default forum emoticons");
 179          $valid = false;
 180      }
 181  
 182      if (isset($_POST['default_language']) && in_array($_POST['default_language'], $available_langs)) {
 183  
 184          $new_forum_settings['default_language'] = $_POST['default_language'];
 185  
 186      } else {
 187  
 188          $error_msg_array[] = gettext("You must choose a default forum language");
 189          $valid = false;
 190      }
 191  
 192      if (forum_get_global_setting('allow_forum_google_analytics', 'Y')) {
 193  
 194          if (isset($_POST['enable_google_analytics']) && $_POST['enable_google_analytics'] == "Y") {
 195              $new_forum_settings['enable_google_analytics'] = "Y";
 196          } else {
 197              $new_forum_settings['enable_google_analytics'] = "N";
 198          }
 199  
 200          if (isset($_POST['google_analytics_code']) && strlen(trim($_POST['google_analytics_code'])) > 0) {
 201              $new_forum_settings['google_analytics_code'] = trim($_POST['google_analytics_code']);
 202          } else {
 203              $new_forum_settings['google_analytics_code'] = "";
 204          }
 205      }
 206  
 207      if (session::check_perm(USER_PERM_ADMIN_TOOLS, 0)) {
 208  
 209          if (isset($_POST['adsense_display_users']) && in_array($_POST['adsense_display_users'], array_keys($adsense_user_type_array))) {
 210              $new_forum_settings['adsense_display_users'] = $_POST['adsense_display_users'];
 211          } else {
 212              $new_forum_settings['adsense_display_users'] = ADSENSE_DISPLAY_NONE;
 213          }
 214  
 215          if (isset($_POST['adsense_display_pages']) && in_array($_POST['adsense_display_pages'], array_keys($adsense_page_type_array))) {
 216              $new_forum_settings['adsense_display_pages'] = $_POST['adsense_display_pages'];
 217          } else {
 218              $new_forum_settings['adsense_display_pages'] = ADSENSE_DISPLAY_TOP_OF_ALL_PAGES;
 219          }
 220  
 221      } else {
 222  
 223          $new_forum_settings['adsense_display_users'] = forum_get_global_setting('adsense_display_users', 'is_numeric', ADSENSE_DISPLAY_NONE);
 224          $new_forum_settings['adsense_display_pages'] = forum_get_global_setting('adsense_display_pages', 'is_numeric', ADSENSE_DISPLAY_TOP_OF_ALL_PAGES);
 225      }
 226  
 227      if (isset($_POST['forum_timezone']) && is_numeric($_POST['forum_timezone'])) {
 228          $new_forum_settings['forum_timezone'] = $_POST['forum_timezone'];
 229      } else {
 230          $new_forum_settings['forum_timezone'] = 27;
 231      }
 232  
 233      if (isset($_POST['forum_dl_saving']) && $_POST['forum_dl_saving'] == "Y") {
 234          $new_forum_settings['forum_dl_saving'] = "Y";
 235      } else {
 236          $new_forum_settings['forum_dl_saving'] = "N";
 237      }
 238  
 239      if (isset($_POST['access_level']) && is_numeric($_POST['access_level'])) {
 240          forum_update_access($forum_settings['fid'], $_POST['access_level']);
 241      }
 242  
 243      if (isset($_POST['closed_message']) && strlen(trim($_POST['closed_message'])) > 0) {
 244          $new_forum_settings['closed_message'] = fix_html(emoticons_strip($_POST['closed_message']));
 245      } else {
 246          $new_forum_settings['closed_message'] = "";
 247      }
 248  
 249      if (isset($_POST['restricted_message']) && strlen(trim($_POST['restricted_message'])) > 0) {
 250          $new_forum_settings['restricted_message'] = fix_html(emoticons_strip($_POST['restricted_message']));
 251      } else {
 252          $new_forum_settings['restricted_message'] = "";
 253      }
 254  
 255      if (isset($_POST['password_protected_message']) && strlen(trim($_POST['password_protected_message'])) > 0) {
 256          $new_forum_settings['password_protected_message'] = fix_html(emoticons_strip($_POST['password_protected_message']));
 257      } else {
 258          $new_forum_settings['password_protected_message'] = "";
 259      }
 260  
 261      if (isset($_POST['allow_post_editing']) && $_POST['allow_post_editing'] == "Y") {
 262          $new_forum_settings['allow_post_editing'] = "Y";
 263      } else {
 264          $new_forum_settings['allow_post_editing'] = "N";
 265      }
 266  
 267      if (isset($_POST['post_edit_time']) && is_numeric($_POST['post_edit_time'])) {
 268          $new_forum_settings['post_edit_time'] = $_POST['post_edit_time'];
 269      } else {
 270          $new_forum_settings['post_edit_time'] = 0;
 271      }
 272  
 273      if (isset($_POST['post_edit_grace_period']) && is_numeric($_POST['post_edit_grace_period'])) {
 274          $new_forum_settings['post_edit_grace_period'] = $_POST['post_edit_grace_period'];
 275      } else {
 276          $new_forum_settings['post_edit_grace_period'] = 0;
 277      }
 278  
 279      if (isset($_POST['maximum_post_length']) && is_numeric($_POST['maximum_post_length'])) {
 280          $new_forum_settings['maximum_post_length'] = $_POST['maximum_post_length'];
 281      } else {
 282          $new_forum_settings['maximum_post_length'] = 6226;
 283      }
 284  
 285      if (isset($_POST['minimum_post_frequency']) && is_numeric($_POST['minimum_post_frequency'])) {
 286          $new_forum_settings['minimum_post_frequency'] = $_POST['minimum_post_frequency'];
 287      } else {
 288          $new_forum_settings['minimum_post_frequency'] = 0;
 289      }
 290  
 291      if (isset($_POST['enable_tags']) && $_POST['enable_tags'] == "Y") {
 292          $new_forum_settings['enable_tags'] = "Y";
 293      } else {
 294          $new_forum_settings['enable_tags'] = "N";
 295      }
 296  
 297      if (isset($_POST['enable_wiki_integration']) && $_POST['enable_wiki_integration'] == "Y") {
 298          $new_forum_settings['enable_wiki_integration'] = "Y";
 299      } else {
 300          $new_forum_settings['enable_wiki_integration'] = "N";
 301      }
 302  
 303      if (isset($_POST['enable_wiki_quick_links']) && $_POST['enable_wiki_quick_links'] == "Y") {
 304          $new_forum_settings['enable_wiki_quick_links'] = "Y";
 305      } else {
 306          $new_forum_settings['enable_wiki_quick_links'] = "N";
 307      }
 308  
 309      if (isset($_POST['wiki_integration_uri']) && strlen(trim($_POST['wiki_integration_uri'])) > 0) {
 310          $new_forum_settings['wiki_integration_uri'] = trim($_POST['wiki_integration_uri']);
 311      } else {
 312          $new_forum_settings['wiki_integration_uri'] = "";
 313      }
 314  
 315      if (isset($_POST['show_links']) && $_POST['show_links'] == "Y") {
 316          $new_forum_settings['show_links'] = "Y";
 317      } else {
 318          $new_forum_settings['show_links'] = "N";
 319      }
 320  
 321      if (isset($_POST['require_link_approval']) && $_POST['require_link_approval'] == "Y") {
 322          $new_forum_settings['require_link_approval'] = "Y";
 323      } else {
 324          $new_forum_settings['require_link_approval'] = "N";
 325      }
 326  
 327      if (isset($_POST['show_share_links']) && $_POST['show_share_links'] == "Y") {
 328          $new_forum_settings['show_share_links'] = "Y";
 329      } else {
 330          $new_forum_settings['show_share_links'] = "N";
 331      }
 332  
 333      if (isset($_POST['allow_polls']) && $_POST['allow_polls'] == "Y") {
 334          $new_forum_settings['allow_polls'] = "Y";
 335      } else {
 336          $new_forum_settings['allow_polls'] = "N";
 337      }
 338  
 339      if (isset($_POST['poll_allow_guests']) && $_POST['poll_allow_guests'] == "Y") {
 340          $new_forum_settings['poll_allow_guests'] = "Y";
 341      } else {
 342          $new_forum_settings['poll_allow_guests'] = "N";
 343      }
 344  
 345      if (isset($_POST['show_stats']) && $_POST['show_stats'] == "Y") {
 346          $new_forum_settings['show_stats'] = "Y";
 347      } else {
 348          $new_forum_settings['show_stats'] = "N";
 349      }
 350  
 351      if (isset($_POST['allow_search_spidering']) && $_POST['allow_search_spidering'] == "Y") {
 352          $new_forum_settings['allow_search_spidering'] = "Y";
 353      } else {
 354          $new_forum_settings['allow_search_spidering'] = "N";
 355      }
 356  
 357      if (isset($_POST['searchbots_show_recent']) && $_POST['searchbots_show_recent'] == "Y") {
 358          $new_forum_settings['searchbots_show_recent'] = "Y";
 359      } else {
 360          $new_forum_settings['searchbots_show_recent'] = "N";
 361      }
 362  
 363      if (isset($_POST['searchbots_show_active']) && $_POST['searchbots_show_active'] == "Y") {
 364          $new_forum_settings['searchbots_show_active'] = "Y";
 365      } else {
 366          $new_forum_settings['searchbots_show_active'] = "N";
 367      }
 368  
 369      if (isset($_POST['guest_account_enabled']) && $_POST['guest_account_enabled'] == "Y") {
 370          $new_forum_settings['guest_account_enabled'] = "Y";
 371      } else {
 372          $new_forum_settings['guest_account_enabled'] = "N";
 373      }
 374  
 375      if (isset($_POST['guest_show_recent']) && $_POST['guest_show_recent'] == "Y") {
 376          $new_forum_settings['guest_show_recent'] = "Y";
 377      } else {
 378          $new_forum_settings['guest_show_recent'] = "N";
 379      }
 380  
 381      if ($valid) {
 382  
 383          if (forum_save_settings($new_forum_settings)) {
 384  
 385              admin_add_log_entry(EDIT_FORUM_SETTINGS, array($new_forum_settings['forum_name']));
 386              header_redirect("admin_forum_settings.php?webtag=$webtag&updated=true", gettext("Forum settings successfully updated"));
 387  
 388          } else {
 389  
 390              $valid = false;
 391              $error_msg_array[] = gettext("Failed to update forum settings. Please try again later.");
 392          }
 393      }
 394  }
 395  
 396  // Start Output Here
 397  html_draw_top(sprintf('title=%s', gettext("Admin - Forum Settings")), 'class=window_title', "js/emoticons.js", 'ckeditor/ckeditor.js', 'main_css=admin.css');
 398  
 399  echo "<h1>", gettext("Admin"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", gettext("Forum Settings"), "</h1>\n";
 400  
 401  if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
 402  
 403      html_display_error_array($error_msg_array, '700', 'center');
 404  
 405  } else if (isset($_GET['updated'])) {
 406  
 407      html_display_success_msg(gettext("Preferences were successfully updated."), '700', 'center');
 408  }
 409  
 410  echo "<br />\n";
 411  echo "<div align=\"center\">\n";
 412  echo "<form accept-charset=\"utf-8\" name=\"prefsform\" action=\"admin_forum_settings.php\" method=\"post\" target=\"_self\">\n";
 413  echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
 414  echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
 415  echo "    <tr>\n";
 416  echo "      <td align=\"left\">\n";
 417  echo "        <table class=\"box\" width=\"100%\">\n";
 418  echo "          <tr>\n";
 419  echo "            <td align=\"left\" class=\"posthead\">\n";
 420  echo "              <table class=\"posthead\" width=\"100%\">\n";
 421  echo "                <tr>\n";
 422  echo "                  <td align=\"left\" class=\"subhead\" colspan=\"2\">", gettext("Main Settings"), "</td>\n";
 423  echo "                </tr>\n";
 424  echo "                <tr>\n";
 425  echo "                  <td align=\"center\">\n";
 426  echo "                    <table class=\"posthead\" width=\"95%\">\n";
 427  echo "                      <tr>\n";
 428  echo "                        <td align=\"left\" width=\"220\">", gettext("Forum Name"), ":</td>\n";
 429  echo "                        <td align=\"left\">", form_input_text("forum_name", (isset($forum_settings['forum_name']) ? htmlentities_array($forum_settings['forum_name']) : 'A Beehive Forum'), 42, 255), "&nbsp;</td>\n";
 430  echo "                      </tr>\n";
 431  echo "                      <tr>\n";
 432  echo "                        <td align=\"left\" width=\"220\">", gettext("Forum Email"), ":</td>\n";
 433  echo "                        <td align=\"left\">", form_input_text("forum_email", (isset($forum_settings['forum_email']) ? htmlentities_array($forum_settings['forum_email']) : 'admin@beehiveforum.co.uk'), 42, 80), "&nbsp;</td>\n";
 434  echo "                      </tr>\n";
 435  echo "                      <tr>\n";
 436  echo "                        <td align=\"left\" width=\"220\">", gettext("Forum Description"), ":</td>\n";
 437  echo "                        <td align=\"left\">", form_input_text("forum_desc", (isset($forum_settings['forum_desc']) ? htmlentities_array($forum_settings['forum_desc']) : ''), 42, 80), "&nbsp;</td>\n";
 438  echo "                      </tr>\n";
 439  echo "                      <tr>\n";
 440  echo "                        <td align=\"left\" width=\"220\">", gettext("Forum Keywords"), ":</td>\n";
 441  echo "                        <td align=\"left\">", form_input_text("forum_keywords", (isset($forum_settings['forum_keywords']) ? htmlentities_array($forum_settings['forum_keywords']) : ''), 42, 80), "&nbsp;</td>\n";
 442  echo "                      </tr>\n";
 443  echo "                      <tr>\n";
 444  echo "                        <td align=\"left\" width=\"220\">", gettext("Forum Content Rating"), ":</td>\n";
 445  echo "                        <td align=\"left\">", form_dropdown_array("forum_content_rating", htmlentities_array($content_ratings_array), (isset($forum_settings['forum_content_rating']) ? htmlentities_array($forum_settings['forum_content_rating']) : 0)), "</td>\n";
 446  echo "                      </tr>\n";
 447  echo "                      <tr>\n";
 448  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 449  echo "                      </tr>\n";
 450  
 451  if (($available_styles = styles_get_available()) !== false) {
 452  
 453      echo "                      <tr>\n";
 454      echo "                        <td align=\"left\" width=\"220\">", gettext("Default Style"), ":</td>\n";
 455      echo "                        <td align=\"left\">", form_dropdown_array("default_style", htmlentities_array($available_styles), (isset($forum_settings['default_style']) && style_exists($forum_settings['default_style']) ? htmlentities_array($forum_settings['default_style']) : 'default')), "</td>\n";
 456      echo "                      </tr>\n";
 457  }
 458  
 459  echo "                      <tr>\n";
 460  echo "                        <td align=\"left\" width=\"220\">", gettext("Default Emoticons"), " [<a href=\"display_emoticons.php?webtag=$webtag\" target=\"_blank\" class=\"popup 500x400\">", gettext("Preview"), "</a>]:</td>\n";
 461  echo "                        <td align=\"left\">", form_dropdown_array("default_emoticons", htmlentities_array($available_emoticons), (isset($forum_settings['default_emoticons']) && in_array($forum_settings['default_emoticons'], array_keys($available_emoticons)) ? $forum_settings['default_emoticons'] : 'none')), "</td>\n";
 462  echo "                      </tr>\n";
 463  echo "                      <tr>\n";
 464  echo "                        <td align=\"left\" width=\"220\">", gettext("Default Language"), ":</td>\n";
 465  echo "                        <td align=\"left\">", form_dropdown_array("default_language", htmlentities_array($available_langs), (isset($forum_settings['default_language']) && in_array($forum_settings['default_language'], $available_langs) ? $forum_settings['default_language'] : 'en')), "</td>\n";
 466  echo "                      </tr>\n";
 467  echo "                      <tr>\n";
 468  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 469  echo "                      </tr>\n";
 470  echo "                    </table>\n";
 471  echo "                  </td>\n";
 472  echo "                </tr>\n";
 473  echo "              </table>\n";
 474  echo "            </td>\n";
 475  echo "          </tr>\n";
 476  echo "        </table>\n";
 477  echo "      </td>\n";
 478  echo "    </tr>\n";
 479  echo "  </table>\n";
 480  echo "  <br />\n";
 481  echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
 482  echo "    <tr>\n";
 483  echo "      <td align=\"left\">\n";
 484  echo "        <table class=\"box\" width=\"100%\">\n";
 485  echo "          <tr>\n";
 486  echo "            <td align=\"left\" class=\"posthead\">\n";
 487  echo "              <table class=\"posthead\" width=\"100%\">\n";
 488  echo "                <tr>\n";
 489  echo "                  <td align=\"left\" colspan=\"2\" class=\"subhead\">", gettext("Time Zone"), "</td>\n";
 490  echo "                </tr>\n";
 491  echo "              </table>\n";
 492  echo "              <table class=\"posthead\" width=\"100%\">\n";
 493  echo "                <tr>\n";
 494  echo "                  <td align=\"center\">\n";
 495  echo "                    <table class=\"posthead\" width=\"95%\">\n";
 496  echo "                      <tr>\n";
 497  echo "                        <td align=\"left\" style=\"white-space: nowrap\">", gettext("Time zone"), ":</td>\n";
 498  echo "                        <td align=\"left\">", form_dropdown_array("forum_timezone", htmlentities_array($available_timezones), (isset($forum_settings['forum_timezone']) && is_numeric($forum_settings['forum_timezone']) ? $forum_settings['forum_timezone'] : 27), null, 'timezone_dropdown'), "</td>\n";
 499  echo "                      </tr>\n";
 500  echo "                      <tr>\n";
 501  echo "                        <td align=\"left\">&nbsp;</td>\n";
 502  echo "                        <td align=\"left\">", form_checkbox("forum_dl_saving", "Y", gettext("Adjust for daylight saving"), (isset($forum_settings['forum_dl_saving']) && $forum_settings['forum_dl_saving'] == 'Y') ? true : false), "</td>\n";
 503  echo "                      </tr>\n";
 504  echo "                      <tr>\n";
 505  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 506  echo "                      </tr>\n";
 507  echo "                    </table>\n";
 508  echo "                  </td>\n";
 509  echo "                </tr>\n";
 510  echo "              </table>\n";
 511  echo "            </td>\n";
 512  echo "          </tr>\n";
 513  echo "        </table>\n";
 514  echo "      </td>\n";
 515  echo "    </tr>\n";
 516  echo "  </table>\n";
 517  echo "  <br />\n";
 518  
 519  if (!isset($forum_settings['access_level']) || $forum_settings['access_level'] > FORUM_DISABLED) {
 520  
 521      echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
 522      echo "    <tr>\n";
 523      echo "      <td align=\"left\">\n";
 524      echo "        <table class=\"box\" width=\"100%\">\n";
 525      echo "          <tr>\n";
 526      echo "            <td align=\"left\" class=\"posthead\">\n";
 527      echo "              <table class=\"posthead\" width=\"100%\">\n";
 528      echo "                <tr>\n";
 529      echo "                  <td align=\"left\" class=\"subhead\" colspan=\"2\">", gettext("Forum Access Settings"), "</td>\n";
 530      echo "                </tr>\n";
 531      echo "                <tr>\n";
 532      echo "                  <td align=\"center\">\n";
 533      echo "                    <table class=\"posthead\" width=\"95%\">\n";
 534      echo "                      <tr>\n";
 535      echo "                        <td align=\"left\" width=\"220\">", gettext("Forum Access Status"), ":</td>\n";
 536      echo "                        <td align=\"left\">", form_radio("access_level", FORUM_UNRESTRICTED, gettext("Open"), (isset($forum_settings['access_level']) && $forum_settings['access_level'] == FORUM_UNRESTRICTED ? true : false)), "</td>\n";
 537      echo "                      </tr>\n";
 538      echo "                      <tr>\n";
 539      echo "                        <td align=\"left\" width=\"220\">&nbsp;</td>\n";
 540      echo "                        <td align=\"left\">", form_radio("access_level", FORUM_CLOSED, gettext("Closed"), (isset($forum_settings['access_level']) && $forum_settings['access_level'] == FORUM_CLOSED ? true : false)), "</td>\n";
 541      echo "                      </tr>\n";
 542      echo "                      <tr>\n";
 543      echo "                        <td align=\"left\" width=\"220\">&nbsp;</td>\n";
 544      echo "                        <td align=\"left\">", form_radio("access_level", FORUM_RESTRICTED, gettext("Restricted"), (isset($forum_settings['access_level']) && $forum_settings['access_level'] == FORUM_RESTRICTED ? true : false)), "</td>\n";
 545      echo "                      </tr>\n";
 546      echo "                      <tr>\n";
 547      echo "                        <td align=\"left\" width=\"220\">&nbsp;</td>\n";
 548      echo "                        <td align=\"left\">", form_radio("access_level", FORUM_PASSWD_PROTECTED, gettext("Password Protected"), (isset($forum_settings['access_level']) && $forum_settings['access_level'] == FORUM_PASSWD_PROTECTED ? true : false)), "</td>\n";
 549      echo "                      </tr>\n";
 550  
 551      if ($forum_settings['access_level'] == FORUM_RESTRICTED) {
 552  
 553          echo "                      <tr>\n";
 554          echo "                        <td align=\"left\">&nbsp;</td>\n";
 555          echo "                        <td align=\"left\">&nbsp;</td>\n";
 556          echo "                      </tr>\n";
 557          echo "                      <tr>\n";
 558          echo "                        <td align=\"center\" colspan=\"2\">", form_submit("changepermissions", gettext("Change Permissions")), "</td>\n";
 559          echo "                      </tr>\n";
 560          echo "                      <tr>\n";
 561          echo "                        <td align=\"left\">&nbsp;</td>\n";
 562          echo "                        <td align=\"left\">&nbsp;</td>\n";
 563          echo "                      </tr>\n";
 564  
 565      } else if ($forum_settings['access_level'] == FORUM_PASSWD_PROTECTED) {
 566  
 567          echo "                      <tr>\n";
 568          echo "                        <td align=\"left\">&nbsp;</td>\n";
 569          echo "                        <td align=\"left\">&nbsp;</td>\n";
 570          echo "                      </tr>\n";
 571  
 572          if (!forum_get_password($forum_settings['fid'])) {
 573  
 574              echo "                      <tr>\n";
 575              echo "                        <td align=\"center\" colspan=\"2\">\n";
 576  
 577              html_display_warning_msg(gettext("You have not set a forum password. If you do not set a password the password protection functionality will be automatically disabled!"), '95%', 'center');
 578  
 579              echo "                        </td>\n";
 580              echo "                      </tr>\n";
 581          }
 582  
 583          echo "                      <tr>\n";
 584          echo "                        <td align=\"center\" colspan=\"2\">", form_submit("changepassword", gettext("Change Password")), "</td>\n";
 585          echo "                      </tr>\n";
 586          echo "                      <tr>\n";
 587          echo "                        <td align=\"left\">&nbsp;</td>\n";
 588          echo "                        <td align=\"left\">&nbsp;</td>\n";
 589          echo "                      </tr>\n";
 590      }
 591  
 592      echo "                      <tr>\n";
 593      echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 594      echo "                      </tr>\n";
 595      echo "                      <tr>\n";
 596      echo "                        <td align=\"left\" colspan=\"2\">\n";
 597      echo "                          <p class=\"smalltext\">", gettext("<b>Forum Access Status</b> controls how users may access your forum."), "</p>\n";
 598      echo "                          <p class=\"smalltext\">", gettext("<b>Open</b> will allow all users and guests access to your forum without restriction."), "</p>\n";
 599      echo "                          <p class=\"smalltext\">", gettext("<b>Closed</b> prevents access for all users, with the exception of the admin who may still access the admin panel."), "</p>\n";
 600      echo "                          <p class=\"smalltext\">", gettext("<b>Restricted</b> allows to set a list of users who are allowed access to your forum."), "</p>\n";
 601      echo "                          <p class=\"smalltext\">", gettext("<b>Password Protected</b> allows you to set a password to give out to users so they can access your forum."), "</p>\n";
 602  
 603      html_display_warning_msg(gettext("When setting Restricted or Password Protected mode you will need to save your changes before you can change the user access privileges or password."), '95%', 'center');
 604  
 605      echo "                        </td>\n";
 606      echo "                      </tr>\n";
 607      echo "                    </table>\n";
 608      echo "                  </td>\n";
 609      echo "                </tr>\n";
 610      echo "              </table>\n";
 611      echo "            </td>\n";
 612      echo "          </tr>\n";
 613      echo "        </table>\n";
 614      echo "      </td>\n";
 615      echo "    </tr>\n";
 616      echo "  </table>\n";
 617      echo "  <br />\n";
 618  }
 619  
 620  if (!isset($forum_settings['closed_message'])) $forum_settings['closed_message'] = '';
 621  if (!isset($forum_settings['restricted_message'])) $forum_settings['restricted_message'] = '';
 622  if (!isset($forum_settings['password_protected_message'])) $forum_settings['password_protected_message'] = '';
 623  
 624  echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
 625  echo "    <tr>\n";
 626  echo "      <td align=\"left\">\n";
 627  echo "        <table class=\"box\" width=\"100%\">\n";
 628  echo "          <tr>\n";
 629  echo "            <td align=\"left\" class=\"posthead\">\n";
 630  echo "              <table class=\"posthead\" width=\"100%\">\n";
 631  echo "                <tr>\n";
 632  echo "                  <td align=\"left\" class=\"subhead\">", gettext("Forum Status Messages"), "</td>\n";
 633  echo "                </tr>\n";
 634  echo "                <tr>\n";
 635  echo "                  <td align=\"center\">\n";
 636  echo "                    <table class=\"posthead\" width=\"95%\">\n";
 637  echo "                      <tr>\n";
 638  echo "                        <td align=\"left\">", gettext("Forum Closed Message"), ":</td>\n";
 639  echo "                      </tr>\n";
 640  echo "                      <tr>\n";
 641  echo "                        <td align=\"left\">", form_textarea("closed_message", htmlentities_array($forum_settings['closed_message']), 7, 80, null, 'admin_tools_textarea editor'), "</td>\n";
 642  echo "                      </tr>\n";
 643  echo "                      <tr>\n";
 644  echo "                        <td align=\"left\" width=\"220\">", gettext("Forum Restricted Message"), ":</td>\n";
 645  echo "                      </tr>\n";
 646  echo "                      <tr>\n";
 647  echo "                        <td align=\"left\">", form_textarea("restricted_message", htmlentities_array($forum_settings['restricted_message']), 7, 80, null, 'admin_tools_textarea editor'), "</td>\n";
 648  echo "                      </tr>\n";
 649  echo "                      <tr>\n";
 650  echo "                        <td align=\"left\" width=\"220\">", gettext("Forum Password Protected Message"), ":</td>\n";
 651  echo "                      </tr>\n";
 652  echo "                      <tr>\n";
 653  echo "                        <td align=\"left\">", form_textarea("password_protected_message", $forum_settings['password_protected_message'], 7, 80, null, 'admin_tools_textarea editor'), "</td>\n";
 654  echo "                      </tr>\n";
 655  echo "                      <tr>\n";
 656  echo "                        <td align=\"left\">&nbsp;</td>\n";
 657  echo "                      </tr>\n";
 658  echo "                      <tr>\n";
 659  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 660  echo "                      </tr>\n";
 661  echo "                      <tr>\n";
 662  echo "                        <td align=\"left\" colspan=\"2\">\n";
 663  echo "                          <p class=\"smalltext\">", gettext("Use <b>Closed Message</b>, <b>Restricted Message</b> and <b>Password Protected Message</b> to customise the message displayed when users access your forum in the various states."), "</p>\n";
 664  echo "                          <p class=\"smalltext\">", gettext("You can use HTML in your messages. Hyperlinks and email addresses will also be automatically converted to links. To use the default Beehive Forum messages clear the fields."), "</p>\n";
 665  echo "                        </td>\n";
 666  echo "                      </tr>\n";
 667  echo "                      <tr>\n";
 668  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 669  echo "                      </tr>\n";
 670  echo "                    </table>\n";
 671  echo "                  </td>\n";
 672  echo "                </tr>\n";
 673  echo "              </table>\n";
 674  echo "            </td>\n";
 675  echo "          </tr>\n";
 676  echo "        </table>\n";
 677  echo "      </td>\n";
 678  echo "    </tr>\n";
 679  echo "  </table>\n";
 680  echo "  <br />\n";
 681  echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
 682  echo "    <tr>\n";
 683  echo "      <td align=\"left\">\n";
 684  echo "        <table class=\"box\" width=\"100%\">\n";
 685  echo "          <tr>\n";
 686  echo "            <td align=\"left\" class=\"posthead\">\n";
 687  echo "              <table class=\"posthead\" width=\"100%\">\n";
 688  echo "                <tr>\n";
 689  echo "                  <td align=\"left\" class=\"subhead\" colspan=\"3\">", gettext("Post Options"), "</td>\n";
 690  echo "                </tr>\n";
 691  echo "                <tr>\n";
 692  echo "                  <td align=\"center\">\n";
 693  echo "                    <table class=\"posthead\" width=\"95%\">\n";
 694  echo "                      <tr>\n";
 695  echo "                        <td align=\"left\" width=\"220\">", gettext("Enable Post Tagging"), ":</td>\n";
 696  echo "                        <td align=\"left\">", form_radio("enable_tags", "Y", gettext("Yes"), (isset($forum_settings['enable_tags']) && $forum_settings['enable_tags'] == "Y")), "&nbsp;", form_radio("enable_tags", "N", gettext("No"), (isset($forum_settings['enable_tags']) && $forum_settings['enable_tags'] == "N") || !isset($forum_settings['enable_tags'])), "</td>\n";
 697  echo "                      </tr>\n";
 698  echo "                      <tr>\n";
 699  echo "                        <td align=\"left\" width=\"220\">", gettext("Allow Post Editing"), ":</td>\n";
 700  echo "                        <td align=\"left\">", form_radio("allow_post_editing", "Y", gettext("Yes"), (isset($forum_settings['allow_post_editing']) && $forum_settings['allow_post_editing'] == "Y")), "&nbsp;", form_radio("allow_post_editing", "N", gettext("No"), (isset($forum_settings['allow_post_editing']) && $forum_settings['allow_post_editing'] == "N") || !isset($forum_settings['allow_post_editing'])), "</td>\n";
 701  echo "                      </tr>\n";
 702  echo "                      <tr>\n";
 703  echo "                        <td align=\"left\" width=\"220\">", gettext("Post Edit Timeout"), ":</td>\n";
 704  echo "                        <td align=\"left\">", form_input_text("post_edit_time", (isset($forum_settings['post_edit_time']) && is_numeric($forum_settings['post_edit_time']) ? htmlentities_array($forum_settings['post_edit_time']) : '0'), 20, 32), "</td>\n";
 705  echo "                      </tr>\n";
 706  echo "                      <tr>\n";
 707  echo "                        <td align=\"left\" width=\"220\">", gettext("Post Edit Grace Period"), ":</td>\n";
 708  echo "                        <td align=\"left\">", form_input_text("post_edit_grace_period", (isset($forum_settings['post_edit_grace_period']) && is_numeric($forum_settings['post_edit_grace_period']) ? htmlentities_array($forum_settings['post_edit_grace_period']) : '0'), 20, 32), "</td>\n";
 709  echo "                      </tr>\n";
 710  echo "                      <tr>\n";
 711  echo "                        <td align=\"left\" width=\"220\">", gettext("Maximum Post Length"), ":</td>\n";
 712  echo "                        <td align=\"left\">", form_input_text("maximum_post_length", (isset($forum_settings['maximum_post_length']) && is_numeric($forum_settings['maximum_post_length']) ? htmlentities_array($forum_settings['maximum_post_length']) : '6226'), 20, 32), "&nbsp;</td>\n";
 713  echo "                      </tr>\n";
 714  echo "                      <tr>\n";
 715  echo "                        <td align=\"left\" width=\"220\">", gettext("Post Frequency"), ":</td>\n";
 716  echo "                        <td align=\"left\">", form_input_text("minimum_post_frequency", (isset($forum_settings['minimum_post_frequency']) && is_numeric($forum_settings['minimum_post_frequency']) ? htmlentities_array($forum_settings['minimum_post_frequency']) : '0'), 20, 32), "&nbsp;</td>\n";
 717  echo "                      </tr>\n";
 718  echo "                      <tr>\n";
 719  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 720  echo "                      </tr>\n";
 721  echo "                      <tr>\n";
 722  echo "                        <td align=\"left\" colspan=\"2\">\n";
 723  echo "                          <p class=\"smalltext\">", gettext("<b>Enable Post Tagging</b> allows users to tag posts by add alpha-numeric tags to posts prefixed with a hash(#) character. These tags can be clicked to find all similarly tagged posts quickly and easily."), "</p>\n";
 724  echo "                          <p class=\"smalltext\">", gettext("<b>Post Edit Timeout</b> is the time in minutes after posting that a user can edit their post. If set to 0 there is no limit."), "</p>\n";
 725  echo "                          <p class=\"smalltext\">", gettext("<b>Post Edit Grace Period</b> allows you to define a period in minutes where users may edit posts without the 'EDITED BY' text appearing on their posts. If set to 0 the 'EDITED BY' text will always appear."), "</p>\n";
 726  echo "                          <p class=\"smalltext\">", gettext("<b>Maximum Post Length</b> is the maximum number of characters that will be displayed in a post. If a post is longer than the number of characters defined here it will be cut short and a link added to the bottom to allow users to read the whole post on a separate page."), "</p>\n";
 727  echo "                          <p class=\"smalltext\">", gettext("<b>Post Frequency</b> is the minimum time a user must wait before they can post again. This setting also affects the creation of polls. Set to 0 to disable the restriction."), "</p>\n";
 728  echo "                        </td>\n";
 729  echo "                      </tr>\n";
 730  echo "                      <tr>\n";
 731  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 732  echo "                      </tr>\n";
 733  echo "                    </table>\n";
 734  echo "                  </td>\n";
 735  echo "                </tr>\n";
 736  echo "              </table>\n";
 737  echo "            </td>\n";
 738  echo "          </tr>\n";
 739  echo "        </table>\n";
 740  echo "      </td>\n";
 741  echo "    </tr>\n";
 742  echo "  </table>\n";
 743  echo "  <br />\n";
 744  echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
 745  echo "    <tr>\n";
 746  echo "      <td align=\"left\">\n";
 747  echo "        <table class=\"box\" width=\"100%\">\n";
 748  echo "          <tr>\n";
 749  echo "            <td align=\"left\" class=\"posthead\">\n";
 750  echo "              <table class=\"posthead\" width=\"100%\">\n";
 751  echo "                <tr>\n";
 752  echo "                  <td align=\"left\" class=\"subhead\" colspan=\"3\">", gettext("WikiWiki Integration"), "</td>\n";
 753  echo "                </tr>\n";
 754  echo "                <tr>\n";
 755  echo "                  <td align=\"center\">\n";
 756  echo "                    <table class=\"posthead\" width=\"95%\">\n";
 757  echo "                      <tr>\n";
 758  echo "                        <td align=\"left\" width=\"220\">", gettext("Enable WikiWiki Integration"), ":</td>\n";
 759  echo "                        <td align=\"left\">", form_radio("enable_wiki_integration", "Y", gettext("Yes"), (isset($forum_settings['enable_wiki_integration']) && $forum_settings['enable_wiki_integration'] == "Y")), "&nbsp;", form_radio("enable_wiki_integration", "N", gettext("No"), (isset($forum_settings['enable_wiki_integration']) && $forum_settings['enable_wiki_integration'] == "N") || !isset($forum_settings['enable_wiki_integration'])), "</td>\n";
 760  echo "                      </tr>\n";
 761  echo "                      <tr>\n";
 762  echo "                        <td align=\"left\" width=\"220\">", gettext("Enable WikiWiki Quick Links"), ":</td>\n";
 763  echo "                        <td align=\"left\">", form_radio("enable_wiki_quick_links", "Y", gettext("Yes"), (isset($forum_settings['enable_wiki_quick_links']) && $forum_settings['enable_wiki_quick_links'] == "Y")), "&nbsp;", form_radio("enable_wiki_quick_links", "N", gettext("No"), (isset($forum_settings['enable_wiki_quick_links']) && $forum_settings['enable_wiki_quick_links'] == "N") || !isset($forum_settings['enable_wiki_quick_links'])), "</td>\n";
 764  echo "                      </tr>\n";
 765  echo "                      <tr>\n";
 766  echo "                        <td align=\"left\" width=\"220\">", gettext("WikiWiki Location"), ":</td>\n";
 767  echo "                        <td align=\"left\">", form_input_text("wiki_integration_uri", (isset($forum_settings['wiki_integration_uri']) ? htmlentities_array($forum_settings['wiki_integration_uri']) : 'http://en.wikipedia.org/wiki/[WikiWord]'), 42, 255), "</td>\n";
 768  echo "                      </tr>\n";
 769  echo "                      <tr>\n";
 770  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 771  echo "                      </tr>\n";
 772  echo "                      <tr>\n";
 773  echo "                        <td align=\"left\" colspan=\"2\">\n";
 774  echo "                          <p class=\"smalltext\">", gettext("<b>Enable WikiWiki Integration</b> provides WikiWord support in your Forum posts. A WikiWord is made up of two or more concatenated words with uppercase letters (often referred to as CamelCase). If you write a word this way it will automatically be changed into a hyperlink pointing to your chosen WikiWiki."), "</p>\n";
 775  echo "                          <p class=\"smalltext\">", gettext("<b>Enable WikiWiki Quick Links</b> enables the use of msg:1.1 and User:Logon style extended WikiLinks which create hyperlinks to the specified message / user profile of the specified user."), "</p>\n";
 776  echo "                          <p class=\"smalltext\">", gettext("<b>WikiWiki Location</b> is used to specify the URI of your WikiWiki. When entering the URI use <i>[WikiWord]</i> to indicate where in the URI the WikiWord should appear, i.e.: <i>http://en.wikipedia.org/wiki/[WikiWord]</i> would link your WikiWords to <a href=\"http://en.wikipedia.org/wiki/\" target=\"_blank\">Wikipedia.org</a>"), "</p>\n";
 777  echo "                        </td>\n";
 778  echo "                      </tr>\n";
 779  echo "                      <tr>\n";
 780  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 781  echo "                      </tr>\n";
 782  echo "                    </table>\n";
 783  echo "                  </td>\n";
 784  echo "                </tr>\n";
 785  echo "              </table>\n";
 786  echo "            </td>\n";
 787  echo "          </tr>\n";
 788  echo "        </table>\n";
 789  echo "      </td>\n";
 790  echo "    </tr>\n";
 791  echo "  </table>\n";
 792  echo "  <br />\n";
 793  
 794  if (forum_get_global_setting('allow_forum_google_analytics', 'Y')) {
 795  
 796      echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
 797      echo "    <tr>\n";
 798      echo "      <td align=\"left\">\n";
 799      echo "        <table class=\"box\" width=\"100%\">\n";
 800      echo "          <tr>\n";
 801      echo "            <td align=\"left\" class=\"posthead\">\n";
 802      echo "              <table class=\"posthead\" width=\"100%\">\n";
 803      echo "                <tr>\n";
 804      echo "                  <td align=\"left\" colspan=\"2\" class=\"subhead\">", gettext("Google Analytics"), "</td>\n";
 805      echo "                </tr>\n";
 806      echo "              </table>\n";
 807      echo "              <table class=\"posthead\" width=\"100%\">\n";
 808      echo "                <tr>\n";
 809      echo "                  <td align=\"center\">\n";
 810      echo "                    <table class=\"posthead\" width=\"95%\">\n";
 811      echo "                      <tr>\n";
 812      echo "                        <td align=\"left\" width=\"220\">", gettext("Enable Google Analytics"), ":</td>\n";
 813      echo "                        <td align=\"left\">", form_radio("enable_google_analytics", "Y", gettext("Yes"), (isset($forum_settings['enable_google_analytics']) && $forum_settings['enable_google_analytics'] == "Y")), "&nbsp;", form_radio("enable_google_analytics", "N", gettext("No"), (isset($forum_settings['enable_google_analytics']) && $forum_settings['enable_google_analytics'] == "N") || !isset($forum_settings['enable_google_analytics'])), "</td>\n";
 814      echo "                      </tr>\n";
 815      echo "                      <tr>\n";
 816      echo "                        <td align=\"left\" style=\"white-space: nowrap\">", gettext("Google Analytics Account ID"), ":</td>\n";
 817      echo "                        <td align=\"left\">", form_input_text("google_analytics_code", (isset($forum_settings['google_analytics_code']) ? htmlentities_array($forum_settings['google_analytics_code']) : ''), 31, 20), "&nbsp;</td>\n";
 818      echo "                      </tr>\n";
 819      echo "                      <tr>\n";
 820      echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 821      echo "                      </tr>\n";
 822      echo "                      <tr>\n";
 823      echo "                        <td align=\"left\" colspan=\"2\">\n";
 824      echo "                          <p class=\"smalltext\">", gettext("Enter your <b>Google Analytics Account ID</b> here to enable Google Analytic tracking of your forum. Google Analytics will track visitors to your site and record how long they stay and which pages they visit. By visiting the Google Analytics site you can see an overview of how your forum is used."), "</p>\n";
 825      echo "                        </td>\n";
 826      echo "                      </tr>\n";
 827      echo "                      <tr>\n";
 828      echo "                        <td align=\"center\" colspan=\"2\">\n";
 829  
 830      html_display_warning_msg(gettext("If you do not have a Google Analytics Account you will need to sign up for one by clicking <a href=\"https://www.google.com/analytics/\" target=\"_blank\">here</a>."), '95%', 'center');
 831  
 832      echo "                        </td>\n";
 833      echo "                      </tr>\n";
 834      echo "                    </table>\n";
 835      echo "                  </td>\n";
 836      echo "                </tr>\n";
 837      echo "              </table>\n";
 838      echo "            </td>\n";
 839      echo "          </tr>\n";
 840      echo "        </table>\n";
 841      echo "      </td>\n";
 842      echo "    </tr>\n";
 843      echo "  </table>\n";
 844      echo "  <br />\n";
 845  }
 846  
 847  if (session::check_perm(USER_PERM_ADMIN_TOOLS, 0)) {
 848  
 849      echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
 850      echo "    <tr>\n";
 851      echo "      <td align=\"left\">\n";
 852      echo "        <table class=\"box\" width=\"100%\">\n";
 853      echo "          <tr>\n";
 854      echo "            <td align=\"left\" class=\"posthead\">\n";
 855      echo "              <table class=\"posthead\" width=\"100%\">\n";
 856      echo "                <tr>\n";
 857      echo "                  <td align=\"left\" colspan=\"2\" class=\"subhead\">", gettext("Google AdSense"), "</td>\n";
 858      echo "                </tr>\n";
 859      echo "              </table>\n";
 860      echo "              <table class=\"posthead\" width=\"100%\">\n";
 861      echo "                <tr>\n";
 862      echo "                  <td align=\"center\">\n";
 863      echo "                    <table class=\"posthead\" width=\"95%\">\n";
 864      echo "                      <tr>\n";
 865      echo "                        <td align=\"left\" width=\"220\">", gettext("Display AdSense Ads for"), ":</td>\n";
 866      echo "                        <td align=\"left\">", form_dropdown_array('adsense_display_users', $adsense_user_type_array, (isset($forum_global_settings['adsense_display_users']) && in_array($forum_global_settings['adsense_display_users'], array_keys($adsense_user_type_array)) ? $forum_global_settings['adsense_display_users'] : ADSENSE_DISPLAY_NONE)), "</td>\n";
 867      echo "                      </tr>\n";
 868      echo "                      <tr>\n";
 869      echo "                        <td align=\"left\" style=\"white-space: nowrap\">", gettext("Display AdSense Ads on"), ":</td>\n";
 870      echo "                        <td align=\"left\">", form_dropdown_array('adsense_display_pages', $adsense_page_type_array, (isset($forum_global_settings['adsense_display_pages']) && in_array($forum_global_settings['adsense_display_pages'], array_keys($adsense_page_type_array)) ? $forum_global_settings['adsense_display_pages'] : ADSENSE_DISPLAY_TOP_OF_ALL_PAGES)), "</td>\n";
 871      echo "                      </tr>\n";
 872      echo "                      <tr>\n";
 873      echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 874      echo "                      </tr>\n";
 875      echo "                      <tr>\n";
 876      echo "                        <td align=\"center\" colspan=\"2\">\n";
 877  
 878      html_display_warning_msg(gettext("To change Google AdSense account details and other settings please see Global Forum Settings"), '95%', 'center');
 879  
 880      echo "                        </td>\n";
 881      echo "                      </tr>\n";
 882      echo "                    </table>\n";
 883      echo "                  </td>\n";
 884      echo "                </tr>\n";
 885      echo "              </table>\n";
 886      echo "            </td>\n";
 887      echo "          </tr>\n";
 888      echo "        </table>\n";
 889      echo "      </td>\n";
 890      echo "    </tr>\n";
 891      echo "  </table>\n";
 892      echo "  <br />\n";
 893  }
 894  
 895  echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
 896  echo "    <tr>\n";
 897  echo "      <td align=\"left\">\n";
 898  echo "        <table class=\"box\" width=\"100%\">\n";
 899  echo "          <tr>\n";
 900  echo "            <td align=\"left\" class=\"posthead\">\n";
 901  echo "              <table class=\"posthead\" width=\"100%\">\n";
 902  echo "                <tr>\n";
 903  echo "                  <td align=\"left\" class=\"subhead\" colspan=\"3\">", gettext("Links"), "</td>\n";
 904  echo "                </tr>\n";
 905  echo "                <tr>\n";
 906  echo "                  <td align=\"center\">\n";
 907  echo "                    <table class=\"posthead\" width=\"95%\">\n";
 908  echo "                      <tr>\n";
 909  echo "                        <td align=\"left\" width=\"220\">", gettext("Enable Links section"), ":</td>\n";
 910  echo "                        <td align=\"left\">", form_radio("show_links", "Y", gettext("Yes"), (isset($forum_settings['show_links']) && $forum_settings['show_links'] == "Y")), "&nbsp;", form_radio("show_links", "N", gettext("No"), (isset($forum_settings['show_links']) && $forum_settings['show_links'] == "N") || !isset($forum_settings['show_links'])), "</td>\n";
 911  echo "                      </tr>\n";
 912  echo "                      <tr>\n";
 913  echo "                        <td align=\"left\" width=\"220\">", gettext("Require Links approval"), ":</td>\n";
 914  echo "                        <td align=\"left\">", form_radio("require_link_approval", "Y", gettext("Yes"), (isset($forum_settings['require_link_approval']) && $forum_settings['require_link_approval'] == "Y")), "&nbsp;", form_radio("require_link_approval", "N", gettext("No"), (isset($forum_settings['require_link_approval']) && $forum_settings['require_link_approval'] == "N") || !isset($forum_settings['require_link_approval'])), "</td>\n";
 915  echo "                      </tr>\n";
 916  echo "                      <tr>\n";
 917  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 918  echo "                      </tr>\n";
 919  echo "                      <tr>\n";
 920  echo "                        <td align=\"left\" colspan=\"2\">\n";
 921  echo "                          <p class=\"smalltext\">", gettext("The Links section of Beehive provides a place for your users to maintain a list of sites they frequently visit that other users may find useful. Links can be divided into categories by folder and allow for comments and ratings to be given. In order to moderate the links section a user must be granted Global Moderator status."), "</p>\n";
 922  echo "                        </td>\n";
 923  echo "                      </tr>\n";
 924  echo "                      <tr>\n";
 925  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 926  echo "                      </tr>\n";
 927  echo "                    </table>\n";
 928  echo "                  </td>\n";
 929  echo "                </tr>\n";
 930  echo "              </table>\n";
 931  echo "            </td>\n";
 932  echo "          </tr>\n";
 933  echo "        </table>\n";
 934  echo "      </td>\n";
 935  echo "    </tr>\n";
 936  echo "  </table>\n";
 937  echo "  <br />\n";
 938  echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
 939  echo "    <tr>\n";
 940  echo "      <td align=\"left\">\n";
 941  echo "        <table class=\"box\" width=\"100%\">\n";
 942  echo "          <tr>\n";
 943  echo "            <td align=\"left\" class=\"posthead\">\n";
 944  echo "              <table class=\"posthead\" width=\"100%\">\n";
 945  echo "                <tr>\n";
 946  echo "                  <td align=\"left\" class=\"subhead\" colspan=\"3\">", gettext("Share Links"), "</td>\n";
 947  echo "                </tr>\n";
 948  echo "                <tr>\n";
 949  echo "                  <td align=\"center\">\n";
 950  echo "                    <table class=\"posthead\" width=\"95%\">\n";
 951  echo "                      <tr>\n";
 952  echo "                        <td align=\"left\" width=\"220\">", gettext("Show Share Links"), ":</td>\n";
 953  echo "                        <td align=\"left\">", form_radio("show_share_links", "Y", gettext("Yes"), (isset($forum_settings['show_share_links']) && $forum_settings['show_share_links'] == "Y")), "&nbsp;", form_radio("show_share_links", "N", gettext("No"), (isset($forum_settings['show_share_links']) && $forum_settings['show_share_links'] == "N") || !isset($forum_settings['show_share_links'])), "</td>\n";
 954  echo "                      </tr>\n";
 955  echo "                      <tr>\n";
 956  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 957  echo "                      </tr>\n";
 958  echo "                      <tr>\n";
 959  echo "                        <td align=\"left\" colspan=\"2\">\n";
 960  echo "                          <p class=\"smalltext\">", gettext("Enabling <b>Show Share Links</b> adds social network share links for Google+, Facebook and Twitter, at the top of each thread. Users can opt-out of displaying these buttons from their My Controls area. By disabling it here, they will be hidden for all users."), "</p>\n";
 961  echo "                        </td>\n";
 962  echo "                      </tr>\n";
 963  echo "                      <tr>\n";
 964  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 965  echo "                      </tr>\n";
 966  echo "                    </table>\n";
 967  echo "                  </td>\n";
 968  echo "                </tr>\n";
 969  echo "              </table>\n";
 970  echo "            </td>\n";
 971  echo "          </tr>\n";
 972  echo "        </table>\n";
 973  echo "      </td>\n";
 974  echo "    </tr>\n";
 975  echo "  </table>\n";
 976  echo "  <br />\n";
 977  echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
 978  echo "    <tr>\n";
 979  echo "      <td align=\"left\">\n";
 980  echo "        <table class=\"box\" width=\"100%\">\n";
 981  echo "          <tr>\n";
 982  echo "            <td align=\"left\" class=\"posthead\">\n";
 983  echo "              <table class=\"posthead\" width=\"100%\">\n";
 984  echo "                <tr>\n";
 985  echo "                  <td align=\"left\" class=\"subhead\" colspan=\"3\">", gettext("Polls"), "</td>\n";
 986  echo "                </tr>\n";
 987  echo "                <tr>\n";
 988  echo "                  <td align=\"center\">\n";
 989  echo "                    <table class=\"posthead\" width=\"95%\">\n";
 990  echo "                      <tr>\n";
 991  echo "                        <td align=\"left\" width=\"220\">", gettext("Allow creation of polls"), ":</td>\n";
 992  echo "                        <td align=\"left\">", form_radio("allow_polls", "Y", gettext("Yes"), (isset($forum_settings['allow_polls']) && $forum_settings['allow_polls'] == "Y")), "&nbsp;", form_radio("allow_polls", "N", gettext("No"), (isset($forum_settings['allow_polls']) && $forum_settings['allow_polls'] == "N") || !isset($forum_settings['allow_polls'])), "</td>\n";
 993  echo "                      </tr>\n";
 994  echo "                      <tr>\n";
 995  echo "                        <td align=\"left\" width=\"220\">", gettext("Allow Guests to vote in polls"), ":</td>\n";
 996  echo "                        <td align=\"left\">", form_radio("poll_allow_guests", "Y", gettext("Yes"), (isset($forum_settings['poll_allow_guests']) && $forum_settings['poll_allow_guests'] == "Y")), "&nbsp;", form_radio("poll_allow_guests", "N", gettext("No"), (isset($forum_settings['poll_allow_guests']) && $forum_settings['poll_allow_guests'] == "N") || !isset($forum_settings['poll_allow_guests'])), "</td>\n";
 997  echo "                      </tr>\n";
 998  echo "                      <tr>\n";
 999  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
1000  echo "                      </tr>\n";
1001  echo "                      <tr>\n";
1002  echo "                        <td align=\"left\" colspan=\"2\">\n";
1003  echo "                          <p class=\"smalltext\">", gettext("If you don't want your users to be able to create polls you can disable the above option."), "</p>\n";
1004  echo "                        </td>\n";
1005  echo "                      </tr>\n";
1006  echo "                      <tr>\n";
1007  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
1008  echo "                      </tr>\n";
1009  echo "                    </table>\n";
1010  echo "                  </td>\n";
1011  echo "                </tr>\n";
1012  echo "              </table>\n";
1013  echo "            </td>\n";
1014  echo "          </tr>\n";
1015  echo "        </table>\n";
1016  echo "      </td>\n";
1017  echo "    </tr>\n";
1018  echo "  </table>\n";
1019  echo "  <br />\n";
1020  echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
1021  echo "    <tr>\n";
1022  echo "      <td align=\"left\">\n";
1023  echo "        <table class=\"box\" width=\"100%\">\n";
1024  echo "          <tr>\n";
1025  echo "            <td align=\"left\" class=\"posthead\">\n";
1026  echo "              <table class=\"posthead\" width=\"100%\">\n";
1027  echo "                <tr>\n";
1028  echo "                  <td align=\"left\" class=\"subhead\" colspan=\"3\">", gettext("Stats"), "</td>\n";
1029  echo "                </tr>\n";
1030  echo "                <tr>\n";
1031  echo "                  <td align=\"center\">\n";
1032  echo "                    <table class=\"posthead\" width=\"95%\">\n";
1033  echo "                      <tr>\n";
1034  echo "                        <td align=\"left\" width=\"220\">", gettext("Enable Stats Display"), ":</td>\n";
1035  echo "                        <td align=\"left\">", form_radio("show_stats", "Y", gettext("Yes"), (isset($forum_settings['show_stats']) && $forum_settings['show_stats'] == "Y")), "&nbsp;", form_radio("show_stats", "N", gettext("No"), (isset($forum_settings['show_stats']) && $forum_settings['show_stats'] == "N") || !isset($forum_settings['show_stats'])), "</td>\n";
1036  echo "                      </tr>\n";
1037  echo "                      <tr>\n";
1038  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
1039  echo "                      </tr>\n";
1040  echo "                      <tr>\n";
1041  echo "                        <td align=\"left\" colspan=\"2\">\n";
1042  echo "                          <p class=\"smalltext\">", gettext("Enabling this option allows Beehive to include a stats display at the bottom of the messages pane similar to the one used by many forum software titles. Once enabled the display of the stats page can be toggled individually by each user. If they don't want to see it they can hide it from view."), "</p>\n";
1043  echo "                        </td>\n";
1044  echo "                      </tr>\n";
1045  echo "                      <tr>\n";
1046  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
1047  echo "                      </tr>\n";
1048  echo "                    </table>\n";
1049  echo "                  </td>\n";
1050  echo "                </tr>\n";
1051  echo "              </table>\n";
1052  echo "            </td>\n";
1053  echo "          </tr>\n";
1054  echo "        </table>\n";
1055  echo "      </td>\n";
1056  echo "    </tr>\n";
1057  echo "  </table>\n";
1058  echo "  <br />\n";
1059  echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
1060  echo "    <tr>\n";
1061  echo "      <td align=\"left\">\n";
1062  echo "        <table class=\"box\" width=\"100%\">\n";
1063  echo "          <tr>\n";
1064  echo "            <td align=\"left\" class=\"posthead\">\n";
1065  echo "              <table class=\"posthead\" width=\"100%\">\n";
1066  echo "                <tr>\n";
1067  echo "                  <td align=\"left\" class=\"subhead\" colspan=\"3\">", gettext("Search Engine Spidering"), "</td>\n";
1068  echo "                </tr>\n";
1069  echo "                <tr>\n";
1070  echo "                  <td align=\"center\">\n";
1071  echo "                    <table class=\"posthead\" width=\"95%\">\n";
1072  echo "                      <tr>\n";
1073  echo "                        <td align=\"left\" width=\"300\">", gettext("Allow Search Engine Spidering"), ":</td>\n";
1074  echo "                        <td align=\"left\">", form_radio("allow_search_spidering", "Y", gettext("Yes"), (isset($forum_settings['allow_search_spidering']) && $forum_settings['allow_search_spidering'] == "Y")), "&nbsp;", form_radio("allow_search_spidering", "N", gettext("No"), (isset($forum_settings['allow_search_spidering']) && $forum_settings['allow_search_spidering'] == "N") || !isset($forum_settings['allow_search_spidering'])), "</td>\n";
1075  echo "                      </tr>\n";
1076  echo "                      <tr>\n";
1077  echo "                        <td align=\"left\" width=\"300\">", gettext("Show Search Engine Bots in Visitor Log"), ":</td>\n";
1078  echo "                        <td align=\"left\">", form_radio("searchbots_show_recent", "Y", gettext("Yes"), (isset($forum_settings['searchbots_show_recent']) && $forum_settings['searchbots_show_recent'] == 'Y')), "&nbsp;", form_radio("searchbots_show_recent", "N", gettext("No"), (isset($forum_settings['searchbots_show_recent']) && $forum_settings['searchbots_show_recent'] == 'N') || !isset($forum_settings['searchbots_show_recent'])), "</td>\n";
1079  echo "                      </tr>\n";
1080  echo "                      <tr>\n";
1081  echo "                        <td align=\"left\" width=\"350\">", gettext("Show Search Engine Bots in Active Users"), ":</td>\n";
1082  echo "                        <td align=\"left\">", form_radio("searchbots_show_active", "Y", gettext("Yes"), (isset($forum_settings['searchbots_show_active']) && $forum_settings['searchbots_show_active'] == 'Y')), "&nbsp;", form_radio("searchbots_show_active", "N", gettext("No"), (isset($forum_settings['searchbots_show_active']) && $forum_settings['searchbots_show_active'] == 'N') || !isset($forum_settings['searchbots_show_active'])), "</td>\n";
1083  echo "                      </tr>\n";
1084  echo "                      <tr>\n";
1085  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
1086  echo "                      </tr>\n";
1087  echo "                      <tr>\n";
1088  echo "                        <td align=\"left\" colspan=\"2\">\n";
1089  echo "                          <p class=\"smalltext\">", gettext("These settings allows your forum to be spidered by search engines like Google, AltaVista and Yahoo. If you switch this option off your forum will not be included in these search engines results."), "</p>\n";
1090  echo "                        </td>\n";
1091  echo "                      </tr>\n";
1092  echo "                      <tr>\n";
1093  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
1094  echo "                      </tr>\n";
1095  echo "                    </table>\n";
1096  echo "                  </td>\n";
1097  echo "                </tr>\n";
1098  echo "              </table>\n";
1099  echo "            </td>\n";
1100  echo "          </tr>\n";
1101  echo "        </table>\n";
1102  echo "      </td>\n";
1103  echo "    </tr>\n";
1104  echo "  </table>\n";
1105  echo "  <br />\n";
1106  echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
1107  echo "    <tr>\n";
1108  echo "      <td align=\"left\">\n";
1109  echo "        <table class=\"box\" width=\"100%\">\n";
1110  echo "          <tr>\n";
1111  echo "            <td align=\"left\" class=\"posthead\">\n";
1112  echo "              <table class=\"posthead\" width=\"100%\">\n";
1113  echo "                <tr>\n";
1114  echo "                  <td align=\"left\" class=\"subhead\" colspan=\"3\">", gettext("User and guest access settings"), "</td>\n";
1115  echo "                </tr>\n";
1116  echo "                <tr>\n";
1117  echo "                  <td align=\"center\">\n";
1118  echo "                    <table class=\"posthead\" width=\"95%\">\n";
1119  echo "                      <tr>\n";
1120  echo "                        <td align=\"left\" width=\"220\">", gettext("Allow Guest Access"), ":</td>\n";
1121  echo "                        <td align=\"left\">", form_radio("guest_account_enabled", "Y", gettext("Yes"), (isset($forum_settings['guest_account_enabled']) && $forum_settings['guest_account_enabled'] == "Y")), "&nbsp;", form_radio("guest_account_enabled", "N", gettext("No"), (isset($forum_settings['guest_account_enabled']) && $forum_settings['guest_account_enabled'] == "N") || !isset($forum_settings['guest_account_enabled'])), "</td>\n";
1122  echo "                      </tr>\n";
1123  echo "                      <tr>\n";
1124  echo "                        <td align=\"left\" width=\"220\">", gettext("List Guests in Visitor Log"), ":</td>\n";
1125  echo "                        <td align=\"left\">", form_radio("guest_show_recent", "Y", gettext("Yes"), (isset($forum_settings['guest_show_recent']) && $forum_settings['guest_show_recent'] == 'Y') || !isset($forum_settings['guest_show_recent'])), "&nbsp;", form_radio("guest_show_recent", "N", gettext("No"), (isset($forum_settings['guest_show_recent']) && $forum_settings['guest_show_recent'] == 'N')), "</td>\n";
1126  echo "                      </tr>\n";
1127  echo "                      <tr>\n";
1128  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
1129  echo "                      </tr>\n";
1130  echo "                      <tr>\n";
1131  echo "                        <td align=\"left\" colspan=\"2\">\n";
1132  echo "                          <p class=\"smalltext\">", gettext("<b>Enable Guest Account</b> allows visitors to browse your forum and read posts without registering a user account. A user account is still required if they wish to post or change user preferences."), "</p>\n";
1133  echo "                        </td>\n";
1134  echo "                      </tr>\n";
1135  echo "                      <tr>\n";
1136  echo "                        <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
1137  echo "                      </tr>\n";
1138  echo "                    </table>\n";
1139  echo "                  </td>\n";
1140  echo "                </tr>\n";
1141  echo "              </table>\n";
1142  echo "            </td>\n";
1143  echo "          </tr>\n";
1144  echo "        </table>\n";
1145  echo "      </td>\n";
1146  echo "    </tr>\n";
1147  echo "    <tr>\n";
1148  echo "      <td align=\"left\">&nbsp;</td>\n";
1149  echo "    </tr>\n";
1150  echo "    <tr>\n";
1151  echo "      <td align=\"center\">", form_submit("save", gettext("Save")), "</td>\n";
1152  echo "    </tr>\n";
1153  echo "  </table>\n";
1154  echo "</form>\n";
1155  echo "</div>\n";
1156  
1157  html_draw_bottom();

title

Description

title

Description

title

Description

title

title

Body