Browse Source

Merge branch 'master' of https://github.com/Spuds/playpen

emanuele 13 years ago
parent
commit
37335f6342
67 changed files with 946 additions and 257 deletions
  1. 1 0
      SSI.php
  2. BIN
      Smileys/fugue/afro.gif
  3. BIN
      Smileys/fugue/angel.gif
  4. BIN
      Smileys/fugue/angry.gif
  5. BIN
      Smileys/fugue/azn.gif
  6. BIN
      Smileys/fugue/blank.gif
  7. BIN
      Smileys/fugue/cheesy.gif
  8. BIN
      Smileys/fugue/cool.gif
  9. BIN
      Smileys/fugue/cry.gif
  10. BIN
      Smileys/fugue/embarrassed.gif
  11. BIN
      Smileys/fugue/evil.gif
  12. BIN
      Smileys/fugue/grin.gif
  13. BIN
      Smileys/fugue/huh.gif
  14. 9 0
      Smileys/fugue/index.php
  15. BIN
      Smileys/fugue/kiss.gif
  16. BIN
      Smileys/fugue/laugh.gif
  17. BIN
      Smileys/fugue/lipsrsealed.gif
  18. BIN
      Smileys/fugue/police.gif
  19. BIN
      Smileys/fugue/rolleyes.gif
  20. BIN
      Smileys/fugue/sad.gif
  21. BIN
      Smileys/fugue/shocked.gif
  22. BIN
      Smileys/fugue/smiley.gif
  23. BIN
      Smileys/fugue/tongue.gif
  24. BIN
      Smileys/fugue/undecided.gif
  25. BIN
      Smileys/fugue/wink.gif
  26. 380 0
      Sources/Class-BrowserDetect.php
  27. 293 0
      Sources/Class-CurlFetchWeb.php
  28. 5 113
      Sources/Load.php
  29. 4 4
      Sources/ManageAttachments.php
  30. 1 0
      Sources/ManageSearch.php
  31. 5 2
      Sources/Profile-Modify.php
  32. 18 6
      Sources/Search.php
  33. 12 2
      Sources/Security.php
  34. 16 1
      Sources/Subs-Package.php
  35. 0 1
      Sources/Themes.php
  36. 3 3
      Themes/default/Admin.template.php
  37. 19 8
      Themes/default/BoardIndex.template.php
  38. 5 4
      Themes/default/Display.template.php
  39. 1 1
      Themes/default/Login.template.php
  40. 4 4
      Themes/default/ManageMaintenance.template.php
  41. 9 2
      Themes/default/ManageNews.template.php
  42. 9 2
      Themes/default/ManagePermissions.template.php
  43. 9 2
      Themes/default/Packages.template.php
  44. 18 9
      Themes/default/PersonalMessage.template.php
  45. 10 8
      Themes/default/Post.template.php
  46. 8 8
      Themes/default/Profile.template.php
  47. 6 1
      Themes/default/Search.template.php
  48. 6 6
      Themes/default/Stats.template.php
  49. 1 1
      Themes/default/css/ie6.css
  50. 40 49
      Themes/default/css/index.css
  51. BIN
      Themes/default/images/star.png
  52. BIN
      Themes/default/images/staradmin.png
  53. BIN
      Themes/default/images/stargmod.png
  54. BIN
      Themes/default/images/starmod.png
  55. BIN
      Themes/default/images/theme/main_block.png
  56. 34 9
      Themes/default/index.template.php
  57. 1 1
      Themes/default/languages/Errors.english.php
  58. 1 0
      Themes/default/languages/Help.english.php
  59. 1 0
      Themes/default/languages/Install.english.php
  60. 1 0
      Themes/default/languages/Search.english.php
  61. 6 2
      Themes/default/languages/index.english.php
  62. 1 1
      Themes/default/scripts/admin.js
  63. 1 1
      Themes/default/scripts/script.js
  64. 1 0
      index.php
  65. 2 2
      other/install_2-1_mysql.sql
  66. 2 2
      other/install_2-1_postgresql.sql
  67. 3 2
      other/install_2-1_sqlite.sql

+ 1 - 0
SSI.php

@@ -66,6 +66,7 @@ require_once($sourcedir . '/Errors.php');
 require_once($sourcedir . '/Logging.php');
 require_once($sourcedir . '/Load.php');
 require_once($sourcedir . '/Security.php');
+require_once($sourcedir . '/Class-BrowserDetect.php');
 
 // Using an pre-PHP 5.1 version?
 if (version_compare(PHP_VERSION, '5.1', '<'))

BIN
Smileys/fugue/afro.gif


BIN
Smileys/fugue/angel.gif


BIN
Smileys/fugue/angry.gif


BIN
Smileys/fugue/azn.gif


BIN
Smileys/fugue/blank.gif


BIN
Smileys/fugue/cheesy.gif


BIN
Smileys/fugue/cool.gif


BIN
Smileys/fugue/cry.gif


BIN
Smileys/fugue/embarrassed.gif


BIN
Smileys/fugue/evil.gif


BIN
Smileys/fugue/grin.gif


BIN
Smileys/fugue/huh.gif


+ 9 - 0
Smileys/fugue/index.php

@@ -0,0 +1,9 @@
+<?php
+
+// Try to handle it with the upper level index.php.  (it should know what to do.)
+if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
+	include (dirname(dirname(__FILE__)) . '/index.php');
+else
+	exit;
+
+?>

BIN
Smileys/fugue/kiss.gif


BIN
Smileys/fugue/laugh.gif


BIN
Smileys/fugue/lipsrsealed.gif


BIN
Smileys/fugue/police.gif


BIN
Smileys/fugue/rolleyes.gif


BIN
Smileys/fugue/sad.gif


BIN
Smileys/fugue/shocked.gif


BIN
Smileys/fugue/smiley.gif


BIN
Smileys/fugue/tongue.gif


BIN
Smileys/fugue/undecided.gif


BIN
Smileys/fugue/wink.gif


+ 380 - 0
Sources/Class-BrowserDetect.php

