Beehive PHP Cross Reference Discussion Forums

Source: /forum_options.php - 629 lines - 36655 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 . 'constants.inc.php';
  29  require_once  BH_INCLUDE_PATH . 'emoticons.inc.php';
  30  require_once  BH_INCLUDE_PATH . 'form.inc.php';
  31  require_once  BH_INCLUDE_PATH . 'format.inc.php';
  32  require_once  BH_INCLUDE_PATH . 'forum.inc.php';
  33  require_once  BH_INCLUDE_PATH . 'header.inc.php';
  34  require_once  BH_INCLUDE_PATH . 'html.inc.php';
  35  require_once  BH_INCLUDE_PATH . 'lang.inc.php';
  36  require_once  BH_INCLUDE_PATH . 'session.inc.php';
  37  require_once  BH_INCLUDE_PATH . 'styles.inc.php';
  38  require_once  BH_INCLUDE_PATH . 'timezone.inc.php';
  39  require_once  BH_INCLUDE_PATH . 'user.inc.php';
  40  // End Required includes
  41  
  42  // Check we're logged in correctly
  43  if (!session::logged_in()) {
  44      html_guest_error();
  45  }
  46  
  47  // Array to hold error messages.
  48  $error_msg_array = array();
  49  
  50  // Get an array of available emoticon sets
  51  $available_emoticons = emoticons_get_available();
  52  
  53  // Get an array of available languages
  54  $available_langs = lang_get_available();
  55  
  56  // Get an array of available timezones.
  57  $available_timezones = get_available_timezones();
  58  
  59  // Get User Prefs
  60  $user_prefs = user_get_prefs($_SESSION['UID']);
  61  
  62  // Submit code starts here.
  63  if (isset($_POST['save'])) {
  64  
  65      $user_prefs_global = array();
  66  
  67      if (isset($_POST['timezone']) && in_array($_POST['timezone'], array_keys($available_timezones))) {
  68          $user_prefs['TIMEZONE'] = $_POST['timezone'];
  69      } else {
  70          $user_prefs['TIMEZONE'] = forum_get_setting('forum_timezone', 'is_numeric', 27);
  71      }
  72  
  73      if (isset($_POST['dl_saving']) && $_POST['dl_saving'] == "Y") {
  74          $user_prefs['DL_SAVING'] = "Y";
  75      } else {
  76          $user_prefs['DL_SAVING'] = "N";
  77      }
  78  
  79      if (isset($_POST['language'])) {
  80          $user_prefs['LANGUAGE'] = trim($_POST['language']);
  81      } else {
  82          $user_prefs['LANGUAGE'] = "";
  83      }
  84  
  85      if (isset($_POST['view_sigs']) && $_POST['view_sigs'] == "N") {
  86          $user_prefs['VIEW_SIGS'] = "N";
  87      } else {
  88          $user_prefs['VIEW_SIGS'] = "Y";
  89      }
  90  
  91      if (isset($_POST['view_sigs_global'])) {
  92          $user_prefs_global['VIEW_SIGS'] = ($_POST['view_sigs_global'] == "Y") ? true : false;
  93      } else {
  94          $user_prefs_global['VIEW_SIGS'] = false;
  95      }
  96  
  97      if (isset($_POST['threads_by_folder']) && $_POST['threads_by_folder'] == "Y") {
  98          $user_prefs['THREADS_BY_FOLDER'] = "Y";
  99      } else {
 100          $user_prefs['THREADS_BY_FOLDER'] = "N";
 101      }
 102  
 103      if (isset($_POST['threads_by_folder_global'])) {
 104          $user_prefs_global['THREADS_BY_FOLDER'] = ($_POST['threads_by_folder_global'] == "Y") ? true : false;
 105      } else {
 106          $user_prefs_global['THREADS_BY_FOLDER'] = false;
 107      }
 108  
 109      if (isset($_POST['mark_as_of_int']) && $_POST['mark_as_of_int'] == "Y") {
 110          $user_prefs['MARK_AS_OF_INT'] = "Y";
 111      } else {
 112          $user_prefs['MARK_AS_OF_INT'] = "N";
 113      }
 114  
 115      if (isset($_POST['mark_as_of_int_global'])) {
 116          $user_prefs_global['MARK_AS_OF_INT'] = ($_POST['mark_as_of_int_global'] == "Y") ? true : false;
 117      } else {
 118          $user_prefs_global['MARK_AS_OF_INT'] = false;
 119      }
 120  
 121      if (isset($_POST['images_to_links']) && $_POST['images_to_links'] == "Y") {
 122          $user_prefs['IMAGES_TO_LINKS'] = "Y";
 123      } else {
 124          $user_prefs['IMAGES_TO_LINKS'] = "N";
 125      }
 126  
 127      if (isset($_POST['images_to_links_global'])) {
 128          $user_prefs_global['IMAGES_TO_LINKS'] = ($_POST['images_to_links_global'] == "Y") ? true : false;
 129      } else {
 130          $user_prefs_global['IMAGES_TO_LINKS'] = false;
 131      }
 132  
 133      if (isset($_POST['use_word_filter']) && $_POST['use_word_filter'] == "Y") {
 134          $user_prefs['USE_WORD_FILTER'] = "Y";
 135      } else {
 136          $user_prefs['USE_WORD_FILTER'] = "N";
 137      }
 138  
 139      if (isset($_POST['use_word_filter_global'])) {
 140          $user_prefs_global['USE_WORD_FILTER'] = ($_POST['use_word_filter_global'] == "Y") ? true : false;
 141      } else {
 142          $user_prefs_global['USE_WORD_FILTER'] = false;
 143      }
 144  
 145      if (isset($_POST['show_thumbs_enabled']) && $_POST['show_thumbs_enabled'] == "Y") {
 146  
 147          if (isset($_POST['show_thumbs']) && is_numeric($_POST['show_thumbs'])) {
 148              $user_prefs['SHOW_THUMBS'] = $_POST['show_thumbs'];
 149          } else {
 150              $user_prefs['SHOW_THUMBS'] = 2;
 151          }
 152  
 153      } else {
 154  
 155          if (isset($_POST['show_thumbs']) && is_numeric($_POST['show_thumbs'])) {
 156              $user_prefs['SHOW_THUMBS'] = $_POST['show_thumbs'] * -1;
 157          } else {
 158              $user_prefs['SHOW_THUMBS'] = -2;
 159          }
 160      }
 161  
 162      if (isset($_POST['show_thumbs_global'])) {
 163          $user_prefs_global['SHOW_THUMBS'] = ($_POST['show_thumbs_global'] == "Y") ? true : false;
 164      } else {
 165          $user_prefs_global['SHOW_THUMBS'] = false;
 166      }
 167  
 168      if (isset($_POST['use_mover_spoiler']) && $_POST['use_mover_spoiler'] == "Y") {
 169          $user_prefs['USE_MOVER_SPOILER'] = "Y";
 170      } else {
 171          $user_prefs['USE_MOVER_SPOILER'] = "N";
 172      }
 173  
 174      if (isset($_POST['use_mover_spoiler_global'])) {
 175          $user_prefs_global['USE_MOVER_SPOILER'] = ($_POST['use_mover_spoiler_global'] == "Y") ? true : false;
 176      } else {
 177          $user_prefs_global['USE_MOVER_SPOILER'] = false;
 178      }
 179  
 180      if (isset($_POST['use_light_mode_spoiler']) && $_POST['use_light_mode_spoiler'] == "Y") {
 181          $user_prefs['USE_LIGHT_MODE_SPOILER'] = "Y";
 182      } else {
 183          $user_prefs['USE_LIGHT_MODE_SPOILER'] = "N";
 184      }
 185  
 186      if (isset($_POST['use_light_mode_spoiler_global'])) {
 187          $user_prefs_global['USE_LIGHT_MODE_SPOILER'] = ($_POST['use_light_mode_spoiler_global'] == "Y") ? true : false;
 188      } else {
 189          $user_prefs_global['USE_LIGHT_MODE_SPOILER'] = false;
 190      }
 191  
 192      if (isset($_POST['use_overflow_resize']) && $_POST['use_overflow_resize'] == "Y") {
 193          $user_prefs['USE_OVERFLOW_RESIZE'] = "Y";
 194      } else {
 195          $user_prefs['USE_OVERFLOW_RESIZE'] = "N";
 196      }
 197  
 198      if (isset($_POST['use_overflow_resize_global'])) {
 199          $user_prefs_global['USE_OVERFLOW_RESIZE'] = ($_POST['use_overflow_resize_global'] == "Y") ? true : false;
 200      } else {
 201          $user_prefs_global['USE_OVERFLOW_RESIZE'] = false;
 202      }
 203  
 204      if (isset($_POST['reply_quick']) && ($_POST['reply_quick'] == "Y")) {
 205          $user_prefs['REPLY_QUICK'] = 'Y';
 206      } else {
 207          $user_prefs['REPLY_QUICK'] = 'N';
 208      }
 209  
 210      if (isset($_POST['reply_quick_global'])) {
 211          $user_prefs_global['REPLY_QUICK'] = ($_POST['reply_quick_global'] == "Y") ? true : false;
 212      } else {
 213          $user_prefs_global['REPLY_QUICK'] = false;
 214      }
 215  
 216      if (isset($_POST['thread_last_page']) && ($_POST['thread_last_page'] == "Y")) {
 217          $user_prefs['THREAD_LAST_PAGE'] = 'Y';
 218      } else {
 219          $user_prefs['THREAD_LAST_PAGE'] = 'N';
 220      }
 221  
 222      if (isset($_POST['thread_last_page_global'])) {
 223          $user_prefs_global['THREAD_LAST_PAGE'] = ($_POST['thread_last_page_global'] == "Y") ? true : false;
 224      } else {
 225          $user_prefs_global['THREAD_LAST_PAGE'] = false;
 226      }
 227  
 228      if (isset($_POST['show_avatars']) && ($_POST['show_avatars'] == "Y")) {
 229          $user_prefs['SHOW_AVATARS'] = 'Y';
 230      } else {
 231          $user_prefs['SHOW_AVATARS'] = 'N';
 232      }
 233  
 234      if (isset($_POST['show_avatars_global'])) {
 235          $user_prefs_global['SHOW_AVATARS'] = ($_POST['show_avatars_global'] == "Y") ? true : false;
 236      } else {
 237          $user_prefs_global['SHOW_AVATARS'] = false;
 238      }
 239  
 240      if (isset($_POST['show_share_links']) && ($_POST['show_share_links'] == "Y")) {
 241          $user_prefs['SHOW_SHARE_LINKS'] = 'Y';
 242      } else {
 243          $user_prefs['SHOW_SHARE_LINKS'] = 'N';
 244      }
 245  
 246      if (isset($_POST['show_share_links_global'])) {
 247          $user_prefs_global['SHOW_SHARE_LINKS'] = ($_POST['show_share_links_global'] == "Y") ? true : false;
 248      } else {
 249          $user_prefs_global['SHOW_SHARE_LINKS'] = false;
 250      }
 251  
 252      if (isset($_POST['enable_wiki_words']) && $_POST['enable_wiki_words'] == "Y") {
 253          $user_prefs['ENABLE_WIKI_WORDS'] = "Y";
 254      } else {
 255          $user_prefs['ENABLE_WIKI_WORDS'] = "N";
 256      }
 257  
 258      if (isset($_POST['enable_wiki_words_global'])) {
 259          $user_prefs_global['ENABLE_WIKI_WORDS'] = ($_POST['enable_wiki_words_global'] == "Y") ? true : false;
 260      } else {
 261          $user_prefs_global['ENABLE_WIKI_WORDS'] = false;
 262      }
 263  
 264      if (isset($_POST['enable_wiki_quick_links']) && $_POST['enable_wiki_quick_links'] == "Y") {
 265          $user_prefs['ENABLE_WIKI_QUICK_LINKS'] = "Y";
 266      } else {
 267          $user_prefs['ENABLE_WIKI_QUICK_LINKS'] = "N";
 268      }
 269  
 270      if (isset($_POST['enable_wiki_quick_links_global'])) {
 271          $user_prefs_global['ENABLE_WIKI_QUICK_LINKS'] = ($_POST['enable_wiki_quick_links_global'] == "Y") ? true : false;
 272      } else {
 273          $user_prefs_global['ENABLE_WIKI_QUICK_LINKS'] = false;
 274      }
 275  
 276      if (isset($_POST['enable_tags']) && $_POST['enable_tags'] == "Y") {
 277          $user_prefs['ENABLE_TAGS'] = "Y";
 278      } else {
 279          $user_prefs['ENABLE_TAGS'] = "N";
 280      }
 281  
 282      if (isset($_POST['enable_tags_global'])) {
 283          $user_prefs_global['ENABLE_TAGS'] = ($_POST['enable_tags_global'] == "Y") ? true : false;
 284      } else {
 285          $user_prefs_global['ENABLE_TAGS'] = false;
 286      }
 287  
 288      if (isset($_POST['show_stats']) && $_POST['show_stats'] == "Y") {
 289          $user_prefs['SHOW_STATS'] = "Y";
 290      } else {
 291          $user_prefs['SHOW_STATS'] = "N";
 292      }
 293  
 294      if (isset($_POST['show_stats_global'])) {
 295          $user_prefs_global['SHOW_STATS'] = ($_POST['show_stats_global'] == "Y") ? true : false;
 296      } else {
 297          $user_prefs_global['SHOW_STATS'] = false;
 298      }
 299  
 300      if (isset($_POST['posts_per_page'])) {
 301          $user_prefs['POSTS_PER_PAGE'] = trim($_POST['posts_per_page']);
 302      } else {
 303          $user_prefs['POSTS_PER_PAGE'] = 20;
 304      }
 305  
 306      if (isset($_POST['posts_per_page_global'])) {
 307          $user_prefs_global['POSTS_PER_PAGE'] = ($_POST['posts_per_page_global'] == "Y") ? true : false;
 308      } else {
 309          $user_prefs_global['POSTS_PER_PAGE'] = false;
 310      }
 311  
 312      if (isset($_POST['font_size'])) {
 313          $user_prefs['FONT_SIZE'] = trim($_POST['font_size']);
 314      } else {
 315          $user_prefs['FONT_SIZE'] = 10;
 316      }
 317  
 318      if (isset($_POST['font_size_global'])) {
 319          $user_prefs_global['FONT_SIZE'] = ($_POST['font_size_global'] == "Y") ? true : false;
 320      } else {
 321          $user_prefs_global['FONT_SIZE'] = false;
 322      }
 323  
 324      if (isset($_POST['style']) && style_exists(trim($_POST['style']))) {
 325          $user_prefs['STYLE'] = trim($_POST['style']);
 326      } else {
 327          $user_prefs['STYLE'] = forum_get_setting('default_style', 'strlen', 'default');
 328      }
 329  
 330      if (isset($_POST['style_global'])) {
 331          $user_prefs_global['STYLE'] = ($_POST['style_global'] == "Y") ? true : false;
 332      } else {
 333          $user_prefs_global['STYLE'] = false;
 334      }
 335  
 336      if (isset($_POST['emoticons'])) {
 337          $user_prefs['EMOTICONS'] = trim($_POST['emoticons']);
 338      } else {
 339          $user_prefs['EMOTICONS'] = forum_get_setting('default_emoticons', 'strlen', 'default');
 340      }
 341  
 342      if (isset($_POST['emoticons_global'])) {
 343          $user_prefs_global['EMOTICONS'] = ($_POST['emoticons_global'] == "Y") ? true : false;
 344      } else {
 345          $user_prefs_global['EMOTICONS'] = false;
 346      }
 347  
 348      if (isset($_POST['start_page'])) {
 349          $user_prefs['START_PAGE'] = trim($_POST['start_page']);
 350      } else {
 351          $user_prefs['START_PAGE'] = 0;
 352      }
 353  
 354      if (isset($_POST['start_page_global'])) {
 355          $user_prefs_global['START_PAGE'] = ($_POST['start_page_global'] == "Y") ? true : false;
 356      } else {
 357          $user_prefs_global['START_PAGE'] = false;
 358      }
 359  
 360      // Update USER_PREFS
 361      if (user_update_prefs($_SESSION['UID'], $user_prefs, $user_prefs_global)) {
 362  
 363          header_redirect("forum_options.php?webtag=$webtag&updated=true", gettext("Preferences were successfully updated."));
 364          exit;
 365  
 366      } else {
 367  
 368          $error_msg_array[] = gettext("Some or all of your user account details could not be updated. Please try again later.");
 369          $valid = false;
 370      }
 371  }
 372  
 373  // Check to see if we should show the set for all forums checkboxes
 374  $show_set_all = (forums_get_available_count() > 1) ? true : false;
 375  
 376  // Start output here
 377  html_draw_top(sprintf('title=%s', gettext("My Controls - Forum Options")), "js/emoticons.js", "js/forum_options.js", 'class=window_title');
 378  
 379  echo "<h1>", gettext("Forum Options"), "</h1>\n";
 380  
 381  if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
 382  
 383      html_display_error_array($error_msg_array, '700', 'left');
 384  
 385  } else if (isset($_GET['updated'])) {
 386  
 387      html_display_success_msg(gettext("Preferences were successfully updated."), '700', 'left', 'preferences_updated');
 388  }
 389  
 390  echo "<br />\n";
 391  echo "<form accept-charset=\"utf-8\" name=\"prefs\" action=\"forum_options.php\" method=\"post\" target=\"_self\">\n";
 392  echo "  ", form_input_hidden('webtag', htmlentities_array($webtag)), "\n";
 393  echo "  <table cellpadding=\"0\" cellspacing=\"0\" width=\"700\">\n";
 394  echo "    <tr>\n";
 395  echo "      <td align=\"left\">\n";
 396  echo "        <table class=\"box\" width=\"100%\">\n";
 397  echo "          <tr>\n";
 398  echo "            <td align=\"left\" class=\"posthead\">\n";
 399  echo "              <table class=\"posthead\" width=\"100%\">\n";
 400  echo "                <tr>\n";
 401  echo "                  <td align=\"left\" colspan=\"3\" class=\"subhead\">", gettext("Time Zone"), "</td>\n";
 402  echo "                </tr>\n";
 403  echo "                <tr>\n";
 404  echo "                  <td align=\"left\" rowspan=\"3\" width=\"1%\">&nbsp;</td>\n";
 405  echo "                </tr>\n";
 406  echo "                <tr>\n";
 407  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", gettext("Time zone"), ":</td>\n";
 408  echo "                  <td align=\"left\">", form_dropdown_array("timezone", htmlentities_array($available_timezones), (isset($user_prefs['TIMEZONE']) && in_array($user_prefs['TIMEZONE'], array_keys($available_timezones))) ? $user_prefs['TIMEZONE'] : forum_get_setting('forum_timezone', 'is_numeric', 27), null, 'timezone_dropdown'), "</td>\n";
 409  echo "                </tr>\n";
 410  echo "                <tr>\n";
 411  echo "                  <td align=\"left\">&nbsp;</td>\n";
 412  echo "                  <td align=\"left\">", form_checkbox("dl_saving", "Y", gettext("Adjust for daylight saving"), (isset($user_prefs['DL_SAVING'])) ? ($user_prefs['DL_SAVING'] == 'Y') : forum_get_setting('forum_dl_saving', 'Y')), "</td>\n";
 413  echo "                </tr>\n";
 414  echo "                <tr>\n";
 415  echo "                  <td align=\"left\">&nbsp;</td>\n";
 416  echo "                </tr>\n";
 417  echo "              </table>\n";
 418  echo "            </td>\n";
 419  echo "          </tr>\n";
 420  echo "        </table>\n";
 421  echo "        <br />\n";
 422  echo "        <table class=\"box\" width=\"100%\">\n";
 423  echo "          <tr>\n";
 424  echo "            <td align=\"left\" class=\"posthead\">\n";
 425  echo "              <table class=\"posthead\" width=\"100%\">\n";
 426  
 427  if ($show_set_all) {
 428  
 429      echo "                <tr>\n";
 430      echo "                  <td align=\"left\" class=\"subhead\" colspan=\"3\">", gettext("Language"), "</td>\n";
 431      echo "                  <td align=\"left\" class=\"subhead\" width=\"1%\">&nbsp;</td>\n";
 432      echo "                </tr>\n";
 433  
 434  } else {
 435  
 436      echo "                <tr>\n";
 437      echo "                  <td align=\"left\" class=\"subhead\" colspan=\"4\">", gettext("Language"), "</td>\n";
 438      echo "                </tr>\n";
 439  }
 440  
 441  echo "                <tr>\n";
 442  echo "                  <td align=\"left\" rowspan=\"6\" width=\"1%\">&nbsp;</td>\n";
 443  echo "                </tr>\n";
 444  echo "                <tr>\n";
 445  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", gettext("Preferred language"), ":</td>\n";
 446  echo "                  <td align=\"left\">", form_dropdown_array("language", htmlentities_array($available_langs), (isset($user_prefs['LANGUAGE']) ? $user_prefs['LANGUAGE'] : 0)), "</td>\n";
 447  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("language_global", "Y", null, (isset($user_prefs['LANGUAGE_GLOBAL']) ? $user_prefs['LANGUAGE_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("language_global", 'Y'), "&nbsp;</td>\n";
 448  echo "                </tr>\n";
 449  echo "                <tr>\n";
 450  echo "                  <td align=\"left\" colspan=\"3\">&nbsp;</td>\n";
 451  echo "                </tr>\n";
 452  echo "              </table>\n";
 453  echo "            </td>\n";
 454  echo "          </tr>\n";
 455  echo "        </table>\n";
 456  echo "        <br />\n";
 457  echo "        <table class=\"box\" width=\"100%\">\n";
 458  echo "          <tr>\n";
 459  echo "            <td align=\"left\" class=\"posthead\">\n";
 460  echo "              <table class=\"posthead\" width=\"100%\">\n";
 461  
 462  if ($show_set_all) {
 463  
 464      echo "                <tr>\n";
 465      echo "                  <td align=\"left\" class=\"subhead\" colspan=\"2\">", gettext("Display"), "</td>\n";
 466      echo "                  <td align=\"left\" class=\"subhead\" width=\"1%\">&nbsp;</td>\n";
 467      echo "                </tr>\n";
 468  
 469  } else {
 470  
 471      echo "                <tr>\n";
 472      echo "                  <td align=\"left\" class=\"subhead\" colspan=\"3\">", gettext("Display"), "</td>\n";
 473      echo "                </tr>\n";
 474  }
 475  
 476  echo "                <tr>\n";
 477  echo "                  <td align=\"left\" rowspan=\"18\" width=\"1%\">&nbsp;</td>\n";
 478  echo "                </tr>\n";
 479  echo "                <tr>\n";
 480  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("threads_by_folder", "Y", gettext("Sort Thread List by folders"), (isset($user_prefs['THREADS_BY_FOLDER']) && $user_prefs['THREADS_BY_FOLDER'] == "Y") ? true : false), "</td>\n";
 481  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("threads_by_folder_global", "Y", null, (isset($user_prefs['THREADS_BY_FOLDER_GLOBAL']) ? $user_prefs['THREADS_BY_FOLDER_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("threads_by_folder_global", 'Y'), "&nbsp;</td>\n";
 482  echo "                </tr>\n";
 483  echo "                <tr>\n";
 484  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("view_sigs", "N", gettext("Globally ignore user signatures"), (isset($user_prefs['VIEW_SIGS']) && $user_prefs['VIEW_SIGS'] == "N") ? true : false), "</td>\n";
 485  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("view_sigs_global", "Y", null, (isset($user_prefs['VIEW_SIGS_GLOBAL']) ? $user_prefs['VIEW_SIGS_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("view_sigs_global", 'Y'), "&nbsp;</td>\n";
 486  echo "                </tr>\n";
 487  echo "                <tr>\n";
 488  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("mark_as_of_int", "Y", gettext("Automatically mark threads I post in as High Interest"), (isset($user_prefs['MARK_AS_OF_INT']) && $user_prefs['MARK_AS_OF_INT'] == "Y") ? true : false), "</td>\n";
 489  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("mark_as_of_int_global", "Y", null, (isset($user_prefs['MARK_AS_OF_INT_GLOBAL']) ? $user_prefs['MARK_AS_OF_INT_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("mark_as_of_int_global", 'Y'), "&nbsp;</td>\n";
 490  echo "                </tr>\n";
 491  echo "                <tr>\n";
 492  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("images_to_links", "Y", gettext("Automatically convert embedded images in posts into links"), (isset($user_prefs['IMAGES_TO_LINKS']) && $user_prefs['IMAGES_TO_LINKS'] == "Y") ? true : false), "</td>\n";
 493  echo "                  <td align=\"right\"  style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("images_to_links_global", "Y", null, (isset($user_prefs['IMAGES_TO_LINKS_GLOBAL']) ? $user_prefs['IMAGES_TO_LINKS_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("images_to_links_global", 'Y'), "&nbsp;</td>\n";
 494  echo "                </tr>\n";
 495  echo "                <tr>\n";
 496  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("show_thumbs_enabled", "Y", array(gettext("Show"), " ", form_dropdown_array("show_thumbs", array(ATTACHMENT_THUMB_SMALL => gettext("Small Sized"), ATTACHMENT_THUMB_MEDIUM => gettext("Medium Sized"), ATTACHMENT_THUMB_LARGE => gettext("Large Sized")), (isset($user_prefs['SHOW_THUMBS']) ? ($user_prefs['SHOW_THUMBS'] > 0 ? $user_prefs['SHOW_THUMBS'] : $user_prefs['SHOW_THUMBS'] * -1) : 2)), " ", gettext("thumbnails for image attachments")), (isset($user_prefs['SHOW_THUMBS']) && $user_prefs['SHOW_THUMBS'] > 0) ? true : false), "</td>\n";
 497  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("show_thumbs_global", "Y", null, (isset($user_prefs['SHOW_THUMBS_GLOBAL']) ? $user_prefs['SHOW_THUMBS_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("show_thumbs_global", 'Y'), "&nbsp;</td>\n";
 498  echo "                </tr>\n";
 499  echo "                <tr>\n";
 500  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("enable_wiki_words", "Y", gettext("Enable WikiWiki Integration"), (isset($user_prefs['ENABLE_WIKI_WORDS']) && $user_prefs['ENABLE_WIKI_WORDS'] == "Y") ? true : false), "</td>\n";
 501  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("enable_wiki_words_global", "Y", null, (isset($user_prefs['ENABLE_WIKI_WORDS_GLOBAL']) ? $user_prefs['ENABLE_WIKI_WORDS_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("enable_wiki_words_global", 'Y'), "&nbsp;</td>\n";
 502  echo "                </tr>\n";
 503  echo "                <tr>\n";
 504  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("enable_wiki_quick_links", "Y", gettext("Enable WikiWiki Quick links"), (isset($user_prefs['ENABLE_WIKI_QUICK_LINKS']) && $user_prefs['ENABLE_WIKI_QUICK_LINKS'] == "Y") ? true : false), "</td>\n";
 505  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("enable_wiki_quick_links_global", "Y", null, (isset($user_prefs['ENABLE_WIKI_QUICK_LINKS_GLOBAL']) ? $user_prefs['ENABLE_WIKI_QUICK_LINKS_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("enable_wiki_quick_links_global", 'Y'), "&nbsp;</td>\n";
 506  echo "                </tr>\n";
 507  echo "                <tr>\n";
 508  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("enable_tags", "Y", gettext("Enable post tagging with #hashtags"), (isset($user_prefs['ENABLE_TAGS']) && $user_prefs['ENABLE_TAGS'] == "Y") ? true : false), "</td>\n";
 509  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("enable_tags_global", "Y", null, (isset($user_prefs['ENABLE_TAGS_GLOBAL']) ? $user_prefs['ENABLE_TAGS_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("enable_tags_global", 'Y'), "&nbsp;</td>\n";
 510  echo "                </tr>\n";
 511  echo "                <tr>\n";
 512  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("use_mover_spoiler", "Y", gettext("Reveal spoilers on mouse over"), (isset($user_prefs['USE_MOVER_SPOILER']) && $user_prefs['USE_MOVER_SPOILER'] == "Y")), "</td>\n";
 513  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("use_mover_spoiler_global", "Y", null, (isset($user_prefs['USE_MOVER_SPOILER_GLOBAL']) ? $user_prefs['USE_MOVER_SPOILER_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("use_mover_spoiler_global", 'Y'), "&nbsp;</td>\n";
 514  echo "                </tr>\n";
 515  echo "                <tr>\n";
 516  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("use_light_mode_spoiler", "Y", gettext("Always show spoilers in Mobile version (uses lighter font colour)"), (isset($user_prefs['USE_LIGHT_MODE_SPOILER']) && $user_prefs['USE_LIGHT_MODE_SPOILER'] == "Y")), "</td>\n";
 517  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("use_light_mode_spoiler_global", "Y", null, (isset($user_prefs['USE_LIGHT_MODE_SPOILER_GLOBAL']) ? $user_prefs['USE_LIGHT_MODE_SPOILER_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("use_light_mode_spoiler_global", 'Y'), "&nbsp;</td>\n";
 518  echo "                </tr>\n";
 519  echo "                <tr>\n";
 520  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("show_stats", "Y", gettext("Show forum stats at bottom of message pane"), (isset($user_prefs['SHOW_STATS']) && $user_prefs['SHOW_STATS'] == "Y") ? true : false), "</td>\n";
 521  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("show_stats_global", "Y", null, (isset($user_prefs['SHOW_STATS_GLOBAL']) ? $user_prefs['SHOW_STATS_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("show_stats_global", 'Y'), "&nbsp;</td>\n";
 522  echo "                </tr>\n";
 523  echo "                <tr>\n";
 524  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("use_word_filter", "Y", gettext("Enable word filter."), (isset($user_prefs['USE_WORD_FILTER']) && $user_prefs['USE_WORD_FILTER'] == "Y")), "&nbsp;<span class=\"smalltext\">[<a href=\"edit_wordfilter.php?webtag=$webtag\">", gettext("Edit Word Filter"), "</a>]</span></td>\n";
 525  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("use_word_filter_global", "Y", null, (isset($user_prefs['USE_WORD_FILTER_GLOBAL']) ? $user_prefs['USE_WORD_FILTER_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("use_word_filter_global", 'Y'), "&nbsp;</td>\n";
 526  echo "                </tr>\n";
 527  echo "                <tr>\n";
 528  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("use_overflow_resize", "Y", gettext("Resize images and reflow page to prevent horizontal scrolling."), (isset($user_prefs['USE_OVERFLOW_RESIZE']) && $user_prefs['USE_OVERFLOW_RESIZE'] == "Y")), "</td>\n";
 529  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("use_overflow_resize_global", "Y", null, (isset($user_prefs['USE_OVERFLOW_RESIZE_GLOBAL']) ? $user_prefs['USE_OVERFLOW_RESIZE_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("use_overflow_resize_global", 'Y'), "&nbsp;</td>\n";
 530  echo "                </tr>\n";
 531  echo "                <tr>\n";
 532  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("reply_quick", "Y", gettext("Use Quick Reply by default. (Full reply in menu)"), (isset($user_prefs['REPLY_QUICK']) && $user_prefs['REPLY_QUICK'] == "Y")), "</td>\n";
 533  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("reply_quick_global", "Y", null, (isset($user_prefs['REPLY_QUICK_GLOBAL']) ? $user_prefs['REPLY_QUICK_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("reply_quick_global", 'Y'), "&nbsp;</td>\n";
 534  echo "                </tr>\n";
 535  echo "                <tr>\n";
 536  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("thread_last_page", "Y", gettext("Thread list last post link goes to last page of posts."), (isset($user_prefs['THREAD_LAST_PAGE']) && $user_prefs['THREAD_LAST_PAGE'] == "Y")), "</td>\n";
 537  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("thread_last_page_global", "Y", null, (isset($user_prefs['THREAD_LAST_PAGE_GLOBAL']) ? $user_prefs['THREAD_LAST_PAGE_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("thread_last_page_global", 'Y'), "&nbsp;</td>\n";
 538  echo "                </tr>\n";
 539  echo "                <tr>\n";
 540  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("show_avatars", "Y", gettext("Show user avatars in message headers, visitor log and active user list"), (isset($user_prefs['SHOW_AVATARS']) && $user_prefs['SHOW_AVATARS'] == "Y")), "</td>\n";
 541  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("show_avatars_global", "Y", null, (isset($user_prefs['SHOW_AVATARS_GLOBAL']) ? $user_prefs['SHOW_AVATARS_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("show_avatars_global", 'Y'), "&nbsp;</td>\n";
 542  echo "                </tr>\n";
 543  echo "                <tr>\n";
 544  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", form_checkbox("show_share_links", "Y", gettext("Show social network share links at top of each thread"), (isset($user_prefs['SHOW_SHARE_LINKS']) && $user_prefs['SHOW_SHARE_LINKS'] == "Y")), "</td>\n";
 545  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("show_share_links_global", "Y", null, (isset($user_prefs['SHOW_SHARE_LINKS_GLOBAL']) ? $user_prefs['SHOW_SHARE_LINKS_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("show_avatars_global", 'Y'), "&nbsp;</td>\n";
 546  echo "                </tr>\n";
 547  echo "                <tr>\n";
 548  echo "                  <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 549  echo "                </tr>\n";
 550  echo "              </table>\n";
 551  echo "            </td>\n";
 552  echo "          </tr>\n";
 553  echo "        </table>\n";
 554  echo "        <br />\n";
 555  echo "        <table class=\"box\" width=\"100%\">\n";
 556  echo "          <tr>\n";
 557  echo "            <td align=\"left\" class=\"posthead\">\n";
 558  echo "              <table class=\"posthead\" width=\"100%\">\n";
 559  
 560  if ($show_set_all) {
 561  
 562      echo "                <tr>\n";
 563      echo "                  <td align=\"left\" class=\"subhead\" colspan=\"3\">", gettext("Style"), "</td>\n";
 564      echo "                  <td align=\"left\" class=\"subhead\" width=\"1%\">&nbsp;</td>\n";
 565      echo "                </tr>\n";
 566  
 567  } else {
 568  
 569      echo "                <tr>\n";
 570      echo "                  <td align=\"left\" class=\"subhead\" colspan=\"4\">", gettext("Style"), "</td>\n";
 571      echo "                </tr>\n";
 572  }
 573  
 574  echo "                <tr>\n";
 575  echo "                  <td align=\"left\" rowspan=\"7\" width=\"1%\">&nbsp;</td>\n";
 576  echo "                </tr>\n";
 577  echo "                <tr>\n";
 578  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", gettext("Posts per page"), ":</td>\n";
 579  echo "                  <td align=\"left\">", form_dropdown_array("posts_per_page", array(10 => 10, 20 => 20, 30 => 30), (isset($user_prefs['POSTS_PER_PAGE']) && is_numeric($user_prefs['POSTS_PER_PAGE'])) ? $user_prefs['POSTS_PER_PAGE'] : 10), "</td>\n";
 580  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("posts_per_page_global", "Y", null, (isset($user_prefs['POSTS_PER_PAGE_GLOBAL']) ? $user_prefs['POSTS_PER_PAGE_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("posts_per_page_global", 'Y'), "&nbsp;</td>\n";
 581  echo "                </tr>\n";
 582  echo "                <tr>\n";
 583  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", gettext("Font size"), ":</td>\n";
 584  echo "                  <td align=\"left\">", form_dropdown_array("font_size", array(5 => '5pt', 6 => '6pt', 7 => '7pt', 8 => '8pt', 9 => '9pt', 10 => '10pt', 11 => '11pt', 12 => '12pt', 13 => '13pt', 14 => '14pt', 15 => '15pt'), (isset($user_prefs['FONT_SIZE']) && is_numeric($user_prefs['FONT_SIZE'])) ? $user_prefs['FONT_SIZE'] : 10), "</td>\n";
 585  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("font_size_global", "Y", null, (isset($user_prefs['FONT_SIZE_GLOBAL']) ? $user_prefs['FONT_SIZE_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("font_size_global", 'Y'), "&nbsp;</td>\n";
 586  echo "                </tr>\n";
 587  
 588  if (($available_styles = styles_get_available()) !== false) {
 589  
 590      echo "                <tr>\n";
 591      echo "                  <td align=\"left\" style=\"white-space: nowrap\">", gettext("Forum style"), ":</td>\n";
 592      echo "                  <td align=\"left\">", form_dropdown_array("style", htmlentities_array($available_styles), (isset($user_prefs['STYLE']) && style_exists($user_prefs['STYLE'])) ? htmlentities_array($user_prefs['STYLE']) : htmlentities_array(forum_get_setting('default_style', 'strlen', 'default'))), "</td>\n";
 593      echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("style_global", "Y", null, (isset($user_prefs['STYLE_GLOBAL']) ? $user_prefs['STYLE_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("style_global", 'Y'), "&nbsp;</td>\n";
 594      echo "                </tr>\n";
 595  }
 596  
 597  if (sizeof($available_emoticons) > 1) {
 598  
 599      echo "                <tr>\n";
 600      echo "                  <td align=\"left\" style=\"white-space: nowrap\">", gettext("Forum emoticons"), " [<a href=\"display_emoticons.php?webtag=$webtag\" target=\"_blank\" class=\"emoticon_preview_popup\">", gettext("Preview"), "</a>]:</td>\n";
 601      echo "                  <td align=\"left\">", form_dropdown_array("emoticons", htmlentities_array($available_emoticons), (isset($user_prefs['EMOTICONS']) && in_array($user_prefs['EMOTICONS'], array_keys($available_emoticons))) ? htmlentities_array($user_prefs['EMOTICONS']) : htmlentities_array(forum_get_setting('default_emoticons', 'strlen', 'default'))), "</td>\n";
 602      echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("emoticons_global", "Y", null, (isset($user_prefs['EMOTICONS_GLOBAL']) ? $user_prefs['EMOTICONS_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("emoticons_global", 'Y'), "&nbsp;</td>\n";
 603      echo "                </tr>\n";
 604  }
 605  
 606  echo "                <tr>\n";
 607  echo "                  <td align=\"left\" style=\"white-space: nowrap\">", gettext("Start page"), ":</td>\n";
 608  echo "                  <td align=\"left\">", form_dropdown_array("start_page", array(START_PAGE_NORMAL => gettext("Start"), START_PAGE_MESSAGES => gettext("Messages"), START_PAGE_INBOX => gettext("Inbox")), (isset($user_prefs['START_PAGE'])) ? $user_prefs['START_PAGE'] : 0), "</td>\n";
 609  echo "                  <td align=\"right\" style=\"white-space: nowrap\">", ($show_set_all) ? form_checkbox("start_page_global", "Y", null, (isset($user_prefs['START_PAGE_GLOBAL']) ? $user_prefs['START_PAGE_GLOBAL'] : false), sprintf('title="%s"', gettext("Set for all forums?"))) : form_input_hidden("start_page_global", 'Y'), "&nbsp;</td>\n";
 610  echo "                </tr>\n";
 611  echo "                <tr>\n";
 612  echo "                  <td align=\"left\" colspan=\"2\">&nbsp;</td>\n";
 613  echo "                </tr>\n";
 614  echo "              </table>\n";
 615  echo "            </td>\n";
 616  echo "          </tr>\n";
 617  echo "        </table>\n";
 618  echo "      </td>\n";
 619  echo "    </tr>\n";
 620  echo "    <tr>\n";
 621  echo "      <td align=\"left\">&nbsp;</td>\n";
 622  echo "    </tr>\n";
 623  echo "    <tr>\n";
 624  echo "      <td align=\"center\">", form_submit("save", gettext("Save")), "</td>\n";
 625  echo "    </tr>\n";
 626  echo "  </table>\n";
 627  echo "</form>\n";
 628  
 629  html_draw_bottom();

title

Description

title

Description

title

Description

title

title

Body