@@ -0,0 +1,380 @@
+<?php
+
+/**
+ * This class is an experiment for the job of correctly detecting browsers and settings
+ * needed for them.
+ * - Detects the following browsers
+ * - Opera, Webkit, Firefox, Web_tv, Konqueror, IE, Gecko
+ * - Webkit variants: Chrome, iphone, blackberry, android, safari, ipad, ipod
+ * - Opera Versions: 6, 7, 8, 9, 10 and mobile mini and mobi
+ * - Firefox Versions: 1, 2, 3 .... 11 ...
+ * - Chrome Versions: 1 ... 18 ...
+ * - IE Versions: 4, 5, 5.5, 6, 7, 8, 9, 10 mobile and Mac
+ * - Nokia 
+ */
+ 
+if (!defined('SMF'))
+	die('Hacking attempt...');
+
+class browser_detector
+{
+	/**
+	 * Holds all browsers information. Its contents will be placed into $context['browser'].
+	 *
+	 * @var array
+	 */
+	private $_browsers = null;
+	private $_is_mobile = null;
+
+	/**
+	 * The main method of this class, you know the one that does the job: detect the thing.
+	 *  - determines the user agent (browser) as best it can.
+	 */
+	function detectBrowser()
+	{
+		global $context, $user_info;
+
+		// Init
+		$this->_browsers = array();
+		$this->_is_mobile = false;
+
+		// Initialize some values we'll set differently if necessary...
+		$this->_browsers['needs_size_fix'] = false;
+
+		// One at a time, one at a time, and in this order too
+		if ($this->isOpera())
+			$this->setupOpera();
+		// Them webkits need to be set up too
+		elseif ($this->isWebkit())
+			$this->setupWebkit();
+		// We may have work to do on Firefox...
+		elseif ($this->isFirefox())
+			$this->setupFirefox();
+		// Old friend, old frenemy
+		elseif ($this->isIe())
+			$this->setupIe();
+		
+		// Just a few mobile checks
+		$this->isOperaMini();
+		$this->isOperaMobi();
+
+		// Be you robot or human?
+		if ($user_info['possibly_robot'])
+		{
+			// This isn't meant to be reliable, it's just meant to catch most bots to prevent PHPSESSID from showing up.
+			$this->_browsers['possibly_robot'] = !empty($user_info['possibly_robot']);
+
+			// Robots shouldn't be logging in or registering.  So, they aren't a bot.  Better to be wrong than sorry (or people won't be able to log in!), anyway.
+			if ((isset($_REQUEST['action']) && in_array($_REQUEST['action'], array('login', 'login2', 'register'))) || !$user_info['is_guest'])
+				$this->_browsers['possibly_robot'] = false;
+		}
+		else
+			$this->_browsers['possibly_robot'] = false;
+
+		// Fill out the historical array as needed to support old mods that don't use isBrowser
+		$this->fillInformation();
+
+		// Last step ...
+		$this->setupBrowserPriority();
+
+		// Now see what you've done!
+		$context['browser'] = $this->_browsers;
+	}
+
+	/**
+	* Determine if the browser is Opera or not
+	* @return boolean true if the browser is Opera otherwise false
+	*/
+	function isOpera()
+	{
+		if (!isset($this->_browsers['is_opera']))
+			$this->_browsers['is_opera'] = strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false;
+		return $this->_browsers['is_opera'];
+	}
+
+	/**
+	* Determine if the browser is IE or not
+	* @return boolean true if the browser is IE otherwise false
+	*/
+	function isIe()
+	{
+		// I'm IE, Yes I'm the real IE; All you other IEs are just imitating.
+		if (!isset($this->_browsers['is_ie']))
+			$this->_browsers['is_ie'] = !$this->isOpera() && !$this->isGecko() && !$this->isWebTv() && preg_match('~MSIE \d+~', $_SERVER['HTTP_USER_AGENT']) === 1;
+		return $this->_browsers['is_ie'];
+	}
+
+	/**
+	* Determine if the browser is a Webkit based one or not
+	* @return boolean true if the browser is Webkit based otherwise false
+	*/
+	function isWebkit()
+	{
+		if (!isset($this->_browsers['is_webkit']))
+			$this->_browsers['is_webkit'] = strpos($_SERVER['HTTP_USER_AGENT'], 'AppleWebKit') !== false;
+		return $this->_browsers['is_webkit'];
+	}
+
+	/**
+	* Determine if the browser is Firefox or one of its variants
+	* @return boolean true if the browser is Firefox otherwise false
+	*/
+	function isFirefox()
+	{
+		if (!isset($this->_browsers['is_firefox']))
+			$this->_browsers['is_firefox'] = preg_match('~(?:Firefox|Ice[wW]easel|IceCat|Shiretoko|Minefield)/~', $_SERVER['HTTP_USER_AGENT']) === 1;
+		return $this->_browsers['is_firefox'];
+	}
+
+	/**
+	* Determine if the browser is WebTv or not
+	* @return boolean true if the browser is WebTv otherwise false
+	*/
+	function isWebTv()
+	{
+		if (!isset($this->_browsers['is_web_tv']))
+			$this->_browsers['is_web_tv'] = strpos($_SERVER['HTTP_USER_AGENT'], 'WebTV') !== false;
+		return $this->_browsers['is_web_tv'];
+	}
+
+	/**
+	* Determine if the browser is konqueror or not
+	* @return boolean true if the browser is konqueror otherwise false
+	*/
+	function isKonqueror()
+	{
+		if (!isset($this->_browsers['is_konqueror']))
+			$this->_browsers['is_konqueror'] = strpos($_SERVER['HTTP_USER_AGENT'], 'Konqueror') !== false;
+		return $this->_browsers['is_konqueror'];
+	}
+
+	/**
+	* Determine if the browser is Gecko or not
+	* @return boolean true if the browser is Gecko otherwise false
+	*/
+	function isGecko()
+	{
+		if (!isset($this->_browsers['is_gecko']))
+			$this->_browsers['is_gecko'] = strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') !== false && !$this->isWebkit() && !$this->isKonqueror();
+		return $this->_browsers['is_gecko'];
+	}
+
+	/**
+	* Determine if the browser is OperaMini or not
+	* @return boolean true if the browser is OperaMini otherwise false
+	*/
+	function isOperaMini()
+	{
+		if (!isset($this->_browsers['is_opera_mini']))
+			$this->_browsers['is_opera_mini'] = (isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']) || stripos($_SERVER['HTTP_USER_AGENT'], 'opera mini') !== false);
+		if ($this->_browsers['is_opera_mini'])
+			$this->_is_mobile = true;
+		return $this->_browsers['is_opera_mini'];
+	}
+
+	/**
+	* Determine if the browser is OperaMobi or not
+	* @return boolean true if the browser is OperaMobi otherwise false
+	*/
+	function isOperaMobi()
+	{
+		if (!isset($this->_browsers['is_opera_mobi']))
+			$this->_browsers['is_opera_mobi'] = stripos($_SERVER['HTTP_USER_AGENT'], 'opera mobi') !== false;
+		if ($this->_browsers['is_opera_mobi'])
+			$this->_is_mobile = true;
+		return $this->_browsers['is_opera_mini'];
+	}
+
+	/**
+	 * Detect Safari / Chrome / iP[ao]d / iPhone / Android / Blackberry from webkit.
+	 *  - set the browser version for Safari and Chrome
+	 *  - set the mobile flag for mobile based useragents
+	 */
+	private function setupWebkit()
+	{
+		$this->_browsers += array(
+			'is_chrome' => strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false,
+			'is_iphone' => (strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') !== false) && strpos($_SERVER['HTTP_USER_AGENT'], 'iPad') === false,
+			'is_blackberry' => stripos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'PlayBook') !== false,
+			'is_android' => strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false,
+			'is_nokia' => strpos($_SERVER['HTTP_USER_AGENT'], 'SymbianOS') !== false,
+		);
+
+		// blackberry, playbook, iphone, nokia, android and ipods set a mobile flag
+		if ($this->_browsers['is_iphone'] || $this->_browsers['is_blackberry'] || $this->_browsers['is_android'] || $this->_browsers['is_nokia'])
+			$this->_is_mobile = true;
+
+		// @todo what to do with the blaPad? ... for now leave it detected as Safari ...
+		$this->_browsers['is_safari'] = strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== false && !$this->_browsers['is_chrome'] && !$this->_browsers['is_iphone'];
+		$this->_browsers['is_ipad'] = strpos($_SERVER['HTTP_USER_AGENT'], 'iPad') !== false;
+
+		// if Chrome, get the major version
+		if ($this->_browsers['is_chrome'])
+		{
+			if (preg_match('~chrome[/]([0-9][0-9]?[.])~i', $_SERVER['HTTP_USER_AGENT'], $match) === 1)
+				$this->_browsers['is_chrome' . (int) $match[1]] = true;
+		}
+
+		// or if Safari get its major version
+		if ($this->_browsers['is_safari'])
+		{
+			if (preg_match('~version/?(.*)safari.*~i', $_SERVER['HTTP_USER_AGENT'], $match) === 1)
+				$this->_browsers['is_safari' . (int) trim($match[1])] = true;
+		}
+	}
+
+	/**
+	 * Additional IE checks and settings.
+	 *  - determines the version of the IE browser in use
+	 *  - detects ie4 onward
+	 *  - attempts to distinguish between IE and IE in compatabilty view
+	 *  - checks for old IE on macs as well, since we can
+	 */
+	private function setupIe()
+	{
+		$this->_browsers['is_ie_compat_view'] = false;
+
+		// get the version of the browser from the msie tag
+		if (preg_match('~MSIE\s?([0-9][0-9]?.[0-9])~i', $_SERVER['HTTP_USER_AGENT'], $msie_match) === 1)
+		{
+			$msie_match[1] = trim($msie_match[1]);
+			$msie_match[1] = (($msie_match[1] - (int) $msie_match[1]) == 0) ? (int) $msie_match[1] : $msie_match[1];
+			$this->_browsers['is_ie' . $msie_match[1]] = true;
+		}
+
+		// "modern" ie uses trident 4=ie8, 5=ie9, 6=ie10, even in compatability view
+		if (preg_match('~Trident/([0-9.])~i', $_SERVER['HTTP_USER_AGENT'], $trident_match) === 1)
+		{
+			$this->_browsers['is_ie' . ((int) $trident_match[1] + 4)] = true;
+
+			// If trident is set, see the (if any) msie tag in the user agent matches ... if not its in some compatablity view
+			if (isset($msie_match[1]) && ($msie_match[1] < $trident_match[1] + 4))
+				$this->_browsers['is_ie_compat_view'] = true;
+		}
+
+		// Detect true IE6 and IE7 and not IE in compat mode.
+		$this->_browsers['is_ie7'] = !empty($this->_browsers['is_ie7']) && ($this->_browsers['is_ie_compat_view'] === false);
+		$this->_browsers['is_ie6'] = !empty($this->_browsers['is_ie6']) && ($this->_browsers['is_ie_compat_view'] === false);
+
+		// IE mobile 7 or 9, ... shucks why not
+		if ((!empty($this->_browsers['is_ie7']) && strpos($_SERVER['HTTP_USER_AGENT'], 'IEMobile/7') !== false) || (!empty($this->_browsers['is_ie9']) && strpos($_SERVER['HTTP_USER_AGENT'], 'IEMobile/9') !== false))
+		{
+			$this->_browsers['is_ie_mobi'] = true;
+			$this->_is_mobile = true;
+		}
+
+		// And some throwbacks to a bygone era, deposited here like cholesterol in your arteries
+		$this->_browsers += array(
+			'is_ie4' => !empty($this->_browsers['is_ie4']) && !$this->_browsers['is_web_tv'],
+			'is_mac_ie' => strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5.') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false
+		);
+
+		// Before IE8 we need to fix IE... lots!
+		$this->_browsers['ie_standards_fix'] = (($this->_browsers['is_ie6'] === true) || ($this->_browsers['is_ie7'] === true)) ? true : false;
+
+		// We may even need a size fix...
+		$this->_browsers['needs_size_fix'] = (!empty($this->_browsers['is_ie5']) || !empty($this->_browsers['is_ie5.5']) || !empty($this->_browsers['is_ie4'])) && !$this->_browsers['is_mac_ie'];
+	}
+
+	/**
+	 * Additional firefox checks.
+	 * - Gets the version of the FF browser in use
+	 * - Considers all FF variants as FF including IceWeasel, IceCat, Shiretoko and Minefiled
+	 */
+	private function setupFirefox()
+	{
+		if (preg_match('~(?:Firefox|Ice[wW]easel|IceCat|Shiretoko|Minefield)[\/ \(]([^ ;\)]+)~', $_SERVER['HTTP_USER_AGENT'], $match) === 1)
+			$this->_browsers['is_firefox' . (int) $match[1]] = true;
+	}
+
+	/**
+	 * More Opera checks if we are opera.
+	 *  - checks for the version of Opera in use
+	 *  - uses checks for 10 first and falls through to <9
+	 */
+	private function setupOpera()
+	{
+		// Opera 10+ uses the version tag at the end of the string
+		if (preg_match('~\sVersion/([0-9]+)\.[0-9]+(?:\s*|$)~', $_SERVER['HTTP_USER_AGENT'], $match))
+			$this->_browsers['is_opera' . (int) $match[1]] = true;
+		// Opera pre 10 is supposed to uses the Opera tag alone, as do some spoofers
+		elseif (preg_match('~Opera[ /]([0-9]+)(?!\\.[89])~', $_SERVER['HTTP_USER_AGENT'], $match))
+			$this->_browsers['is_opera' . (int) $match[1]] = true;
+
+		// Needs size fix?
+		$this->_browsers['needs_size_fix'] = !empty($this->_browsers['is_opera6']);
+	}
+
+	/**
+	 * Get the browser name that we will use in the <body id="this_browser">
+	 *  - The order of each browser in $browser_priority is important
+	 *  - if you want to have id='ie6' and not id='ie' then it must appear first in the list of ie browsers
+	 *  - only sets browsers that may need some help via css for compatablity
+	 */
+	private function setupBrowserPriority()
+	{
+		global $context;
+
+		if ($this->_is_mobile)
+			$context['browser_body_id'] = 'mobile';
+		else
+		{
+			$browser_priority = array(
+				'is_ie6' => 'ie6',
+				'is_ie7' => 'ie7',
+				'is_ie' => 'ie',
+				'is_firefox3' => 'firefox3',
+				'is_firefox4' => 'firefox4',
+				'is_firefox' => 'firefox',
+				'is_chrome' => 'chrome',
+				'is_safari' => 'safari',
+				'is_opera8' => 'opera8',
+				'is_opera9' => 'opera9',
+				'is_opera10' => 'opera10',
+				'is_konqueror' => 'konqueror',
+			);
+
+			$context['browser_body_id'] = 'smf';
+			$active = array_reverse(array_keys($this->_browsers, true));
+			foreach ($active as $key => $browser)
+			{
+				if (array_key_exists($browser, $browser_priority))
+				{
+					$context['browser_body_id'] = $browser_priority[$browser];
+					break;
+				}
+			}
+		}
+	}
+
+	/**
+	 * Fill out the historical array
+	 *  - needed to support old mods that don't use isBrowser
+	 */
+	function fillInformation()
+	{
+		$this->_browsers += array(
+			'is_webkit' => false,
+			'is_opera6' => false,
+			'is_opera7' => false,
+			'is_opera8' => false,
+			'is_opera9' => false,
+			'is_opera10' => false,
+			'is_ie4' => false,
+			'is_mac_ie' => false,
+			'is_firefox1' => false,
+			'is_firefox2' => false,
+			'is_firefox3' => false,
+			'is_iphone' => false,
+			'is_android' => false,
+			'is_chrome' => false,
+			'is_safari' => false,
+			'is_ie8' => false,
+			'is_ie7' => false,
+			'is_ie6' => false,
+			'is_ie5.5' => false,
+			'is_ie5' => false,
+			'ie_standards_fix' => false,
+		);
+	}
+}

+ 293 - 0
Sources/Class-CurlFetchWeb.php

@@ -0,0 +1,293 @@
+<?php
+/**
+* Simple cURL class to fetch a web page
+* Properly redirects even with safe mode and basedir restrictions
+* Can provide simple post options to a page
+*
+* Load class
+* Initiate as
+*  - $fetch_data = new cURL_fetch_web_data();
+*	- optionaly pass an array of cURL options and redirect count
+*	- cURL_fetch_web_data(cURL options array, Max redirects);
+*  - $fetch_data = new cURL_fetch_web_data(array(CURLOPT_SSL_VERIFYPEER => 1), 5);
+*
+* Make the call
+*  - $fetch_data('http://www.simplemachines.org'); // fetch a page
+*  - $fetch_data('http://www.simplemachines.org', array('user' => 'name', 'password' => 'password')); // post to a page
+*  - $fetch_data('http://www.simplemachines.org', parameter1&parameter2&parameter3); // post to a page
+*
+*
+* Get the data
+*  - $fetch_data->result('body'); // just the page content
+*  - $fetch_data->result(); // an array of results, body, header, http result codes
+*  - $fetch_data->result_raw(); // show all results of all calls (in the event of a redirect)
+*  - $fetch_data->result_raw(0); // show all results of call x
+*
+*/
+
+if (!defined('SMF'))
+die('Hacking attempt...');
+
+class curl_fetch_web_data
+{
+	private $default_options = array(
+		CURLOPT_RETURNTRANSFER	=> 1, // Get returned value as a string (don't output it)
+		CURLOPT_HEADER			=> 1, // We need the headers to do our own redirect
+		CURLOPT_FOLLOWLOCATION	=> 0, // Don't follow, we will do it ourselves so safe mode and open_basedir will dig it
+		CURLOPT_USERAGENT		=> 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko Firefox/11.0', // set a normal looking useragent
+		CURLOPT_CONNECTTIMEOUT	=> 15, // Don't wait forever on a connection
+		CURLOPT_TIMEOUT			=> 90, // A page should load in this amount of time
+		CURLOPT_MAXREDIRS		=> 5, // stop after this many redirects
+		CURLOPT_ENCODING		=> 'gzip,deflate', // accept gzip and decode it
+		CURLOPT_SSL_VERIFYPEER	=> 0, // stop cURL from verifying the peer's certificate
+		CURLOPT_SSL_VERIFYHOST	=> 0, // stop cURL from verifying the peer's host
+		CURLOPT_POST			=> 0, // no post data unless its passed
+	);
+
+	/**
+	* Start the curl object
+	* - allow for user override values
+	*
+	* @param type $options, cURL options as an array
+	* @param type $max_redirect, use to overide the default of 3
+	*/
+	public function __construct($options = array(), $max_redirect = 3)
+	{
+		// Initialize class variables
+		$this->max_redirect = intval($max_redirect);
+		$this->user_options = $options;
+	}
+
+	/**
+	* Main calling function, 
+	*  - will request the page data from a given $url
+	*  - optionally will post data to the page form if post data is supplied
+	*  - passed arrays will be converted to a post string joined with &'s
+	*  - calls set_options to set the curl opts array values based on the defaults and user input
+	*
+	* @param type $url, the site we are going to fetch
+	* @param type $post_data, any post data as form name => value
+	*/
+	public function get_url_data($url, $post_data = array())
+	{
+		// POSTing some data perhaps?
+		if (!empty($post_data) && is_array($post_data))
+			$this->post_data = $this->build_post_data($post_data);
+		elseif (!empty($post_data))
+			$this->post_data = trim($post_data);
+
+		// set the options and get it
+		$this->set_options();
+		$this->curl_request(str_replace(' ', '%20', $url));
+	}
+
+	/**
+	* Makes the actual cURL call
+	*  - stores responses (url, code, error, headers, body) in the response array
+	*  - detects 301, 302, 307 codes and will redirect to the given response header location
+	*
+	* @param type $url, site to fetch
+	* @param type $redirect, flag to indicate if this was a redirect request or not
+	* @return boolean
+	*/
+	private function curl_request($url, $redirect = false)
+	{
+		// we do have a url I hope
+		if ($url == '')
+			return false;
+		else
+			$this->options[CURLOPT_URL] = $url;
+
+		// if we have not already been redirected, set it up so we can if needed
+		if (!$redirect)
+		{
+			$this->current_redirect = 1;
+			$this->response = array();
+		}
+
+		// Initialize the curl object and make the call
+		$cr = curl_init();
+		curl_setopt_array($cr, $this->options);
+		curl_exec($cr);
+
+		// Get what was returned
+		$curl_info		= curl_getinfo($cr);
+		$curl_content	= curl_multi_getcontent($cr);
+		$url			= $curl_info['url']; // Last effective URL
+		$http_code		= $curl_info['http_code']; // Last HTTP code
+		$body			= (!curl_error($cr)) ? substr($curl_content, $curl_info['header_size']) : false;
+		$error			= (curl_error($cr)) ? curl_error($cr) : false;
+
+		// close this request
+		curl_close($cr);
+
+		// store this 'loops' data, someone may want all of these :O
+		$this->response[] = array(
+			'url'	 => $url,
+			'code'	=> $http_code,
+			'error'   => $error,
+			'headers' => isset($this->headers) ? $this->headers : false,
+			'body'	=> $body,
+		);
+
+		// If this a redirect with a location header and we have not given up, then do it again
+		if (preg_match('~30[127]~i', $http_code) === 1 && $this->headers['location'] != '' && $this->current_redirect <= $this->max_redirect)
+		{
+			$this->current_redirect++;
+			$header_location = $this->get_redirect_url($url, $this->headers['location']);
+			$this->redirect($header_location, $url);
+		}
+	}
+
+	/**
+	* Used if being redirected to ensure we have a fully qualified address
+	*
+	* @param type $last_url, where we went to
+	* @param type $new_url, where we were redirected to
+	* @return new url location
+	*/
+	private function get_redirect_url($last_url = '', $new_url = '')
+	{
+		// Get the elements for these urls
+		$last_url_parse = parse_url($last_url);
+		$new_url_parse  = parse_url($new_url);
+
+		// redirect headers are often incomplete or relative so we need to make sure they are fully qualified
+		$new_url_parse['scheme'] = isset($new_url_parse['scheme']) ? $new_url_parse['scheme'] : $last_url_parse['scheme'];
+		$new_url_parse['host']   = isset($new_url_parse['host']) ? $new_url_parse['host'] : $last_url_parse['host'];
+		$new_url_parse['path']   = isset($new_url_parse['path']) ? $new_url_parse['path'] : $last_url_parse['path'];
+		$new_url_parse['query']  = isset($new_url_parse['query']) ? $new_url_parse['query'] : '';
+
+		// Build the new URL that was in the http header
+		return $new_url_parse['scheme'] . '://' . $new_url_parse['host'] . $new_url_parse['path'] . (!empty($new_url_parse['query']) ? '?' . $new_url_parse['query'] : '');
+	}
+
+	/**
+	* Used to return the results to the calling program
+	*  - called as ->result() will return the full final array
+	*  - called as ->result('body') to just return the page source of the result
+	*
+	* @param type $area, used to return an area such as body, header, error
+	* @return type
+	*/
+	public function result($area = '')
+	{
+		$max_result = count($this->response) - 1;
+
+		// just return a specifed area or the entire result?
+		if ($area == '')
+			return $this->response[$max_result];
+		else
+			return isset($this->response[$max_result][$area]) ? $this->response[$max_result][$area] : $this->response[$max_result];
+	}
+
+	/**
+	* Will return all results from all loops (redirects)
+	*  - Can be call as ->result_raw(x) where x is a specific loop results.
+	*  - Call as ->result_raw() for everything.
+	*
+	* @param type $response_number
+	* @return type
+	*/
+	public function result_raw($response_number = '')
+	{
+		if (!is_numeric($response_number))
+			return $this->response;
+		else
+		{
+			$response_number = min($response_number, count($this->response) - 1);
+			return $this->response[$response_number];
+		}
+	}
+
+	/**
+	* Takes supplied POST data and url encodes it
+	*  - forms the date (for post) in to a string var=xyz&var2=abc&var3=123
+	*  - drops vars with @ since we don't support sending files (uploading)
+	*
+	* @param type $post_data
+	* @return type
+	*/
+	private function build_post_data($post_data)
+	{
+		if (is_array($post_data))
+		{
+			$postvars = array();
+			
+			// build the post data, drop ones with leading @'s since those can be used to send files, we don't support that.
+			foreach ($post_data as $name => $value)
+				$postvars[] = $name . '=' . urlencode($value[0] == '@' ? '' : $value);
+			
+			return implode('&', $postvars);
+		}
+		else
+			return $post_data;
+		
+	}
+
+	/**
+	* Sets the final cURL options for the current call
+	*  - overwrites our default values with user supplied ones or appends new user ones to what we have
+	*  - sets the callback function now that $this is existing
+	*
+	*/
+	private function set_options()
+	{
+		// Callback to parse the returned headers, if any
+		$this->default_options[CURLOPT_HEADERFUNCTION] = array($this, 'header_callback');
+
+		// Any user options to account for
+		if (is_array($this->user_options))
+		{
+			$keys = array_merge(array_keys($this->default_options), array_keys($this->user_options));
+			$vals = array_merge($this->default_options, $this->user_options);
+			$this->options = array_combine($keys, $vals);
+		}
+		else
+			$this->options = $this->default_options;
+
+		// POST data options, here we don't allow any overide
+		if (isset($this->post_data))
+		{
+			$this->options[CURLOPT_POST] = 1;
+			$this->options[CURLOPT_POSTFIELDS] = $this->post_data;
+		}
+	}
+
+	/**
+	* Called to initiate a redirect from a 301, 302 or 307 header
+	*  - resets the cURL options for the loop, sets the referrer flag
+	*
+	* @param type $target_url
+	* @param type $referer_url
+	*/
+	private function redirect($target_url, $referer_url)
+	{
+		// no no I last saw that over there ... really, 301, 302, 307
+		$this->set_options();
+		$this->options[CURLOPT_REFERER] = $referer_url;
+		$this->curl_request($target_url, true);
+	}
+
+	/**
+	* Callback function to parse returned headers
+	*  - lowercases everything to make it consistent
+	*
+	* @param type $cr
+	* @param type $header
+	* @return type
+	*/
+	private function header_callback($cr, $header)
+	{
+		$_header = trim($header);
+		$temp = explode(': ', $_header, 2);
+
+		// set proper headers only
+		if (isset($temp[0]) && isset($temp[1]))
+			$this->headers[strtolower($temp[0])] = strtolower(trim($temp[1]));
+
+		// return the length of what was passed unless you want a Failed writing header error ;)
+		return strlen($header);
+	}
+}
+?>

+ 5 - 113
Sources/Load.php

@@ -392,7 +392,7 @@ function loadUserSettings()
 		else
 		{
 			$ci_user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
-			$user_info['possibly_robot'] = (strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla') === false && strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') === false) || strpos($ci_user_agent, 'googlebot') !== false || strpos($ci_user_agent, 'slurp') !== false || strpos($ci_user_agent, 'crawl') !== false;
+			$user_info['possibly_robot'] = (strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla') === false && strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') === false) || strpos($ci_user_agent, 'googlebot') !== false || strpos($ci_user_agent, 'slurp') !== false || strpos($ci_user_agent, 'crawl') !== false || strpos($ci_user_agent, 'msnbot') !== false;
 		}
 	}
 
@@ -1225,122 +1225,14 @@ function loadMemberContext($user, $display_custom_fields = false)
 
 /**
  * Loads information about what browser the user is viewing with and places it in $context
+ *  - uses the class from Class-BrowerDetect.php
  *
  */
 function detectBrowser()
 {
-	global $context, $user_info;
-
-	// The following determines the user agent (browser) as best it can.
-	$context['browser'] = array(
-		'is_opera' => strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false,
-		'is_webkit' => strpos($_SERVER['HTTP_USER_AGENT'], 'AppleWebKit') !== false,
-		'is_firefox' => preg_match('~(?:Firefox|Ice[wW]easel|IceCat|Shiretoko|Minefield)/~', $_SERVER['HTTP_USER_AGENT']) === 1,
-		'is_web_tv' => strpos($_SERVER['HTTP_USER_AGENT'], 'WebTV') !== false,
-		'is_konqueror' => strpos($_SERVER['HTTP_USER_AGENT'], 'Konqueror') !== false,
-	);
-
-	// <Insert corny Geico gecko comment here>.
-	$context['browser']['is_gecko'] = strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') !== false && !$context['browser']['is_webkit'] && !$context['browser']['is_konqueror'];
-
-	// I'm IE, Yes I'm the real IE; All you other IEs are just imitating.
-	$context['browser']['is_ie'] = !$context['browser']['is_opera'] && !$context['browser']['is_gecko'] && !$context['browser']['is_web_tv'] && preg_match('~MSIE \d+~', $_SERVER['HTTP_USER_AGENT']) === 1;
-
-	// Detect Safari/Chrome/iP[ao]d/iPhone from webkit.
-	if ($context['browser']['is_webkit'])
-	{
-		$context['browser'] += array(
-			'is_chrome' => $context['browser']['is_webkit'] && strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false,
-			'is_iphone' => strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'iPod') !== false,
-			'is_blackberry' => strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'PlayBook') !== false,
-			'is_android' => strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false,
-		);
-
-		$context['browser']['is_safari'] = !$context['browser']['is_chrome'] && strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== false;
-		$context['browser']['is_ipad'] = $context['browser']['is_iphone'] && strpos($_SERVER['HTTP_USER_AGENT'], 'iPad') !== false;
-	}
-
-	// More Opera checks if we are opera.
-	if ($context['browser']['is_opera'])
-		$context['browser'] += array(
-			'is_opera6' => strpos($_SERVER['HTTP_USER_AGENT'], 'Opera 6') !== false,
-			'is_opera7' => strpos($_SERVER['HTTP_USER_AGENT'], 'Opera 7') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Opera/7') !== false,
-			'is_opera8' => strpos($_SERVER['HTTP_USER_AGENT'], 'Opera 8') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Opera/8') !== false,
-			'is_opera9' => preg_match('~Opera[ /]9(?!\\.[89])~', $_SERVER['HTTP_USER_AGENT']) === 1,
-			'is_opera10' => preg_match('~Opera[ /]10\\.~', $_SERVER['HTTP_USER_AGENT']) === 1 || (preg_match('~Opera[ /]9\\.[89]~', $_SERVER['HTTP_USER_AGENT']) === 1 && preg_match('~Version/1[0-9]\\.~', $_SERVER['HTTP_USER_AGENT']) === 1),
-			'is_opera_mobi' => strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mobi') !== false,
-		);
-
-	// Additional firefox checks.
-	if ($context['browser']['is_firefox'])
-		$context['browser'] += array(
-			'is_firefox1' => preg_match('~(?:Firefox|Ice[wW]easel|IceCat)/1\\.~', $_SERVER['HTTP_USER_AGENT']) === 1,
-			'is_firefox2' => preg_match('~(?:Firefox|Ice[wW]easel|IceCat)/2\\.~', $_SERVER['HTTP_USER_AGENT']) === 1,
-			'is_firefox3' => preg_match('~(?:Firefox|Ice[wW]easel|IceCat|Shiretoko|Minefield)/3\\.~', $_SERVER['HTTP_USER_AGENT']) === 1,
-		);
-
-	// Additional IE checks.
-	if ($context['browser']['is_ie'])
-	{
-		$context['browser'] += array(
-			'is_ie9' => strpos($_SERVER['HTTP_USER_AGENT'], 'Trident/5.0') !== false,
-			'is_ie8' => strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') !== false,
-			'is_ie_mobi' => strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'IEMobile/7') !== false,
-			'is_ie5.5' => strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5.5') !== false,
-			'is_ie5' => strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5.0') !== false,
-			'is_ie4' => strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 4') !== false && !$context['browser']['is_web_tv'],
-			'is_mac_ie' => strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5.') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false,
-		);
-
-		// Detect IE7 and not IE8/IE9 in combat mode.
-		$context['browser']['is_ie7'] = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false && !($context['browser']['is_ie8'] || $context['browser']['is_ie9']);
-
-		// Before IE8 we need to fix IE... lots!
-		$context['browser']['ie_standards_fix'] = ($context['browser']['is_ie8'] || $context['browser']['is_ie9']) ? false : true;
-
-		$context['browser']['is_ie6'] = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false && !$context['browser']['is_ie8'] && !$context['browser']['is_ie7'];
-	}
-
-	$context['browser']['needs_size_fix'] = false;
-	if ($context['browser']['is_ie'] || $context['browser']['is_opera'])
-		$context['browser']['needs_size_fix'] = (!empty($context['browser']['is_ie5']) || !empty($context['browser']['is_ie5.5']) || !empty($context['browser']['is_ie4']) || !empty($context['browser']['is_opera6'])) && strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') === false;
-
-	// Be you robot or human?
-	if ($user_info['possibly_robot'])
-	{
-		// This isn't meant to be reliable, it's just meant to catch most bots to prevent PHPSESSID from showing up.
-		$context['browser']['possibly_robot'] = !empty($user_info['possibly_robot']);
-
-		// Robots shouldn't be logging in or registering.  So, they aren't a bot.  Better to be wrong than sorry (or people won't be able to log in!), anyway.
-		if ((isset($_REQUEST['action']) && in_array($_REQUEST['action'], array('login', 'login2', 'register'))) || !$user_info['is_guest'])
-			$context['browser']['possibly_robot'] = false;
-	}
-	else
-		$context['browser']['possibly_robot'] = false;
-
-	// Fill out the rest as needed to support mods that don't use isBrowser
-	$context['browser'] += array(
-		'is_opera6' => false,
-		'is_opera7' => false,
-		'is_opera8' => false,
-		'is_opera9' => false,
-		'is_opera10' => false,
-		'is_ie4' => false,
-		'is_mac_ie' => false,
-		'is_firefox1' => false,
-		'is_firefox2' => false,
-		'is_firefox3' => false,
-		'is_iphone' => false,
-		'is_android' => false,
-		'is_chrome' => false,
-		'is_safari' => false,
-		'is_ie8' => false,
-		'is_ie7' => false,
-		'is_ie6' => false,
-		'is_ie5.5' => false,
-		'is_ie5' => false,
-		'ie_standards_fix' => false,
-	);
+	// Load the current user's browser of choice
+	$detector = new browser_detector;
+	$detector->detectBrowser();
 }
 
 /**

+ 4 - 4
Sources/ManageAttachments.php

@@ -110,12 +110,12 @@ function ManageAttachmentSettings($return_config = false)
 		'',
 			// Directory and size limits.
 			empty($modSettings['currentAttachmentUploadDir']) ? array('text', 'attachmentUploadDir', 'subtext' => $txt['attachmentUploadDir_multiple_configure'], 40, 'invalid' => !$context['valid_upload_dir']) : array('var_message', 'attachmentUploadDir_multiple', 'message' => 'attachmentUploadDir_multiple_configure'),
-			array('text', 'attachmentDirSizeLimit', 'subtext' => $txt['zero_for_no_limit'], 6, 'postinput' => $txt['kilobyte']),
-			array('text', 'attachmentPostLimit', 'subtext' => $txt['zero_for_no_limit'], 6, 'postinput' => $txt['kilobyte']),
+			array('int', 'attachmentDirSizeLimit', 'subtext' => $txt['zero_for_no_limit'], 6, 'postinput' => $txt['kilobyte']),
+			array('int', 'attachmentPostLimit', 'subtext' => $txt['zero_for_no_limit'], 6, 'postinput' => $txt['kilobyte']),
 			array('warning', empty($testPM) ? 'attachment_postsize_warning' : ''),
-			array('text', 'attachmentSizeLimit', 'subtext' => $txt['zero_for_no_limit'], 6, 'postinput' => $txt['kilobyte']),
+			array('int', 'attachmentSizeLimit', 'subtext' => $txt['zero_for_no_limit'], 6, 'postinput' => $txt['kilobyte']),
 			array('warning', empty($testUM) ? 'attachment_filesize_warning' : ''),
-			array('text', 'attachmentNumPerPostLimit', 'subtext' => $txt['zero_for_no_limit'], 6),
+			array('int', 'attachmentNumPerPostLimit', 'subtext' => $txt['zero_for_no_limit'], 6),
 			// Security Items
 		array('title', 'attachment_security_settings'),
 			// Extension checks etc.

+ 1 - 0
Sources/ManageSearch.php

@@ -95,6 +95,7 @@ function EditSearchSettings($return_config = false)
 			array('permissions', 'search_posts'),
 			// Some simple settings.
 			array('check', 'simpleSearch'),
+			array('check', 'search_dropdown'),
 			array('int', 'search_results_per_page'),
 			array('int', 'search_max_results', 'subtext' => $txt['search_max_results_disable']),
 		'',

+ 5 - 2
Sources/Profile-Modify.php

@@ -1773,9 +1773,12 @@ function authentication($memID, $saving = false)
 				// Do the important bits.
 				updateMemberData($memID, array('openid_uri' => '', 'passwd' => $passwd));
 				if ($context['user']['is_owner'])
+				{
 					setLoginCookie(60 * $modSettings['cookieTime'], $memID, sha1(sha1(strtolower($cur_profile['member_name']) . un_htmlspecialchars($_POST['passwrd2'])) . $cur_profile['password_salt']));
-
-				redirectexit('action=profile;u=' . $memID);
+					redirectexit('action=profile;area=authentication;updated');
+				}
+				else
+					redirectexit('action=profile;u=' . $memID);
 			}
 
 			return true;

+ 18 - 6
Sources/Search.php

@@ -248,6 +248,10 @@ function PlushSearch2()
 	global $scripturl, $modSettings, $sourcedir, $txt, $db_connection;
 	global $user_info, $context, $options, $messages_request, $boards_can;
 	global $excludedWords, $participants, $smcFunc;
+	
+	// if comming from the quick search box, and we want to search on members, well we need to do that ;)
+	if (isset($_REQUEST['search_selection']) && $_REQUEST['search_selection'] === 'members')
+		redirectexit($scripturl . '?action=mlist;sa=search;fields=name,email;search=' . urlencode($_REQUEST['search']));
 
 	if (!empty($context['load_average']) && !empty($modSettings['loadavg_search']) && $context['load_average'] >= $modSettings['loadavg_search'])
 		fatal_lang_error('loadavg_search_disabled', false);
@@ -292,6 +296,7 @@ function PlushSearch2()
 
 	// Number of pages hard maximum - normally not set at all.
 	$modSettings['search_max_results'] = empty($modSettings['search_max_results']) ? 200 * $modSettings['search_results_per_page'] : (int) $modSettings['search_max_results'];
+	
 	// Maximum length of the string.
 	$context['search_string_limit'] = 100;
 
@@ -322,15 +327,17 @@ function PlushSearch2()
 	{
 		// Due to IE's 2083 character limit, we have to compress long search strings
 		$temp_params = base64_decode(str_replace(array('-', '_', '.'), array('+', '/', '='), $_REQUEST['params']));
+		
 		// Test for gzuncompress failing
 		$temp_params2 = @gzuncompress($temp_params);
 		$temp_params = explode('|"|', (!empty($temp_params2) ? $temp_params2 : $temp_params));
 
 		foreach ($temp_params as $i => $data)
 		{
-			@list ($k, $v) = explode('|\'|', $data);
+			@list($k, $v) = explode('|\'|', $data);
 			$search_params[$k] = $v;
 		}
+		
 		if (isset($search_params['brd']))
 			$search_params['brd'] = empty($search_params['brd']) ? array() : explode(',', $search_params['brd']);
 	}
@@ -352,9 +359,9 @@ function PlushSearch2()
 		$search_params['maxage'] = !empty($search_params['maxage']) ? (int) $search_params['maxage'] : (int) $_REQUEST['maxage'];
 
 	// Searching a specific topic?
-	if (!empty($_REQUEST['topic']))
-	{
-		$search_params['topic'] = (int) $_REQUEST['topic'];
+	if (!empty($_REQUEST['topic']) || (!empty($_REQUEST['search_selection']) && $_REQUEST['search_selection'] == 'topic'))
+	{	
+		$search_params['topic'] = empty($_REQUEST['search_selection']) ? (int) $_REQUEST['topic'] : (isset($_REQUEST['sd_topic']) ? (int) $_REQUEST['sd_topic'] : '');
 		$search_params['show_complete'] = true;
 	}
 	elseif (!empty($search_params['topic']))
@@ -458,8 +465,13 @@ function PlushSearch2()
 		$_REQUEST['brd'] = $search_params['brd'];
 
 	// Ensure that brd is an array.
-	if (!empty($_REQUEST['brd']) && !is_array($_REQUEST['brd']))
-		$_REQUEST['brd'] = strpos($_REQUEST['brd'], ',') !== false ? explode(',', $_REQUEST['brd']) : array($_REQUEST['brd']);
+	if ((!empty($_REQUEST['brd']) && !is_array($_REQUEST['brd'])) || (!empty($_REQUEST['search_selection']) && $_REQUEST['search_selection'] == 'board'))
+	{
+		if (!empty($_REQUEST['brd']))
+			$_REQUEST['brd'] = strpos($_REQUEST['brd'], ',') !== false ? explode(',', $_REQUEST['brd']) : array($_REQUEST['brd']);
+		else
+			$_REQUEST['brd'] = isset($_REQUEST['sd_brd']) ? array($_REQUEST['sd_brd']) : array();
+	}
 
 	// Make sure all boards are integers.
 	if (!empty($_REQUEST['brd']))

+ 12 - 2
Sources/Security.php

@@ -39,8 +39,18 @@ function validateSession($type = 'admin')
 	// If we're using XML give an additional ten minutes grace as an admin can't log on in XML mode.
 	$refreshTime = isset($_GET['xml']) ? 4200 : 3600;
 
-	// Is the security option off?  Or are they already logged in?
-	if (!empty($modSettings['securityDisable' . ($type != 'admin' ? '_' . $type : '')]) || (!empty($_SESSION[$type . '_time']) && $_SESSION[$type . '_time'] + $refreshTime >= time()))
+	// Is the security option off? 
+	if (!empty($modSettings['securityDisable' . ($type != 'admin' ? '_' . $type : '')]))
+		return;
+		
+	// Or are they already logged in?
+	if ($type === 'moderate')
+	{
+		// Moderator or admin sesssion is need for this area
+		if ((!empty($_SESSION[$type . '_time']) && $_SESSION[$type . '_time'] + $refreshTime >= time()) || (!empty($_SESSION['admin_time']) && $_SESSION['admin_time'] + $refreshTime >= time()))
+			return;
+	}
+	elseif (!empty($_SESSION[$type . '_time']) && $_SESSION[$type . '_time'] + $refreshTime >= time())
 		return;
 
 	require_once($sourcedir . '/Subs-Auth.php');

+ 16 - 1
Sources/Subs-Package.php

@@ -3001,6 +3001,21 @@ function fetch_web_data($url, $post_data = '', $keep_alive = false, $redirection
 		$ftp->check_response(226);
 		$ftp->close();
 	}
+	// More likely a standard HTTP URL, first try to use cURL if available
+	elseif (isset($match[1]) && $match[1] === 'http' && function_exists('curl_init'))
+	{
+		// Include the file containing the curl_fetch_web_data class.
+		require_once($sourcedir . '/Class-CurlFetchWeb.php');
+
+		$fetch_data = new curl_fetch_web_data();
+		$fetch_data->get_url_data($url, $post_data);
+
+		// no errors and a 200 result, then we have a good dataset, well we at least have data ;)
+		if ($fetch_data->result('code') == 200 && !$fetch_data->result('error'))
+			$data = $fetch_data->result('body');
+		else
+			return false;
+	}
 	// This is more likely; a standard HTTP URL.
 	elseif (isset($match[1]) && $match[1] == 'http')
 	{
@@ -3023,7 +3038,7 @@ function fetch_web_data($url, $post_data = '', $keep_alive = false, $redirection
 		// I want this, from there, and I'm not going to be bothering you for more (probably.)
 		if (empty($post_data))
 		{
-			fwrite($fp, 'GET ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n");
+			fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n");
 			fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n");
 			fwrite($fp, 'User-Agent: PHP/SMF' . "\r\n");
 			if ($keep_alive)

+ 0 - 1
Sources/Themes.php

@@ -1876,7 +1876,6 @@ function EditTheme()
 				fwrite($fp, $_POST['entire_file']);
 				fclose($fp);
 
-				// @todo Use fetch_web_data()?
 				$error = @file_get_contents($theme_url . '/tmp_' . session_id() . '.php');
 				if (preg_match('~ <b>(\d+)</b><br( /)?' . '>$~i', $error) != 0)
 					$error_file = $theme_dir . '/tmp_' . session_id() . '.php';

+ 3 - 3
Themes/default/Admin.template.php

@@ -262,7 +262,7 @@ function template_credits()
 				<span class="ie6_header floatleft"><a href="', $scripturl, '?action=helpadmin;help=latest_support" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" class="icon" alt="', $txt['help'], '" /></a> ', $txt['support_latest'], '</span>
 			</h3>
 		</div>
-		<div class="windowbg2">
+		<div class="windowbg">
 			<span class="topslice"><span></span></span>
 			<div class="content">
 				<div id="latestSupport">', $txt['support_latest_fetch'], '</div>
@@ -277,7 +277,7 @@ function template_credits()
 				', $txt['admin_credits'], '
 			</h3>
 		</div>
-		<div class="windowbg">
+		<div class="windowbg2">
 			<span class="topslice"><span></span></span>
 			<div class="content">';
 
@@ -767,7 +767,7 @@ function template_show_settings()
 
 	if (!empty($context['settings_insert_above']))
 		echo $context['settings_insert_above'];
-
+		
 	echo '
 	<div id="admincenter">
 		<form action="', $context['post_url'], '" method="post" accept-charset="', $context['character_set'], '"', !empty($context['force_form_onsubmit']) ? ' onsubmit="' . $context['force_form_onsubmit'] . '"' : '', '>';

+ 19 - 8
Themes/default/BoardIndex.template.php

@@ -283,7 +283,7 @@ function template_info_center()
 		<div class="cat_bar">
 			<h3 class="catbg">
 				<img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/collapse.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
-				', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '
+				<a href="#" id="upshrink_link">', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '</a>
 			</h3>
 		</div>
 		<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';
@@ -352,31 +352,35 @@ function template_info_center()
 
 		// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
 		if (!empty($context['calendar_holidays']))
-				echo '
+			echo '
 				<span class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';
 
 		// People's birthdays. Like mine. And yours, I guess. Kidding.
 		if (!empty($context['calendar_birthdays']))
 		{
-				echo '
+			echo '
 				<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span> ';
-		/* Each member in calendar_birthdays has:
-				id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
-		foreach ($context['calendar_birthdays'] as $member)
+			
+			// Each member in calendar_birthdays has:
+			//		id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) 
+			foreach ($context['calendar_birthdays'] as $member)
 				echo '
 				<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
 		}
+		
 		// Events like community get-togethers.
 		if (!empty($context['calendar_events']))
 		{
 			echo '
 				<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</span> ';
-			/* Each event in calendar_events should have:
-					title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
+			
+			// Each event in calendar_events should have:
+			//		title, href, is_last, can_edit (are they allowed?), modify_href, and is_today.
 			foreach ($context['calendar_events'] as $event)
 				echo '
 					', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/modify_small.png" alt="*" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
 		}
+		
 		echo '
 			</p>';
 	}
@@ -492,6 +496,13 @@ function template_info_center()
 					altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
 				}
 			],
+			aSwapLinks: [
+				{
+					sId: \'upshrink_link\',
+					msgExpanded: ', JavaScriptEscape(sprintf($txt['info_center_title'], $context['forum_name_html_safe'])), ',
+					msgCollapsed: ', JavaScriptEscape(sprintf($txt['info_center_title'], $context['forum_name_html_safe'])), '
+				}
+			],
 			oThemeOptions: {
 				bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
 				sOptionName: \'collapse_header_ic\',

+ 5 - 4
Themes/default/Display.template.php

@@ -676,10 +676,11 @@ function template_main()
 			<div class="tborder" id="quickreplybox">
 				<div class="cat_bar">
 					<h3 class="catbg">
-						<span class="ie6_header floatleft"><a href="javascript:oQuickReply.swap();">
-							<img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.png" alt="+" id="quickReplyExpand" class="icon" />
-						</a>
-						<a href="javascript:oQuickReply.swap();">', $txt['quick_reply'], '</a>
+						<span class="ie6_header floatright">
+							<a href="javascript:oQuickReply.swap();"><img src="', $settings['images_url'], '/', $options['display_quick_reply'] == 2 ? 'collapse' : 'expand', '.png" alt="+" id="quickReplyExpand" class="icon" />		</a>
+						</span>
+						<span>
+							<a href="javascript:oQuickReply.swap();">', $txt['quick_reply'], '</a>
 						</span>
 					</h3>
 				</div>

+ 1 - 1
Themes/default/Login.template.php

@@ -226,7 +226,7 @@ function template_admin_login()
 	echo '
 			<strong>', $txt['password'], ':</strong>
 			<input type="password" name="', $context['sessionCheckType'], '_pass" size="24" class="input_password" />
-			<a href="', $scripturl, '?action=helpadmin;help=securityDisable_why" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.png" alt="', $txt['help'], '" /></a><br />
+			<a href="', $scripturl, '?action=helpadmin;help=securityDisable_why" onclick="return reqWin(this.href);" class="help"><img class="icon" src="', $settings['images_url'], '/helptopics.png" alt="', $txt['help'], '" /></a><br />
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 			<input type="hidden" name="', $context['admin-login_token_var'], '" value="', $context['admin-login_token'], '" />
 			<input type="submit" style="margin-top: 1em;" value="', $txt['login'], '" class="button_submit" />';

+ 4 - 4
Themes/default/ManageMaintenance.template.php

@@ -252,7 +252,7 @@ function template_maintain_members()
 			membersSwap = !membersSwap;
 			var membersForm = document.getElementById(\'membersForm\');
 
-			document.getElementById("membersIcon").src = smf_images_url + (membersSwap ? "/collapse.png" : "/expand.png");
+			document.getElementById("membersIcon").src = smf_images_url + (membersSwap ? "/selected_open.png" : "/selected.png");
 			setInnerHTML(document.getElementById("membersText"), membersSwap ? "', $txt['maintain_members_choose'], '" : "', $txt['maintain_members_all'], '");
 			document.getElementById("membersPanel").style.display = (membersSwap ? "block" : "none");
 
@@ -356,7 +356,7 @@ function template_maintain_members()
 					</select> ', $txt['maintain_members_since2'], ' <input type="text" name="maxdays" value="30" size="3" class="input_text" />', $txt['maintain_members_since3'], '</p>';
 
 	echo '
-					<p><a href="#membersLink" onclick="swapMembers();"><img src="', $settings['images_url'], '/expand.png" alt="+" id="membersIcon" /></a> <a href="#membersLink" onclick="swapMembers();" id="membersText" style="font-weight: bold;">', $txt['maintain_members_all'], '</a></p>
+					<p><a href="#membersLink" onclick="swapMembers();"><img src="', $settings['images_url'], '/selected.png" alt="+" id="membersIcon" /></a> <a href="#membersLink" onclick="swapMembers();" id="membersText" style="font-weight: bold;">', $txt['maintain_members_all'], '</a></p>
 					<div style="display: none; padding: 3px" id="membersPanel">';
 
 	foreach ($context['membergroups'] as $group)
@@ -430,7 +430,7 @@ function template_maintain_topics()
 				rotSwap = !rotSwap;
 
 				// Toggle icon
-				document.getElementById("rotIcon").src = smf_images_url + (rotSwap ? "/collapse.png" : "/expand.png");
+				document.getElementById("rotIcon").src = smf_images_url + (rotSwap ? "/selected_open.png" : "/selected.png");
 				setInnerHTML(document.getElementById("rotText"), rotSwap ? ', JavaScriptEscape($txt['maintain_old_choose']), ' : ', JavaScriptEscape($txt['maintain_old_all']), ');
 
 				// Toggle panel
@@ -476,7 +476,7 @@ function template_maintain_topics()
 
 		echo '
 					<p>
-						<a href="#rotLink" onclick="swapRot();"><img src="', $settings['images_url'], '/expand.png" alt="+" id="rotIcon" /></a> <a href="#rotLink" onclick="swapRot();" id="rotText" style="font-weight: bold;">', $txt['maintain_old_all'], '</a>
+						<a href="#rotLink" onclick="swapRot();"><img src="', $settings['images_url'], '/selected.png" alt="+" id="rotIcon" /></a> <a href="#rotLink" onclick="swapRot();" id="rotText" style="font-weight: bold;">', $txt['maintain_old_all'], '</a>
 					</p>
 					<div style="display: none;" id="rotPanel" class="flow_hidden">
 						<div class="floatleft" style="width: 49%">';

+ 9 - 2
Themes/default/ManageNews.template.php

@@ -119,8 +119,8 @@ function template_email_members()
 
 			<div class="cat_bar">
 				<h3 class="catbg">
-					<span class="ie6_header floatleft"><strong>', $txt['advanced'], '</strong></span>
-					<img class="panel_toggle" src="', $settings['images_url'], '/', empty($context['show_advanced_options']) ? 'collapse' : 'expand', '.png" id="advanced_panel_toggle" alt="*" />
+					<img id="advanced_panel_toggle" class="panel_toggle" style="display: none; src="', $settings['images_url'], '/', empty($context['show_advanced_options']) ? 'collapse' : 'expand', '.png" alt="*" />
+					<a href="#" id="advanced_panel_link" >', $txt['advanced'], '</a>
 				</h3>
 			</div>
 
@@ -208,6 +208,13 @@ function template_email_members()
 					altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
 				}
 			],
+			aSwapLinks: [
+				{
+					sId: \'advanced_panel_link\',
+					msgExpanded: ', JavaScriptEscape($txt['advanced']), ',
+					msgCollapsed: ', JavaScriptEscape($txt['advanced']), '
+				}
+			],
 			oThemeOptions: {
 				bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
 				sOptionName: \'admin_preferences\',

+ 9 - 2
Themes/default/ManagePermissions.template.php

@@ -97,8 +97,8 @@ function template_permission_index()
 		echo '
 			<div class="cat_bar">
 				<h3 class="catbg">
-					<span class="ie6_header">', $txt['permissions_advanced_options'], '</span>
-					<img class="panel_toggle" src="', $settings['images_url'], '/', empty($context['show_advanced_options']) ? 'collapse' : 'expand', '.png" id="permissions_panel_toggle" alt="*" />
+					<img id="permissions_panel_toggle" class="panel_toggle" style="display: none;" src="', $settings['images_url'], '/', empty($context['show_advanced_options']) ? 'collapse' : 'expand', '.png"  alt="*" />
+					<a href="#" id="permissions_panel_link">', $txt['permissions_advanced_options'], '</a>
 				</h3>
 			</div>
 			<div id="permissions_panel_advanced" class="windowbg">
@@ -207,6 +207,13 @@ function template_permission_index()
 					altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
 				}
 			],
+			aSwapLinks: [
+				{
+					sId: \'permissions_panel_link\',
+					msgExpanded: ', JavaScriptEscape($txt['advanced']), ',
+					msgCollapsed: ', JavaScriptEscape($txt['advanced']), '
+				}
+			],
 			oThemeOptions: {
 				bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
 				sOptionName: \'admin_preferences\',

+ 9 - 2
Themes/default/Packages.template.php

@@ -610,8 +610,8 @@ function template_browse()
 			<div id="advanced_box" >
 				<div class="cat_bar">
 					<h3 class="catbg">
-					<span class="ie6_header floatleft"><strong>', $txt['package_advanced_options'], '</strong></span>
-					<img class="panel_toggle" src="', $settings['images_url'], '/', empty($context['show_advanced_options']) ? 'collapse' : 'expand', '.png" id="advanced_panel_toggle" alt="*" />
+						<img id="advanced_panel_toggle" class="panel_toggle" style="display: none;" src="', $settings['images_url'], '/', empty($context['show_advanced_options']) ? 'collapse' : 'expand', '.png" alt="*" />
+						<a href="#" id="advanced_panel_link">', $txt['package_advanced_button'], '</a>
 					</h3>
 				</div>
 				<div id="advanced_panel_div" class="windowbg">
@@ -662,6 +662,13 @@ function template_browse()
 					altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
 				}
 			],
+			aSwapLinks: [
+				{
+					sId: \'advanced_panel_link\',
+					msgExpanded: ', JavaScriptEscape($txt['package_advanced_button']), ',
+					msgCollapsed: ', JavaScriptEscape($txt['package_advanced_button']), '
+				}
+			],
 			oThemeOptions: {
 				bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
 				sOptionName: \'admin_preferences\',

+ 18 - 9
Themes/default/PersonalMessage.template.php

@@ -739,8 +739,7 @@ function template_search()
 			<div class="roundframe">
 				<div class="title_bar">
 					<h4 class="titlebg">
-						<span class="ie6_header floatleft"><strong>', $txt['pm_search_choose_label'], '</strong></span>
-						<img class="panel_toggle" src="', $settings['images_url'], '/', empty($context['show_advanced_options']) ? 'collapse' : 'expand', '.png" id="advanced_panel_toggle" alt="*" />
+						<img id="advanced_panel_toggle" class="panel_toggle" style="display: none;" src="', $settings['images_url'], '/', empty($context['show_advanced_options']) ? 'collapse' : 'expand', '.png"  alt="*" /><a href="#" id="advanced_panel_link">', $txt['pm_search_choose_label'], '</a>
 					</h4>
 				</div>
 				<div id="advanced_panel_div">
@@ -782,6 +781,13 @@ function template_search()
 						altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
 					}
 				],
+				aSwapLinks: [
+					{
+						sId: \'advanced_panel_link\',
+						msgExpanded: ', JavaScriptEscape($txt['pm_search_choose_label']), ',
+						msgCollapsed: ', JavaScriptEscape($txt['pm_search_choose_label']), '
+					}
+				],
 				oThemeOptions: {
 					bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
 					sOptionName: \'admin_preferences\',
@@ -1062,21 +1068,24 @@ function template_send()
 
 	// Send, Preview, spellcheck buttons.
 	echo '
-				<p><label for="outbox"><input type="checkbox" name="outbox" id="outbox" value="1" tabindex="', $context['tabindex']++, '"', $context['copy_to_outbox'] ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['pm_save_outbox'], '</label></p>
-				<p id="shortcuts" class="smalltext">
-					', isBrowser('is_firefox') ? $txt['shortcuts_firefox'] : $txt['shortcuts'], '
+				<p>
+					<label for="outbox"><input type="checkbox" name="outbox" id="outbox" value="1" tabindex="', $context['tabindex']++, '"', $context['copy_to_outbox'] ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['pm_save_outbox'], '</label>
 				</p>
-				<p id="post_confirm_strip" class="righttext">
+				<hr class="hrcolor" />
+				<span id="shortcuts" class="smalltext">
+					', isBrowser('is_firefox') ? $txt['shortcuts_firefox'] : $txt['shortcuts'], '
+				</span>
+				<span id="post_confirm_strip" class="righttext">
 					', template_control_richedit_buttons($context['post_box_name']), '
-				</p>
+				</span>
 				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 				<input type="hidden" name="seqnum" value="', $context['form_sequence_number'], '" />
 				<input type="hidden" name="replied_to" value="', !empty($context['quoted_message']['id']) ? $context['quoted_message']['id'] : 0, '" />
 				<input type="hidden" name="pm_head" value="', !empty($context['quoted_message']['pm_head']) ? $context['quoted_message']['pm_head'] : 0, '" />
 				<input type="hidden" name="f" value="', isset($context['folder']) ? $context['folder'] : '', '" />
 				<input type="hidden" name="l" value="', isset($context['current_label_id']) ? $context['current_label_id'] : -1, '" />
-				<br class="clear" />
-				</div>
+				<br class="clear_right" />
+			</div>
 			<span class="lowerframe"><span></span></span>
 		</div>
 	</form>';

+ 10 - 8
Themes/default/Post.template.php

@@ -373,8 +373,10 @@ function template_main()
 	// If the admin has enabled the hiding of the additional options - show a link and image for it.
 	if (!empty($settings['additional_options_collapsable']))
 		echo '
-					<div id="postAdditionalOptionsHeader">
-						<img src="', $settings['images_url'], '/collapse.png" alt="-" id="postMoreExpand" style="display: none;" /> <strong><a href="#" id="postMoreExpandLink">', $context['can_post_attachment'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt'], '</a></strong>
+					<div id="postAdditionalOptionsHeader" class="title_bar">
+						<h4 class="titlebg">
+							<img id="postMoreExpand" class="panel_toggle" style="display: none;" src="', $settings['images_url'], '/collapse.png" alt="-" /> <strong><a href="#" id="postMoreExpandLink">', $context['can_post_attachment'] ? $txt['post_additionalopt_attach'] : $txt['post_additionalopt'], '</a></strong>
+						</h4>
 					</div>';
 
 	// Display the check boxes for all the standard options - if they are available to the user!
@@ -504,11 +506,11 @@ function template_main()
 
 	// Finally, the submit buttons.
 	echo '
-					<p class="smalltext" id="shortcuts">
-						', isBrowser('is_firefox') ? $txt['shortcuts_firefox'] : $txt['shortcuts'], '
-					</p>
 					<hr class="hrcolor" />
-					<p id="post_confirm_buttons">
+					<span class="smalltext" >
+						', isBrowser('is_firefox') ? $txt['shortcuts_firefox'] : $txt['shortcuts'], '
+					</span>
+					<span id="post_confirm_buttons">
 						', template_control_richedit_buttons($context['post_box_name']);
 
 	// Option to delete an event if user is editing one.
@@ -517,8 +519,8 @@ function template_main()
 						<input type="submit" name="deleteevent" value="', $txt['event_delete'], '" onclick="return confirm(\'', $txt['event_delete_confirm'], '\');" class="button_submit" />';
 
 	echo '
-						<br class="clear_right" />
-					</p>
+					</span>
+					<br class="clear_right" />
 				</div>
 				<span class="lowerframe"><span></span></span>
 			</div>

+ 8 - 8
Themes/default/Profile.template.php

@@ -2876,23 +2876,23 @@ function template_authentication_method()
 							<span class="smalltext">', $txt['required_security_reasons'], '</span>
 						</dt>
 						<dd>
-							<input type="password" name="oldpasswrd" size="20" style="margin-right: 4ex;" class="input_password" />
+							<input type="password" name="oldpasswrd" tabindex="', $context['tabindex']++, '" size="20" style="margin-right: 4ex;" class="input_password" />
 						</dd>
 					</dl>';
 
 	echo '
-					<div class="righttext">';
+					<hr class="hrcolor" />';
 
 	if (!empty($context['token_check']))
 		echo '
-						<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
+					<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
 
 	echo '
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="u" value="', $context['id_member'], '" />
-						<input type="hidden" name="sa" value="', $context['menu_item_selected'], '" />
-						<input type="submit" value="', $txt['change_profile'], '" class="button_submit" />
-					</div>
+					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<input type="hidden" name="u" value="', $context['id_member'], '" />
+					<input type="hidden" name="sa" value="', $context['menu_item_selected'], '" />
+					<input type="submit" value="', $txt['change_profile'], '" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>

+ 6 - 1
Themes/default/Search.template.php

@@ -160,7 +160,12 @@ function template_main()
 			<div class="roundframe">
 				<div class="title_bar">
 					<h4 class="titlebg">
-						<a href="javascript:void(0);" onclick="expandCollapseBoards(); return false;"><img src="', $settings['images_url'], '/expand.png" id="expandBoardsIcon" alt="" /></a> <a href="javascript:void(0);" onclick="expandCollapseBoards(); return false;"><strong>', $txt['choose_board'], '</strong></a>
+						<span class="ie6_header floatright">
+							<a href="javascript:void(0);" onclick="expandCollapseBoards(); return false;"><img src="', $settings['images_url'], '/expand.png" id="expandBoardsIcon" alt=""  class="icon"/></a>
+						</span>
+						<span>
+							<a href="javascript:void(0);" onclick="expandCollapseBoards(); return false;"><strong>', $txt['choose_board'], '</strong></a>
+						</span>
 					</h4>
 				</div>
 				<div class="flow_auto" id="searchBoardsExpand"', $context['boards_check_all'] ? ' style="display: none;"' : '', '>

+ 6 - 6
Themes/default/Stats.template.php

@@ -364,7 +364,7 @@ function template_main()
 			echo '
 				<tr class="windowbg2" valign="middle" align="center" id="year_', $id, '">
 					<th class="lefttext" width="25%">
-						<img id="year_img_', $id, '" src="', $settings['images_url'], '/collapse.png" alt="*" /> <a href="#year_', $id, '" id="year_link_', $id, '">', $year['year'], '</a>
+						<img id="year_img_', $id, '" src="', $settings['images_url'], '/selected_open.png" alt="*" /> <a href="#year_', $id, '" id="year_link_', $id, '">', $year['year'], '</a>
 					</th>
 					<th width="15%">', $year['new_topics'], '</th>
 					<th width="15%">', $year['new_posts'], '</th>
@@ -383,7 +383,7 @@ function template_main()
 				echo '
 				<tr class="windowbg2" valign="middle" align="center" id="tr_month_', $month['id'], '">
 					<th class="stats_month">
-						<img src="', $settings['images_url'], '/', $month['expanded'] ? 'collapse.png' : 'expand.png', '" alt="" id="img_', $month['id'], '" /> <a id="m', $month['id'], '" href="', $month['href'], '" onclick="return doingExpandCollapse;">', $month['month'], ' ', $month['year'], '</a>
+						<img src="', $settings['images_url'], '/', $month['expanded'] ? 'selected_open.png' : 'selected.png', '" alt="" id="img_', $month['id'], '" /> <a id="m', $month['id'], '" href="', $month['href'], '" onclick="return doingExpandCollapse;">', $month['month'], ' ', $month['year'], '</a>
 					</th>
 					<th width="15%">', $month['new_topics'], '</th>
 					<th width="15%">', $month['new_posts'], '</th>
@@ -431,14 +431,14 @@ function template_main()
 			sTableId: \'stats\',
 
 			reYearPattern: /year_(\d+)/,
-			sYearImageCollapsed: \'expand.png\',
-			sYearImageExpanded: \'collapse.png\',
+			sYearImageCollapsed: \'selected.png\',
+			sYearImageExpanded: \'selected_open.png\',
 			sYearImageIdPrefix: \'year_img_\',
 			sYearLinkIdPrefix: \'year_link_\',
 
 			reMonthPattern: /tr_month_(\d+)/,
-			sMonthImageCollapsed: \'expand.png\',
-			sMonthImageExpanded: \'collapse.png\',
+			sMonthImageCollapsed: \'selected.png\',
+			sMonthImageExpanded: \'selected_open.png\',
 			sMonthImageIdPrefix: \'img_\',
 			sMonthLinkIdPrefix: \'m\',
 

+ 1 - 1
Themes/default/css/ie6.css

@@ -17,7 +17,7 @@ h3.catbg img.icon, h4.titlebg img.icon
 }
 h3.catbg span.ie6_header, h4.catbg span.ie6_header, h3.titlebg span.ie6_header, h4.titlebg span.ie6_header
 {
-	padding: 6px 0;
+	padding: 10px 0;
 }
 #statistics h4.titlebg span.ie6_header
 {

+ 40 - 49
Themes/default/css/index.css

@@ -94,7 +94,7 @@ select
 /* Add some padding to the options instead. */
 select option
 {
-	padding: 1px;
+	padding: 2px;
 }
 
 /* The font size of textareas should be just a little bit larger. */
@@ -137,15 +137,15 @@ input:focus, textarea:focus, button:focus, select:focus
 input, select, textarea, textarea.editor 
 {
 	background: #fff;
-	outline:none !important;
+	outline: none !important;
 	border: 1px solid #bbb;
 	vertical-align: top;
-	border-radius: 3px;
+	border-radius: 4px;
 	box-shadow: 0 2px 5px rgba(0,0,0,0.05) inset;
 }
 input:hover, select:hover, textarea:hover, textarea.editor:hover 
 {
-	outline:none !important;
+	outline: none !important;
 	border: 1px solid #999;
 }
 textarea:hover, textarea.editor:hover 
@@ -160,7 +160,7 @@ input:focus, select:focus, textarea:focus, textarea.editor:focus
 }
 select option 
 {
-	padding: 0.1em 0.3em 0.1em 0.3em;
+	padding: 0.1em 0.3em;
 }
 /* End lotsa new stuff */
 
@@ -173,7 +173,7 @@ select option
 	cursor: pointer;
 	font-weight: normal;
 	float: right;
-	border-radius: 3px;
+	border-radius: 4px;
 }
 a.button_link
 { 
@@ -332,14 +332,12 @@ em
 }
 .righttext
 {
-	margin-left: auto;
-	margin-right: 0;
+	margin: 0 0 0 auto;
 	text-align: right;
 }
 .lefttext
 {
-	margin-left: 0;
-	margin-right: auto;
+	margin: 0 0 0 auto;
 	text-align: left;
 }
 .double_height
@@ -826,8 +824,8 @@ dl.settings dt a img
 h3.catbg, h3.catbg2, h3.titlebg, h4.titlebg, h4.catbg
 {
 	overflow: hidden;
-	height: 31px;
-	line-height: 31px;
+	height: 38px;
+	line-height: 38px;
 	font-size: 1.2em;
 	font-weight: bold;
 }
@@ -881,13 +879,13 @@ h4.titlebg, h3.titlebg
 h4.titlebg img.icon
 {
 	float: left;
-	margin: 5px 8px 0 0;
+	margin: 9px 8px 0 0;
 }
 div.cat_bar
 {
 	background: #99abbf url(../images/theme/main_block.png) no-repeat 0 -160px;
 	padding-left: 9px;
-	height: 31px;
+	height: 38px;
 	overflow: hidden;
 	margin-bottom: 1px;
 }
@@ -895,7 +893,7 @@ div.title_bar
 {
 	background: #e3e9ef url(../images/theme/main_block.png) no-repeat 0 -200px;
 	padding-left: 9px;
-	height: 31px;
+	height: 38px;
 	overflow: hidden;
 	margin-bottom: 1px;
 }
@@ -915,7 +913,7 @@ div.title_barIC
 {
 	background: #dadfe6 url(../images/theme/main_block.png) no-repeat 0 -120px;
 	padding-left: 9px;
-	height: 31px;
+	height: 38px;
 	overflow: hidden;
 	margin-bottom: 1px;
 }
@@ -928,10 +926,10 @@ div.title_barIC h4.titlebg
 	margin: 0;
 	padding: 0.5em;
 }
-img#upshrink_ic, img#newsupshrink
+img#upshrink_ic, img#newsupshrink, img.panel_toggle
 {
 	float: right;
-	margin: 10px 5px 0 0;
+	margin: 12px 5px 0 1em;
 }
 table.table_list a.unreadlink, table.table_list a.collapse
 {
@@ -939,14 +937,9 @@ table.table_list a.unreadlink, table.table_list a.collapse
 }
 table.table_list a.collapse
 {
-	margin: 10px 5px 0 1em;
-	height: 31px;
-	line-height: 31px;
-}
-.panel_toggle
-{	
-	margin: 8px 5px 0 1em;
-	float: right;
+	margin: 12px 5px 0 1em;
+	height: 38px;
+	line-height: 38px;
 }
 
 /* The half-round header bars for some tables. */
@@ -957,8 +950,8 @@ table.table_list a.collapse
 }
 .table_grid tr.catbg th, .table_grid tr.titlebg th
 {
-	height: 28px;
-	line-height: 28px;
+	height: 38px;
+	line-height: 38px;
 }
 tr.catbg th.first_th
 {
@@ -1172,19 +1165,23 @@ span.lowerframe span
 ------------------------------------------------------- */
 .auto_suggest_div
 {
-	border: 1px solid #000;
 	position: absolute;
 	visibility: hidden;
+	border-radius: 4px;
+	outline: none !important;
+	border: 1px solid #bbb;
 }
 .auto_suggest_item
 {
 	background-color: #ddd;
+	padding: .1em .3em;
 }
 .auto_suggest_item_hover
 {
 	background-color: #888;
 	cursor: pointer;
 	color: #eee;
+	padding: .1em .3em;
 }
 
 /* Styles for the standard dropdown menus.
@@ -1993,7 +1990,7 @@ div#pollmoderation
 #forumposts h3 img
 {
 	float: left;
-	margin: 4px 0.5em 0 0;
+	margin: 8px 0.5em 0 0;
 }
 #forumposts h3.catbg
 {
@@ -2308,7 +2305,6 @@ ul.post_options li
 	overflow: hidden;
 	margin: .5em 0;
 	padding: 0;
-	border-bottom: 1px solid #cacdd3;
 	padding: 0.5em;
 }
 #postAttachment dd, #postAttachment2 dd
@@ -2727,6 +2723,10 @@ tr.titlebg td
 {
 	padding: 0 0 1em 0;
 }
+#admin_login .centertext a.help img
+{
+	vertical-align: middle;
+}
 
 /* Styles for sidebar menus.
 ------------------------------------------------------- */
@@ -2819,21 +2819,15 @@ tr.windowbg td, tr.windowbg2 td, tr.approvebg td, tr.highlight2 td
 }
 .topic_table td.stickybg2
 {
-	background-image: url(../images/icons/quick_sticky.png);
-	background-repeat: no-repeat;
-	background-position: 98% 4px;
+	background:  #f2e3d9 url(../images/icons/quick_sticky.png) no-repeat 98% 4px;
 }
 .topic_table td.lockedbg2
 {
-	background-image: url(../images/icons/quick_lock.png);
-	background-repeat: no-repeat;
-	background-position: 98% 4px;
+	background: #d8e1e7 url(../images/icons/quick_lock.png) no-repeat 98% 4px;
 }
 .topic_table td.locked_sticky2
 {
-	background-image: url(../images/icons/quick_sticky_lock.png);
-	background-repeat: no-repeat;
-	background-position: 98% 4px;
+	background: #f2e3d9 url(../images/icons/quick_sticky_lock.png) no-repeat 98% 4px;
 }
 .topic_table td.lastpost
 {
@@ -2850,8 +2844,7 @@ tr.windowbg td, tr.windowbg2 td, tr.approvebg td, tr.highlight2 td
 }
 .errorbox 
 {
-	background: #fee url(../images/warning_mute.png) center no-repeat;
-	background-position: 10px 50%;
+	background: #fee url(../images/warning_mute.png) no-repeat 10px 50%;
 	text-align: left;
 	border-top: 2px solid #c34;
 	border-bottom: 2px solid #c34;
@@ -2888,8 +2881,7 @@ tr.windowbg td, tr.windowbg2 td, tr.approvebg td, tr.highlight2 td
 .noticebox 
 {
 	color: #666;
-	background: #fff6ca url(../images/warning_moderate.png) center no-repeat;
-	background-position: 10px 50%;
+	background: #fff6ca url(../images/warning_moderate.png) no-repeat 10px 50%;
 	text-align: left;
 	border-top: 1px solid #ffd324;
 	border-bottom: 1px solid #ffd324;
@@ -2899,8 +2891,7 @@ tr.windowbg td, tr.windowbg2 td, tr.approvebg td, tr.highlight2 td
 .infobox 
 {
 	color: #000;
-	background: #efe url(../images/icons/field_valid.png) center no-repeat;
-	background-position: 10px 50%;
+	background: #efe url(../images/icons/field_valid.png) no-repeat 10px 50%;
 	text-align: left;
 	border-top: 1px solid green;
 	border-bottom: 1px solid green;
@@ -3500,12 +3491,12 @@ dl.addrules dt.floatleft
 }
 #month_grid div.cat_bar
 {
-	height: 25px;
+	height: 38px;
 }
 #month_grid h3.catbg
 {
-	height: 25px;
-	line-height: 27px;
+	height: 38px;
+	line-height: 38px;
 }
 #month_grid table
 {

BIN
Themes/default/images/star.png


BIN
Themes/default/images/staradmin.png


BIN
Themes/default/images/stargmod.png


BIN
Themes/default/images/starmod.png


BIN
Themes/default/images/theme/main_block.png


+ 34 - 9
Themes/default/index.template.php

@@ -155,7 +155,7 @@ function template_html_above()
 			$("ul.dropmenu").superfish(); 
 		});
 	// ]]></script>';
-		
+
 	// load in any javascript files from mods and themes
 	template_javascript();
 		
@@ -202,7 +202,7 @@ function template_html_above()
 
 	echo '
 </head>
-<body class="action_', !empty($context['current_action']) ? htmlspecialchars($context['current_action']) : (!empty($context['current_board']) ? 'messageindex' : (!empty($context['current_topic']) ? 'display' : 'home')),
+<body id="', $context['browser_body_id'], '" class="action_', !empty($context['current_action']) ? htmlspecialchars($context['current_action']) : (!empty($context['current_board']) ? 'messageindex' : (!empty($context['current_topic']) ? 'display' : 'home')),
 	!empty($context['current_board']) ? ' board_' . htmlspecialchars($context['current_board']) : '',
 	'"',
 	// Style per page.
@@ -294,24 +294,49 @@ function template_body_above()
 	echo '
 			</div>
 			<div class="news normaltext">';
+	
 	if ($context['allow_search'])
 	{
 		echo '
-				<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
-					<input type="text" name="search" value="" class="input_text" />&nbsp;
-					<input type="submit" name="search2" value="', $txt['search'], '" class="button_submit" />
-					<input type="hidden" name="advanced" value="0" />';
+			<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
+				<input type="text" name="search" value="" class="input_text" />&nbsp';
+		
+		// Using the quick search dropdown?
+		if (!empty($modSettings['search_dropdown']))
+		{
+			$selected = !empty($context['current_topic']) ? 'current_topic' : (!empty($context['current_board']) ? 'current_board' : 'all');
+			
+			echo '
+				<select name="search_selection">
+					<option value="all"', ($selected == 'all' ? ' selected="selected"' : ''), '>', $txt['search_entireforum'], ' </option>';
+				
+				// Can't limit it to a specific topic if we are not in one
+				if (!empty($context['current_topic']))
+					echo '
+					<option value="topic"', ($selected == 'current_topic' ? ' selected="selected"' : ''), '>', $txt['search_thistopic'], '</option>';
 
+				// Can't limit it to a specific board if we are not in one
+				if (!empty($context['current_board']))
+					echo '
+					<option value="board"', ($selected == 'current_board' ? ' selected="selected"' : ''), '>', $txt['search_thisbrd'], '</option>';
+			echo '
+					<option value="members"', ($selected == 'members' ? ' selected="selected"' : ''), '>', $txt['search_members'], ' </option>
+				</select>';
+		}
+		
 		// Search within current topic?
 		if (!empty($context['current_topic']))
 			echo '
-						<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
+				<input type="hidden" name="', (!empty($modSettings['search_dropdown']) ? 'sd_topic' : 'topic'), '" value="', $context['current_topic'], '" />';
 		// If we're on a certain board, limit it to this board ;).
 		elseif (!empty($context['current_board']))
 			echo '
-						<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
+				<input type="hidden" name="', (!empty($modSettings['search_dropdown']) ? 'sd_brd[' : 'brd['), $context['current_board'],   ']"', 'value="', $context['current_board'], '" />';
 
-		echo '</form>';
+		echo '
+				<input type="submit" name="search2" value="', $txt['search'], '" class="button_submit" />
+				<input type="hidden" name="advanced" value="0" />
+			</form>';	
 	}
 
 	// Show a random news item? (or you could pick one from news_lines...)

+ 1 - 1
Themes/default/languages/Errors.english.php

@@ -212,7 +212,7 @@ $txt['theme_edit_missing'] = 'The file you are trying to edit... can\'t even be
 $txt['no_dump_database'] = 'Only administrators can make database backups!';
 $txt['pm_not_yours'] = 'The personal message you\'re trying to quote is not your own or does not exist, please go back and try again.';
 $txt['mangled_post'] = 'Mangled form data - please go back and try again.';
-$txt['post_upload_error'] = 'The post data is missing. This error is can be caused by trying to submit to file larger than allowed by the server.  Please contact your administrator if this problem continues.';
+$txt['post_upload_error'] = 'The post data is missing. This error is can be caused by trying to submit a file larger than allowed by the server.  Please contact your administrator if this problem continues.';
 $txt['quoted_post_deleted'] = 'The post you are trying to quote either does not exist, was deleted, or is no longer viewable by you.';
 $txt['pm_too_many_per_hour'] = 'You have exceeded the limit of %1$d personal messages per hour.';
 $txt['labels_too_many'] = 'Sorry, %1$s messages already had the maximum amount of labels allowed!';

+ 1 - 0
Themes/default/languages/Help.english.php

@@ -293,6 +293,7 @@ $helptxt['compactTopicPagesEnable'] = 'This will just show a selection of the nu
 $helptxt['timeLoadPageEnable'] = 'This will show the time in seconds SMF took to create that page at the bottom of the board.';
 $helptxt['removeNestedQuotes'] = 'This will strip nested quotes from a post when citing the post in question via a quote link.';
 $helptxt['simpleSearch'] = 'This will show a simple search form and a link to a more advanced form.';
+$helptxt['search_dropdown'] = 'This will show a search selection dropdown next to the quick search box.  From this you can choose to search the current site, current board (if in a board_, current topic (if in a topic) or search for members.';
 $helptxt['max_image_width'] = 'This allows you to set a maximum size for posted pictures. Pictures smaller than the maximum will not be affected.';
 $helptxt['mail_type'] = 'This setting allows you to choose either PHP\'s default settings, or to override those settings with SMTP.  PHP doesn\'t support using authentication with SMTP (which many hosts require, now) so if you want that you should select SMTP.  Please note that SMTP can be slower, and some servers will not take usernames and passwords.<br /><br />You don\'t need to fill in the SMTP settings if this is set to PHP\'s default.';
 $helptxt['attachment_manager_settings'] = 'Attachments are files that members can upload, and attach to a post.<br /><br />

+ 1 - 0
Themes/default/languages/Install.english.php

@@ -45,6 +45,7 @@ $txt['default_reserved_names'] = 'Admin\nWebmaster\nGuest\nroot';
 $txt['default_smileyset_name'] = 'Alienine\'s Set';
 $txt['default_aaron_smileyset_name'] = 'Aaron\'s Set';
 $txt['default_akyhne_smileyset_name'] = 'Akyhne\'s Set';
+$txt['default_fugue_smileyset_name'] = 'Fugue\'s Set';
 $txt['default_theme_name'] = 'SMF Default Theme - Curve';
 $txt['default_core_theme_name'] = 'Core Theme';
 $txt['default_classic_theme_name'] = 'Classic YaBB SE Theme';

+ 1 - 0
Themes/default/languages/Search.english.php

@@ -29,6 +29,7 @@ $txt['search_specific_topic'] = 'Searching only posts in the topic';
 $txt['mods_cat_search'] = 'Search';
 $txt['groups_search_posts'] = 'Membergroups with access to the search function';
 $txt['simpleSearch'] = 'Enable simple search';
+$txt['search_dropdown'] = 'Enable the Quick Search dropdown';
 $txt['search_results_per_page'] = 'Number of search results per page';
 $txt['search_weight_frequency'] = 'Relative search weight for number of matching messages within a topic';
 $txt['search_weight_age'] = 'Relative search weight for age of last matching message';

+ 6 - 2
Themes/default/languages/index.english.php

@@ -149,6 +149,10 @@ $txt['search_on'] = 'on';
 
 $txt['search'] = 'Search';
 $txt['all'] = 'All';
+$txt['search_entireforum'] = 'Entire Forum';
+$txt['search_thisbrd'] = 'This board';
+$txt['search_thistopic'] = 'This topic';
+$txt['search_members'] = 'Members';
 
 $txt['back'] = 'Back';
 $txt['password_reminder'] = 'Password reminder';
@@ -656,8 +660,8 @@ $txt['quickmod_split_selected'] = 'Split Selected';
 // In this string, don't use entities. (&amp;, etc.)
 $txt['show_personal_messages'] = 'You have received one or more new personal messages.\\nWould you like to open a new window to view them?';
 
-$txt['previous_next_back'] = '&171; previous';
-$txt['previous_next_forward'] = 'next &187;';
+$txt['previous_next_back'] = '&laquo; previous';
+$txt['previous_next_forward'] = 'next &raquo;';
 
 $txt['movetopic_auto_board'] = '[BOARD]';
 $txt['movetopic_auto_topic'] = '[TOPIC LINK]';

+ 1 - 1
Themes/default/scripts/admin.js

@@ -482,7 +482,7 @@ function toggleBreakdown(id_group, forcedisplayType)
 		document.getElementById("perm_div_" + id_group + "_" + groupPermissions[id_group][i]).style.display = displayType
 	}
 	document.getElementById("group_hr_div_" + id_group).style.display = displayType
-	document.getElementById("group_toggle_img_" + id_group).src = smf_images_url + "/" + (displayType == "none" ? "selected" : "sort_down") + ".png";
+	document.getElementById("group_toggle_img_" + id_group).src = smf_images_url + "/" + (displayType == "none" ? "selected" : "selected_open") + ".png";
 
 	return false;
 }

+ 1 - 1
Themes/default/scripts/script.js

@@ -1023,7 +1023,7 @@ JumpTo.prototype.showSelect = function ()
 	var sChildLevelPrefix = '';
 	for (var i = this.opt.iCurBoardChildLevel; i > 0; i--)
 		sChildLevelPrefix += this.opt.sBoardChildLevelIndicator;
-	setInnerHTML(document.getElementById(this.opt.sContainerId), this.opt.sJumpToTemplate.replace(/%select_id%/, this.opt.sContainerId + '_select').replace(/%dropdown_list%/, '<select name="' + this.opt.sContainerId + '_select" id="' + this.opt.sContainerId + '_select" ' + ('implementation' in document ? '' : 'onmouseover="grabJumpToContent();" ') + ('onbeforeactivate' in document ? 'onbeforeactivate' : 'onfocus') + '="grabJumpToContent();"><option value="?board=' + this.opt.iCurBoardId + '.0">' + sChildLevelPrefix + this.opt.sBoardPrefix + this.opt.sCurBoardName.removeEntities() + '</option></select>&nbsp;<input type="button" value="' + this.opt.sGoButtonLabel + '" onclick="window.location.href = \'' + smf_prepareScriptUrl(smf_scripturl) + 'board=' + this.opt.iCurBoardId + '.0\';" />'));
+	setInnerHTML(document.getElementById(this.opt.sContainerId), this.opt.sJumpToTemplate.replace(/%select_id%/, this.opt.sContainerId + '_select').replace(/%dropdown_list%/, '<select name="' + this.opt.sContainerId + '_select" id="' + this.opt.sContainerId + '_select" ' + ('implementation' in document ? '' : 'onmouseover="grabJumpToContent();" ') + ('onbeforeactivate' in document ? 'onbeforeactivate' : 'onfocus') + '="grabJumpToContent();"><option value="?board=' + this.opt.iCurBoardId + '.0">' + sChildLevelPrefix + this.opt.sBoardPrefix + this.opt.sCurBoardName.removeEntities() + '</option></select>&nbsp;<input type="button" class="button_submit" value="' + this.opt.sGoButtonLabel + '" onclick="window.location.href = \'' + smf_prepareScriptUrl(smf_scripturl) + 'board=' + this.opt.iCurBoardId + '.0\';" />'));
 	this.dropdownList = document.getElementById(this.opt.sContainerId + '_select');
 }
 

+ 1 - 0
index.php

@@ -52,6 +52,7 @@ require_once($sourcedir . '/Errors.php');
 require_once($sourcedir . '/Logging.php');
 require_once($sourcedir . '/Load.php');
 require_once($sourcedir . '/Security.php');
+require_once($sourcedir . '/Class-BrowserDetect.php');
 
 // Using an pre-PHP 5.1 version?
 if (version_compare(PHP_VERSION, '5.1', '<'))

+ 2 - 2
other/install_2-1_mysql.sql

@@ -1757,8 +1757,8 @@ VALUES ('smfVersion', '{$smf_version}'),
 	('time_offset', '0'),
 	('cookieTime', '60'),
 	('lastActive', '15'),
-	('smiley_sets_known', 'default,aaron,akyhne'),
-	('smiley_sets_names', '{$default_smileyset_name}\n{$default_aaron_smileyset_name}\n{$default_akyhne_smileyset_name}'),
+	('smiley_sets_known', 'default,aaron,akyhne,fugue'),
+	('smiley_sets_names', '{$default_smileyset_name}\n{$default_aaron_smileyset_name}\n{$default_akyhne_smileyset_name}\n{$default_fugue_smileyset_name}'),
 	('smiley_sets_default', 'default'),
 	('cal_days_for_index', '7'),
 	('requireAgreement', '1'),

+ 2 - 2
other/install_2-1_postgresql.sql

@@ -2246,8 +2246,8 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('who_enabled', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('time_offset', '0');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cookieTime', '60');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('lastActive', '15');
-INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smiley_sets_known', 'default,aaron,akyhne');
-INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smiley_sets_names', '{$default_smileyset_name}\n{$default_aaron_smileyset_name}\n{$default_akyhne_smileyset_name}');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smiley_sets_known', 'default,aaron,akyhne,fugue');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smiley_sets_names', '{$default_smileyset_name}\n{$default_aaron_smileyset_name}\n{$default_akyhne_smileyset_name}\n{$default_fugue_smileyset_name}');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smiley_sets_default', 'default');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_days_for_index', '7');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('requireAgreement', '1');

+ 3 - 2
other/install_2-1_sqlite.sql

@@ -1899,10 +1899,11 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('who_enabled', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('time_offset', '0');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cookieTime', '60');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('lastActive', '15');
-INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smiley_sets_known', 'default,aaron,akyhne');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smiley_sets_known', 'default,aaron,akyhne,fugue');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smiley_sets_names', '{$default_smileyset_name}
 {$default_aaron_smileyset_name}
-{$default_akyhne_smileyset_name}');
+{$default_akyhne_smileyset_name}
+{$default_fugue_smileyset_name}');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('smiley_sets_default', 'default');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('cal_days_for_index', '7');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('requireAgreement', '1');