소스 검색

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

emanuele 13 년 전
부모
커밋
b162f88a62
71개의 변경된 파일2036개의 추가작업 그리고 1298개의 파일을 삭제
  1. 154 107
      Sources/Load.php
  2. 8 3
      Sources/ManageAttachments.php
  3. 2 0
      Sources/ManageBans.php
  4. 5 5
      Sources/ManageCalendar.php
  5. 1 1
      Sources/ManageMail.php
  6. 2 2
      Sources/ManageMembergroups.php
  7. 2 6
      Sources/ManageMembers.php
  8. 6 8
      Sources/ManagePaid.php
  9. 3 4
      Sources/ManageScheduledTasks.php
  10. 1 1
      Sources/ManageSearch.php
  11. 9 2
      Sources/ManageSearchEngines.php
  12. 147 87
      Sources/ManageServer.php
  13. 6 4
      Sources/ManageSettings.php
  14. 8 8
      Sources/ManageSmileys.php
  15. 8 6
      Sources/ModerationCenter.php
  16. 6 5
      Sources/Modlog.php
  17. 361 88
      Sources/Packages.php
  18. 5 5
      Sources/Profile-Modify.php
  19. 8 8
      Sources/Profile-View.php
  20. 23 14
      Sources/Subs-Graphics.php
  21. 162 52
      Sources/Subs-Package.php
  22. 91 15
      Sources/Subs.php
  23. 36 1
      Sources/Who.php
  24. 40 17
      Themes/default/Admin.template.php
  25. 3 3
      Themes/default/BoardIndex.template.php
  26. 1 1
      Themes/default/Calendar.template.php
  27. 3 1
      Themes/default/Display.template.php
  28. 40 35
      Themes/default/Errors.template.php
  29. 5 0
      Themes/default/ManageAttachments.template.php
  30. 20 18
      Themes/default/ManageBans.template.php
  31. 10 8
      Themes/default/ManageBoards.template.php
  32. 3 1
      Themes/default/ManageCalendar.template.php
  33. 8 12
      Themes/default/ManageLanguages.template.php
  34. 52 18
      Themes/default/ManageMaintenance.template.php
  35. 38 25
      Themes/default/ManageMembergroups.template.php
  36. 1 3
      Themes/default/ManageMembers.template.php
  37. 3 3
      Themes/default/ManageNews.template.php
  38. 8 7
      Themes/default/ManagePaid.template.php
  39. 14 13
      Themes/default/ManagePermissions.template.php
  40. 18 10
      Themes/default/ManageSearch.template.php
  41. 8 1
      Themes/default/ManageSmileys.template.php
  42. 45 38
      Themes/default/Memberlist.template.php
  43. 17 12
      Themes/default/ModerationCenter.template.php
  44. 80 313
      Themes/default/Packages.template.php
  45. 5 5
      Themes/default/PersonalMessage.template.php
  46. 3 1
      Themes/default/Post.template.php
  47. 216 141
      Themes/default/Profile.template.php
  48. 49 29
      Themes/default/Register.template.php
  49. 4 4
      Themes/default/Reports.template.php
  50. 88 35
      Themes/default/Search.template.php
  51. 7 6
      Themes/default/SplitTopics.template.php
  52. 57 33
      Themes/default/Themes.template.php
  53. 23 10
      Themes/default/css/index.css
  54. 9 5
      Themes/default/languages/Admin.english.php
  55. 5 1
      Themes/default/languages/Help.english.php
  56. 3 1
      Themes/default/languages/ManageMaintenance.english.php
  57. 2 1
      Themes/default/languages/ManageScheduledTasks.english.php
  58. 22 29
      Themes/default/languages/ManageSettings.english.php
  59. 1 0
      Themes/default/languages/ManageSmileys.english.php
  60. 1 0
      Themes/default/languages/ModerationCenter.english.php
  61. 4 2
      Themes/default/languages/Modlog.english.php
  62. 19 8
      Themes/default/languages/Packages.english.php
  63. 4 4
      Themes/default/languages/Profile.english.php
  64. 4 2
      Themes/default/languages/Search.english.php
  65. 1 1
      Themes/default/languages/Settings.english.php
  66. 3 0
      Themes/default/languages/Who.english.php
  67. 6 0
      Themes/default/languages/index.english.php
  68. 1 1
      Themes/default/scripts/admin.js
  69. 1 1
      Themes/default/scripts/script.js
  70. 1 1
      index.php
  71. 26 6
      other/Settings.php

+ 154 - 107
Sources/Load.php

@@ -2598,9 +2598,16 @@ function cache_quick_get($key, $file, $function, $params, $level = 1)
 
 /**
  * Puts value in the cache under key for ttl seconds.
- * It may "miss" so shouldn't be depended on, and may go to any of many
- * various caching servers.
- * It supports eAccelerator, Turck MMCache, APC, ZPS, and memcached.
+ * It may "miss" so shouldn't be depended on, and may go to any of many various caching servers.
+ * It supports:
+ *
+ * Turck MMCache: http://turck-mmcache.sourceforge.net/index_old.html#api
+ * Xcache: http://xcache.lighttpd.net/wiki/XcacheApi
+ * memcache: http://www.php.net/memcache
+ * APC: http://www.php.net/apc
+ * eAccelerator: http://bart.eaccelerator.net/doc/phpdoc/
+ * Zend: http://files.zend.com/help/Zend-Platform/output_cache_functions.htm
+ * Zend: http://files.zend.com/help/Zend-Platform/zend_cache_functions.htm
  *
  * @param string $key
  * @param mixed $value
@@ -2610,8 +2617,9 @@ function cache_put_data($key, $value, $ttl = 120)
 {
 	global $boardurl, $sourcedir, $modSettings, $memcached;
 	global $cache_hits, $cache_count, $db_show_debug, $cachedir;
+	global $cache_accelerator, $cache_enable;
 
-	if (empty($modSettings['cache_enable']) && !empty($modSettings))
+	if (empty($cache_enable))
 		return;
 
 	$cache_count = isset($cache_count) ? $cache_count + 1 : 1;
@@ -2624,74 +2632,94 @@ function cache_put_data($key, $value, $ttl = 120)
 	$key = md5($boardurl . filemtime($sourcedir . '/Load.php')) . '-SMF-' . strtr($key, ':', '-');
 	$value = $value === null ? null : serialize($value);
 
-	// The simple yet efficient memcached.
-	if (function_exists('memcached_set') || function_exists('memcache_set') && isset($modSettings['cache_memcached']) && trim($modSettings['cache_memcached']) != '')
+	switch ($cache_accelerator)
 	{
-		// Not connected yet?
-		if (empty($memcached))
-			get_memcached_server();
-		if (!$memcached)
-			return;
+		case 'memcached':
+			// The simple yet efficient memcached.
+			if (function_exists('memcached_set') || function_exists('memcache_set') && isset($modSettings['cache_memcached']) && trim($modSettings['cache_memcached']) != '')
+			{
+				// Not connected yet?
+				if (empty($memcached))
+					get_memcached_server();
+				if (!$memcached)
+					return;
 
-		memcache_set($memcached, $key, $value, 0, $ttl);
-	}
-	// eAccelerator...
-	elseif (function_exists('eaccelerator_put'))
-	{
-		if (mt_rand(0, 10) == 1)
-			eaccelerator_gc();
+				memcache_set($memcached, $key, $value, 0, $ttl);
+			}
+			break;
+		case 'eaccelerator':
+			// eAccelerator...
+			if (function_exists('eaccelerator_put'))
+			{
+				if (mt_rand(0, 10) == 1)
+					eaccelerator_gc();
 
-		if ($value === null)
-			@eaccelerator_rm($key);
-		else
-			eaccelerator_put($key, $value, $ttl);
-	}
-	// Turck MMCache?
-	elseif (function_exists('mmcache_put'))
-	{
-		if (mt_rand(0, 10) == 1)
-			mmcache_gc();
+				if ($value === null)
+					@eaccelerator_rm($key);
+				else
+					eaccelerator_put($key, $value, $ttl);
+			}
+			break;
+		case 'mmcache':
+			// Turck MMCache?
+			if (function_exists('mmcache_put'))
+			{
+				if (mt_rand(0, 10) == 1)
+					mmcache_gc();
 
-		if ($value === null)
-			@mmcache_rm($key);
-		else
-			mmcache_put($key, $value, $ttl);
-	}
-	// Alternative PHP Cache, ahoy!
-	elseif (function_exists('apc_store'))
-	{
-		// An extended key is needed to counteract a bug in APC.
-		if ($value === null)
-			apc_delete($key . 'smf');
-		else
-			apc_store($key . 'smf', $value, $ttl);
-	}
-	// Zend Platform/ZPS/etc.
-	elseif (function_exists('output_cache_put'))
-		output_cache_put($key, $value);
-	elseif (function_exists('xcache_set') && ini_get('xcache.var_size') > 0)
-	{
-		if ($value === null)
-			xcache_unset($key);
-		else
-			xcache_set($key, $value, $ttl);
-	}
-	// Otherwise custom cache?
-	else
-	{
-		if ($value === null)
-			@unlink($cachedir . '/data_' . $key . '.php');
-		else
-		{
-			$cache_data = '<' . '?' . 'php if (!defined(\'SMF\')) die; if (' . (time() + $ttl) . ' < time()) $expired = true; else{$expired = false; $value = \'' . addcslashes($value, '\\\'') . '\';}' . '?' . '>';
-			
-			// Write out the cache file, check that the cache write was successful; all the data must be written
-			// If it fails due to low diskspace, or other, remove the cache file
-			if (file_put_contents($cachedir . '/data_' . $key . '.php', $cache_data, LOCK_EX) !== strlen($cache_data))
+				if ($value === null)
+					@mmcache_rm($key);
+				else
+				{
+					mmcache_lock($key);
+					mmcache_put($key, $value, $ttl);
+					mmcache_unlock($key);
+				}
+			}
+			break;
+		case 'apc':
+			// Alternative PHP Cache, ahoy!
+			if (function_exists('apc_store'))
+			{
+				// An extended key is needed to counteract a bug in APC.
+				if ($value === null)
+					apc_delete($key . 'smf');
+				else
+					apc_store($key . 'smf', $value, $ttl);
+			}
+			break;
+		case 'zend':
+			// Zend Platform/ZPS/etc.
+			if (function_exists('zend_shm_cache_store'))
+				zend_shm_cache_store('SMF::' . $key, $value, $ttl);
+			elseif (function_exists('output_cache_put'))
+				output_cache_put($key, $value);
+			break;
+		case 'xcache':
+			if (function_exists('xcache_set') && ini_get('xcache.var_size') > 0)
+			{
+				if ($value === null)
+					xcache_unset($key);
+				else
+					xcache_set($key, $value, $ttl);
+			}
+			break;
+		default:
+			// Otherwise custom cache?
+			if ($value === null)
 				@unlink($cachedir . '/data_' . $key . '.php');
-		}
+			else
+			{
+				$cache_data = '<' . '?' . 'php if (!defined(\'SMF\')) die; if (' . (time() + $ttl) . ' < time()) $expired = true; else{$expired = false; $value = \'' . addcslashes($value, '\\\'') . '\';}' . '?' . '>';
+
+				// Write out the cache file, check that the cache write was successful; all the data must be written
+				// If it fails due to low diskspace, or other, remove the cache file
+				if (file_put_contents($cachedir . '/data_' . $key . '.php', $cache_data, LOCK_EX) !== strlen($cache_data))
+					@unlink($cachedir . '/data_' . $key . '.php');
+			}
+			break;
 	}
-	
+
 	if (function_exists('call_integration_hook'))
 		call_integration_hook('cache_put_data', array(&$key, &$value, &$ttl));
 
@@ -2700,8 +2728,7 @@ function cache_put_data($key, $value, $ttl = 120)
 }
 
 /**
- * Gets the value from the cache specified by key, so long as it is not older
- * than ttl seconds.
+ * Gets the value from the cache specified by key, so long as it is not older than ttl seconds.
  * It may often "miss", so shouldn't be depended on.
  * It supports the same as cache_put_data().
  *
@@ -2713,8 +2740,9 @@ function cache_get_data($key, $ttl = 120)
 {
 	global $boardurl, $sourcedir, $modSettings, $memcached;
 	global $cache_hits, $cache_count, $db_show_debug, $cachedir;
+	global $cache_accelerator, $cache_enable;
 
-	if (empty($modSettings['cache_enable']) && !empty($modSettings))
+	if (empty($cache_enable))
 		return;
 
 	$cache_count = isset($cache_count) ? $cache_count + 1 : 1;
@@ -2726,40 +2754,59 @@ function cache_get_data($key, $ttl = 120)
 
 	$key = md5($boardurl . filemtime($sourcedir . '/Load.php')) . '-SMF-' . strtr($key, ':', '-');
 
-	// Okay, let's go for it memcached!
-	if ((function_exists('memcache_get') || function_exists('memcached_get')) && isset($modSettings['cache_memcached']) && trim($modSettings['cache_memcached']) != '')
-	{
-		// Not connected yet?
-		if (empty($memcached))
-			get_memcached_server();
-		if (!$memcached)
-			return null;
-		
-		$value = (function_exists('memcache_get')) ? memcache_get($cache['connection'], $key) : memcached_get($cache['connection'], $key);
-	}
-	// Again, eAccelerator.
-	elseif (function_exists('eaccelerator_get'))
-		$value = eaccelerator_get($key);
-	// The older, but ever-stable, Turck MMCache...
-	elseif (function_exists('mmcache_get'))
-		$value = mmcache_get($key);
-	// This is the free APC from PECL.
-	elseif (function_exists('apc_fetch'))
-		$value = apc_fetch($key . 'smf');
-	// Zend's pricey stuff.
-	elseif (function_exists('output_cache_get'))
-		$value = output_cache_get($key, $ttl);
-	elseif (function_exists('xcache_get') && ini_get('xcache.var_size') > 0)
-		$value = xcache_get($key);
-	// Otherwise it's SMF data!
-	elseif (file_exists($cachedir . '/data_' . $key . '.php') && filesize($cachedir . '/data_' . $key . '.php') > 10)
-	{
-		require($cachedir . '/data_' . $key . '.php');
-		if (!empty($expired) && isset($value))
-		{
-			@unlink($cachedir . '/data_' . $key . '.php');
-			unset($value);
-		}
+	switch ($cache_accelerator)
+	{
+		case 'memcache':
+			// Okay, let's go for it memcached!
+			if ((function_exists('memcache_get') || function_exists('memcached_get')) && isset($modSettings['cache_memcached']) && trim($modSettings['cache_memcached']) != '')
+			{
+				// Not connected yet?
+				if (empty($memcached))
+					get_memcached_server();
+				if (!$memcached)
+					return null;
+
+				$value = (function_exists('memcache_get')) ? memcache_get($cache['connection'], $key) : memcached_get($cache['connection'], $key);
+			}
+			break;
+		case 'eaccelerator':
+			// Again, eAccelerator.
+			if (function_exists('eaccelerator_get'))
+				$value = eaccelerator_get($key);
+			break;
+		case 'mmcache':
+			// The older, but ever-stable, Turck MMCache...
+			if (function_exists('mmcache_get'))
+				$value = mmcache_get($key);
+			break;
+		case 'apc':
+			// This is the free APC from PECL.
+			if (function_exists('apc_fetch'))
+				$value = apc_fetch($key . 'smf');
+			break;
+		case 'zend':
+			// Zend's pricey stuff.
+			if (function_exists('zend_shm_cache_fetch'))
+				$value = zend_shm_cache_fetch('SMF::' . $key, $ttl);
+			elseif (function_exists('output_cache_get'))
+				$value = output_cache_get($key, $ttl);
+			break;
+		case 'xcache':
+			if (function_exists('xcache_get') && ini_get('xcache.var_size') > 0)
+				$value = xcache_get($key);
+			break;
+		default:
+			// Otherwise it's SMF data!
+			if (file_exists($cachedir . '/data_' . $key . '.php') && filesize($cachedir . '/data_' . $key . '.php') > 10)
+			{
+				require($cachedir . '/data_' . $key . '.php');
+				if (!empty($expired) && isset($value))
+				{
+					@unlink($cachedir . '/data_' . $key . '.php');
+					unset($value);
+				}
+			}
+			break;
 	}
 
 	if (isset($db_show_debug) && $db_show_debug === true)
@@ -2767,7 +2814,7 @@ function cache_get_data($key, $ttl = 120)
 		$cache_hits[$cache_count]['t'] = array_sum(explode(' ', microtime())) - array_sum(explode(' ', $st));
 		$cache_hits[$cache_count]['s'] = isset($value) ? strlen($value) : 0;
 	}
-	
+
 	if (function_exists('call_integration_hook'))
 		call_integration_hook('cache_get_data', array(&$key, &$ttl, &$value));
 
@@ -2778,15 +2825,15 @@ function cache_get_data($key, $ttl = 120)
  * Get memcache servers.
  * This function is used by cache_get_data() and cache_put_data().
  * It attempts to connect to a random server in the cache_memcached setting.
- * It recursively calls itself up to recursion_level times.
+ * It recursively calls itself up to $level times.
  *
  * @param int $level = 3
  */
 function get_memcached_server($level = 3)
 {
-	global $modSettings, $memcached, $db_persist;
+	global $modSettings, $memcached, $db_persist, $cache_memcached;
 
-	$servers = explode(',', $modSettings['cache_memcached']);
+	$servers = explode(',', $cache_memcached);
 	$server = explode(':', trim($servers[array_rand($servers)]));
 	$cache = (function_exists('memcache_get')) ? 'memcache' : ((function_exists('memcached_get') ? 'memcached' : ''));
 

+ 8 - 3
Sources/ManageAttachments.php

@@ -99,8 +99,6 @@ function ManageAttachmentSettings($return_config = false)
 			array('select', 'attachmentEnable', array($txt['attachmentEnable_deactivate'], $txt['attachmentEnable_enable_all'], $txt['attachmentEnable_disable_new'])),
 		'',
 			// Extension checks etc.
-			array('check', 'attachmentCheckExtensions'),
-			array('text', 'attachmentExtensions', 40),
 			array('check', 'attachmentRecodeLineEndings'),
 		'',
 			// Directory and size limits.
@@ -109,8 +107,13 @@ function ManageAttachmentSettings($return_config = false)
 			array('text', 'attachmentPostLimit', 6, 'postinput' => $txt['kilobyte']),
 			array('text', 'attachmentSizeLimit', 6, 'postinput' => $txt['kilobyte']),
 			array('text', 'attachmentNumPerPostLimit', 6),
+			// Security Items
+		'',
+			// Extension checks etc.
+			array('check', 'attachmentCheckExtensions'),
+			array('text', 'attachmentExtensions', 40),
 		'',
-			// Image settings.
+			// Image checks.
 			array('warning', empty($testGD) ? 'attachment_gd_warning' : ''),
 			array('check', 'attachment_image_reencode'),
 		'',
@@ -121,6 +124,8 @@ function ManageAttachmentSettings($return_config = false)
 			array('check', 'attachmentShowImages'),
 			array('check', 'attachmentThumbnails'),
 			array('check', 'attachment_thumb_png'),
+			array('check', 'attachment_thumb_memory', 'subtext' => $txt['attachment_thumb_memory_note1'], 'postinput' => $txt['attachment_thumb_memory_note2']),
+			array('warning', 'attachment_thumb_memory_note'),
 			array('text', 'attachmentThumbWidth', 6),
 			array('text', 'attachmentThumbHeight', 6),
 	);

+ 2 - 0
Sources/ManageBans.php

@@ -140,6 +140,7 @@ function BanList()
 
 	$listOptions = array(
 		'id' => 'ban_list',
+		'title' => $txt['ban_title'],
 		'items_per_page' => 20,
 		'base_href' => $scripturl . '?action=admin;area=ban;sa=list',
 		'default_sort_col' => 'added',
@@ -1445,6 +1446,7 @@ function BanLog()
 
 	$listOptions = array(
 		'id' => 'ban_log',
+		'title' => $txt['ban_log'],
 		'items_per_page' => 30,
 		'base_href' => $context['admin_area'] == 'ban' ? $scripturl . '?action=admin;area=ban;sa=log' : $scripturl . '?action=admin;area=logs;sa=banlog',
 		'default_sort_col' => 'date',

+ 5 - 5
Sources/ManageCalendar.php

@@ -133,7 +133,6 @@ function ModifyHolidays()
 						// Construct the date.
 						return sprintf(\'%1$d %2$s %3$s\', $rowData[\'day\'], $txt[\'months\'][(int) $rowData[\'month\']], $year);
 					'),
-					'class' => 'windowbg',
 				),
 				'sort' => array(
 					'default' => 'event_date',
@@ -163,8 +162,9 @@ function ModifyHolidays()
 			array(
 				'position' => 'below_table_data',
 				'value' => '
-					<a href="' . $scripturl . '?action=admin;area=managecalendar;sa=editholiday" style="margin: 0 1em">[' . $txt['holidays_add'] . ']</a>
-					<input type="submit" name="delete" value="' . $txt['quickmod_delete_selected'] . '" class="button_submit" />',
+					
+					<input type="submit" name="delete" value="' . $txt['quickmod_delete_selected'] . '" class="button_submit" />
+					<a class="button_link" href="' . $scripturl . '?action=admin;area=managecalendar;sa=editholiday" style="margin: 0 1em">' . $txt['holidays_add'] . '</a>',
 				'style' => 'text-align: right;',
 			),
 		),
@@ -316,7 +316,7 @@ function ModifyCalendarSettings($return_config = false)
 			array('permissions', 'calendar_edit_any'),
 		'',
 			// How many days to show on board index, and where to display events etc?
-			array('int', 'cal_days_for_index'),
+			array('int', 'cal_days_for_index', 6, 'postinput' => $txt['days_word']),
 			array('select', 'cal_showholidays', array(0 => $txt['setting_cal_show_never'], 1 => $txt['setting_cal_show_cal'], 3 => $txt['setting_cal_show_index'], 2 => $txt['setting_cal_show_all'])),
 			array('select', 'cal_showbdays', array(0 => $txt['setting_cal_show_never'], 1 => $txt['setting_cal_show_cal'], 3 => $txt['setting_cal_show_index'], 2 => $txt['setting_cal_show_all'])),
 			array('select', 'cal_showevents', array(0 => $txt['setting_cal_show_never'], 1 => $txt['setting_cal_show_cal'], 3 => $txt['setting_cal_show_index'], 2 => $txt['setting_cal_show_all'])),
@@ -333,7 +333,7 @@ function ModifyCalendarSettings($return_config = false)
 		'',
 			// Calendar spanning...
 			array('check', 'cal_allowspan'),
-			array('int', 'cal_maxspan'),
+			array('int', 'cal_maxspan', 6, 'postinput' => $txt['days_word']),
 	);
 
 	call_integration_hook('integrate_modify_calendar_settings', array(&$config_vars));

+ 1 - 1
Sources/ManageMail.php

@@ -199,7 +199,7 @@ function BrowseMailQueue()
 		'additional_rows' => array(
 			array(
 				'position' => 'below_table_data',
-				'value' => '[<a href="' . $scripturl . '?action=admin;area=mailqueue;sa=clear;' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="return confirm(\'' . $txt['mailqueue_clear_list_warning'] . '\');">' . $txt['mailqueue_clear_list'] . '</a>] <input type="submit" name="delete_redirects" value="' . $txt['delete'] . '" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" class="button_submit" />',
+				'value' => '<input type="submit" name="delete_redirects" value="' . $txt['quickmod_delete_selected'] . '" onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" class="button_submit" /><a class="button_link" href="' . $scripturl . '?action=admin;area=mailqueue;sa=clear;' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="return confirm(\'' . $txt['mailqueue_clear_list_warning'] . '\');">' . $txt['mailqueue_clear_list'] . '</a> ',
 			),
 		),
 	);

+ 2 - 2
Sources/ManageMembergroups.php

@@ -191,7 +191,7 @@ function MembergroupIndex()
 		'additional_rows' => array(
 			array(
 				'position' => 'below_table_data',
-				'value' => '[<a href="' . $scripturl . '?action=admin;area=membergroups;sa=add;generalgroup">' . $txt['membergroups_add_group'] . '</a>]',
+				'value' => '<a class="button_link" href="' . $scripturl . '?action=admin;area=membergroups;sa=add;generalgroup">' . $txt['membergroups_add_group'] . '</a>',
 			),
 		),
 	);
@@ -304,7 +304,7 @@ function MembergroupIndex()
 		'additional_rows' => array(
 			array(
 				'position' => 'below_table_data',
-				'value' => '[<a href="' . $scripturl . '?action=admin;area=membergroups;sa=add;postgroup">' . $txt['membergroups_add_group'] . '</a>]',
+				'value' => '<a class="button_link" href="' . $scripturl . '?action=admin;area=membergroups;sa=add;postgroup">' . $txt['membergroups_add_group'] . '</a>',
 			),
 		),
 	);

+ 2 - 6
Sources/ManageMembers.php

@@ -418,6 +418,7 @@ function ViewMemberlist()
 
 	$listOptions = array(
 		'id' => 'member_list',
+		'title' => $txt['members_list'],
 		'items_per_page' => $modSettings['defaultMaxMembers'],
 		'base_href' => $scripturl . '?action=admin;area=viewmembers' . $context['params_url'],
 		'default_sort_col' => 'user_name',
@@ -444,7 +445,6 @@ function ViewMemberlist()
 				),
 				'data' => array(
 					'db' => 'id_member',
-					'class' => 'windowbg',
 					'style' => 'text-align: center;',
 				),
 				'sort' => array(
@@ -499,7 +499,6 @@ function ViewMemberlist()
 							'email_address' => true,
 						),
 					),
-					'class' => 'windowbg',
 				),
 				'sort' => array(
 					'default' => 'email_address',
@@ -585,7 +584,6 @@ function ViewMemberlist()
 
 						return \'<input type="checkbox" name="delete[]" value="\' . $rowData[\'id_member\'] . \'" class="input_check" \' . ($rowData[\'id_member\'] == $user_info[\'id\'] || $rowData[\'id_group\'] == 1 || in_array(1, explode(\',\', $rowData[\'additional_groups\'])) ? \'disabled="disabled"\' : \'\') . \' />\';
 					'),
-					'class' => 'windowbg',
 					'style' => 'text-align: center',
 				),
 			),
@@ -799,6 +797,7 @@ function MembersAwaitingActivation()
 
 	$listOptions = array(
 		'id' => 'approve_list',
+		'title' => $txt['members_approval_title'],
 		'items_per_page' => $modSettings['defaultMaxMembers'],
 		'base_href' => $scripturl . '?action=admin;area=viewmembers;sa=browse;type=' . $context['browse_type'] . (!empty($context['show_filter']) ? ';filter=' . $context['current_filter'] : ''),
 		'default_sort_col' => 'date_registered',
@@ -826,7 +825,6 @@ function MembersAwaitingActivation()
 				),
 				'data' => array(
 					'db' => 'id_member',
-					'class' => 'windowbg',
 					'style' => 'text-align: center;',
 				),
 				'sort' => array(
@@ -863,7 +861,6 @@ function MembersAwaitingActivation()
 							'email_address' => true,
 						),
 					),
-					'class' => 'windowbg',
 				),
 				'sort' => array(
 					'default' => 'email_address',
@@ -948,7 +945,6 @@ function MembersAwaitingActivation()
 							'id_member' => false,
 						),
 					),
-					'class' => 'windowbg',
 					'style' => 'text-align: center',
 				),
 			),

+ 6 - 8
Sources/ManagePaid.php

@@ -120,7 +120,7 @@ function ModifySubscriptionSettings($return_config = false)
 	// Some important context stuff
 	$context['page_title'] = $txt['settings'];
 	$context['sub_template'] = 'show_settings';
-	$context['settings_message'] = '<span class="smalltext">' . $txt['paid_note'] . '</span>';
+	$context['settings_message'] = $txt['paid_note'];
 	$context[$context['admin_menu_name']]['current_subsection'] = 'settings';
 
 	// Get the final touches in place.
@@ -202,6 +202,7 @@ function ViewSubscriptions()
 
 	$listOptions = array(
 		'id' => 'subscription_list',
+		'title' => $txt['subscriptions'],
 		'items_per_page' => 20,
 		'base_href' => $scripturl . '?action=admin;area=paidsubscribe;sa=view',
 		'get_items' => array(
@@ -630,6 +631,7 @@ function ViewSubscribedUsers()
 
 	$listOptions = array(
 		'id' => 'subscribed_users_list',
+		'title' => sprintf($txt['view_users_subscribed'], $row['name']),
 		'items_per_page' => 20,
 		'base_href' => $scripturl . '?action=admin;area=paidsubscribe;sa=viewsub;sid=' . $context['sub_id'],
 		'default_sort_col' => 'name',
@@ -759,18 +761,14 @@ function ViewSubscribedUsers()
 					<div class="floatleft">
 						<input type="submit" name="add" value="' . $txt['add_subscriber'] . '" class="button_submit" />
 					</div>
-					<div class="floatright">
-						<input type="submit" name="finished" value="' . $txt['complete_selected'] . '" onclick="return confirm(\'' . $txt['complete_are_sure'] . '\');" class="button_submit" />
-						<input type="submit" name="delete" value="' . $txt['delete_selected'] . '" onclick="return confirm(\'' . $txt['delete_are_sure'] . '\');" class="button_submit" />
-					</div>
+					<input type="submit" name="finished" value="' . $txt['complete_selected'] . '" onclick="return confirm(\'' . $txt['complete_are_sure'] . '\');" class="button_submit" />
+					<input type="submit" name="delete" value="' . $txt['delete_selected'] . '" onclick="return confirm(\'' . $txt['delete_are_sure'] . '\');" class="button_submit" />
 				',
 			),
 			array(
 				'position' => 'top_of_list',
 				'value' => '
-					<div class="title_bar">
-						<h3 class="titlebg">' . sprintf($txt['view_users_subscribed'], $row['name']) . '</h3>
-					</div>
+
 					<div class="floatright">
 						<input type="text" name="sub_search" value="" class="input_text" />
 						<input type="submit" name="ssearch" value="' . $txt['search_sub'] . '" class="button_submit" />

+ 3 - 4
Sources/ManageScheduledTasks.php

@@ -251,8 +251,7 @@ function ScheduledTasks()
 			),
 			array(
 				'position' => 'after_title',
-				'value' => '
-					<span class="smalltext">' . $txt['scheduled_tasks_time_offset'] . '</span>',
+				'value' => $txt['scheduled_tasks_time_offset'],
 				'class' => 'windowbg2',
 			),
 		),
@@ -502,13 +501,13 @@ function TaskLog()
 			array(
 				'position' => 'below_table_data',
 				'value' => '
-					<input type="submit" name="removeAll" value="' . $txt['scheduled_log_empty_log'] . '" class="button_submit" />',
+					<input type="submit" name="removeAll" value="' . $txt['scheduled_log_empty_log'] . '" onclick="return confirm(\'' . $txt['scheduled_log_empty_log_confirm'] . '\');" class="button_submit" />',
 				'style' => 'text-align: right;',
 			),
 			array(
 				'position' => 'after_title',
 				'value' => $txt['scheduled_tasks_time_offset'],
-				'class' => 'smalltext',
+				'class' => 'windowbg2',
 			),
 		),
 	);

+ 1 - 1
Sources/ManageSearch.php

@@ -99,7 +99,7 @@ function EditSearchSettings($return_config = false)
 			array('int', 'search_max_results', 'subtext' => $txt['search_max_results_disable']),
 		'',
 			// Some limitations.
-			array('int', 'search_floodcontrol_time', 'subtext' => $txt['search_floodcontrol_time_desc']),
+			array('int', 'search_floodcontrol_time', 'subtext' => $txt['search_floodcontrol_time_desc'], 6, 'postinput' => $txt['seconds']),
 	);
 
 	call_integration_hook('integrate_modify_search_settings', array(&$config_vars));

+ 9 - 2
Sources/ManageSearchEngines.php

@@ -212,6 +212,7 @@ function ViewSpiders()
 	createToken('admin-ser');
 	$listOptions = array(
 		'id' => 'spider_list',
+		'title' => $txt['spiders'],
 		'items_per_page' => 20,
 		'base_href' => $scripturl . '?action=admin;area=sengines;sa=spiders',
 		'default_sort_col' => 'name',
@@ -299,8 +300,8 @@ function ViewSpiders()
 			array(
 				'position' => 'below_table_data',
 				'value' => '
-					<input type="submit" name="addSpider" value="' . $txt['spiders_add'] . '" class="button_submit" />
 					<input type="submit" name="removeSpiders" value="' . $txt['spiders_remove_selected'] . '" onclick="return confirm(\'' . $txt['spider_remove_selected_confirm'] . '\');" class="button_submit" />
+					<input type="submit" name="addSpider" value="' . $txt['spiders_add'] . '" class="button_submit" />
 				',
 				'style' => 'text-align: right;',
 			),
@@ -752,7 +753,12 @@ function SpiderLogs()
 			array(
 				'position' => 'after_title',
 				'value' => $txt['spider_logs_info'],
-				'class' => 'smalltext',
+				'class' => 'windowbg2',
+			),
+			array(
+				'position' => 'below_table_data',
+				'value' => '<input type="submit" name="removeAll" value="' . $txt['spider_log_empty_log'] . '" onclick="return confirm(\'' . $txt['spider_log_empty_log_confirm'] . '\');" class="button_submit" />',
+				'style' => 'text-align: right;',
 			),
 		),
 	);
@@ -942,6 +948,7 @@ function SpiderStats()
 
 	$listOptions = array(
 		'id' => 'spider_stat_list',
+		'title' => $txt['spider'] . ' ' . $txt['spider_stats'],
 		'items_per_page' => 20,
 		'base_href' => $scripturl . '?action=admin;area=sengines;sa=stats',
 		'default_sort_col' => 'stat_date',

+ 147 - 87
Sources/ManageServer.php

@@ -1,9 +1,9 @@
 <?php
 
 /**
- * Contains all the functionality required to be able to edit the
- * core server settings. This includes anything from which an error may
- * result in the forum destroying itself in a firey fury.
+ * Contains all the functionality required to be able to edit the core server 
+ * settings. This includes anything from which an error may result in the forum
+ * destroying itself in a firey fury.
  *
  * Adding options to one of the setting screens isn't hard. Call prepareDBSettingsContext;
  * The basic format for a checkbox is:
@@ -17,41 +17,33 @@
  *
  * Here's a quick explanation of how to add a new item:
  *
- * * A text input box.  For textual values.
- * ie.	array('text', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth'),
- *
- * * A text input box.  For numerical values.
- * ie.	array('int', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth'),
- *
- * * A text input box.  For floating point values.
- * ie.	array('float', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth'),
- *
- * * A large text input box. Used for textual values spanning multiple lines.
- * ie.	array('large_text', 'nameInModSettingsAndSQL', 'OptionalNumberOfRows'),
- *
- * * A check box.  Either one or zero. (boolean)
- * ie.	array('check', 'nameInModSettingsAndSQL'),
- *
- * * A selection box.  Used for the selection of something from a list.
- * ie.	array('select', 'nameInModSettingsAndSQL', array('valueForSQL' => $txt['displayedValue'])),
- * Note that just saying array('first', 'second') will put 0 in the SQL for 'first'.
- *
- * * A password input box. Used for passwords, no less!
- * ie.	array('password', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth'),
- *
- * * A permission - for picking groups who have a permission.
- * ie.	array('permissions', 'manage_groups'),
- *
- * * A BBC selection box.
- * ie.	array('bbc', 'sig_bbc'),
+ * - A text input box.  For textual values.
+ * 		array('text', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth'),
+ * - A text input box.  For numerical values.
+ * 		array('int', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth'),
+ * - A text input box.  For floating point values.
+ * 		array('float', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth'),
+ * - A large text input box. Used for textual values spanning multiple lines.
+ * 		array('large_text', 'nameInModSettingsAndSQL', 'OptionalNumberOfRows'),
+ * - A check box.  Either one or zero. (boolean)
+ * 		array('check', 'nameInModSettingsAndSQL'),
+ * - A selection box.  Used for the selection of something from a list.
+ * 		array('select', 'nameInModSettingsAndSQL', array('valueForSQL' => $txt['displayedValue'])),
+ * 		Note that just saying array('first', 'second') will put 0 in the SQL for 'first'.
+ * - A password input box. Used for passwords, no less!
+ * 		array('password', 'nameInModSettingsAndSQL', 'OptionalInputBoxWidth'),
+ * - A permission - for picking groups who have a permission.
+ * 		array('permissions', 'manage_groups'),
+ * - A BBC selection box.
+ * 		array('bbc', 'sig_bbc'),
  *
  * For each option:
- * 	type (see above), variable name, size/possible values.
- * 	OR	make type '' for an empty string for a horizontal rule.
- *  SET	preinput - to put some HTML prior to the input box.
- *  SET	postinput - to put some HTML following the input box.
- *  SET	invalid - to mark the data as invalid.
- *  PLUS you can override label and help parameters by forcing their keys in the array, for example:
+ * 	- type (see above), variable name, size/possible values.
+ * 	  OR make type '' for an empty string for a horizontal rule.
+ *  - SET preinput - to put some HTML prior to the input box.
+ *  - SET postinput - to put some HTML following the input box.
+ *  - SET invalid - to mark the data as invalid.
+ *  - PLUS you can override label and help parameters by forcing their keys in the array, for example:
  *  	array('text', 'invalidlabel', 3, 'label' => 'Actual Label')
  *
  * Simple Machines Forum (SMF)
@@ -69,7 +61,8 @@ if (!defined('SMF'))
 
 /**
  * This is the main dispatcher. Sets up all the available sub-actions, all the tabs and selects
- *  the appropriate one based on the sub-action.
+ * the appropriate one based on the sub-action.
+ *
  * Requires the admin_forum permission.
  * Redirects to the appropriate function based on the sub-action.
  *
@@ -205,10 +198,10 @@ function ModifyDatabaseSettings($return_config = false)
 	global $scripturl, $context, $settings, $txt, $boarddir;
 
 	/* If you're writing a mod, it's a bad idea to add things here....
-	For each option:
+		For each option:
 		variable name, description, type (constant), size/possible values, helptext.
-	OR	an empty string for a horizontal rule.
-	OR	a string for a titled section. */
+		OR an empty string for a horizontal rule.
+		OR a string for a titled section. */
 	$config_vars = array(
 		array('db_server', $txt['database_server'], 'file', 'text'),
 		array('db_user', $txt['database_user'], 'file', 'text'),
@@ -265,7 +258,7 @@ function ModifyCookieSettings($return_config = false)
 	$config_vars = array(
 		// Cookies...
 		array('cookiename', $txt['cookie_name'], 'file', 'text', 20),
-		array('cookieTime', $txt['cookieTime'], 'db', 'int'),
+		array('cookieTime', $txt['cookieTime'], 'db', 'int', 'postinput' => $txt['minutes']),
 		array('localCookies', $txt['localCookies'], 'db', 'check', false, 'localCookies'),
 		array('globalCookies', $txt['globalCookies'], 'db', 'check', false, 'globalCookies'),
 		array('globalCookiesDomain', $txt['globalCookiesDomain'], 'db', 'text', false, 'globalCookiesDomain'),
@@ -275,7 +268,7 @@ function ModifyCookieSettings($return_config = false)
 		// Sessions
 		array('databaseSession_enable', $txt['databaseSession_enable'], 'db', 'check', false, 'databaseSession_enable'),
 		array('databaseSession_loose', $txt['databaseSession_loose'], 'db', 'check', false, 'databaseSession_loose'),
-		array('databaseSession_lifetime', $txt['databaseSession_lifetime'], 'db', 'int', false, 'databaseSession_lifetime'),
+		array('databaseSession_lifetime', $txt['databaseSession_lifetime'], 'db', 'int', false, 'databaseSession_lifetime', 'postinput' => $txt['seconds']),
 	);
 
 	call_integration_hook('integrate_cookie_settings', array(&$config_vars));
@@ -326,14 +319,67 @@ function ModifyCookieSettings($return_config = false)
  */
 function ModifyCacheSettings($return_config = false)
 {
-	global $context, $scripturl, $txt, $helptxt, $modSettings;
+	global $context, $scripturl, $txt, $helptxt, $cache_enable;
+	
+	// Detect all available optimizers
+	$detected = array();
+	if (function_exists('eaccelerator_put'))
+		$detected['eaccelerator'] = $txt['eAccelerator_cache'];
+	if (function_exists('mmcache_put'))
+		$detected['mmcache'] = $txt['mmcache_cache'];
+	if (function_exists('apc_store'))
+		$detected['apc'] = $txt['apc_cache'];
+	if (function_exists('output_cache_put') || function_exists('zend_shm_cache_store'))
+		$detected['zend'] = $txt['zend_cache'];
+	if (function_exists('memcache_set') || function_exists('memcached_set'))
+		$detected['memcached'] = $txt['memcached_cache'];
+	if (function_exists('xcache_set'))
+		$detected['xcache'] = $txt['xcache_cache'];
+		
+	// set a message to show what, if anything, we found
+	if (empty($detected))
+		$txt['cache_settings_message'] = $txt['detected_no_caching'];
+	else
+		$txt['cache_settings_message'] = sprintf($txt['detected_accelerators'], implode(', ', $detected));
+	
+	// This is always an option
+	$detected['smf'] = $txt['default_cache'];
 
 	// Define the variables we want to edit.
 	$config_vars = array(
-		// Only a couple of settings, but they are important
-		array('select', 'cache_enable', array($txt['cache_off'], $txt['cache_level1'], $txt['cache_level2'], $txt['cache_level3'])),
-		array('text', 'cache_memcached'),
+		// Only a few settings, but they are important
+		array('', $txt['cache_settings_message'], '', 'desc'),
+		array('cache_enable', $txt['cache_enable'], 'file', 'select', array($txt['cache_off'], $txt['cache_level1'], $txt['cache_level2'], $txt['cache_level3']), 'cache_enable'),
+		array('cache_accelerator', $txt['cache_accelerator'], 'file', 'select', $detected),
+		array('cache_memcached', $txt['cache_memcached'], 'file', 'text', $txt['cache_memcached'], 'cache_memcached'),
+		array('cachedir', $txt['cachedir'], 'file', 'text', 36, 'cache_cachedir'),
 	);
+	
+	// some javascript to enable / disable certain settings if the option is not selected
+	$context['settings_post_javascript'] = '
+		var cache_type = document.getElementById(\'cache_accelerator\');
+		mod_addEvent(cache_type, \'change\', toggleCache);
+		toggleCache();
+
+		function mod_addEvent(control, ev, fn)
+		{
+			if (control.addEventListener)
+			{
+				control.addEventListener(ev, fn, false); 
+			} 
+			else if (control.attachEvent)
+			{
+				control.attachEvent(\'on\'+ev, fn);
+			}
+		}
+		function toggleCache()
+		{
+			var select_elem1 = document.getElementById(\'cache_memcached\');
+			var select_elem2 = document.getElementById(\'cachedir\');
+			select_elem1.disabled = cache_type.value != "memcached";
+			select_elem2.disabled = cache_type.value != "smf";
+		}
+	';
 
 	call_integration_hook('integrate_modify_cache_settings', array(&$config_vars));
 
@@ -345,46 +391,31 @@ function ModifyCacheSettings($return_config = false)
 	{
 		call_integration_hook('integrate_save_cache_settings');
 
-		saveDBSettings($config_vars);
-
-		// We have to manually force the clearing of the cache otherwise the changed settings might not get noticed.
-		$cache_enable = $modSettings['cache_enable'];
-		$modSettings['cache_enable'] = 1;
-		cache_put_data('modSettings', null, 90);
-		$modSettings['cache_enable'] = $cache_enable;
+		saveSettings($config_vars);
+		
+		// we need to save the $cache_enable to $modSettings as well
+		updatesettings(array('cache_enable' => (int) $_POST['cache_enable']));
 
-		if ($modSettings['cache_enable'] == 0)
-		{
-			loadLanguage('ManageMaintenance');
-			createToken('admin-maint');
-			$context['template_layers'][] = 'clean_cache_button';
-		}
+		// exit so we reload our new settings on the page
+		redirectexit('action=admin;area=serversettings;sa=cache;' . $context['session_var'] . '=' . $context['session_id']);
+	}
+	
+	// if its off, allow them to clear it as well
+	// @todo why only when its off ?
+	if (empty($cache_enable))
+	{
+		loadLanguage('ManageMaintenance');
+		createToken('admin-maint');
+		$context['template_layers'][] = 'clean_cache_button';
 	}
 
 	$context['post_url'] = $scripturl . '?action=admin;area=serversettings;sa=cache;save';
 	$context['settings_title'] = $txt['caching_settings'];
 	$context['settings_message'] = $txt['caching_information'];
 
-	// Detect an optimizer?
-	if (function_exists('eaccelerator_put'))
-		$detected = 'eAccelerator';
-	elseif (function_exists('mmcache_put'))
-		$detected = 'MMCache';
-	elseif (function_exists('apc_store'))
-		$detected = 'APC';
-	elseif (function_exists('output_cache_put'))
-		$detected = 'Zend';
-	elseif (function_exists('memcache_set') || function_exists('memcached_set'))
-		$detected = 'Memcached';
-	elseif (function_exists('xcache_set'))
-		$detected = 'XCache';
-	else
-		$detected = 'no_caching';
-
-	$context['settings_message'] = sprintf($context['settings_message'], $txt['detected_' . $detected]);
-
 	// Prepare the template.
-	prepareDBSettingContext($config_vars);
+	createToken('admin-ssc');
+	prepareServerSettingsContext($config_vars);
 }
 
 /**
@@ -421,7 +452,7 @@ function ModifyLoadBalancingSettings($return_config = false)
 
 	// Start with a simple checkbox.
 	$config_vars = array(
-		array('check', 'loadavg_enable'),
+		array('check', 'loadavg_enable', 'disabled' => $disabled),
 	);
 
 	// Set the default values for each option.
@@ -472,13 +503,26 @@ function ModifyLoadBalancingSettings($return_config = false)
 		saveDBSettings($config_vars);
 		redirectexit('action=admin;area=serversettings;sa=loads;' . $context['session_var'] . '=' . $context['session_id']);
 	}
-
+	
+	createToken('admin-ssc');
 	prepareDBSettingContext($config_vars);
 }
 
 
 /**
  * Helper function, it sets up the context for the manage server settings.
+ * - The basic usage of the six numbered key fields are
+ * - array (0 ,1, 2, 3, 4, 5
+ *		0 variable name - the name of the saved variable
+ *		1 label - the text to show on the settings page
+ *		2 saveto - file or db, where to save the variable name - value pair
+ *		3 type - type of data to save, int, float, text, check
+ *		4 size - false or field size
+ *		5 help - '' or helptxt variable name
+ *	)
+ *
+ * the following named keys are also permitted
+ * 'disabled' => 'postinput' => 'preinput' =>
  *
  * @param array $config_vars
  */
@@ -506,26 +550,38 @@ function prepareServerSettingsContext(&$config_vars)
 				$config_var[1] = substr($config_var[1], 0, $divPos);
 			}
 
-			$context['config_vars'][] = array(
+			$context['config_vars'][$config_var[0]] = array(
 				'label' => $config_var[1],
 				'help' => isset($config_var[5]) ? $config_var[5] : '',
 				'type' => $config_var[3],
 				'size' => empty($config_var[4]) ? 0 : $config_var[4],
-				'data' => isset($config_var[4]) && is_array($config_var[4]) ? $config_var[4] : array(),
+				'data' => isset($config_var[4]) && is_array($config_var[4]) && $config_var[3] != 'select' ? $config_var[4] : array(),
 				'name' => $config_var[0],
 				'value' => $config_var[2] == 'file' ? htmlspecialchars($$varname) : (isset($modSettings[$config_var[0]]) ? htmlspecialchars($modSettings[$config_var[0]]) : (in_array($config_var[3], array('int', 'float')) ? 0 : '')),
 				'disabled' => !empty($context['settings_not_writable']) || !empty($config_var['disabled']),
 				'invalid' => false,
 				'subtext' => $subtext,
 				'javascript' => '',
-				'preinput' => '',
-				'postinput' => '',
+				'preinput' => !empty($config_var['preinput']) ? $config_var['preinput'] : '',
+				'postinput' => !empty($config_var['postinput']) ? $config_var['postinput'] : '',
 			);
 			
+			// If this is a select box handle any data.
+			if (!empty($config_var[4]) && is_array($config_var[4]))
+			{
+				// If it's associative
+				if (isset($config_var[4][0]) && is_array($config_var[4][0]))
+					$context['config_vars'][$config_var[0]]['data'] = $config_var[4];
+				else
+				{
+					foreach ($config_var[4] as $key => $item)
+						$context['config_vars'][$config_var[0]]['data'][] = array($key, $item);
+				}
+			}
 		}
 	}
 
-	// Two tokens because save these settings require both saveSettings and saveDBSettings
+	// Two tokens because saving these settings requires both saveSettings and saveDBSettings
 	createToken('admin-ssc');
 	createToken('admin-dbsc');
 }
@@ -732,11 +788,15 @@ function saveSettings(&$config_vars)
 		'cookiename',
 		'webmaster_email',
 		'db_name', 'db_user', 'db_server', 'db_prefix', 'ssi_db_user',
-		'boarddir', 'sourcedir', 'cachedir',
+		'boarddir', 'sourcedir', 
+		'cachedir', 'cache_accelerator', 'cache_memcached',
 	);
+	
 	// All the numeric variables.
 	$config_ints = array(
+		'cache_enable',
 	);
+	
 	// All the checkboxes.
 	$config_bools = array(
 		'db_persist', 'db_error_send',
@@ -772,7 +832,7 @@ function saveSettings(&$config_vars)
 	require_once($sourcedir . '/Subs-Admin.php');
 	updateSettingsFile($new_settings);
 
-	// Now loopt through the remaining (database-based) settings.
+	// Now loop through the remaining (database-based) settings.
 	$new_settings = array();
 	foreach ($config_vars as $config_var)
 	{

+ 6 - 4
Sources/ManageSettings.php

@@ -63,6 +63,7 @@ function ModifyFeatureSettings()
 
 	call_integration_hook('integrate_modify_features', array(&$subActions));
 
+	// If Advanced Profile Fields are disabled don't show the setting page
 	if (!in_array('cp', $context['admin_features']))
 		unset($subActions['profile']);
 
@@ -394,6 +395,7 @@ function ModifyCoreFeatures($return_config = false)
 
 		// Make any setting changes!
 		updateSettings($setting_changes);
+
 		// This is needed to let menus appear if cache > 2
 		clean_cache('data');
 
@@ -462,12 +464,12 @@ function ModifyBasicSettings($return_config = false)
 			// Number formatting, timezones.
 			array('text', 'time_format'),
 			array('select', 'number_format', array('1234.00' => '1234.00', '1,234.00' => '1,234.00', '1.234,00' => '1.234,00', '1 234,00' => '1 234,00', '1234,00' => '1234,00')),
-			array('float', 'time_offset'),
+			array('float', 'time_offset', 6, 'postinput' => $txt['hours']),
 			'default_timezone' => array('select', 'default_timezone', array()),
 		'',
 			// Who's online?
 			array('check', 'who_enabled'),
-			array('int', 'lastActive'),
+			array('int', 'lastActive', 6, 'postinput' => $txt['minutes']),
 		'',
 			// Statistics.
 			array('check', 'trackStats'),
@@ -639,8 +641,8 @@ function ModifyKarmaSettings($return_config = false)
 			array('select', 'karmaMode', explode('|', $txt['karma_options'])),
 		'',
 			// Who can do it.... and who is restricted by time limits?
-			array('int', 'karmaMinPosts'),
-			array('float', 'karmaWaitTime'),
+			array('int', 'karmaMinPosts', 6, 'postinput' => strtolower($txt['posts'])),
+			array('float', 'karmaWaitTime', 6, 'postinput' => $txt['hours']),
 			array('check', 'karmaTimeRestrictAdmins'),
 		'',
 			// What does it look like?  [smite]?

+ 8 - 8
Sources/ManageSmileys.php

@@ -207,8 +207,10 @@ function EditSmileySets()
 			$set_paths = explode(',', $modSettings['smiley_sets_known']);
 			$set_names = explode("\n", $modSettings['smiley_sets_names']);
 			foreach ($_POST['smiley_set'] as $id => $val)
+			{	
 				if (isset($set_paths[$id], $set_names[$id]) && !empty($id))
 					unset($set_paths[$id], $set_names[$id]);
+			}
 
 			updateSettings(array(
 				'smiley_sets_known' => implode(',', $set_paths),
@@ -365,6 +367,8 @@ function EditSmileySets()
 
 	$listOptions = array(
 		'id' => 'smiley_set_list',
+		'title' => $txt['smiley_sets'],
+		'no_items_label' => $txt['smiley_sets_none'],
 		'base_href' => $scripturl . '?action=admin;area=smileys;sa=editsets',
 		'default_sort_col' => 'default',
 		'get_items' => array(
@@ -394,7 +398,6 @@ function EditSmileySets()
 				),
 				'data' => array(
 					'db_htmlsafe' => 'name',
-					'class' => 'windowbg',
 				),
 				'sort' => array(
 					'default' => 'name',
@@ -412,7 +415,6 @@ function EditSmileySets()
 							'path' => true,
 						),
 					),
-					'class' => 'windowbg',
 				),
 				'sort' => array(
 					'default' => 'path',
@@ -452,7 +454,7 @@ function EditSmileySets()
 		'additional_rows' => array(
 			array(
 				'position' => 'below_table_data',
-				'value' => '[<a href="' . $scripturl . '?action=admin;area=smileys;sa=modifyset' . '">' . $txt['smiley_sets_add'] . '</a>] <input type="submit" name="delete" value="' . $txt['smiley_sets_delete'] . '" onclick="return confirm(\'' . $txt['smiley_sets_confirm'] . '\');" class="button_submit" />',
+				'value' => '<input type="submit" name="delete" value="' . $txt['smiley_sets_delete'] . '" onclick="return confirm(\'' . $txt['smiley_sets_confirm'] . '\');" class="button_submit" /> <a class="button_link" href="' . $scripturl . '?action=admin;area=smileys;sa=modifyset' . '">' . $txt['smiley_sets_add'] . '</a> ',
 			),
 		),
 	);
@@ -924,6 +926,7 @@ function EditSmileys()
 
 		$listOptions = array(
 			'id' => 'smiley_list',
+			'title' => $txt['smileys_edit'],
 			'items_per_page' => 40,
 			'base_href' => $scripturl . '?action=admin;area=smileys;sa=editsmileys',
 			'default_sort_col' => 'filename',
@@ -966,7 +969,6 @@ function EditSmileys()
 					),
 					'data' => array(
 						'db_htmlsafe' => 'filename',
-						'class' => 'windowbg',
 					),
 					'sort' => array(
 						'default' => 'filename',
@@ -988,7 +990,6 @@ function EditSmileys()
 							else
 								return $txt[\'smileys_location_popup\'];
 						'),
-						'class' => 'windowbg',
 					),
 					'sort' => array(
 						'default' => 'FIND_IN_SET(hidden, \'' . implode(',', array_keys($smiley_locations)) . '\')',
@@ -1018,7 +1019,6 @@ function EditSmileys()
 
 							return $description;
 						'),
-						'class' => 'windowbg',
 					),
 					'sort' => array(
 						'default' => 'description',
@@ -1654,6 +1654,7 @@ function EditMessageIcons()
 
 	$listOptions = array(
 		'id' => 'message_icon_list',
+		'title' => $txt['icons_edit_message_icons'],
 		'base_href' => $scripturl . '?action=admin;area=smileys;sa=editicons',
 		'get_items' => array(
 			'function' => 'list_getMessageIcons',
@@ -1690,7 +1691,6 @@ function EditMessageIcons()
 				),
 				'data' => array(
 					'db_htmlsafe' => 'title',
-					'class' => 'windowbg',
 				),
 			),
 			'board' => array(
@@ -1740,7 +1740,7 @@ function EditMessageIcons()
 		'additional_rows' => array(
 			array(
 				'position' => 'below_table_data',
-				'value' => '[<a href="' . $scripturl . '?action=admin;area=smileys;sa=editicon">' . $txt['icons_add_new'] . '</a>] <input type="submit" name="delete" value="' . $txt['quickmod_delete_selected'] . '" class="button_submit" />',
+				'value' => '<input type="submit" name="delete" value="' . $txt['quickmod_delete_selected'] . '" class="button_submit" /> <a class="button_link" href="' . $scripturl . '?action=admin;area=smileys;sa=editicon">' . $txt['icons_add_new'] . '</a>',
 			),
 		),
 	);

+ 8 - 6
Sources/ModerationCenter.php

@@ -1602,10 +1602,7 @@ function ViewWarningLog()
 
 						if (!empty($warning[\'id_notice\']))
 							$output .= \'
-							<div class="floatright">
-								<a href="\' . $scripturl . \'?action=moderate;area=notice;nid=\' . $warning[\'id_notice\'] . \'" onclick="window.open(this.href, \\\'\\\', \\\'scrollbars=yes,resizable=yes,width=400,height=250\\\');return false;" target="_blank" class="new_win" title="\' . $txt[\'profile_warning_previous_notice\'] . \'"><img src="\' . $settings[\'default_images_url\'] . \'/filter.png" alt="\' . $txt[\'profile_warning_previous_notice\'] . \'" /></a>
-							</div>\';
-
+								<a href="\' . $scripturl . \'?action=moderate;area=notice;nid=\' . $warning[\'id_notice\'] . \'" onclick="window.open(this.href, \\\'\\\', \\\'scrollbars=yes,resizable=yes,width=400,height=250\\\');return false;" target="_blank" class="new_win" title="\' . $txt[\'profile_warning_previous_notice\'] . \'"><img src="\' . $settings[\'default_images_url\'] . \'/filter.png" alt="\' . $txt[\'profile_warning_previous_notice\'] . \'" /></a>\';
 						return $output;
 					'),
 				),
@@ -1805,6 +1802,7 @@ function ViewWarningTemplates()
 			),
 			'delete' => array(
 				'header' => array(
+					'value' => '<input type="checkbox" class="input_check" onclick="invertAll(this, this.form);" />',
 					'style' => 'width: 4%;',
 				),
 				'data' => array(
@@ -1824,9 +1822,13 @@ function ViewWarningTemplates()
 		'additional_rows' => array(
 			array(
 				'position' => 'below_table_data',
+				'value' => '&nbsp;<input type="submit" name="delete" value="' . $txt['mc_warning_template_delete'] . '" onclick="return confirm(\'' . $txt['mc_warning_template_delete_confirm'] . '\');" class="button_submit" />',
+				'style' => 'text-align: right;',
+			),
+			array(
+				'position' => 'bottom_of_list',
 				'value' => '
-					<input type="submit" name="add" value="' . $txt['mc_warning_template_add'] . '" class="button_submit" />
-					<input type="submit" name="delete" value="' . $txt['mc_warning_template_delete'] . '" onclick="return confirm(\'' . $txt['mc_warning_template_delete_confirm'] . '\');" class="button_submit" />',
+					<input type="submit" name="add" value="' . $txt['mc_warning_template_add'] . '" class="button_submit" />',
 				'style' => 'text-align: right;',
 			),
 		),

+ 6 - 5
Sources/Modlog.php

@@ -276,17 +276,18 @@ function ViewModlog()
 			array(
 				'position' => 'after_title',
 				'value' => $txt['modlog_' . ($context['log_type'] == 3 ? 'admin' : 'moderation') . '_log_desc'],
-				'class' => 'smalltext',
-				'style' => 'padding: 2ex;',
+
+				'style' => 'padding: 1ex 2ex;',
 			),
 			array(
 				'position' => 'below_table_data',
 				'value' => '
 					' . $txt['modlog_search'] . ' (' . $txt['modlog_by'] . ': ' . $context['search']['label'] . '):
-					<input type="text" name="search" size="18" value="' . $context['search']['string'] . '" class="input_text" /> <input type="submit" name="is_search" value="' . $txt['modlog_go'] . '" class="button_submit" />
+					<input type="text" name="search" size="18" value="' . $context['search']['string'] . '" class="input_text" />
+					<input type="submit" name="is_search" value="' . $txt['modlog_go'] . '" class="button_submit" style="float:none" />
 					' . ($context['can_delete'] ? ' |
-						<input type="submit" name="remove" value="' . $txt['modlog_remove'] . '" class="button_submit" />
-						<input type="submit" name="removeall" value="' . $txt['modlog_removeall'] . '" class="button_submit" />' : ''),
+						<input type="submit" name="remove" value="' . $txt['modlog_remove'] . '" onclick="return confirm(\'' . $txt['modlog_remove_selected_confirm'] . '\');" class="button_submit" />
+						<input type="submit" name="removeall" value="' . $txt['modlog_removeall'] . '" onclick="return confirm(\'' . $txt['modlog_remove_all_confirm'] . '\');" class="button_submit" />' : ''),
 			),
 		),
 	);

+ 361 - 88
Sources/Packages.php

@@ -49,7 +49,7 @@ function Packages()
 		'install2' => 'PackageInstall',
 		'uninstall' => 'PackageInstallTest',
 		'uninstall2' => 'PackageInstall',
-		'installed' => 'InstalledList',
+		'installed' => 'PackageBrowse',
 		'options' => 'PackageOptions',
 		'perms' => 'PackagePermissions',
 		'flush' => 'FlushInstall',
@@ -293,6 +293,7 @@ function PackageInstallTest()
 	$context['has_failure'] = false;
 	$chmod_files = array();
 
+	// no actions found, return so we can display an error
 	if (empty($actions))
 		return;
 
@@ -313,21 +314,22 @@ function PackageInstallTest()
 			$chmod_files[] = $action['filename'];
 			continue;
 		}
-		elseif ($action['type'] == 'readme')
+		elseif ($action['type'] == 'readme' || $action['type'] == 'license')
 		{
+			$type = 'package_' . $action['type'];
 			if (file_exists($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename']))
-				$context['package_readme'] = htmlspecialchars(trim(file_get_contents($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename']), "\n\r"));
+				$context[$type] = htmlspecialchars(trim(file_get_contents($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename']), "\n\r"));
 			elseif (file_exists($action['filename']))
-				$context['package_readme'] = htmlspecialchars(trim(file_get_contents($action['filename']), "\n\r"));
+				$context[$type] = htmlspecialchars(trim(file_get_contents($action['filename']), "\n\r"));
 
 			if (!empty($action['parse_bbc']))
 			{
 				require_once($sourcedir . '/Subs-Post.php');
-				preparsecode($context['package_readme']);
-				$context['package_readme'] = parse_bbc($context['package_readme']);
+				preparsecode($context[$type]);
+				$context[$type] = parse_bbc($context[$type]);
 			}
 			else
-				$context['package_readme'] = nl2br($context['package_readme']);
+				$context[$type] = nl2br($context[$type]);
 
 			continue;
 		}
@@ -489,10 +491,12 @@ function PackageInstallTest()
 			$thisAction = array();
 		}
 		elseif ($action['type'] == 'code')
+		{
 			$thisAction = array(
 				'type' => $txt['execute_code'],
 				'action' => $smcFunc['htmlspecialchars']($action['filename']),
 			);
+		}
 		elseif ($action['type'] == 'database')
 		{
 			$thisAction = array(
@@ -501,11 +505,13 @@ function PackageInstallTest()
 			);
 		}
 		elseif (in_array($action['type'], array('create-dir', 'create-file')))
+		{
 			$thisAction = array(
 				'type' => $txt['package_create'] . ' ' . ($action['type'] == 'create-dir' ? $txt['package_tree'] : $txt['package_file']),
 				'action' => $smcFunc['htmlspecialchars'](strtr($action['destination'], array($boarddir => '.')))
 			);
-		elseif (in_array($action['type'], array('hook')))
+		}
+		elseif ($action['type'] == 'hook')
 		{
 			$action['description'] = !isset($action['hook'], $action['function']) ? $txt['package_action_failure'] : $txt['package_action_success'];
 
@@ -517,6 +523,54 @@ function PackageInstallTest()
 				'action' => sprintf($txt['execute_hook_action'],  $smcFunc['htmlspecialchars']($action['hook'])),
 			);
 		}
+		elseif ($action['type'] == 'credits')
+		{
+			$thisAction = array(
+				'type' => $txt['execute_credits_add'],
+				'action' => sprintf($txt['execute_credits_action'],  $smcFunc['htmlspecialchars']($action['title'])),
+			);
+		}
+		elseif ($action['type'] == 'requires')
+		{
+			$installed = false;
+			$version = true;
+
+			// package missing required values?
+			if (!isset($action['id']))
+				$context['has_failure'] = true;
+			else
+			{
+				// See if this dependancy is installed
+				$request = $smcFunc['db_query']('', '
+					SELECT version
+					FROM {db_prefix}log_packages
+					WHERE package_id = {string:current_package}
+						AND install_state != {int:not_installed}
+					ORDER BY time_installed DESC
+					LIMIT 1',
+					array(
+						'not_installed'	=> 0,
+						'current_package' => $action['id'],
+					)
+				);
+				$installed = ($smcFunc['db_num_rows']($request) !== 0);
+				if ($installed)
+					list($version) = $smcFunc['db_fetch_row']($request);
+				$smcFunc['db_free_result']($request);
+
+				// do a version level check (if requested) in the most basic way
+				$version = (isset($action['version']) ? $version == $action['version'] : true);
+			}
+
+			// Set success or failure information
+			$action['description'] = ($installed && $version) ? $txt['package_action_success'] : $txt['package_action_failure'];
+			$context['has_failure'] = !($installed && $version);
+
+			$thisAction = array(
+				'type' => $txt['package_requires'],
+				'action' => $txt['package_check_for'] . ' ' . $action['id'] . (isset($action['version']) ? (' / ' . ($version ? $action['version'] : '<span class="error">' . $action['version'] . '</span>')) : ''),
+			);
+		}
 		elseif (in_array($action['type'], array('require-dir', 'require-file')))
 		{
 			// Do this one...
@@ -564,6 +618,7 @@ function PackageInstallTest()
 				// Is the action already stated?
 				$theme_action = !empty($action['theme_action']) && in_array($action['theme_action'], array('no', 'yes', 'auto')) ? $action['theme_action'] : 'auto';
 				$action['unparsed_destination'] = $action['unparsed_filename'];
+				
 				// If it's not auto do we think we have something we can act upon?
 				if ($theme_action != 'auto' && !in_array($matches[1], array('languagedir', 'languages_dir', 'imagesdir', 'themedir')))
 					$theme_action = '';
@@ -615,6 +670,7 @@ function PackageInstallTest()
 				if (isset($theme_data['theme_dir']) && $id != 1)
 				{
 					$real_path = $theme_data['theme_dir'] . $path;
+					
 					// Confirm that we don't already have this dealt with by another entry.
 					if (!in_array(strtolower(strtr($real_path, array('\\' => '/'))), $themeFinds['other_themes']))
 					{
@@ -626,6 +682,7 @@ function PackageInstallTest()
 								$temp = dirname($temp);
 							$chmod_files[] = $temp;
 						}
+						
 						if ($action_data['type'] == 'require-dir' && !is_writable($real_path) && (file_exists($real_path) || !is_writable(dirname($real_path))))
 							$chmod_files[] = $real_path;
 
@@ -921,7 +978,17 @@ function PackageInstall()
 				// Now include the file and be done with it ;).
 				require($boarddir . '/Packages/temp/' . $context['base_path'] . $action['filename']);
 			}
-			elseif ($action['type'] == 'hook' && isset($action['hook'], $action['name']))
+			elseif ($action['type'] == 'credits')
+			{
+				// Time to build the billboard
+				$credits_tag = array(
+					'url' => $action['url'],
+					'license' => $action['license'],
+					'copyright' => $action['copyright'],
+					'title' => $action['title'],
+				);
+			}
+			elseif ($action['type'] == 'hook' && isset($action['hook'], $action['function']))
 			{
 				if ($action['reverse'])
 					remove_integration_function($action['hook'], $action['function']);
@@ -1048,19 +1115,21 @@ function PackageInstall()
 			// What failed steps?
 			$failed_step_insert = serialize($failed_steps);
 
+			// Credits tag?
+			$credits_tag = (empty($credits_tag)) ? '' : serialize($credits_tag);
 			$smcFunc['db_insert']('',
 				'{db_prefix}log_packages',
 				array(
 					'filename' => 'string', 'name' => 'string', 'package_id' => 'string', 'version' => 'string',
 					'id_member_installed' => 'int', 'member_installed' => 'string','time_installed' => 'int',
 					'install_state' => 'int', 'failed_steps' => 'string', 'themes_installed' => 'string',
-					'member_removed' => 'int', 'db_changes' => 'string',
+					'member_removed' => 'int', 'db_changes' => 'string', 'credits' => 'string',
 				),
 				array(
 					$packageInfo['filename'], $packageInfo['name'], $packageInfo['id'], $packageInfo['version'],
 					$user_info['id'], $user_info['name'], time(),
 					$is_upgrade ? 2 : 1, $failed_step_insert, $themes_installed,
-					0, $db_changes,
+					0, $db_changes, $credits_tag,
 				),
 				array('id_install')
 			);
@@ -1265,29 +1334,158 @@ function PackageRemove()
  */
 function PackageBrowse()
 {
-	global $txt, $boarddir, $scripturl, $context, $forum_version;
+	global $txt, $boarddir, $scripturl, $context, $forum_version, $sourcedir, $settings;
 
 	$context['page_title'] .= ' - ' . $txt['browse_packages'];
-	$context['sub_template'] = 'browse';
 
 	$context['forum_version'] = $forum_version;
+	$context['modification_types'] = array('modification', 'avatar', 'language', 'unknown');
+
+	$installed = $context['sub_action'] == 'installed' ? true : false;
+
+	require_once($sourcedir . '/Subs-List.php');
+
+	foreach ($context['modification_types'] as $type)
+	{
+		// Use the standard templates for showing this.
+		$listOptions = array(
+			'id' => 'packages_lists_' . $type,
+			'title' => $installed ? $txt['view_and_remove'] : $txt[$type . '_package'],
+			'no_items_label' => $txt['no_packages'],
+			'get_items' => array(
+				'function' => 'list_getPackages',
+				'params' => array('type' => $type, 'installed' => $installed),
+			),
+			'columns' => array(
+				'id' => array(
+					'header' => array(
+						'value' => '',
+						'style' => 'width: 32px;',
+					),
+					'data' => array(
+						'function' => create_function('$packages', '
+							static $packageCounter;
+							if (empty($packageCounter))
+								$packageCounter = 1;
+
+							return $packageCounter++ . \'.\';
+						'),
+					),
+				),
+				'mod_name' => array(
+					'header' => array(
+						'value' => $txt['mod_name'],
+						'style' => 'width: 25%;',
+					),
+					'data' => array(
+						'function' => create_function('$package_md5', '
+							global $context;
 
-	$instmods = loadInstalledPackages();
+							if (isset($context[\'available_' . $type . '\'][$package_md5]))
+								return $context[\'available_' . $type . '\'][$package_md5][\'name\'];'
+						),
+					),
+				),
+				'version' => array(
+					'header' => array(
+						'value' => $txt['mod_version'],
+						'style' => 'width: 25%;',
+					),
+					'data' => array(
+						'function' => create_function('$package_md5', '
+							global $context;
 
-	$installed_mods = array();
-	// Look through the list of installed mods...
-	foreach ($instmods as $installed_mod)
-		$installed_mods[$installed_mod['package_id']] = array(
-			'id' => $installed_mod['id'],
-			'version' => $installed_mod['version'],
+							if (isset($context[\'available_' . $type . '\'][$package_md5]))
+								return $context[\'available_' . $type . '\'][$package_md5][\'version\'];'
+						),
+					),
+				),
+				'operations' => array(
+					'header' => array(
+						'value' => '',
+					),
+					'data' => array(
+						'function' => create_function('$package_md5', '
+							global $context, $scripturl, $txt;
+
+							if (!isset($context[\'available_' . $type . '\'][$package_md5]))
+								return \'\';
+
+							// Rewrite shortcut
+							$package = $context[\'available_' . $type . '\'][$package_md5];
+							$return = \'\';
+
+							if ($package[\'can_uninstall\'])
+								$return = \'
+									<a href="\' . $scripturl . \'?action=admin;area=packages;sa=uninstall;package=\' . $package[\'filename\'] . \';pid=\' . $package[\'installed_id\'] . \'">[ \' . $txt[\'uninstall\'] . \' ]</a>\';
+							elseif ($package[\'can_emulate_uninstall\'])
+								$return = \'
+									<a href="\' . $scripturl . \'?action=admin;area=packages;sa=uninstall;ve=\' . $package[\'can_emulate_uninstall\'] . \';package=\' . $package[\'filename\'] . \';pid=\' . $package[\'installed_id\'] . \'">[ \' . $txt[\'package_emulate_uninstall\'] . \' \' . $package[\'can_emulate_uninstall\'] . \' ]</a>\';
+							elseif ($package[\'can_upgrade\'])
+								$return = \'
+									<a href="\' . $scripturl . \'?action=admin;area=packages;sa=install;package=\' . $package[\'filename\'] . \'">[ \' . $txt[\'package_upgrade\'] . \' ]</a>\';
+							elseif ($package[\'can_install\'])
+								$return = \'
+									<a href="\' . $scripturl . \'?action=admin;area=packages;sa=install;package=\' . $package[\'filename\'] . \'">[ \' . $txt[\'install_mod\'] . \' ]</a>\';
+							elseif ($package[\'can_emulate_install\'])
+								$return = \'
+									<a href="\' . $scripturl . \'?action=admin;area=packages;sa=install;ve=\' . $package[\'can_emulate_install\'] . \';package=\' . $package[\'filename\'] . \'">[ \' . $txt[\'package_emulate_install\'] . \' \' . $package[\'can_emulate_install\'] . \' ]</a>\';
+
+							return $return . \'
+									<a href="\' . $scripturl . \'?action=admin;area=packages;sa=list;package=\' . $package[\'filename\'] . \'">[ \' . $txt[\'list_files\'] . \' ]</a>
+									<a href="\' . $scripturl . \'?action=admin;area=packages;sa=remove;package=\' . $package[\'filename\'] . \';\' . $context[\'session_var\'] . \'=\' . $context[\'session_id\'] . \'"\' . ($package[\'is_installed\'] && $package[\'is_current\'] ? \' onclick="return confirm(\\\'\' . $txt[\'package_delete_bad\'] . \'\\\');"\' : \'\') . \'>[ \' . $txt[\'package_delete\'] . \' ]</a>\';'
+							),
+						'style' => 'text-align: right;',
+					),
+				),
+			),
+			'additional_rows' => array(
+				array(
+					'position' => 'bottom_of_list',
+					'value' => (
+					$context['sub_action'] == 'browse' ? '
+			<div class="padding smalltext floatleft">
+				' . $txt['package_installed_key'] . '
+				<img src="' . $settings['images_url'] . '/icons/package_installed.png" alt="" class="centericon" style="margin-left: 1ex;" /> ' . $txt['package_installed_current'] . '
+				<img src="' . $settings['images_url'] . '/icons/package_old.png" alt="" class="centericon" style="margin-left: 2ex;" /> ' . $txt['package_installed_old'] . '
+			</div>' : '<a class="button_link" href="' . $scripturl . '?action=admin;area=packages;sa=flush;' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="return confirm(\'' . $txt['package_delete_list_warning'] . '\');">' . $txt['delete_list'] . '</a><span style="float: right; margin:.5em;"></span><a class="button_link" href="#" onclick="document.getElementById(\'advanced_box\').style.display = document.getElementById(\'advanced_box\').style.display == \'\' ? \'none\' : \'\'; return false;">' .  $txt['package_advanced_button'] . '</a>'), 
+				),
+			),
 		);
 
+		createList($listOptions);
+	}
+
+	$context['sub_template'] = 'browse';
+	$context['default_list'] = 'packages_lists';
+
+	// Empty lists for now.
+	$context['available_mods'] = array();
+	$context['available_avatars'] = array();
+	$context['available_languages'] = array();
+	$context['available_other'] = array();
+	$context['available_all'] = array();
+}
+
+function list_getPackages($start, $items_per_page, $sort, $params, $installed)
+{
+	global $boarddir, $scripturl, $context, $forum_version;
+	static $instmods, $packages;
+	
+	// Start things up
+	if (!isset($packages[$params]))
+		$packages[$params] = array();
+
+	// We need the packages directory to be writable for this.
+	if (!@is_writable($boarddir . '/Packages'))
+		create_chmod_control(array($boarddir . '/Packages'), array('destination_url' => $scripturl . '?action=admin;area=packages', 'crash_on_error' => true));
+
 	$the_version = strtr($forum_version, array('SMF ' => ''));
 
 	// Here we have a little code to help those who class themselves as something of gods, version emulation ;)
 	if (isset($_GET['version_emulate']))
 	{
-		if ($_GET['version_emulate'] === 0 && isset($_SESSION['version_emulate']))
+		if (($_GET['version_emulate'] === 0 || $_GET['version_emulate'] === $forum_version) && isset($_SESSION['version_emulate']))
 			unset($_SESSION['version_emulate']);
 		elseif ($_GET['version_emulate'] !== 0)
 			$_SESSION['version_emulate'] = strtr($_GET['version_emulate'], array('-' => ' ', '+' => ' ', 'SMF ' => ''));
@@ -1297,20 +1495,44 @@ function PackageBrowse()
 		$context['forum_version'] = 'SMF ' . $_SESSION['version_emulate'];
 		$the_version = $_SESSION['version_emulate'];
 	}
+	if (isset($_SESSION['single_version_emulate']))
+		unset($_SESSION['single_version_emulate']);
 
-	// Get a list of all the ids installed, so the latest packages won't include already installed ones.
-	$context['installed_mods'] = array_keys($installed_mods);
+	if (empty($instmods))
+	{
+		$instmods = loadInstalledPackages();
+		$installed_mods = array();
+		// Look through the list of installed mods...
+		foreach ($instmods as $installed_mod)
+			$installed_mods[$installed_mod['package_id']] = array(
+				'id' => $installed_mod['id'],
+				'version' => $installed_mod['version'],
+			);
 
-	// Empty lists for now.
-	$context['available_mods'] = array();
-	$context['available_avatars'] = array();
-	$context['available_languages'] = array();
-	$context['available_other'] = array();
-	$context['available_all'] = array();
+		// Get a list of all the ids installed, so the latest packages won't include already installed ones.
+		$context['installed_mods'] = array_keys($installed_mods);
+	}
 
-	// We need the packages directory to be writable for this.
-	if (!@is_writable($boarddir . '/Packages'))
-		create_chmod_control(array($boarddir . '/Packages'), array('destination_url' => $scripturl . '?action=admin;area=packages', 'crash_on_error' => true));
+	if ($installed)
+	{
+		foreach ($instmods as $installed_mod)
+		{
+			$packages['modification'][] = $installed_mod['package_id'];
+			$context['available_modification'][$installed_mod['package_id']] = array(
+				'can_uninstall' => true,
+				'name' => $installed_mod['name'],
+				'filename' => $installed_mod['filename'],
+				'installed_id' => $installed_mod['id'],
+				'version' => $installed_mod['version'],
+				'is_installed' => true,
+				'is_current' => true,
+			);
+		}
+		return $packages['modification'];
+	}
+
+	if (empty($packages))
+		$packages = array('modification' => array(), 'avatar' => array(), 'language' => array(), 'unknown' => array());
 
 	if ($dir = @opendir($boarddir . '/Packages'))
 	{
@@ -1320,6 +1542,14 @@ function PackageBrowse()
 			if ($package == '.' || $package == '..' || $package == 'temp' || (!(is_dir($boarddir . '/Packages/' . $package) && file_exists($boarddir . '/Packages/' . $package . '/package-info.xml')) && substr(strtolower($package), -7) != '.tar.gz' && substr(strtolower($package), -4) != '.tgz' && substr(strtolower($package), -4) != '.zip'))
 				continue;
 
+			$skip = false;
+			foreach ($context['modification_types'] as $type)
+				if (isset($context['available_' . $type][md5($package)]))
+					$skip = true;
+
+			if ($skip)
+				continue;
+
 			// Skip directories or files that are named the same.
 			if (is_dir($boarddir . '/Packages/' . $package))
 			{
@@ -1344,80 +1574,123 @@ function PackageBrowse()
 			if (!is_array($packageInfo))
 				continue;
 
-			$packageInfo['installed_id'] = isset($installed_mods[$packageInfo['id']]) ? $installed_mods[$packageInfo['id']]['id'] : 0;
+			if (!empty($packageInfo))
+			{
+				$packageInfo['installed_id'] = isset($installed_mods[$packageInfo['id']]) ? $installed_mods[$packageInfo['id']]['id'] : 0;
 
-			$packageInfo['is_installed'] = isset($installed_mods[$packageInfo['id']]);
-			$packageInfo['is_current'] = $packageInfo['is_installed'] && ($installed_mods[$packageInfo['id']]['version'] == $packageInfo['version']);
-			$packageInfo['is_newer'] = $packageInfo['is_installed'] && ($installed_mods[$packageInfo['id']]['version'] > $packageInfo['version']);
+				$packageInfo['is_installed'] = isset($installed_mods[$packageInfo['id']]);
+				$packageInfo['is_current'] = $packageInfo['is_installed'] && ($installed_mods[$packageInfo['id']]['version'] == $packageInfo['version']);
+				$packageInfo['is_newer'] = $packageInfo['is_installed'] && ($installed_mods[$packageInfo['id']]['version'] > $packageInfo['version']);
 
-			$packageInfo['can_install'] = false;
-			$packageInfo['can_uninstall'] = false;
-			$packageInfo['can_upgrade'] = false;
+				$packageInfo['can_install'] = false;
+				$packageInfo['can_uninstall'] = false;
+				$packageInfo['can_upgrade'] = false;
+				$packageInfo['can_emulate_install'] = false;
+				$packageInfo['can_emulate_uninstall'] = false;
 
-			// This package is currently NOT installed.  Check if it can be.
-			if (!$packageInfo['is_installed'] && $packageInfo['xml']->exists('install'))
-			{
-				// Check if there's an install for *THIS* version of SMF.
-				$installs = $packageInfo['xml']->set('install');
-				foreach ($installs as $install)
+				// This package is currently NOT installed.  Check if it can be.
+				if (!$packageInfo['is_installed'] && $packageInfo['xml']->exists('install'))
 				{
-					if (!$install->exists('@for') || matchPackageVersion($the_version, $install->fetch('@for')))
+					// Check if there's an install for *THIS* version of SMF.
+					$installs = $packageInfo['xml']->set('install');
+					foreach ($installs as $install)
+					{
+						if (!$install->exists('@for') || matchPackageVersion($the_version, $install->fetch('@for')))
+						{
+							// Okay, this one is good to go.
+							$packageInfo['can_install'] = true;
+							break;
+						}
+					}
+
+					// no install found for this version, lets see if one exists for another
+					if ($packageInfo['can_install'] === false && $install->exists('@for') && empty($_SESSION['version_emulate']))
 					{
-						// Okay, this one is good to go.
-						$packageInfo['can_install'] = true;
-						break;
+						$reset = true;
+						
+						// Get the highest install version that is available from the package
+						foreach ($installs as $install)
+						{
+							$packageInfo['can_emulate_install'] = matchHighestPackageVersion($install->fetch('@for'), $reset, $the_version);
+							$reset = false;
+						}
 					}
 				}
-			}
-			// An already installed, but old, package.  Can we upgrade it?
-			elseif ($packageInfo['is_installed'] && !$packageInfo['is_current'] && $packageInfo['xml']->exists('upgrade'))
-			{
-				$upgrades = $packageInfo['xml']->set('upgrade');
+				// An already installed, but old, package.  Can we upgrade it?
+				elseif ($packageInfo['is_installed'] && !$packageInfo['is_current'] && $packageInfo['xml']->exists('upgrade'))
+				{
+					$upgrades = $packageInfo['xml']->set('upgrade');
 
-				// First go through, and check against the current version of SMF.
-				foreach ($upgrades as $upgrade)
+					// First go through, and check against the current version of SMF.
+					foreach ($upgrades as $upgrade)
+					{
+						// Even if it is for this SMF, is it for the installed version of the mod?
+						if (!$upgrade->exists('@for') || matchPackageVersion($the_version, $upgrade->fetch('@for')))
+							if (!$upgrade->exists('@from') || matchPackageVersion($installed_mods[$packageInfo['id']]['version'], $upgrade->fetch('@from')))
+							{
+								$packageInfo['can_upgrade'] = true;
+								break;
+							}
+					}
+				}
+				// Note that it has to be the current version to be uninstallable.  Shucks.
+				elseif ($packageInfo['is_installed'] && $packageInfo['is_current'] && $packageInfo['xml']->exists('uninstall'))
 				{
-					// Even if it is for this SMF, is it for the installed version of the mod?
-					if (!$upgrade->exists('@for') || matchPackageVersion($the_version, $upgrade->fetch('@for')))
-						if (!$upgrade->exists('@from') || matchPackageVersion($installed_mods[$packageInfo['id']]['version'], $upgrade->fetch('@from')))
+					$uninstalls = $packageInfo['xml']->set('uninstall');
+
+					// Can we find any uninstallation methods that work for this SMF version?
+					foreach ($uninstalls as $uninstall)
+					{
+						if (!$uninstall->exists('@for') || matchPackageVersion($the_version, $uninstall->fetch('@for')))
 						{
-							$packageInfo['can_upgrade'] = true;
+							$packageInfo['can_uninstall'] = true;
 							break;
 						}
-				}
-			}
-			// Note that it has to be the current version to be uninstallable.  Shucks.
-			elseif ($packageInfo['is_installed'] && $packageInfo['is_current'] && $packageInfo['xml']->exists('uninstall'))
-			{
-				$uninstalls = $packageInfo['xml']->set('uninstall');
-
-				// Can we find any uninstallation methods that work for this SMF version?
-				foreach ($uninstalls as $uninstall)
-					if (!$uninstall->exists('@for') || matchPackageVersion($the_version, $uninstall->fetch('@for')))
+					}
+					
+					// no uninstall found for this version, lets see if one exists for another
+					if ($packageInfo['can_uninstall'] === false && $uninstall->exists('@for') && empty($_SESSION['version_emulate']))
 					{
-						$packageInfo['can_uninstall'] = true;
-						break;
+						$reset = true;
+						
+						// Get the highest install version that is available from the package
+						foreach ($uninstalls as $uninstall)
+						{
+							$packageInfo['can_emulate_uninstall'] = matchHighestPackageVersion($uninstall->fetch('@for'), $reset, $the_version);
+							$reset = false;
+						}
 					}
-			}
+				}
 
-			// Store a complete list.
-			$context['available_all'][] = $packageInfo;
-
-			// Modification.
-			if ($packageInfo['type'] == 'modification' || $packageInfo['type'] == 'mod')
-				$context['available_mods'][] = $packageInfo;
-			// Avatar package.
-			elseif ($packageInfo['type'] == 'avatar')
-				$context['available_avatars'][] = $packageInfo;
-			// Language package.
-			elseif ($packageInfo['type'] == 'language')
-				$context['available_languages'][] = $packageInfo;
-			// Other stuff.
-			else
-				$context['available_other'][] = $packageInfo;
+				// Modification.
+				if ($packageInfo['type'] == 'modification' || $packageInfo['type'] == 'mod')
+				{
+					$packages['modification'][] = md5($package);
+					$context['available_modification'][md5($package)] = $packageInfo;
+				}
+				// Avatar package.
+				elseif ($packageInfo['type'] == 'avatar')
+				{
+					$packages['avatar'][] = md5($package);
+					$context['available_avatar'][md5($package)] = $packageInfo;
+				}
+				// Language package.
+				elseif ($packageInfo['type'] == 'language')
+				{
+					$packages['language'][] = md5($package);
+					$context['available_language'][md5($package)] = $packageInfo;
+				}
+				// Other stuff.
+				else
+				{
+					$packages['unknown'][] = md5($package);
+					$context['available_unknown'][md5($package)] = $packageInfo;
+				}
+			}
 		}
 		closedir($dir);
 	}
+	return $packages[$params];
 }
 
 function PackageOptions()

+ 5 - 5
Sources/Profile-Modify.php

@@ -174,7 +174,7 @@ function loadProfileFields($force_reload = false)
 		),
 		'email_address' => array(
 			'type' => 'text',
-			'label' => $txt['email'],
+			'label' => $txt['user_email_address'],
 			'subtext' => $txt['valid_email'],
 			'log_change' => true,
 			'permission' => 'profile_identity',
@@ -337,7 +337,7 @@ function loadProfileFields($force_reload = false)
 		'member_name' => array(
 			'type' => allowedTo('admin_forum') && isset($_GET['changeusername']) ? 'text' : 'label',
 			'label' => $txt['username'],
-			'subtext' => allowedTo('admin_forum') && !isset($_GET['changeusername']) ? '(<a href="' . $scripturl . '?action=profile;u=' . $context['id_member'] . ';area=account;changeusername" style="font-style: italic;">' . $txt['username_change'] . '</a>)' : '',
+			'subtext' => allowedTo('admin_forum') && !isset($_GET['changeusername']) ? '[<a href="' . $scripturl . '?action=profile;u=' . $context['id_member'] . ';area=account;changeusername" style="font-style: italic;">' . $txt['username_change'] . '</a>]' : '',
 			'log_change' => true,
 			'permission' => 'profile_identity',
 			'prehtml' => allowedTo('admin_forum') && isset($_GET['changeusername']) ? '<div class="alert">' . $txt['username_warning'] . '</div>' : '',
@@ -385,7 +385,7 @@ function loadProfileFields($force_reload = false)
 		),
 		'passwrd1' => array(
 			'type' => 'password',
-			'label' => $txt['choose_pass'],
+			'label' => ucwords($txt['choose_pass']),
 			'subtext' => $txt['password_strength'],
 			'size' => 20,
 			'value' => '',
@@ -419,7 +419,7 @@ function loadProfileFields($force_reload = false)
 		),
 		'passwrd2' => array(
 			'type' => 'password',
-			'label' => $txt['verify_pass'],
+			'label' => ucwords($txt['verify_pass']),
 			'enabled' => empty($cur_profile['openid_uri']),
 			'size' => 20,
 			'value' => '',
@@ -509,7 +509,7 @@ function loadProfileFields($force_reload = false)
 			'label' => $txt['secret_answer'],
 			'subtext' => $txt['secret_desc2'],
 			'size' => 20,
-			'postinput' => '<span class="smalltext" style="margin-left: 4ex;"><a href="' . $scripturl . '?action=helpadmin;help=secret_why_blank" onclick="return reqWin(this.href);">' . $txt['secret_why_blank'] . '</a></span>',
+			'postinput' => '<span class="smalltext" style="margin-left: 4ex;">[<a href="' . $scripturl . '?action=helpadmin;help=secret_why_blank" onclick="return reqWin(this.href);">' . $txt['secret_why_blank'] . '</a>]</span>',
 			'value' => '',
 			'permission' => 'profile_identity',
 			'input_validate' => create_function('&$value', '

+ 8 - 8
Sources/Profile-View.php

@@ -948,8 +948,8 @@ function trackActivity($memID)
 			array(
 				'position' => 'after_title',
 				'value' => $txt['errors_desc'],
-				'class' => 'smalltext',
-				'style' => 'padding: 2ex;',
+				'class' => 'windowbg2',
+				'style' => 'padding: 1ex 2ex;',
 			),
 		),
 	);
@@ -1361,8 +1361,8 @@ function TrackIP($memID = 0)
 			array(
 				'position' => 'after_title',
 				'value' => $txt['messages_from_ip_desc'],
-				'class' => 'smalltext',
-				'style' => 'padding: 2ex;',
+				'class' => 'windowbg2',
+				'style' => 'padding: 1ex 2ex;',
 			),
 		),
 	);
@@ -1450,8 +1450,8 @@ function TrackIP($memID = 0)
 			array(
 				'position' => 'after_title',
 				'value' => $txt['errors_from_ip_desc'],
-				'class' => 'smalltext',
-				'style' => 'padding: 2ex;',
+				'class' => 'windowbg2',
+				'style' => 'padding: 1ex 2ex;',
 			),
 		),
 	);
@@ -1570,8 +1570,8 @@ function TrackLogins($memID = 0)
 			array(
 				'position' => 'after_title',
 				'value' => $txt['trackLogins_desc'],
-				'class' => 'smalltext',
-				'style' => 'padding: 2ex;',
+				'class' => 'windowbg2',
+				'style' => 'padding: 1ex 2ex;',
 			),
 		),
 	);

+ 23 - 14
Sources/Subs-Graphics.php

@@ -22,12 +22,12 @@ if (!defined('SMF'))
 	die('Hacking attempt...');
 
 /**
- * downloads file from url and stores it locally for avatar use by id_member.
- * supports GIF, JPG, PNG, BMP and WBMP formats.
- * detects if GD2 is available.
- * uses resizeImageFile() to resize to max_width by max_height, and saves the result to a file.
- * updates the database info for the member's avatar.
- * returns whether the download and resize was successful.
+ * downloads a file from a url and stores it locally for avatar use by id_member.
+ * - supports GIF, JPG, PNG, BMP and WBMP formats.
+ * - detects if GD2 is available.
+ * - uses resizeImageFile() to resize to max_width by max_height, and saves the result to a file.
+ * - updates the database info for the member's avatar.
+ * - returns whether the download and resize was successful.
  *
  * @param string $temporary_path, the full path to the temporary file
  * @param int $memID, member ID
@@ -173,10 +173,10 @@ function createThumbnail($source, $max_width, $max_height)
 }
 
 /**
- * Creates a copy of the file at the same location as fileName.
- * The file would have the format preferred_format if possible,
- * otherwise the default format is jpeg.
- * The function makes sure that all non-essential image contents are disposed.
+ * Used to re-econodes an image to a specifed image format
+ * - creates a copy of the file at the same location as fileName.
+ * - the file would have the format preferred_format if possible, otherwise the default format is jpeg.
+ * - the function makes sure that all non-essential image contents are disposed.
  *
  * @param string $fileName
  * @param int $preferred_format = 0
@@ -206,8 +206,8 @@ function reencodeImage($fileName, $preferred_format = 0)
 }
 
 /**
- * Searches through the file to see if there's non-binary content.
- * If extensiveCheck is true, searches for asp/php short tags as well.
+ * Searches through the file to see if there's potentialy harmful non-binary content.
+ * - if extensiveCheck is true, searches for asp/php short tags as well.
  *
  * @param string $fileName
  * @param bool $extensiveCheck = false
@@ -674,9 +674,18 @@ if (!function_exists('imagecreatefrombmp'))
 						imagesetpixel($dst_img, $x, $y, $palette[$byte & 15]);
 				}
 			}
-			else
+			elseif ($info['bits'] == 1)
 			{
-				// Sorry, I'm just not going to do monochrome :P.
+				$x = 0;
+				for ($j = 0; $j < $scan_line_size; $x++)
+				{
+					$byte = ord($scan_line{$j++});
+					
+					imagesetpixel($dst_img, $x, $y, $palette[(($byte) & 128) != 0]);
+					for ($shift = 1; $shift < 8; $shift++) {
+						if (++$x < $info['width']) imagesetpixel($dst_img, $x, $y, $palette[(($byte << $shift) & 128) != 0]);
+					}
+				}
 			}
 		}
 

+ 162 - 52
Sources/Subs-Package.php

@@ -50,16 +50,23 @@ function read_tgz_file($gzfilename, $destination, $single_file = false, $overwri
 
 /**
  * Extracts a file or files from the .tar.gz contained in data.
+ *
  * detects if the file is really a .zip file, and if so returns the result of read_zip_data
- * if destination is null, returns a list of files in the archive.
- * if single_file is true, returns the contents of the file specified by destination, if it exists, or false.
- * if single_file is true, destination can start with * and / to signify that the file may come from any directory.
- * destination should not begin with a / if single_file is true.
+ *
+ * if destination is null
+ *	- returns a list of files in the archive.
+ *
+ * if single_file is true
+ * - returns the contents of the file specified by destination, if it exists, or false.
+ * - destination can start with * and / to signify that the file may come from any directory.
+ * - destination should not begin with a / if single_file is true.
+ *
  * overwrites existing files with newer modification times if and only if overwrite is true.
  * creates the destination directory if it doesn't exist, and is is specified.
  * requires zlib support be built into PHP.
  * returns an array of the files extracted.
  * if files_to_extract is not equal to null only extracts file within this array.
+ *
  * @param string data,
  * @param string destination,
  * @param bool single_file = false,
@@ -296,7 +303,7 @@ function read_zip_data($data, $destination, $single_file = false, $overwrite = f
 		// Okay!  We can write this file, looks good from here...
 		if ($write_this && $destination !== null)
 		{
-			if ((strpos($file_info['filename'], '/') !== false && !$single_file) || (!is_dir($file_info['dir'])))
+			if ((strpos($file_info['filename'], '/') !== false && !$single_file) || (!$single_file && !is_dir($file_info['dir'])))
 				mktree($file_info['dir'], 0777);
 
 			// If we're looking for a specific file, and this is it... ka-bam, baby.
@@ -359,8 +366,10 @@ function url_exists($url)
 
 /**
  * Loads and returns an array of installed packages.
- * gets this information from Packages/installed.list.
- * returns the array of data.
+ * - gets this information from Packages/installed.list.
+ * - returns the array of data.
+ * - default sort order is package_installed time
+ * 
  * @return array
  */
 function loadInstalledPackages()
@@ -418,10 +427,11 @@ function loadInstalledPackages()
 
 /**
  * Loads a package's information and returns a representative array.
- * expects the file to be a package in Packages/.
- * returns a error string if the package-info is invalid.
- * returns a basic array of id, version, filename, and similar information.
- * in the array returned, an xmlArray is available in 'xml'.
+ * - expects the file to be a package in Packages/.
+ * - returns a error string if the package-info is invalid.
+ * - otherwise returns a basic array of id, version, filename, and similar information.
+ * - an xmlArray is available in 'xml'.
+ *
  * @param string $filename
  * @return array
  */
@@ -970,12 +980,14 @@ function packageRequireFTP($destination_url, $files = null, $return = false)
 }
 
 /**
- * Parses the actions in package-info.xml files from packages.
- * package should be an xmlArray with package-info as its base.
- * testing_only should be true if the package should not actually be applied.
- * method is upgrade, install, or uninstall.  Its default is install.
- * previous_version should be set to the previous installed version of this package, if any.
- * does not handle failure terribly well; testing first is always better.
+ * Parses the actions in package-info.xml file from packages.
+ *
+ * - package should be an xmlArray with package-info as its base.
+ * - testing_only should be true if the package should not actually be applied.
+ * - method can be upgrade, install, or uninstall.  Its default is install.
+ * - previous_version should be set to the previous installed version of this package, if any.
+ * - does not handle failure terribly well; testing first is always better.
+ *
  * @param xmlArray &$package
  * @param bool $testing_only = true
  * @param string $method = 'install' ('install', 'upgrade', or 'uninstall')
@@ -998,6 +1010,15 @@ function parsePackageInfo(&$packageXML, $testing_only = true, $method = 'install
 	if (!empty($_SESSION['version_emulate']))
 		$the_version = $_SESSION['version_emulate'];
 
+	// Single package emulation
+	if (!empty($_REQUEST['ve']) && !empty($_REQUEST['package']))
+	{
+		$the_version = $_REQUEST['ve'];
+		$_SESSION['single_version_emulate'][$_REQUEST['package']] = $the_version;
+	}
+	if (!empty($_REQUEST['package']) && (!empty($_SESSION['single_version_emulate'][$_REQUEST['package']])))
+		$the_version = $_SESSION['single_version_emulate'][$_REQUEST['package']];
+
 	// Get all the versions of this method and find the right one.
 	$these_methods = $packageXML->set($method);
 	foreach ($these_methods as $this_method)
@@ -1035,53 +1056,55 @@ function parsePackageInfo(&$packageXML, $testing_only = true, $method = 'install
 	$temp_path = $boarddir . '/Packages/temp/' . (isset($context['base_path']) ? $context['base_path'] : '');
 
 	$context['readmes'] = array();
+	$context['licences'] = array();
+
 	// This is the testing phase... nothing shall be done yet.
 	foreach ($actions as $action)
 	{
 		$actionType = $action->name();
 
-		if (in_array($actionType, array('readme', 'code', 'database', 'modification', 'redirect')))
+		if (in_array($actionType, array('readme', 'code', 'database', 'modification', 'redirect', 'license')))
 		{
-			// Allow for translated readme files.
-			if ($actionType == 'readme')
+			// Allow for translated readme and license files.
+			if ($actionType == 'readme' || $actionType == 'license')
 			{
+				$type = $actionType . 's';
 				if ($action->exists('@lang'))
 				{
-					// Auto-select a readme language based on either request variable or current language.
-					if ((isset($_REQUEST['readme']) && $action->fetch('@lang') == $_REQUEST['readme']) || (!isset($_REQUEST['readme']) && $action->fetch('@lang') == $language))
+					// Auto-select the language based on either request variable or current language.
+					if ((isset($_REQUEST['readme']) && $action->fetch('@lang') == $_REQUEST['readme']) || (isset($_REQUEST['license']) && $action->fetch('@lang') == $_REQUEST['license']) || (!isset($_REQUEST['readme']) && $action->fetch('@lang') == $language)	|| (!isset($_REQUEST['license']) && $action->fetch('@lang') == $language))
 					{
-						// In case the user put the readme blocks in the wrong order.
-						if (isset($context['readmes']['selected']) && $context['readmes']['selected'] == 'default')
-							$context['readmes'][] = 'default';
+						// In case the user put the blocks in the wrong order.
+						if (isset($context[$type]['selected']) && $context[$type]['selected'] == 'default')
+							$context[$type][] = 'default';
 
-						$context['readmes']['selected'] = htmlspecialchars($action->fetch('@lang'));
+						$context[$type]['selected'] = htmlspecialchars($action->fetch('@lang'));
 					}
 					else
 					{
-						// We don't want this readme now, but we'll allow the user to select to read it.
-						$context['readmes'][] = htmlspecialchars($action->fetch('@lang'));
+						// We don't want this now, but we'll allow the user to select to read it.
+						$context[$type][] = htmlspecialchars($action->fetch('@lang'));
 						continue;
 					}
 				}
-				// Fallback readme. Without lang parameter.
+				// Fallback when we have no lang parameter.
 				else
 				{
-
-					// Already selected a readme.
-					if (isset($context['readmes']['selected']))
+					// Already selected one for use?
+					if (isset($context[$type]['selected']))
 					{
-						$context['readmes'][] = 'default';
+						$context[$type][] = 'default';
 						continue;
 					}
 					else
-						$context['readmes']['selected'] = 'default';
+						$context[$type]['selected'] = 'default';
 				}
 			}
 
 			// @todo Make sure the file actually exists?  Might not work when testing?
 			if ($action->exists('@type') && $action->fetch('@type') == 'inline')
 			{
-				$filename = $temp_path . '$auto_' . $temp_auto++ . ($actionType == 'readme' || $actionType == 'redirect' ? '.txt' : ($actionType == 'code' || $actionType == 'database' ? '.php' : '.mod'));
+				$filename = $temp_path . '$auto_' . $temp_auto++ . (in_array($actionType, array('readme', 'redirect', 'license')) ? '.txt' : ($actionType == 'code' || $actionType == 'database' ? '.php' : '.mod'));
 				package_put_contents($filename, $action->fetch('.'));
 				$filename = strtr($filename, array($temp_path => ''));
 			}
@@ -1097,7 +1120,7 @@ function parsePackageInfo(&$packageXML, $testing_only = true, $method = 'install
 				'redirect_url' => $action->exists('@url') ? $action->fetch('@url') : '',
 				'redirect_timeout' => $action->exists('@timeout') ? (int) $action->fetch('@timeout') : '',
 				'parse_bbc' => $action->exists('@parsebbc') && $action->fetch('@parsebbc') == 'true',
-				'language' => ($actionType == 'readme' && $action->exists('@lang') && $action->fetch('@lang') == $language) ? $language : '',
+				'language' => (($actionType == 'readme' || $actionType == 'license')  && $action->exists('@lang') && $action->fetch('@lang') == $language) ? $language : '',
 			);
 
 			continue;
@@ -1113,6 +1136,36 @@ function parsePackageInfo(&$packageXML, $testing_only = true, $method = 'install
 			);
 			continue;
 		}
+		elseif ($actionType == 'credits')
+		{
+			// quick check of any supplied url
+			$url = $action->exists('@url') ? $action->fetch('@url') : '';
+			if (strlen(trim($url)) > 0 && substr($url, 0, 7) !== 'http://' && substr($url, 0, 8) !== 'https://')
+			{
+				$url = 'http://' . $url;
+				if (strlen($url) < 8 || (substr($url, 0, 7) !== 'http://' && substr($url, 0, 8) !== 'https://'))
+					$url = '';
+			}
+
+			$return[] = array(
+				'type' => $actionType,
+				'url' => $url,
+				'license' => $action->exists('@license') ? $action->fetch('@license') : '',
+				'copyright' => $action->exists('@copyright') ? $action->fetch('@copyright') : '',
+				'title' => $action->fetch('.'),
+			);
+			continue;
+		}
+		elseif ($actionType == 'requires')
+		{
+			$return[] = array(
+				'type' => $actionType,
+				'id' => $action->exists('@id') ? $action->fetch('@id') : '',
+				'version' => $action->exists('@version') ? $action->fetch('@version') : $action->fetch('.'),
+				'description' => '',
+			);
+			continue;
+		}
 		elseif ($actionType == 'error')
 		{
 			$return[] = array(
@@ -1242,7 +1295,7 @@ function parsePackageInfo(&$packageXML, $testing_only = true, $method = 'install
 		}
 		elseif ($actionType == 'remove-dir')
 		{
-			if (!is_writable($this_action['filename']) && file_exists($this_action['destination']))
+			if (!is_writable($this_action['filename']) && file_exists($this_action['filename']))
 				$return[] = array(
 					'type' => 'chmod',
 					'filename' => $this_action['filename']
@@ -1268,7 +1321,7 @@ function parsePackageInfo(&$packageXML, $testing_only = true, $method = 'install
 	$not_done = array(array('type' => '!'));
 	foreach ($return as $action)
 	{
-		if ($action['type'] == 'modification' || $action['type'] == 'code' || $action['type'] == 'database' || $action['type'] == 'redirect')
+		if (in_array($action['type'], array('modification', 'code', 'database', 'redirect', 'hook', 'credits')))
 			$not_done[] = $action;
 
 		if ($action['type'] == 'create-dir')
@@ -1366,9 +1419,48 @@ function parsePackageInfo(&$packageXML, $testing_only = true, $method = 'install
 
 /**
  * Checks if version matches any of the versions in versions.
- * supports comma separated version numbers, with or without whitespace.
- * supports lower and upper bounds. (1.0-1.2)
- * returns true if the version matched.
+ * - supports comma separated version numbers, with or without whitespace.
+ * - supports lower and upper bounds. (1.0-1.2)
+ * - returns true if the version matched.
+ *
+ * @param string $versions
+ * @return highest install value string or false
+ */
+function matchHighestPackageVersion($versions, $reset = false, $the_version)
+{
+	static $near_version = 0;
+
+	if ($reset)
+		$near_version = 0;
+
+	// Normalize the $versions while we remove our previous Doh!
+	$versions = explode(',', str_replace(array(' ', '2.0rc1-1'), array('', '2.0rc1.1'), strtolower($versions)));
+
+	// Loop through each version, save the highest we can find
+	foreach ($versions as $for)
+	{
+		// Adjust for those wild cards
+		if (strpos($for, '*') !== false)
+			$for = str_replace('*', '0dev0', $for) . '-' . str_replace('*', '999', $for);
+
+		// If we have a range, grab the lower value, done this way so it looks normal-er to the user e.g. 2.0 vs 2.0.99
+		if (strpos($for, '-') !== false)
+			list ($for, $higher) = explode('-', $for);
+
+		// Do the compare, if the for is greater, than what we have but not greater than what we are running .....
+		if (compareVersions($near_version, $for) === -1 && compareVersions($for, $the_version) !== 1)
+			$near_version = $for;
+	}
+
+	return !empty($near_version) ? $near_version : false;
+}
+
+/**
+ * Checks if the forum version matches any of the available versions from the package install xml.
+ * - supports comma separated version numbers, with or without whitespace.
+ * - supports lower and upper bounds. (1.0-1.2)
+ * - returns true if the version matched.
+ *
  * @param string $version
  * @param string $versions
  * @return bool
@@ -1408,10 +1500,14 @@ function matchPackageVersion($version, $versions)
 }
 
 /**
- * Compares two versions.
+ * Compares two versions and determines if one is newer, older or the same, returns
+ * - (-1) if version1 is lower than version2
+ * - (0) if version1 is equal to version2
+ * - (1) if version1 is higher than version2
+ *
  * @param string version1
  * @param string version2
- * @return int (-1 if version1 is lower than version2, 0 if version1 is equal to version2; 1 if version1 is higher than version2)
+ * @return int (-1, 0, 1)
  */
 function compareVersions($version1, $version2)
 {
@@ -2426,7 +2522,7 @@ function package_get_contents($filename)
 
 	if (!isset($package_cache))
 	{
-	
+
 		$mem_check = setMemoryLimit('128M');
 
 		// Windows doesn't seem to care about the memory_limit.
@@ -2460,7 +2556,7 @@ function package_put_contents($filename, $data, $testing = false)
 	{
 		// Try to increase the memory limit - we don't want to run out of ram!
 		$mem_check = setMemoryLimit('128M');
-		
+
 		if (!empty($modSettings['package_disable_cache']) || $mem_check || stripos(PHP_OS, 'win') !== false)
 			$package_cache = array();
 		else
@@ -2523,16 +2619,21 @@ function package_flush_cache($trash = false)
 		elseif (!file_exists($filename))
 			@touch($filename);
 
-		package_chmod($filename);
+		$result = package_chmod($filename);
 
-		$fp = fopen($filename, 'r+');
-		if (!$fp && !$trash)
+		// if we are not doing our test pass, then lets do a full write check
+		if (!$trash)
 		{
-			// We should have package_chmod()'d them before, no?!
-			trigger_error('package_flush_cache(): some files are still not writable', E_USER_WARNING);
-			return;
+			// acid test, can we really open this file for writing?
+			$fp = ($result) ? fopen($filename, 'r+') : $result;
+			if (!$fp)
+			{
+				// We should have package_chmod()'d them before, no?!
+				trigger_error('package_flush_cache(): some files are still not writable', E_USER_WARNING);
+				return;
+			}
+			fclose($fp);
 		}
-		fclose($fp);
 	}
 
 	if ($trash)
@@ -2553,6 +2654,7 @@ function package_flush_cache($trash = false)
 
 /**
  * Try to make a file writable.
+ *
  * @param string $filename
  * @param string $perm_state = 'writable'
  * @param bool $track_change = false
@@ -2686,6 +2788,8 @@ function package_chmod($filename, $perm_state = 'writable', $track_change = fals
 }
 
 /**
+ * Used to crypt the supplied ftp password in this session
+ *
  * @param string $pass
  * @return string The encrypted password
  */
@@ -2838,6 +2942,12 @@ function package_create_backup($id = 'backup')
 
 /**
  * Get the contents of a URL, irrespective of allow_url_fopen.
+ *
+ * - reads the contents of an http or ftp address and retruns the page in a string
+ * - will accept up to 3 page redirections (redirectio_level in the function call is private)
+ * - if post_data is supplied, the value and lenght is posted to the given url as form data
+ * - URL must be supplied in lowercase
+ *
  * @param string $url
  * @param string $post_data = ''
  * @param bool $keep_alive = false

+ 91 - 15
Sources/Subs.php

@@ -3497,28 +3497,104 @@ function create_button($name, $alt, $label = '', $custom = '', $force_use = fals
 }
 
 /**
- * Empty out the cache folder.
- * clean the cache directory ($cachedir, if any and in use)
+ * Empty out the cache in use as best it can
+ *
  * it may only remove the files of a certain type (if the $type parameter is given)
+ * Type can be user, data or left blank
+ * 	- user clears out user data
+ *  - data clears out system / opcode data
+ *  - If no type is specified will perfom a complete cache clearing
+ * For cache engines that do not distinguish on types, a full cache flush will be done
  *
- * @param string $type = ''
+ * @param string $type = '' 
  */
 function clean_cache($type = '')
 {
-	global $cachedir, $sourcedir;
-
-	// No directory = no game.
-	if (!is_dir($cachedir))
-		return;
-
-	// Remove the files in SMF's own disk cache, if any
-	$dh = opendir($cachedir);
-	while ($file = readdir($dh))
+	global $cachedir, $sourcedir, $cache_accelerator, $modSettings, $memcached;
+	
+	switch ($cache_accelerator)
 	{
-		if ($file != '.' && $file != '..' && $file != 'index.php' && $file != '.htaccess' && (!$type || substr($file, 0, strlen($type)) == $type))
-			@unlink($cachedir . '/' . $file);
+		case 'memcached':
+			if (function_exists('memcache_flush') || function_exists('memcached_flush') && isset($modSettings['cache_memcached']) && trim($modSettings['cache_memcached']) != '')
+			{
+				// Not connected yet?
+				if (empty($memcached))
+					get_memcached_server();
+				if (!$memcached)
+					return;
+
+				// clear it out
+				if (function_exists('memcache_flush'))
+					memcache_flush($memcached);
+				else
+					memcached_flush($memcached);
+			}
+			break;
+		case 'eaccelerator':
+			if (function_exists('eaccelerator_clear') && function_exists('eaccelerator_clean') )
+			{ 
+				// Clean out the already expired items
+				@eaccelerator_clean();
+				
+				// Remove all unused scripts and data from shared memory and disk cache, 
+				// e.g. all data that isn't used in the current requests.
+				eaccelerator_clear();
+			}
+		case 'mmcache':
+			if (function_exists('mmcache_gc'))
+			{
+				// removes all expired keys from shared memory, this is not a complete cache flush :(
+				// @todo there is no clear function, should we try to find all of the keys and delete those? with mmcache_rm
+				mmcache_gc();
+			}
+			break;
+		case 'apc':
+			if (function_exists('apc_clear_cache'))
+			{
+				// if passed a type, clear that type out
+				if ($type === '' || $type === 'data')
+				{
+					apc_clear_cache('user');
+					apc_clear_cache('system');
+				}
+				elseif ($type === 'user')
+					apc_clear_cache('user');
+			}
+			break;
+		case 'zend':
+			if (function_exists('zend_shm_cache_clear'))
+				zend_shm_cache_clear('SMF');
+			break;
+		case 'xcache':
+			if (function_exists('xcache_clear_cache'))
+			{
+				// 
+				if ($type === '')
+				{
+					xcache_clear_cache(XC_TYPE_VAR, 0);
+					xcache_clear_cache(XC_TYPE_PHP, 0);
+				}
+				if ($type === 'user')
+					xcache_clear_cache(XC_TYPE_VAR, 0);
+				if ($type === 'data')
+					xcache_clear_cache(XC_TYPE_PHP, 0);
+			}
+			break;
+		default:
+			// No directory = no game.
+			if (!is_dir($cachedir))
+				return;
+
+			// Remove the files in SMF's own disk cache, if any
+			$dh = opendir($cachedir);
+			while ($file = readdir($dh))
+			{
+				if ($file != '.' && $file != '..' && $file != 'index.php' && $file != '.htaccess' && (!$type || substr($file, 0, strlen($type)) == $type))
+					@unlink($cachedir . '/' . $file);
+			}
+			closedir($dh);
+			break;
 	}
-	closedir($dh);
 
 	// Invalidate cache, to be sure!
 	// ... as long as Load.php can be modified, anyway.

+ 36 - 1
Sources/Who.php

@@ -521,7 +521,7 @@ function determineActions($urls, $preferred_prefix = false)
  */
 function Credits($in_admin = false)
 {
-	global $context, $modSettings, $forum_copyright, $forum_version, $boardurl, $txt, $user_info;
+	global $context, $smcFunc, $modSettings, $forum_copyright, $forum_version, $boardurl, $txt, $user_info;
 
 	// Don't blink. Don't even blink. Blink and you're dead.
 	loadLanguage('Who');
@@ -694,6 +694,40 @@ function Credits($in_admin = false)
 		),
 	);
 
+	// support for mods that use the <credits> tag via the package manager
+	if (($mods = cache_get_data('mods_credits', 86400)) === null)
+	{
+		$mods = array();
+		$request = $smcFunc['db_query']('', '
+			SELECT version, name, credits
+			FROM {db_prefix}log_packages
+			WHERE install_state = {int:installed_mods}
+				AND credits != {string:empty}
+				AND SUBSTRING(filename FROM 1 FOR 9) != {string:patch_name}',
+			array(
+				'installed_mods' => 1,
+				'patch_name' => 'smf_patch',
+				'empty' => '',
+			)
+		);
+		while ($row = $smcFunc['db_fetch_assoc']($request))
+		{
+			$credit_info = unserialize($row['credits']);
+
+			$copyright = empty($credit_info['copyright']) ? '' : $txt['credits_copyright'] . ' &copy; ' . $smcFunc['htmlspecialchars']($credit_info['copyright']);
+			$license = empty($credit_info['license']) ? '' : $txt['credits_license'] . ' ' . $smcFunc['htmlspecialchars']($credit_info['license']);
+			$version = $txt['credits_version'] . $row['version'];
+			$title = (empty($credit_info['title']) ? $row['name'] : $smcFunc['htmlspecialchars']($credit_info['title'])) . ' : ' . $version;
+
+			// build this one out and stash it away
+			$mod_name = empty($credit_info['url']) ? '<strong>' . $title . '</strong>' : '<a href="' . $credit_info['url'] . '">' . '<strong>' . $title . '</strong>' . '</a>';
+			$mods[] =  $mod_name . (!empty($license) ? ' | ' . $license  : '') . (!empty($copyright) ? ' | ' . $copyright  : '');
+		}
+		cache_put_data('mods_credits', $mods, 86400);
+	}
+
+	$context['copyrights']['mods'] += $mods;
+
 	if (!$in_admin)
 	{
 		loadTemplate('Who');
@@ -702,6 +736,7 @@ function Credits($in_admin = false)
 		$context['page_title'] = $txt['credits'];
 	}
 
+	// Support for those that want to use a hook as well
 	call_integration_hook('integrate_credits');
 }
 

+ 40 - 17
Themes/default/Admin.template.php

@@ -141,6 +141,7 @@ function template_admin()
 
 	// This sets the announcements and current versions themselves ;).
 	echo '
+		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/admin.js?fin20"></script>
 		<script type="text/javascript"><!-- // --><![CDATA[
 			var oAdminIndex = new smf_AdminIndex({
 				sSelf: \'oAdminCenter\',
@@ -586,6 +587,7 @@ function template_view_versions()
 	   file categories. (sources, languages, and templates.) */
 	echo '
 		<script type="text/javascript" src="', $scripturl, '?action=viewsmfile;filename=detailed-version.js"></script>
+		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/admin.js?fin20"></script>
 		<script type="text/javascript"><!-- // --><![CDATA[
 			var oViewVersions = new smf_ViewVersions({
 				aKnownLanguages: [
@@ -625,12 +627,19 @@ function template_edit_censored()
 	// Show text boxes for censoring [bad   ] => [good  ].
 	foreach ($context['censored_words'] as $vulgar => $proper)
 		echo '
-					<div style="margin-top: 1ex;"><input type="text" name="censor_vulgar[]" value="', $vulgar, '" size="20" /> => <input type="text" name="censor_proper[]" value="', $proper, '" size="20" /></div>';
+					<div style="margin-top: 1ex;">
+						<input type="text" name="censor_vulgar[]" value="', $vulgar, '" size="30" /> => <input type="text" name="censor_proper[]" value="', $proper, '" size="30" />
+					</div>';
 
 	// Now provide a way to censor more words.
 	echo '
-					<div style="margin-top: 1ex;"><input type="text" name="censor_vulgar[]" size="20" class="input_text" /> => <input type="text" name="censor_proper[]" size="20" class="input_text" /></div>
-					<div id="moreCensoredWords"></div><div style="margin-top: 1ex; display: none;" id="moreCensoredWords_link"><a href="#;" onclick="addNewWord(); return false;">', $txt['censor_clickadd'], '</a></div>
+					<div style="margin-top: 1ex;">
+						<input type="text" name="censor_vulgar[]" size="30" class="input_text" /> => <input type="text" name="censor_proper[]" size="30" class="input_text" />
+					</div>
+					<div id="moreCensoredWords"></div><div style="margin-top: 1ex; display: none;" id="moreCensoredWords_link">
+						<a class="button_link" style="float: left" href="#;" onclick="addNewWord(); return false;">', $txt['censor_clickadd'], '</a><br />
+					</div>
+					<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/admin.js?fin20"></script>
 					<script type="text/javascript"><!-- // --><![CDATA[
 						document.getElementById("moreCensoredWords_link").style.display = "";
 					// ]]></script>
@@ -649,10 +658,13 @@ function template_edit_censored()
 							<input type="checkbox" name="censorIgnoreCase" value="1" id="censorIgnoreCase_check"', empty($modSettings['censorIgnoreCase']) ? '' : ' checked="checked"', ' class="input_check" />
 						</dd>
 					</dl>
+					<hr class="hrcolor" />
 					<input type="submit" name="save_censor" value="', $txt['save'], '" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
-			</div>';
+			</div>
+			<br />';
 
 	// This table lets you test out your filters by typing in rude words and seeing what comes out.
 	echo '
@@ -954,10 +966,9 @@ function template_show_settings()
 
 	if (empty($context['settings_save_dont_show']))
 		echo '
-					<hr class="hrcolor clear" />
-					<div class="righttext">
-						<input type="submit" value="', $txt['save'], '"', (!empty($context['save_disabled']) ? ' disabled="disabled"' : ''), (!empty($context['settings_save_onclick']) ? ' onclick="' . $context['settings_save_onclick'] . '"' : ''), ' class="button_submit" />
-					</div>';
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['save'], '"', (!empty($context['save_disabled']) ? ' disabled="disabled"' : ''), (!empty($context['settings_save_onclick']) ? ' onclick="' . $context['settings_save_onclick'] . '"' : ''), ' class="button_submit" />
+					<br class="clear_right" />';
 
 	if ($is_open)
 		echo '
@@ -1211,7 +1222,7 @@ function template_edit_profile_field()
 							</dd>
 						</dl>
 					</fieldset>
-					<div class="righttext">
+					<hr class="hrcolor" />
 						<input type="submit" name="save" value="', $txt['save'], '" class="button_submit" />';
 
 	if ($context['fid'])
@@ -1219,7 +1230,7 @@ function template_edit_profile_field()
 						<input type="submit" name="delete" value="', $txt['delete'], '" onclick="return confirm(\'', $txt['custom_edit_delete_sure'], '\');" class="button_submit" />';
 
 	echo '
-					</div>
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -1355,8 +1366,11 @@ function template_core_features()
 			</div>';
 
 	$alternate = true;
+	$num = 0;
+	$num_features = count($context['features']);
 	foreach ($context['features'] as $id => $feature)
 	{
+		$num++;
 		echo '
 			<div class="windowbg', $alternate ? '2' : '', '">
 				<span class="topslice"><span></span></span>
@@ -1373,7 +1387,20 @@ function template_core_features()
 						<label for="plain_feature_', $id, '_radio_on"><input type="radio" name="feature_plain_', $id, '" id="plain_feature_', $id, '_radio_on" value="1"', $feature['enabled'] ? ' checked="checked"' : '', ' class="input_radio" />', $txt['core_settings_enabled'], '</label>
 						<label for="plain_feature_', $id, '_radio_off"><input type="radio" name="feature_plain_', $id, '" id="plain_feature_', $id, '_radio_off" value="0"', !$feature['enabled'] ? ' checked="checked"' : '', ' class="input_radio" />', $txt['core_settings_disabled'], '</label>
 					</div>
-				</div>
+				</div>';
+				
+		// last feature, show the save button
+		if ($num == $num_features)
+			echo '
+				<div class="content">
+					<hr class="color clear" />
+					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<input type="hidden" name="', $context['admin-core_token_var'], '" value="', $context['admin-core_token'], '" />
+					<input type="hidden" value="0" name="js_worked" id="js_worked" />
+					<input type="submit" value="', $txt['save'], '" name="save" class="button_submit" />
+				</div>';
+	
+		echo '
 				<span class="botslice clear_right"><span></span></span>
 			</div>';
 
@@ -1381,12 +1408,6 @@ function template_core_features()
 	}
 
 	echo '
-			<div class="righttext">
-				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-				<input type="hidden" name="', $context['admin-core_token_var'], '" value="', $context['admin-core_token'], '" />
-				<input type="hidden" value="0" name="js_worked" id="js_worked" />
-				<input type="submit" value="', $txt['save'], '" name="save" class="button_submit" />
-			</div>
 		</form>
 	</div>
 	<br class="clear" />';
@@ -1441,6 +1462,8 @@ function template_callback_question_answer_list()
 		<dt id="add_more_question_placeholder" style="display: none;"></dt><dd></dd>
 		<dt id="add_more_link_div" style="display: none;">
 			<a href="#" onclick="addAnotherQuestion(); return false;">&#171; ', $txt['setup_verification_add_more'], ' &#187;</a>
+			<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/admin.js?fin20"></script>
+
 		</dt><dd></dd>';
 
 	// The javascript needs to go at the end but we'll put it in this template for looks.

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

@@ -18,7 +18,7 @@ function template_main()
 	if (!$settings['show_stats_index'])
 		echo '
 	<div id="index_common_stats">
-		', $txt['members'], ': ', $context['common_stats']['total_members'], ' &nbsp;&#8226;&nbsp; ', $txt['posts_made'], ': ', $context['common_stats']['total_posts'], ' &nbsp;&#8226;&nbsp; ', $txt['topics'], ': ', $context['common_stats']['total_topics'], '
+		', $txt['members'], ': ', $context['common_stats']['total_members'], ' &nbsp;&#8226;&nbsp; ', $txt['posts_made'], ': ', $context['common_stats']['total_posts'], ' &nbsp;&#8226;&nbsp; ', $txt['topics'], ': ', $context['common_stats']['total_topics'], '<br />
 		', ($settings['show_latest_member'] ? ' ' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
 	</div>';
 
@@ -495,8 +495,8 @@ function template_info_center()
 			oThemeOptions: {
 				bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
 				sOptionName: \'collapse_header_ic\',
-				sSessionVar: ', JavaScriptEscape($context['session_var']), ',
-				sSessionId: ', JavaScriptEscape($context['session_id']), '
+				sSessionId: smf_session_id,
+				sSessionVar: smf_session_var,
 			},
 			oCookieOptions: {
 				bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',

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

@@ -55,7 +55,7 @@ function template_main()
 
 	echo '
 				</form>
-				<br class="clear" />
+				<br class="clear_right" />
 			</div>
 		</div>';
 }

+ 3 - 1
Themes/default/Display.template.php

@@ -718,7 +718,8 @@ function template_main()
 							<div class="quickReplyContent">
 								<textarea cols="600" rows="7" name="message" tabindex="', $context['tabindex']++, '"></textarea>
 							</div>
-							<div class="righttext padding">
+							<div class="padding">
+								<hr class="hrcolor" />
 								<input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="', $context['tabindex']++, '" class="button_submit" />
 								<input type="submit" name="preview" value="', $txt['preview'], '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="', $context['tabindex']++, '" class="button_submit" />';
 
@@ -727,6 +728,7 @@ function template_main()
 								<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="', $context['tabindex']++, '" class="button_submit" />';
 
 			echo '
+								<br class="clear_right" />
 							</div>
 						</form>
 					</div>

+ 40 - 35
Themes/default/Errors.template.php

@@ -45,10 +45,9 @@ function template_error_log()
 	global $context, $settings, $options, $scripturl, $txt, $modSettings;
 
 	echo '
-		<form action="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';start=', $context['start'], $context['has_filter'] ? $context['filter']['href'] : '', '" method="post" accept-charset="', $context['character_set'], '" onsubmit="if (lastClicked == \'remove_all\' &amp;&amp; !confirm(\'', $txt['sure_about_errorlog_remove'], '\')) return false; else return true;">
-			<script type="text/javascript"><!-- // --><![CDATA[
-				var lastClicked = "";
-			// ]]></script>
+		<form action="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';start=', $context['start'], $context['has_filter'] ? $context['filter']['href'] : '', '" method="post" accept-charset="', $context['character_set'], '">';
+	
+	echo '
 			<div class="title_bar clear_right">
 				<h3 class="titlebg">
 					<span class="ie6_header floatleft">
@@ -68,37 +67,36 @@ function template_error_log()
 	echo '
 						', implode('&nbsp;|&nbsp;', $error_types), '
 					</td>
-				</tr>
-				<tr>
-					<td colspan="3" class="windowbg">
-						&nbsp;&nbsp;', $txt['pages'], ': ', $context['page_index'], '
-					</td>
 				</tr>';
 
 	if ($context['has_filter'])
 		echo '
 				<tr>
 					<td colspan="3" class="windowbg">
-						<strong>', $txt['applying_filter'], ':</strong> ', $context['filter']['entity'], ' ', $context['filter']['value']['html'], ' (<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', '">', $txt['clear_filter'], '</a>)
+						<strong>&nbsp;&nbsp;', $txt['applying_filter'], ':</strong> ', $context['filter']['entity'], ' ', $context['filter']['value']['html'], '&nbsp;&nbsp;[<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', '">', $txt['clear_filter'], '</a>]
 					</td>
 				</tr>';
 
-	if (!empty($context['errors']))
-		echo '
+	echo '
 				<tr class="titlebg">
-					<td colspan="3" class="lefttext">
-						<div class="floatright"><input type="submit" value="', $txt['remove_selection'], '" onclick="lastClicked = \'remove_selection\';" class="button_submit" /> <input type="submit" name="delall" value="', $context['has_filter'] ? $txt['remove_filtered_results'] : $txt['remove_all'], '" onclick="lastClicked = \'remove_all\';" class="button_submit" /></div>
-						<label for="check_all1"><input type="checkbox" id="check_all1" onclick="invertAll(this, this.form, \'delete[]\'); this.form.check_all2.checked = this.checked;" class="input_check" /><strong>', $txt['check_all'], '</strong></label>
+					<td colspan="3" class="righttext" style="padding-right: 1.2ex">
+						<label for="check_all1"><strong>', $txt['check_all'], '</strong></label>&nbsp;
+						<input type="checkbox" id="check_all1" onclick="invertAll(this, this.form, \'delete[]\'); this.form.check_all2.checked = this.checked;" class="input_check" />
 					</td>
 				</tr>';
 
+	// No errors, then show a message
+	if (count($context['errors']) == 0)
+		echo '
+				<tr class="windowbg">
+					<td class="centertext" colspan="2">', $txt['errlog_no_entries'], '</td>
+				</tr>';		
+			
+	// we have some errors, must be some mods installed :P
 	foreach ($context['errors'] as $error)
 	{
 		echo '
 				<tr class="windowbg', $error['alternate'] ? '2' : '', '">
-					<td rowspan="2" class="checkbox_column">
-						<input type="checkbox" name="delete[]" value="', $error['id'], '" class="input_check" />
-					</td>
 					<td class="half_width">
 						<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=id_member;value=', $error['member']['id'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_member'], '"><img src="', $settings['images_url'], '/filter.png" alt="', $txt['apply_filter'], ': ', $txt['filter_only_member'], '" /></a>
 						<strong>', $error['member']['link'], '</strong><br />
@@ -120,6 +118,11 @@ function template_error_log()
 		echo '
 						<a href="', $scripturl, '?action=admin;area=logs;sa=errorlog', $context['sort_direction'] == 'down' ? ';desc' : '', ';filter=error_type;value=', $error['error_type']['type'], '" title="', $txt['apply_filter'], ': ', $txt['filter_only_type'], '"><img src="', $settings['images_url'], '/filter.png" alt="', $txt['apply_filter'], ': ', $txt['filter_only_type'], '" /></a>
 						', $txt['error_type'], ': ', $error['error_type']['name'], '
+					</td>';
+
+		echo '
+					<td rowspan="2" class="checkbox_column">
+						<input type="checkbox" name="delete[]" value="', $error['id'], '" class="input_check" />
 					</td>
 				</tr>
 				<tr class="windowbg', $error['alternate'] ? '2' : '', '">
@@ -142,30 +145,32 @@ function template_error_log()
 				</tr>';
 	}
 
-	if (!empty($context['errors']))
-		echo '
+	echo '
 				<tr class="titlebg">
-					<td colspan="3" class="lefttext">
-						<div class="floatright"><input type="submit" value="', $txt['remove_selection'], '" onclick="lastClicked = \'remove_selection\';" class="button_submit" /> <input type="submit" name="delall" value="', $context['has_filter'] ? $txt['remove_filtered_results'] : $txt['remove_all'], '" onclick="lastClicked = \'remove_all\';" class="button_submit" /></div>
-						&nbsp;<label for="check_all2"><input type="checkbox" id="check_all2" onclick="invertAll(this, this.form, \'delete[]\'); this.form.check_all1.checked = this.checked;" class="input_check" /><strong>', $txt['check_all'], '</strong></label>
+					<td colspan="3" class="righttext" style="padding-right: 1.2ex">
+						<label for="check_all2"><strong>', $txt['check_all'], '</strong></label>&nbsp;
+						<input type="checkbox" id="check_all2" onclick="invertAll(this, this.form, \'delete[]\'); this.form.check_all1.checked = this.checked;" class="input_check" />
 					</td>
-				</tr>';
-	else
-		echo '
-				<tr>
-					<td colspan="3" class="windowbg2">', $txt['errlog_no_entries'], '</td>
-				</tr>';
+				</tr>
+			</table>
+			<div class="pagesection floatleft">
+				&nbsp;&nbsp;', $txt['pages'], ': ', $context['page_index'], '
+			</div>';  
 
 	echo '
-				<tr>
-					<td colspan="3" class="windowbg">
-						&nbsp;&nbsp;', $txt['pages'], ': ', $context['page_index'], '
-					</td>
-				</tr>
-			</table><br />';
+			<div class="floatright" style="margin-top: 1ex">
+				<input type="submit" name="removeSelection" value="' . $txt['remove_selection'] . '" onclick="return confirm(\'' . $txt['remove_selection_confirm'] . '\');" class="button_submit" />
+				<input type="submit" name="delall" value="', $context['has_filter'] ? $txt['remove_filtered_results'] : $txt['remove_all'], '" onclick="return confirm(\'', $context['has_filter'] ? $txt['remove_filtered_results_confirm'] : $txt['sure_about_errorlog_remove'], '\');" class="button_submit" />
+			</div>
+			<br />';
+
 	if ($context['sort_direction'] == 'down')
 		echo '
 			<input type="hidden" name="desc" value="1" />';
+		
+	echo '
+			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />';
+
 	echo '
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 			<input type="hidden" name="', $context['admin-el_token_var'], '" value="', $context['admin-el_token'], '" />

+ 5 - 0
Themes/default/ManageAttachments.template.php

@@ -88,7 +88,9 @@ function template_maintenance()
 			<div class="content">
 				<form action="', $scripturl, '?action=admin;area=manageattachments;sa=repair;', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '">
 					<p>', $txt['attachment_integrity_check_desc'], '</p>
+					<hr class="hrcolor" />
 					<input type="submit" name="repair" value="', $txt['attachment_check_now'], '" class="button_submit" />
+					<br class="clear_right" />
 				</form>
 			</div>
 			<span class="botslice"><span></span></span>
@@ -106,6 +108,7 @@ function template_maintenance()
 					<input type="hidden" name="type" value="attachments" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="sa" value="byAge" />
+					<br class="clear_right" />
 				</form>
 				<hr />
 				<form action="', $scripturl, '?action=admin;area=manageattachments" method="post" accept-charset="', $context['character_set'], '" onsubmit="return confirm(\'', $txt['attachment_pruning_warning'], '\');" style="margin: 0 0 2ex 0;">
@@ -115,6 +118,7 @@ function template_maintenance()
 					<input type="hidden" name="type" value="attachments" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="sa" value="bySize" />
+					<br class="clear_right" />
 				</form>
 				<hr />
 				<form action="', $scripturl, '?action=admin;area=manageattachments" method="post" accept-charset="', $context['character_set'], '" onsubmit="return confirm(\'', $txt['attachment_pruning_warning'], '\');" style="margin: 0 0 2ex 0;">
@@ -123,6 +127,7 @@ function template_maintenance()
 					<input type="hidden" name="type" value="avatars" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="sa" value="byAge" />
+					<br class="clear_right" />
 				</form>
 			</div>
 			<span class="botslice"><span></span></span>

+ 20 - 18
Themes/default/ManageBans.template.php

@@ -37,21 +37,21 @@ function template_ban_edit()
 							<strong>', $txt['ban_name'], ':</strong>
 						</dt>
 						<dd>
-							<input type="text" name="ban_name" value="', $context['ban']['name'], '" size="45" maxlength="60" class="input_text" />
+							<input type="text" name="ban_name" value="', $context['ban']['name'], '" size="47" maxlength="60" class="input_text" />
 						</dd>
 						<dt>
 							<strong>', $txt['ban_reason'], ':</strong><br />
 							<span class="smalltext">', $txt['ban_reason_desc'], '</span>
 						</dt>
 						<dd>
-							<textarea name="reason" cols="44" rows="3">', $context['ban']['reason'], '</textarea>
+							<textarea name="reason" cols="40" rows="3" style="min-height: 64px; max-height: 64px; min-width: 50%; max-width: 99%;">', $context['ban']['reason'], '</textarea>
 						</dd>
 						<dt>
 							<strong>', $txt['ban_notes'], ':</strong><br />
 							<span class="smalltext">', $txt['ban_notes_desc'], '</span>
 						</dt>
 						<dd>
-							<textarea name="notes" cols="44" rows="3">', $context['ban']['notes'], '</textarea>
+							<textarea name="notes" cols="40" rows="3" style="min-height: 64px; max-height: 64px; min-width: 50%; max-width: 99%;">', $context['ban']['notes'], '</textarea>
 						</dd>
 					</dl>
 					<fieldset class="ban_settings floatleft">
@@ -164,13 +164,13 @@ function template_ban_edit()
 	}
 
 	echo '
-						<div class="righttext">
-							<input type="submit" name="', $context['ban']['is_new'] ? 'add_ban' : 'modify_ban', '" value="', $context['ban']['is_new'] ? $txt['ban_add'] : $txt['ban_modify'], '" class="button_submit" />
-							<input type="hidden" name="old_expire" value="', $context['ban']['expiration']['days'], '" />
-							<input type="hidden" name="bg" value="', $context['ban']['id'], '" />
-							<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-							<input type="hidden" name="', $context['admin-bet_token_var'], '" value="', $context['admin-bet_token'], '" />
-						</div>
+						<hr class="hrcolor" />
+						<input type="submit" name="', $context['ban']['is_new'] ? 'add_ban' : 'modify_ban', '" value="', $context['ban']['is_new'] ? $txt['ban_add'] : $txt['ban_modify'], '" class="button_submit" />
+						<input type="hidden" name="old_expire" value="', $context['ban']['expiration']['days'], '" />
+						<input type="hidden" name="bg" value="', $context['ban']['id'], '" />
+						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+						<input type="hidden" name="', $context['admin-bet_token_var'], '" value="', $context['admin-bet_token'], '" />
+						<br class="clear_right" />
 					</form>
 				</div>
 				<span class="botslice"><span></span></span>
@@ -198,10 +198,11 @@ function template_ban_edit()
 						</tr>';
 		else
 		{
+			$alternate = true;
 			foreach ($context['ban_items'] as $ban_item)
 			{
 				echo '
-						<tr class="windowbg2" align="left">
+						<tr class="', $alternate ? 'windowbg' : 'windowbg2', '" align="left">
 							<td>';
 				if ($ban_item['type'] == 'ip')
 					echo '		<strong>', $txt['ip'], ':</strong>&nbsp;', $ban_item['ip'];
@@ -213,10 +214,11 @@ function template_ban_edit()
 					echo '		<strong>', $txt['username'], ':</strong>&nbsp;', $ban_item['user']['link'];
 				echo '
 							</td>
-							<td class="windowbg" align="center">', $ban_item['hits'], '</td>
-							<td class="windowbg" align="center"><a href="', $scripturl, '?action=admin;area=ban;sa=edittrigger;bg=', $context['ban']['id'], ';bi=', $ban_item['id'], '">', $txt['ban_edit_trigger'], '</a></td>
-							<td align="center" class="windowbg2"><input type="checkbox" name="ban_items[]" value="', $ban_item['id'], '" class="input_check" /></td>
+							<td align="center">', $ban_item['hits'], '</td>
+							<td align="center"><a href="', $scripturl, '?action=admin;area=ban;sa=edittrigger;bg=', $context['ban']['id'], ';bi=', $ban_item['id'], '">', $txt['ban_edit_trigger'], '</a></td>
+							<td align="center"><input type="checkbox" name="ban_items[]" value="', $ban_item['id'], '" class="input_check" /></td>
 						</tr>';
+				$alternate = !$alternate;
 			}
 		}
 
@@ -226,7 +228,8 @@ function template_ban_edit()
 				<div class="flow_auto">
 					<div class="floatright">
 						<div class="additional_row">
-							[<a href="', $scripturl, '?action=admin;area=ban;sa=edittrigger;bg=', $context['ban']['id'], '">', $txt['ban_add_trigger'], '</a>] <input type="submit" name="remove_selection" value="', $txt['ban_remove_selected_triggers'], '" class="button_submit" />
+							<input type="submit" name="remove_selection" value="', $txt['ban_remove_selected_triggers'], '" class="button_submit" />
+							<a class="button_link" href="', $scripturl, '?action=admin;area=ban;sa=edittrigger;bg=', $context['ban']['id'], '">', $txt['ban_add_trigger'], '</a>
 						</div>
 					</div>
 				</div>
@@ -329,9 +332,8 @@ function template_ban_edit_trigger()
 							</dd>
 						</dl>
 					</fieldset>
-					<div class="righttext">
-						<input type="submit" name="', $context['ban_trigger']['is_new'] ? 'add_new_trigger' : 'edit_trigger', '" value="', $context['ban_trigger']['is_new'] ? $txt['ban_add_trigger_submit'] : $txt['ban_edit_trigger_submit'], '" class="button_submit" />
-					</div>
+					<input type="submit" name="', $context['ban_trigger']['is_new'] ? 'add_new_trigger' : 'edit_trigger', '" value="', $context['ban_trigger']['is_new'] ? $txt['ban_add_trigger_submit'] : $txt['ban_edit_trigger_submit'], '" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>

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

@@ -56,7 +56,7 @@ function template_main()
 			<div class="windowbg">
 				<span class="topslice"><span></span></span>
 				<div class="content">
-					<ul id="category_', $category['id'], '" style="float:left; width:100%;">';
+					<ul id="category_', $category['id'], '" <ul class="reset nolist">';
 
 		if (!empty($category['move_link']))
 			echo '
@@ -67,7 +67,6 @@ function template_main()
 		// List through every board in the category, printing its name and link to modify the board.
 		foreach ($category['boards'] as $board)
 		{
-			$alternate = !$alternate;
 
 			echo '
 						<li', !empty($modSettings['recycle_board']) && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] == $board['id'] ? ' id="recycle_board"' : ' ', ' class="windowbg', $alternate ? '' : '2', '" style="padding-' . ($context['right_to_left'] ? 'right' : 'left') . ': ', 5 + 30 * $board['child_level'], 'px;', $board['move'] ? 'color: red;' : '', '"><span class="floatleft"><a href="', $scripturl, '?board=', $board['id'], '">', $board['name'], '</a>', !empty($modSettings['recycle_board']) && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] == $board['id'] ? '<a href="' . $scripturl . '?action=admin;area=manageboards;sa=settings"> <img src="' . $settings['images_url'] . '/post/recycled.png" alt="' . $txt['recycle_board'] . '" /></a></span>' : '</span>', '
@@ -90,15 +89,16 @@ function template_main()
 				echo '
 						</li>';
 			}
+			$alternate = !$alternate;
 		}
 
 		// Button to add a new board.
 		echo '
 					</ul>
-					<div class="righttext">
-						<input type="submit" value="', $txt['mboards_new_board'], '" class="button_submit" />
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					</div>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['mboards_new_board'], '" class="button_submit" />
+					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -163,7 +163,7 @@ function template_modify_category()
 	// Table footer.
 	echo '
 					</dl>
-					<div class="righttext">';
+					<hr class="hrcolor" />';
 
 	if (isset($context['category']['is_new']))
 		echo '
@@ -184,7 +184,7 @@ function template_modify_category()
 						<input type="hidden" name="empty" value="1" />';
 
 	echo '
-					</div>
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -489,6 +489,7 @@ function template_modify_board()
 		echo '<div class="information">', $txt['mboards_recycle_disabled_delete'], '</div>';
 
 	echo '
+					<hr class="hrcolor" />
 					<input type="hidden" name="rid" value="', $context['redirect_location'], '" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-be-' . $context['board']['id'] . '_token_var'], '" value="', $context['admin-be-' . $context['board']['id'] . '_token'], '" />';
@@ -510,6 +511,7 @@ function template_modify_board()
 		echo '
 					<span', $context['board']['is_recycle'] ? ' style="visibility:hidden">' : '>', '<input type="submit" name="delete" value="', $txt['mboards_delete_board'], '" onclick="return confirm(\'', $txt['boardConfirm'], '\');"', ' class="button_submit" /></span>';
 	echo '
+				<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>

+ 3 - 1
Themes/default/ManageCalendar.template.php

@@ -94,7 +94,8 @@ function template_edit_holiday()
 	echo '
 							</select>
 						</dd>
-					</dl>';
+					</dl>
+					<hr class="hrcolor" />';
 
 	if ($context['is_new'])
 		echo '
@@ -106,6 +107,7 @@ function template_edit_holiday()
 					<input type="hidden" name="holiday" value="', $context['holiday']['id'], '" />';
 	echo '
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>

+ 8 - 12
Themes/default/ManageLanguages.template.php

@@ -306,10 +306,9 @@ function template_modify_language_entries()
 						</dd>
 					</dl>
 					</fieldset>
-					<div class="righttext">
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="', $context['admin-mlang_token_var'], '" value="', $context['admin-mlang_token'], '" />
-						<input type="submit" name="save_main" value="', $txt['save'], '"', $context['lang_file_not_writable_message'] || !empty($context['file_entries']) ? ' disabled="disabled"' : '', ' class="button_submit" />';
+					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<input type="hidden" name="', $context['admin-mlang_token_var'], '" value="', $context['admin-mlang_token'], '" />
+					<input type="submit" name="save_main" value="', $txt['save'], '"', $context['lang_file_not_writable_message'] || !empty($context['file_entries']) ? ' disabled="disabled"' : '', ' class="button_submit" />';
 
 	// Allow deleting entries.
 	if ($context['lang_id'] != 'english')
@@ -320,7 +319,7 @@ function template_modify_language_entries()
 	}
 
 	echo '
-					</div>
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -462,16 +461,13 @@ function template_add_language()
 	{
 		// Display a little error box.
 		echo '
-						<div class="smalltext error">', $txt['add_language_error_' . $context['smf_error']], '</div>';
+						<div><br /><p class="errorbox">', $txt['add_language_error_' . $context['smf_error']], '</p></div>';
 	}
 
 	echo '
-
-					</fieldset>
-					<div class="righttext">
-						', isBrowser('is_ie') ? '<input type="text" name="ie_fix" style="display: none;" class="input_text" /> ' : '', '
-						<input type="submit" name="smf_add_sub" value="', $txt['search'], '" class="button_submit" />
-					</div>
+					</fieldset>', isBrowser('is_ie') ? '<input type="text" name="ie_fix" style="display: none;" class="input_text" /> ' : '', '
+					<input type="submit" name="smf_add_sub" value="', $txt['search'], '" class="button_submit" />
+					<br />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>

+ 52 - 18
Themes/default/ManageMaintenance.template.php

@@ -32,9 +32,11 @@ function template_maintain_database()
 			<div class="content">
 				<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=optimize" method="post" accept-charset="', $context['character_set'], '">
 					<p>', $txt['maintain_optimize_info'], '</p>
-					<span><input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" /></span>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
+					<br class="clear_right" />
 				</form>
 			</div>
 			<span class="botslice"><span></span></span>
@@ -54,13 +56,17 @@ function template_maintain_database()
 
 	if ($db_type == 'sqlite')
 		echo '
-					<p><input type="submit" value="', $txt['maintain_backup_save'], '" id="submitDump" class="button_submit" /></p>';
+					<hr class="hrcolor" />
+					<p><input type="submit" value="', $txt['maintain_backup_save'], '" id="submitDump" class="button_submit" />
+					<br class="clear_right" /></p>';
 	else
 		echo '
 					<p><label for="struct"><input type="checkbox" name="struct" id="struct" onclick="document.getElementById(\'submitDump\').disabled = !document.getElementById(\'struct\').checked &amp;&amp; !document.getElementById(\'data\').checked;" class="input_check" checked="checked" /> ', $txt['maintain_backup_struct'], '</label><br />
 					<label for="data"><input type="checkbox" name="data" id="data" onclick="document.getElementById(\'submitDump\').disabled = !document.getElementById(\'struct\').checked &amp;&amp; !document.getElementById(\'data\').checked;" checked="checked" class="input_check" /> ', $txt['maintain_backup_data'], '</label><br />
 					<label for="compress"><input type="checkbox" name="compress" id="compress" value="gzip" checked="checked" class="input_check" /> ', $txt['maintain_backup_gz'], '</label></p>
-					<p><input type="submit" value="', $txt['maintain_backup_save'], '" id="submitDump" onclick="return document.getElementById(\'struct\').checked || document.getElementById(\'data\').checked;" class="button_submit" /></p>';
+					<hr class="hrcolor" />
+					<p><input type="submit" value="', $txt['maintain_backup_save'], '" id="submitDump" onclick="return document.getElementById(\'struct\').checked || document.getElementById(\'data\').checked;" class="button_submit" />
+					<br class="clear_right" /></p>';
 
 	echo '
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -82,8 +88,9 @@ function template_maintain_database()
 			<div class="content">
 				<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertutf8" method="post" accept-charset="', $context['character_set'], '">
 					<p>', $txt['utf8_introduction'], '</p>
-					', !empty($modSettings['search_index']) && $modSettings['search_index'] == 'fulltext' ? '<p class="error">' . $txt['utf8_cannot_convert_fulltext'] . '</p>' : '', '
-					<span><input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" ', !empty($modSettings['search_index']) && $modSettings['search_index'] == 'fulltext' ? 'disabled="disabled"' : '', '/></span>
+					', !empty($modSettings['search_index']) && $modSettings['search_index'] == 'fulltext' ? '<p class="errorbox">' . $txt['utf8_cannot_convert_fulltext'] . '</p>' : '', '
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" ', !empty($modSettings['search_index']) && $modSettings['search_index'] == 'fulltext' ? 'disabled="disabled"' : '', '/><br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
 				</form>
@@ -104,7 +111,9 @@ function template_maintain_database()
 			<div class="content">
 				<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertentities" method="post" accept-charset="', $context['character_set'], '">
 					<p>', $txt['entity_convert_introduction'], '</p>
-					<span><input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" /></span>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
+					<br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
 				</form>
@@ -141,7 +150,9 @@ function template_maintain_routine()
 			<div class="content">
 				<form action="', $scripturl, '?action=admin;area=maintain;sa=routine;activity=version" method="post" accept-charset="', $context['character_set'], '">
 					<p>', $txt['maintain_version_info'], '</p>
-					<span><input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" /></span>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
+					<br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 				</form>
 			</div>
@@ -155,7 +166,9 @@ function template_maintain_routine()
 			<div class="content">
 				<form action="', $scripturl, '?action=admin;area=repairboards" method="post" accept-charset="', $context['character_set'], '">
 					<p>', $txt['maintain_errors_info'], '</p>
-					<span><input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" /></span>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
+					<br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
 				</form>
@@ -170,7 +183,9 @@ function template_maintain_routine()
 			<div class="content">
 				<form action="', $scripturl, '?action=admin;area=maintain;sa=routine;activity=recount" method="post" accept-charset="', $context['character_set'], '">
 					<p>', $txt['maintain_recount_info'], '</p>
-					<span><input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" /></span>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
+					<br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
 				</form>
@@ -185,7 +200,9 @@ function template_maintain_routine()
 			<div class="content">
 				<form action="', $scripturl, '?action=admin;area=maintain;sa=routine;activity=logs" method="post" accept-charset="', $context['character_set'], '">
 					<p>', $txt['maintain_logs_info'], '</p>
-					<span><input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" /></span>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
+					<br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
 				</form>
@@ -200,7 +217,9 @@ function template_maintain_routine()
 			<div class="content">
 				<form action="', $scripturl, '?action=admin;area=maintain;sa=routine;activity=cleancache" method="post" accept-charset="', $context['character_set'], '">
 					<p>', $txt['maintain_cache_info'], '</p>
-					<span><input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" /></span>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
+					<br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
 				</form>
@@ -309,7 +328,10 @@ function template_maintain_members()
 						<input type="checkbox" name="posts" id="posts" checked="checked" class="input_check" />
 						<label for="posts">', $txt['reattribute_increase_posts'], '</label>
 					</p>
-					<span><input type="submit" id="do_attribute" value="', $txt['reattribute'], '" onclick="if (!checkAttributeValidity()) return false; return confirm(warningMessage);" class="button_submit" /></span>
+					<hr class="hrcolor" />
+					<input type="submit" id="do_attribute" value="', $txt['reattribute'], '" onclick="if (!checkAttributeValidity()) return false; 
+					return confirm(warningMessage);" class="button_submit" />
+					<br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
 				</form>
@@ -343,7 +365,9 @@ function template_maintain_members()
 
 	echo '
 					</div>
-					<span><input type="submit" value="', $txt['maintain_old_remove'], '" onclick="return confirm(\'', $txt['maintain_members_confirm'], '\');" class="button_submit" /></span>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['maintain_old_remove'], '" onclick="return confirm(\'', $txt['maintain_members_confirm'], '\');" class="button_submit" />
+					<br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
 				</form>
@@ -356,9 +380,11 @@ function template_maintain_members()
 		<div class="windowbg">
 			<span class="topslice"><span></span></span>
 			<div class="content">
-				<form action="', $scripturl, '?action=admin;area=maintain;sa=members;activity=recountposts" method="post" accept-charset="', $context['character_set'], '" id="membersForm">
+				<form action="', $scripturl, '?action=admin;area=maintain;sa=members;activity=recountposts" method="post" accept-charset="', $context['character_set'], '" id="membersRecountForm">
 					<p>', $txt['maintain_recountposts_info'], '</p>
-					<span><input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" /></span>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['maintain_run_now'], '" class="button_submit" />
+					<br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
 				</form>
@@ -485,7 +511,9 @@ function template_maintain_topics()
 	echo '
 						</div>
 					</div>
-					<span><input type="submit" value="', $txt['maintain_old_remove'], '" onclick="return confirm(\'', $txt['maintain_old_confirm'], '\');" class="button_submit" /></span>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['maintain_old_remove'], '" onclick="return confirm(\'', $txt['maintain_old_confirm'], '\');" class="button_submit" />
+					<br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
 				</form>
@@ -536,7 +564,9 @@ function template_maintain_topics()
 	}
 	echo '
 					</select></p>
-					<span><input type="submit" value="', $txt['move_topics_now'], '" onclick="if (document.getElementById(\'id_board_from\').options[document.getElementById(\'id_board_from\').selectedIndex].disabled || document.getElementById(\'id_board_from\').options[document.getElementById(\'id_board_to\').selectedIndex].disabled) return false; var confirmText = \'', $txt['move_topics_confirm'] . '\'; return confirm(confirmText.replace(/%board_from%/, document.getElementById(\'id_board_from\').options[document.getElementById(\'id_board_from\').selectedIndex].text.replace(/^=+&gt;&nbsp;/, \'\')).replace(/%board_to%/, document.getElementById(\'id_board_to\').options[document.getElementById(\'id_board_to\').selectedIndex].text.replace(/^=+&gt;&nbsp;/, \'\')));" class="button_submit" /></span>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['move_topics_now'], '" onclick="if (document.getElementById(\'id_board_from\').options[document.getElementById(\'id_board_from\').selectedIndex].disabled || document.getElementById(\'id_board_from\').options[document.getElementById(\'id_board_to\').selectedIndex].disabled) return false; var confirmText = \'', $txt['move_topics_confirm'] . '\'; return confirm(confirmText.replace(/%board_from%/, document.getElementById(\'id_board_from\').options[document.getElementById(\'id_board_from\').selectedIndex].text.replace(/^=+&gt;&nbsp;/, \'\')).replace(/%board_to%/, document.getElementById(\'id_board_to\').options[document.getElementById(\'id_board_to\').selectedIndex].text.replace(/^=+&gt;&nbsp;/, \'\')));" class="button_submit" />
+					<br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 				</form>
 			</div>
@@ -611,7 +641,9 @@ function template_convert_utf8()
 						<dt><strong>', $txt['utf8_target_charset'], ': </strong></dt>
 						<dd>', $txt['utf8_utf8'], '</dd>
 					</dl>
+					<hr class="hrcolor" />
 					<input type="submit" value="', $txt['utf8_proceed'], '" class="button_submit" />
+					<br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-maint_token_var'], '" value="', $context['admin-maint_token'], '" />
 					<input type="hidden" name="proceed" value="1" />
@@ -637,7 +669,9 @@ function template_convert_entities()
 			<div class="content">
 				<p>', $txt['entity_convert_introduction'], '</p>
 				<form action="', $scripturl, '?action=admin;area=maintain;sa=database;activity=convertentities;start=0;', $context['session_var'], '=', $context['session_id'], '" method="post" accept-charset="', $context['character_set'], '">
-					<input type="submit" value="', $txt['entity_convert_proceed'], '" class="button_submit" />
+				<hr class="hrcolor" />
+				<input type="submit" value="', $txt['entity_convert_proceed'], '" class="button_submit" />
+				<br class="clear_right" />
 				</form>
 			</div>
 			<span class="botslice"><span></span></span>

+ 38 - 25
Themes/default/ManageMembergroups.template.php

@@ -154,9 +154,9 @@ function template_new_group()
 							</fieldset>
 						</dd>
 					</dl>
-					<div class="righttext">
-						<input type="submit" value="', $txt['membergroups_add_group'], '" class="button_submit" />
-					</div>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['membergroups_add_group'], '" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>';
@@ -369,10 +369,10 @@ function template_edit_group()
 	}
 	echo '
 					</dl>
-					<div class="righttext">
-						<input type="submit" name="save" value="', $txt['membergroups_edit_save'], '" class="button_submit" />', $context['group']['allow_delete'] ? '
-						<input type="submit" name="delete" value="' . $txt['membergroups_delete'] . '" onclick="return confirm(\'' . $txt['membergroups_confirm_delete'] . '\');" class="button_submit" />' : '', '
-					</div>
+					<hr class="hrcolor" />
+					<input type="submit" name="save" value="', $txt['membergroups_edit_save'], '" class="button_submit" />', $context['group']['allow_delete'] ? '
+					<input type="submit" name="delete" value="' . $txt['membergroups_delete'] . '" onclick="return confirm(\'' . $txt['membergroups_confirm_delete'] . '\');" class="button_submit" />' : '', '
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -385,8 +385,8 @@ function template_edit_group()
 		<script type="text/javascript"><!-- // --><![CDATA[
 			var oModeratorSuggest = new smc_AutoSuggest({
 				sSelf: \'oModeratorSuggest\',
-				sSessionId: \'', $context['session_id'], '\',
-				sSessionVar: \'', $context['session_var'], '\',
+				sSessionId: smf_session_id,
+				sSessionVar: smf_session_var,
 				sSuggestId: \'group_moderators\',
 				sControlId: \'group_moderators\',
 				sSearchType: \'member\',
@@ -500,14 +500,14 @@ function template_group_members()
 			<table width="100%" class="table_grid">
 				<thead>
 					<tr class="catbg">
-						<th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=name', $context['sort_by'] == 'name' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['name'], $context['sort_by'] == 'name' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>
+						<th class="first_th"><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=name', $context['sort_by'] == 'name' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['name'], $context['sort_by'] == 'name' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>
 						<th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=email', $context['sort_by'] == 'email' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['email'], $context['sort_by'] == 'email' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>
 						<th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=active', $context['sort_by'] == 'active' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['membergroups_members_last_active'], $context['sort_by'] == 'active' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>
 						<th><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=registered', $context['sort_by'] == 'registered' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['date_registered'], $context['sort_by'] == 'registered' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>
-						<th', empty($context['group']['assignable']) ? ' colspan="2"' : '', '><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=posts', $context['sort_by'] == 'posts' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['posts'], $context['sort_by'] == 'posts' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>';
+						<th ', empty($context['group']['assignable']) ? ' class="last_th" colspan="2"' : '', '><a href="', $scripturl, '?action=', $context['current_action'], (isset($context['admin_area']) ? ';area=' . $context['admin_area'] : ''), ';sa=members;start=', $context['start'], ';sort=posts', $context['sort_by'] == 'posts' && $context['sort_direction'] == 'up' ? ';desc' : '', ';group=', $context['group']['id'], '">', $txt['posts'], $context['sort_by'] == 'posts' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.png" alt="" />' : '', '</a></th>';
 	if (!empty($context['group']['assignable']))
 		echo '
-						<td width="4%" align="center"><input type="checkbox" class="input_check" onclick="invertAll(this, this.form);" /></td>';
+						<th class="last_th" width="4%" align="center"><input type="checkbox" class="input_check" onclick="invertAll(this, this.form);" /></th>';
 	echo '
 					</tr>
 				</thead>
@@ -519,10 +519,12 @@ function template_group_members()
 						<td colspan="6" align="center">', $txt['membergroups_members_no_members'], '</td>
 					</tr>';
 
+	$alternate = false;
 	foreach ($context['members'] as $member)
 	{
+		$alternate = !$alternate;
 		echo '
-					<tr class="windowbg2">
+					<tr class="', $alternate === true ? 'windowbg' : 'windowbg2', '">
 						<td>', $member['name'], '</td>
 						<td', $member['show_email'] == 'no_through_forum' && $settings['use_image_buttons'] ? ' align="center"' : '', '>';
 
@@ -545,8 +547,8 @@ function template_group_members()
 
 		echo '
 						</td>
-						<td class="windowbg">', $member['last_online'], '</td>
-						<td class="windowbg">', $member['registered'], '</td>
+						<td>', $member['last_online'], '</td>
+						<td>', $member['registered'], '</td>
 						<td', empty($context['group']['assignable']) ? ' colspan="2"' : '', '>', $member['posts'], '</td>';
 		if (!empty($context['group']['assignable']))
 			echo '
@@ -557,17 +559,20 @@ function template_group_members()
 
 	echo '
 				</tbody>
-			</table>
-			<div class="pagesection flow_hidden">
-				<div class="floatleft">', $txt['pages'], ': ', $context['page_index'], '</div>';
-
+			</table>';
+		
 	if (!empty($context['group']['assignable']))
 		echo '
-				<div class="floatright"><input type="submit" name="remove" value="', $txt['membergroups_members_remove'], '" class="button_submit" /></div>';
+			<div class="floatright">
+				<input type="submit" name="remove" value="', $txt['membergroups_members_remove'], '" class="button_submit " />
+			</div>';
+	
 	echo '
+			<div class="pagesection flow_hidden">
+				<div class="floatleft">', $txt['pages'], ': ', $context['page_index'], '</div>
 			</div>
 			<br />';
-
+	
 	if (!empty($context['group']['assignable']))
 	{
 		echo '
@@ -577,10 +582,17 @@ function template_group_members()
 			<div class="windowbg">
 				<span class="topslice"><span></span></span>
 				<div class="content">
-					<strong>', $txt['membergroups_members_add_desc'], ':</strong>
-					<input type="text" name="toAdd" id="toAdd" value="" class="input_text" />
-					<div id="toAddItemContainer"></div>
+					<dl class="settings">
+						<dt>
+							<strong>', $txt['membergroups_members_add_desc'], ':</strong>
+						</dt>
+						<dd>
+							<input type="text" name="toAdd" id="toAdd" value="" class="input_text" />
+							<div id="toAddItemContainer"></div>
+						</dd>
+					</dl>
 					<input type="submit" name="add" value="', $txt['membergroups_members_add'], '" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>';
@@ -638,7 +650,7 @@ function template_group_request_reason()
 						</dt>
 						<dd>
 							<input type="hidden" name="groupr[]" value="', $request['id'], '" />
-							<textarea name="groupreason[', $request['id'], ']" rows="3" cols="40" style="' . (isBrowser('is_ie8') ? 'width: 635px; max-width: 96%; min-width: 96%' : 'width: 96%') . ';"></textarea>
+							<textarea name="groupreason[', $request['id'], ']" rows="3" cols="40" style="' . (isBrowser('is_ie8') ? 'width: 635px; min-width: 96%; max-width: 96%' : 'min-width: 80%; max-width: 99%') . ';"></textarea>
 						</dd>';
 
 	echo '
@@ -646,6 +658,7 @@ function template_group_request_reason()
 					<input type="submit" name="go" value="', $txt['mc_groupr_submit'], '" class="button_submit" />
 					<input type="hidden" name="req_action" value="got_reason" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>

+ 1 - 3
Themes/default/ManageMembers.template.php

@@ -234,9 +234,7 @@ function template_search_members()
 					</tbody>
 				</table>
 			</div><br />
-			<div class="righttext">
-				<input type="submit" value="', $txt['search'], '" class="button_submit" />
-			</div>
+			<input type="submit" value="', $txt['search'], '" class="button_submit" />
 		</form>
 	</div>
 	<br class="clear" />';

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

@@ -56,7 +56,7 @@ function template_edit_news()
 				</tbody>
 			</table>
 			<div class="floatleft padding">
-				<div id="moreNewsItems_link" style="display: none;"><a href="javascript:void(0);" onclick="addNewsItem(); return false;">', $txt['editnews_clickadd'], '</a></div>
+				<div id="moreNewsItems_link" style="display: none;">[<a href="javascript:void(0);" onclick="addNewsItem(); return false;">', $txt['editnews_clickadd'], '</a>]</div>
 				<script type="text/javascript"><!-- // --><![CDATA[
 					document.getElementById("moreNewsItems_link").style.display = "";
 					function addNewsItem()
@@ -213,8 +213,8 @@ function template_email_members()
 		document.getElementById("advanced_select_div").style.display = "";
 		var oMemberSuggest = new smc_AutoSuggest({
 			sSelf: \'oMemberSuggest\',
-			sSessionId: \'', $context['session_id'], '\',
-			sSessionVar: \'', $context['session_var'], '\',
+			sSessionId: smf_session_id,
+			sSessionVar: smf_session_var,
 			sSuggestId: \'members\',
 			sControlId: \'members\',
 			sSearchType: \'member\',

+ 8 - 7
Themes/default/ManagePaid.template.php

@@ -185,11 +185,11 @@ function template_modify_subscription()
 							</dl>
 						</fieldset>
 					</div>
-					<div class="righttext">
-						<input type="submit" name="save" value="', $txt['paid_settings_save'], '" class="button_submit" />
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="', $context['admin-pms_token_var'], '" value="', $context['admin-pms_token'], '" />
-					</div>
+					<hr class="hrcolor">
+					<input type="submit" name="save" value="', $txt['paid_settings_save'], '" class="button_submit" />
+					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<input type="hidden" name="', $context['admin-pms_token_var'], '" value="', $context['admin-pms_token'], '" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -474,8 +474,9 @@ function template_user_subscription()
 					', sprintf($modSettings['paid_currency_symbol'], $subscription['costs']['fixed']);
 
 				echo '
-					<br />
-					<input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="button_submit" />';
+					<hr class="hrcolor" />
+					<input type="submit" name="sub_id[', $subscription['id'], ']" value="', $txt['paid_order'], '" class="button_submit" />
+					<br class="clear_right" />';
 			}
 			else
 				echo '

+ 14 - 13
Themes/default/ManagePermissions.template.php

@@ -184,9 +184,8 @@ function template_permission_index()
 							</dd>
 						</dl>
 					</fieldset>
-					<div class="righttext">
-						<input type="submit" value="', $txt['permissions_set_permissions'], '" onclick="return checkSubmit();" class="button_submit" />
-					</div>
+					<input type="submit" value="', $txt['permissions_set_permissions'], '" onclick="return checkSubmit();" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>';
@@ -279,9 +278,10 @@ function template_by_board()
 
 	if (!$context['edit_all'])
 		echo '
-		<div class="righttext">
-			<a href="', $scripturl, '?action=admin;area=permissions;sa=board;edit;', $context['session_var'], '=', $context['session_id'], '">[', $txt['permissions_board_all'], ']</a>
-		</div>';
+			<div class="content">
+			<a class="button_link" href="', $scripturl, '?action=admin;area=permissions;sa=board;edit;', $context['session_var'], '=', $context['session_id'], '">', $txt['permissions_board_all'], '</a>
+			<br class="clear_right" />
+			</div>';
 
 	foreach ($context['categories'] as $category)
 	{
@@ -340,14 +340,15 @@ function template_by_board()
 	}
 
 	echo '
-		<div class="righttext">';
+		<div class="content">';
 
 	if ($context['edit_all'])
 		echo '
 			<input type="submit" name="save_changes" value="', $txt['save'], '" class="button_submit" />';
 	else
 		echo '
-			<a href="', $scripturl, '?action=admin;area=permissions;sa=board;edit;', $context['session_var'], '=', $context['session_id'], '">[', $txt['permissions_board_all'], ']</a>';
+			
+			<a class="button_link" href="', $scripturl, '?action=admin;area=permissions;sa=board;edit;', $context['session_var'], '=', $context['session_id'], '">', $txt['permissions_board_all'], '</a>';
 
 	echo '
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -448,11 +449,11 @@ function template_edit_profiles()
 							</select>
 						</dd>
 					</dl>
-					<div class="righttext">
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="', $context['admin-mpp_token_var'], '" value="', $context['admin-mpp_token'], '" />
-						<input type="submit" name="create" value="', $txt['permissions_profile_new_create'], '" class="button_submit" />
-					</div>
+					<hr class="hrcolor" />
+					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<input type="hidden" name="', $context['admin-mpp_token_var'], '" value="', $context['admin-mpp_token'], '" />
+					<input type="submit" name="create" value="', $txt['permissions_profile_new_create'], '" class="button_submit" />
+					<br class="clear_right />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>

+ 18 - 10
Themes/default/ManageSearch.template.php

@@ -80,9 +80,11 @@ function template_modify_weights()
 							<span class="search_weight"><strong>100%</strong></span>
 						</dd>
 					</dl>
-					<input type="submit" name="save" value="', $txt['search_weights_save'], '" class="button_submit floatright" />
+					<hr class="hrcolor" />
+					<input type="submit" name="save" value="', $txt['search_weights_save'], '" class="button_submit" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="', $context['admin-msw_token_var'], '" value="', $context['admin-msw_token'], '" /><br class="clear" />
+					<input type="hidden" name="', $context['admin-msw_token_var'], '" value="', $context['admin-msw_token'], '" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -208,11 +210,11 @@ function template_select_search_method()
 						<input type="checkbox" name="search_force_index" id="search_force_index_check" value="1"', empty($modSettings['search_force_index']) ? '' : ' checked="checked"', ' class="input_check" /><label for="search_force_index_check">', $txt['search_force_index'], '</label><br />
 						<input type="checkbox" name="search_match_words" id="search_match_words_check" value="1"', empty($modSettings['search_match_words']) ? '' : ' checked="checked"', ' class="input_check" /><label for="search_match_words_check">', $txt['search_match_words'], '</label>
 					</fieldset>
-					<div class="clear">
-						<input type="submit" name="save" value="', $txt['search_method_save'], '" class="button_submit floatright" />
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="', $context['admin-msm_token_var'], '" value="', $context['admin-msm_token'], '" />
-					</div>
+					<hr class="hrcolor clear" />
+					<input type="submit" name="save" value="', $txt['search_method_save'], '" class="button_submit" />
+					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<input type="hidden" name="', $context['admin-msm_token_var'], '" value="', $context['admin-msm_token'], '" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice clear"><span></span></span>
 			</div>
@@ -367,9 +369,11 @@ function template_spider_edit()
 							<textarea name="spider_ip" rows="4" cols="20">', $context['spider']['ip_info'], '</textarea>
 						</dd>
 					</dl>
+					<hr class="hrcolor" />
+					<input type="submit" name="save" value="', $context['page_title'], '" class="button_submit" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-ses_token_var'], '" value="', $context['admin-ses_token'], '" />
-					<input type="submit" name="save" value="', $context['page_title'], '" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -402,10 +406,12 @@ function template_show_spider_logs()
 						', $txt['spider_logs_delete_older'], '
 						<input type="text" name="older" id="older" value="7" size="3" class="input_text" />
 						', $txt['spider_logs_delete_day'], '
-					</p>
+					</p>	
+					<hr class="hrcolor" />
+					<input type="submit" name="delete_entries" value="', $txt['spider_logs_delete_submit'], '" onclick="if (document.getElementById(\'older\').value &lt; 1 &amp;&amp; !confirm(\'' . addcslashes($txt['spider_logs_delete_confirm'], "'") . '\')) return false; return true;" class="button_submit" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-sl_token_var'], '" value="', $context['admin-sl_token'], '" />
-					<input type="submit" name="delete_entries" value="', $txt['spider_logs_delete_submit'], '" onclick="if (document.getElementById(\'older\').value &lt; 1 &amp;&amp; !confirm(\'' . addcslashes($txt['spider_logs_delete_confirm'], "'") . '\')) return false; return true;" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -437,9 +443,11 @@ function template_show_spider_stats()
 					<p>
 						', sprintf($txt['spider_stats_delete_older'], '<input type="text" name="older" id="older" value="90" size="3" class="input_text" />'), '
 					</p>
+					<hr class="hrcolor" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-ss_token_var'], '" value="', $context['admin-ss_token'], '" />
 					<input type="submit" name="delete_entries" value="', $txt['spider_logs_delete_submit'], '" onclick="if (document.getElementById(\'older\').value &lt; 1 &amp;&amp; !confirm(\'' . addcslashes($txt['spider_logs_delete_confirm'], "'") . '\')) return false; return true;" class="button_submit" />
+					<br />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>

+ 8 - 1
Themes/default/ManageSmileys.template.php

@@ -145,7 +145,9 @@ function template_modifyset()
 
 		echo '
 					</dl>
+					<hr class="hrcolor" />
 					<input type="submit" value="', $txt['smiley_sets_save'], '" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -233,8 +235,10 @@ function template_modifysmiley()
 							</select>
 						</dd>
 					</dl>
+					<hr class="hrcolor" />
 					<input type="submit" value="', $txt['smileys_save'], '" class="button_submit" />
 					<input type="submit" name="deletesmiley" value="', $txt['smileys_delete'], '" onclick="return confirm(\'', $txt['smileys_delete_confirm'], '\');" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -383,7 +387,9 @@ function template_addsmiley()
 							</select>
 						</dd>
 					</dl>
+					<hr class="hrcolor" />
 					<input type="submit" value="', $txt['smileys_save'], '" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -537,9 +543,10 @@ function template_editicon()
 					<input type="hidden" name="icon" value="', $context['icon']['id'], '" />';
 
 	echo '
-
+					<hr class="hrcolor" />
 					<input type="submit" value="', $txt['smileys_save'], '" class="button_submit" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>

+ 45 - 38
Themes/default/Memberlist.template.php

@@ -68,52 +68,53 @@ function template_main()
 			<tbody>';
 
 	// Assuming there are members loop through each one displaying their data.
+	$alternate = true;
 	if (!empty($context['members']))
 	{
 		foreach ($context['members'] as $member)
 		{
 			echo '
-				<tr ', empty($member['sort_letter']) ? '' : ' id="letter' . $member['sort_letter'] . '"', '>
-					<td class="windowbg2">
+				<tr class="windowbg', $alternate ? '2' : '', '"', empty($member['sort_letter']) ? '' : ' id="letter' . $member['sort_letter'] . '"', '>
+					<td class="centertext">
 						', $context['can_send_pm'] ? '<a href="' . $member['online']['href'] . '" title="' . $member['online']['text'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $member['online']['image_href'] . '" alt="' . $member['online']['text'] . '" class="centericon" />' : $member['online']['label'], $context['can_send_pm'] ? '</a>' : '', '
 					</td>
-					<td class="windowbg lefttext">', $member['link'], '</td>
-					<td class="windowbg2">', $member['show_email'] == 'no' ? '' : '<a href="' . $scripturl . '?action=emailuser;sa=email;uid=' . $member['id'] . '" rel="nofollow"><img src="' . $settings['images_url'] . '/email_sm.png" alt="' . $txt['email'] . '" title="' . $txt['email'] . ' ' . $member['name'] . '" /></a>', '</td>';
+					<td class="lefttext">', $member['link'], '</td>
+					<td class="centertext">', $member['show_email'] == 'no' ? '' : '<a href="' . $scripturl . '?action=emailuser;sa=email;uid=' . $member['id'] . '" rel="nofollow"><img src="' . $settings['images_url'] . '/email_sm.png" alt="' . $txt['email'] . '" title="' . $txt['email'] . ' ' . $member['name'] . '" /></a>', '</td>';
 
 		if (!isset($context['disabled_fields']['website']))
 			echo '
-					<td class="windowbg">', $member['website']['url'] != '' ? '<a href="' . $member['website']['url'] . '" target="_blank" class="new_win"><img src="' . $settings['images_url'] . '/www.png" alt="' . $member['website']['title'] . '" title="' . $member['website']['title'] . '" /></a>' : '', '</td>';
+					<td class="centertext">', $member['website']['url'] != '' ? '<a href="' . $member['website']['url'] . '" target="_blank" class="new_win"><img src="' . $settings['images_url'] . '/www.png" alt="' . $member['website']['title'] . '" title="' . $member['website']['title'] . '" /></a>' : '', '</td>';
 
 		// ICQ?
 		if (!isset($context['disabled_fields']['icq']))
 			echo '
-					<td class="windowbg2">', $member['icq']['link'], '</td>';
+					<td class="centertext">', $member['icq']['link'], '</td>';
 
 		// AIM?
 		if (!isset($context['disabled_fields']['aim']))
 			echo '
-					<td class="windowbg2">', $member['aim']['link'], '</td>';
+					<td class="centertext">', $member['aim']['link'], '</td>';
 
 		// YIM?
 		if (!isset($context['disabled_fields']['yim']))
 			echo '
-					<td class="windowbg2">', $member['yim']['link'], '</td>';
+					<td class="centertext">', $member['yim']['link'], '</td>';
 
 		// MSN?
 		if (!isset($context['disabled_fields']['msn']))
 			echo '
-					<td class="windowbg2">', $member['msn']['link'], '</td>';
+					<td class="centertext">', $member['msn']['link'], '</td>';
 
 		// Group and date.
 		echo '
-					<td class="windowbg lefttext">', empty($member['group']) ? $member['post_group'] : $member['group'], '</td>
-					<td class="windowbg lefttext">', $member['registered_date'], '</td>';
+					<td class="lefttext">', empty($member['group']) ? $member['post_group'] : $member['group'], '</td>
+					<td class="lefttext">', $member['registered_date'], '</td>';
 
 		if (!isset($context['disabled_fields']['posts']))
 		{
 			echo '
-					<td class="windowbg2" style="white-space: nowrap" width="15">', $member['posts'], '</td>
-					<td class="windowbg statsbar" width="120">';
+					<td style="white-space: nowrap" width="15">', $member['posts'], '</td>
+					<td class="statsbar" width="120">';
 
 			if (!empty($member['post_percent']))
 				echo '
@@ -127,6 +128,8 @@ function template_main()
 
 		echo '
 				</tr>';
+				
+			$alternate = !$alternate;
 		}
 	}
 	// No members?
@@ -136,12 +139,12 @@ function template_main()
 					<td colspan="', $context['colspan'], '" class="windowbg">', $txt['search_no_results'], '</td>
 				</tr>';
 
-	// Show the page numbers again. (makes 'em easier to find!)
-	echo '
+				echo '
 			</tbody>
 			</table>
 		</div>';
-
+		
+	// Show the page numbers again. (makes 'em easier to find!)
 	echo '
 		<div class="pagesection">
 			<div class="pagelinks floatleft">', $txt['pages'], ': ', $context['page_index'], '</div>';
@@ -149,9 +152,7 @@ function template_main()
 	// If it is displaying the result of a search show a "search again" link to edit their criteria.
 	if (isset($context['old_search']))
 		echo '
-			<div class="floatright">
-				<a href="', $scripturl, '?action=mlist;sa=search;search=', $context['old_search_value'], '">', $txt['mlist_search_again'], '</a>
-			</div>';
+			<a class="button_link" href="', $scripturl, '?action=mlist;sa=search;search=', $context['old_search_value'], '">', $txt['mlist_search_again'], '</a>';
 	echo '
 		</div>
 	</div>';
@@ -181,32 +182,38 @@ function template_search()
 			<div class="pagesection">
 				', template_button_strip($memberlist_buttons, 'right'), '
 			</div>';
+	
 	// Display the input boxes for the form.
 	echo '	<div id="memberlist_search" class="clear">
-				<span class="upperframe"><span></span></span>
+				<span class="upperframe"><span></span></span>';
+	
+	echo '
 				<div class="roundframe">
-					<div id="mlist_search" class="flow_hidden">
-						<div id="search_term_input"><br />
-							<strong>', $txt['search_for'], ':</strong>
-							<input type="text" name="search" value="', $context['old_search'], '" size="35" class="input_text" /> <input type="submit" name="ml_search" value="' . $txt['search'] . '" class="button_submit" />
-						</div>
-						<span class="floatleft">';
-
-	$count = 0;
+					<dl id="mlist_search" class="settings">
+						<dt>
+							<label><strong>', $txt['search_for'], ':</strong></label>
+						</dt>
+						<dd>
+							<input type="text" name="search" value="', $context['old_search'], '" size="42" class="input_text" />
+						</dd>
+						<dt>
+							<label><strong>', $txt['mlist_search_filter'], ':</strong></label>
+						</dt>';
+
 	foreach ($context['search_fields'] as $id => $title)
 	{
 		echo '
-							<label for="fields-', $id, '"><input type="checkbox" name="fields[]" id="fields-', $id, '" value="', $id, '" ', in_array($id, $context['search_defaults']) ? 'checked="checked"' : '', ' class="input_check" />', $title, '</label><br />';
-	// Half way through?
-		if (round(count($context['search_fields']) / 2) == ++$count)
-			echo '
-						</span>
-						<span class="floatleft">';
+						<dd>
+							<label for="fields-', $id, '"><input type="checkbox" name="fields[]" id="fields-', $id, '" value="', $id, '" ', in_array($id, $context['search_defaults']) ? 'checked="checked"' : '', ' class="input_check floatright" />', $title, '</label>
+						</dd>';
 	}
-		echo '
-						</span>
-					</div>
-				</div>
+	echo '
+					</dl>
+					<hr class="hrcolor" />
+					<input type="submit" name="submit" value="' . $txt['search'] . '" class="button_submit" />
+					<br class="clear_right" />
+				</div>';	
+	echo '
 				<span class="lowerframe"><span></span></span>
 			</div>
 		</div>

+ 17 - 12
Themes/default/ModerationCenter.template.php

@@ -25,7 +25,6 @@ function template_moderation_center()
 			<p>
 				', $txt['mc_description'], '
 			</p>
-
 		</div>';
 
 	$alternate = true;
@@ -72,6 +71,7 @@ function template_latest_news()
 	echo '
 		<script type="text/javascript" src="', $scripturl, '?action=viewsmfile;filename=current-version.js"></script>
 		<script type="text/javascript" src="', $scripturl, '?action=viewsmfile;filename=latest-news.js"></script>
+		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/admin.js?fin20"></script>
 		<script type="text/javascript"><!-- // --><![CDATA[
 			var oAdminIndex = new smf_AdminIndex({
 				sSelf: \'oAdminCenter\',
@@ -258,8 +258,8 @@ function template_reported_posts()
 				', $context['view_closed'] ? $txt['mc_reportedp_closed'] : $txt['mc_reportedp_active'], '
 			</h3>
 		</div>
-		<div class="pagesection">
-			<div class="pages">', $txt['pages'], ': ', $context['page_index'], '</div>
+		<div class="pagesection floatleft">
+			', $txt['pages'], ': ', $context['page_index'], '
 		</div>';
 
 	// Make the buttons.
@@ -357,8 +357,8 @@ function template_unapproved_posts()
 		</div>';
 	else
 		echo '
-			<div class="pagesection">
-				<div class="pagelinks">', $txt['pages'], ': ', $context['page_index'], '</div>
+			<div class="pagesection floatleft">
+				', $txt['pages'], ': ', $context['page_index'], '
 			</div>';
 
 	foreach ($context['unapproved_items'] as $item)
@@ -431,6 +431,9 @@ function template_unapproved_attachments()
 		<form action="', $scripturl, '?action=moderate;area=attachmod;sa=attachments;start=', $context['start'], '" method="post" accept-charset="', $context['character_set'], '">
 			<div class="cat_bar">
 				<h3 class="catbg">', $txt['mc_unapproved_attachments'], '</h3>
+			</div>
+			<div class="information">
+				', $txt['mc_unapproved_attachments_desc'], '
 			</div>';
 
 	// The ever popular approve button, with the massively unpopular delete.
@@ -449,8 +452,8 @@ function template_unapproved_attachments()
 			</div>';
 	else
 		echo '
-			<div class="pagesection">
-				<div class="pagelinks">', $txt['pages'], ': ', $context['page_index'], '</div>
+			<div class="pagesection floatleft">
+				', $txt['pages'], ': ', $context['page_index'], '
 			</div>
 			<table class="table_grid" width="100%">
 			<thead>
@@ -751,11 +754,11 @@ function template_moderation_settings()
 
 	echo '
 					</dl>
-					<div class="righttext">
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="', $context['mod-set_token_var'], '" value="', $context['mod-set_token'], '" />
-						<input type="submit" name="save" value="', $txt['save'], '" class="button_submit" />
-					</div>
+					<hr class="hrcolor" />
+					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<input type="hidden" name="', $context['mod-set_token_var'], '" value="', $context['mod-set_token'], '" />
+					<input type="submit" name="save" value="', $txt['save'], '" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -847,7 +850,9 @@ function template_warn_template()
 						<br />';
 
 	echo '
+					<hr class="hrcolor" />
 					<input type="submit" name="save" value="', $context['page_title'], '" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>

+ 80 - 313
Themes/default/Packages.template.php

@@ -58,7 +58,7 @@ function template_view_package()
 				<div class="content">
 					', $context['package_readme'], '
 					<span class="floatright">', $txt['package_available_readme_language'], '
-						<select name="readme_language" id="readme_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = smf_prepareScriptUrl(smf_scripturl + \'', '?action=admin;area=packages;sa=', $context['uninstalling'] ? 'uninstall' : 'install', ';package=', $context['filename'], ';readme=\' + this.options[this.selectedIndex].value);">';
+						<select name="readme_language" id="readme_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = smf_prepareScriptUrl(smf_scripturl + \'', '?action=admin;area=packages;sa=', $context['uninstalling'] ? 'uninstall' : 'install', ';package=', $context['filename'], ';readme=\' + this.options[this.selectedIndex].value + \';license=\' + get_selected(\'license_language\'));">';
 							foreach ($context['readmes'] as $a => $b)
 								echo '<option value="', $b, '"', $a === 'selected' ? ' selected="selected"' : '', '>', $b == 'default' ? $txt['package_readme_default'] : ucfirst($b), '</option>';
 			echo '
@@ -69,7 +69,31 @@ function template_view_package()
 			</div>
 			<br />';
 	}
-
+	
+	// Did they specify a license to display?
+	if (isset($context['package_license']))
+	{
+		echo '
+			<div class="cat_bar">
+				<h3 class="catbg">', $txt['package_install_license'], '</h3>
+			</div>
+			<div class="windowbg2">
+				<span class="topslice"><span></span></span>
+				<div class="content">
+					', $context['package_license'], '
+					<span class="floatright">', $txt['package_available_license_language'], '
+						<select name="license_language" id="license_language" onchange="if (this.options[this.selectedIndex].value) window.location.href = smf_prepareScriptUrl(smf_scripturl + \'', '?action=admin;area=packages;sa=install', ';package=', $context['filename'], ';license=\' + this.options[this.selectedIndex].value + \';readme=\' + get_selected(\'readme_language\'));">';
+							foreach ($context['licenses'] as $a => $b)
+								echo '<option value="', $b, '"', $a === 'selected' ? ' selected="selected"' : '', '>', $b == 'default' ? $txt['package_license_default'] : ucfirst($b), '</option>';
+			echo '
+						</select>
+					</span>
+				</div>
+				<span class="botslice"><span></span></span>
+			</div>
+			<br />';
+	}
+	
 	echo '
 		<form action="', $scripturl, '?action=admin;area=packages;sa=', $context['uninstalling'] ? 'uninstall' : 'install', $context['ftp_needed'] ? '' : '2', ';package=', $context['filename'], ';pid=', $context['install_id'], '" onsubmit="submitonce(this);" method="post" accept-charset="', $context['character_set'], '">
 			<div class="cat_bar">
@@ -347,6 +371,21 @@ function template_view_package()
 
 	echo '
 	// ]]></script>';
+	
+	// Get the currently selected item from a select list
+	echo '
+	<script type="text/javascript"><!-- // --><![CDATA[
+	function get_selected(id)
+	{
+		var aSelected = document.getElementById(id);
+		for (var i = 0; i < aSelected.options.length; i++)
+		{
+			if (aSelected.options[i].selected == true)
+				return aSelected.options[i].value;
+		}
+		return aSelected.options[0];
+	}
+	// ]]></script>';
 
 	// And a bit more for database changes.
 	if (!empty($context['database_changes']))
@@ -495,68 +534,16 @@ function template_examine()
 	<br class="clear" />';
 }
 
-function template_view_installed()
+function template_browse()
 {
-	global $context, $settings, $options, $txt, $scripturl;
+	global $context, $settings, $options, $txt, $scripturl, $modSettings, $forum_version;
 
 	echo '
-	<div id="admincenter">
-		<div class="title_bar">
-			<h3 class="titlebg">' . $txt['view_and_remove'] . '</h3>
-		</div>';
+	<div id="admincenter">';
 
-	if (empty($context['installed_mods']))
-	{
-		echo '
-		<div class="information">
-			', $txt['no_mods_installed'], '
-		</div>';
-	}
-	else
+	if ($context['sub_action'] == 'browse')
 	{
 		echo '
-		<table class="table_grid" width="100%">
-		<thead>
-			<tr class="catbg">
-				<th class="first_th" scope="col" width="32"></th>
-				<th class="lefttext" scope="col" width="25%">', $txt['mod_name'], '</th>
-				<th class="lefttext" scope="col" width="25%">', $txt['mod_version'], '</th>
-				<th class="last_th" scope="col" width="49%"></th>
-			</tr>
-		</thead>
-		<tbody>';
-
-		$alt = false;
-		foreach ($context['installed_mods'] as $i => $file)
-		{
-			echo '
-			<tr class="', $alt ? 'windowbg' : 'windowbg2', '">
-				<td><span class="smalltext">', ++$i, '.</span></td>
-				<td><span class="smalltext">', $file['name'], '</span></td>
-				<td><span class="smalltext">', $file['version'], '</span></td>
-				<td align="right"><span class="smalltext"><a href="', $scripturl, '?action=admin;area=packages;sa=uninstall;package=', $file['filename'], ';pid=', $file['id'], '">[ ', $txt['uninstall'], ' ]</a></span></td>
-			</tr>';
-			$alt = !$alt;
-		}
-
-		echo '
-		</tbody>
-		</table>
-		<br />
-		<a href="', $scripturl, '?action=admin;area=packages;sa=flush;', $context['session_var'], '=', $context['session_id'], '">[ ', $txt['delete_list'], ' ]</a>';
-	}
-
-	echo '
-	</div>
-	<br class="clear" />';
-}
-
-function template_browse()
-{
-	global $context, $settings, $options, $txt, $scripturl, $modSettings, $forum_version;
-
-	echo '
-	<div id="admincenter">
 		<div class="cat_bar">
 			<h3 class="catbg">
 				<span class="ie6_header floatleft"><a href="', $scripturl, '?action=helpadmin;help=latest_packages" onclick="return reqWin(this.href);" class="help"><img class="icon" src="', $settings['images_url'], '/helptopics.png" alt="', $txt['help'], '" align="top" /></a> ', $txt['packages_latest'], '</span>
@@ -575,275 +562,55 @@ function template_browse()
 			window.smfForum_sessionid = "', $context['session_id'], '";
 			window.smfForum_sessionvar = "', $context['session_var'], '";';
 
-	// Make a list of already installed mods so nothing is listed twice ;).
-	echo '
+		// Make a list of already installed mods so nothing is listed twice ;).
+		echo '
 			window.smfInstalledPackages = ["', implode('", "', $context['installed_mods']), '"];
 			window.smfVersion = "', $context['forum_version'], '";
 		// ]]></script>';
 
-	if (empty($modSettings['disable_smf_js']))
-		echo '
+		if (empty($modSettings['disable_smf_js']))
+			echo '
 		<script type="text/javascript" src="', $scripturl, '?action=viewsmfile;filename=latest-packages.js"></script>';
 
-	echo '
-		<script type="text/javascript"><!-- // --><![CDATA[
-			var tempOldOnload;
-		// ]]></script>';
-
 		echo '
 		<script type="text/javascript"><!-- // --><![CDATA[
+			var tempOldOnload;
 			smfSetLatestPackages();
 		// ]]></script>';
 
-	echo '
+		echo '
 		<br />
 		<div class="cat_bar">
 			<h3 class="catbg">', $txt['browse_packages'], '</h3>
 		</div>';
-
-	if (!empty($context['available_mods']))
-	{
-		echo '
-		<br />
-		<div class="title_bar">
-			<h3 class="titlebg">', $txt['modification_package'], '</h3>
-		</div>
-
-		<table class="table_grid" width="100%">
-		<thead>
-			<tr class="catbg">
-				<th class="first_th" width="32"></th>
-				<th class="lefttext" width="25%">', $txt['mod_name'], '</th>
-				<th class="lefttext" width="25%">', $txt['mod_version'], '</th>
-				<th class="last_th" width="49%"></th>
-			</tr>
-		</thead>
-		<tbody>';
-
-		$alt = false;
-		foreach ($context['available_mods'] as $i => $package)
-		{
-			echo '
-			<tr class="', $alt ? 'windowbg2' : 'windowbg', '">
-				<td>', ++$i, '.</td>
-				<td>', $package['name'], '</td>
-				<td>
-					', $package['version'];
-
-			if ($package['is_installed'] && !$package['is_newer'])
-				echo '
-					<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.png" alt="" class="centericon" style="margin-left: 2ex;" />';
-
-			echo '
-				</td>
-				<td align="right">';
-
-			if ($package['can_uninstall'])
-				echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=uninstall;package=', $package['filename'], ';pid=', $package['installed_id'], '">[ ', $txt['uninstall'], ' ]</a>';
-			elseif ($package['can_upgrade'])
-				echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
-			elseif ($package['can_install'])
-				echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=install;package=', $package['filename'], '">[ ', $txt['install_mod'], ' ]</a>';
-
-			echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=list;package=', $package['filename'], '">[ ', $txt['list_files'], ' ]</a>
-					<a href="', $scripturl, '?action=admin;area=packages;sa=remove;package=', $package['filename'], ';', $context['session_var'], '=', $context['session_id'], '"', $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package_delete'], ' ]</a>
-				</td>
-			</tr>';
-			$alt = !$alt;
-		}
-
-		echo '
-		</tbody>
-		</table>';
-	}
-
-	if (!empty($context['available_avatars']))
-	{
-		echo '
-		<br />
-		<div class="title_bar">
-			<h3 class="titlebg">', $txt['avatar_package'], '</h3>
-		</div>
-		<table class="table_grid" width="100%">
-		<thead>
-			<tr class="catbg">
-				<th class="first_th" width="32"></th>
-				<th class="lefttext" width="25%">', $txt['mod_name'], '</th>
-				<th class="lefttext" width="25%">', $txt['mod_version'], '</th>
-				<th lass="last_th" width="49%"></th>
-			</tr>
-		</thead>
-		<tbody>';
-
-		foreach ($context['available_avatars'] as $i => $package)
-		{
-			echo '
-			<tr class="windowbg2">
-				<td>', ++$i, '.</td>
-				<td>', $package['name'], '</td>
-				<td>', $package['version'];
-
-			if ($package['is_installed'] && !$package['is_newer'])
-				echo '
-					<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.png" alt="" class="centericon" style="margin-left: 2ex;" />';
-
-			echo '
-				</td>
-				<td align="right">';
-
-		if ($package['can_uninstall'])
-			echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=uninstall;package=', $package['filename'], ';pid=', $package['installed_id'], '">[ ', $txt['uninstall'], ' ]</a>';
-		elseif ($package['can_upgrade'])
-			echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
-		elseif ($package['can_install'])
-			echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=install;package=', $package['filename'], '">[ ', $txt['install_mod'], ' ]</a>';
-
-		echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=list;package=', $package['filename'], '">[ ', $txt['list_files'], ' ]</a>
-					<a href="', $scripturl, '?action=admin;area=packages;sa=remove;package=', $package['filename'], ';', $context['session_var'], '=', $context['session_id'], '"', $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package_delete'], ' ]</a>
-				</td>
-			</tr>';
-		}
-
-		echo '
-		</tbody>
-		</table>';
-	}
-
-	if (!empty($context['available_languages']))
-	{
-		echo '
-		<br />
-		<div class="title_bar">
-			<h3 class="titlebg">' . $txt['language_package'] . '</h3>
-		</div>
-		<table class="table_grid" width="100%">
-		<thead>
-			<tr class="catbg">
-				<th class="first_th" width="32"></th>
-				<th class="lefttext" width="25%">', $txt['mod_name'], '</th>
-				<th class="lefttext" width="25%">', $txt['mod_version'], '</th>
-				<th class="last_th" width="49%"></th>
-			</tr>
-		</thead>
-		<tbody>';
-
-		foreach ($context['available_languages'] as $i => $package)
-		{
-			echo '
-			<tr class="windowbg">
-				<td>' . ++$i . '.</td>
-				<td>' . $package['name'] . '</td>
-				<td>' . $package['version'];
-
-			if ($package['is_installed'] && !$package['is_newer'])
-				echo '
-					<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.png" alt="" class="centericon" style="margin-left: 2ex;" />';
-
-			echo '
-				</td>
-				<td align="right">';
-
-		if ($package['can_uninstall'])
-			echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=uninstall;package=', $package['filename'], ';pid=', $package['installed_id'], '">[ ', $txt['uninstall'], ' ]</a>';
-		elseif ($package['can_upgrade'])
-			echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
-		elseif ($package['can_install'])
-			echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=install;package=', $package['filename'], '">[ ', $txt['install_mod'], ' ]</a>';
-
-		echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=list;package=', $package['filename'], '">[ ', $txt['list_files'], ' ]</a>
-					<a href="', $scripturl, '?action=admin;area=packages;sa=remove;package=', $package['filename'], ';', $context['session_var'], '=', $context['session_id'], '"', $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package_delete'], ' ]</a>
-				</td>
-			</tr>';
-		}
-
-		echo '
-		</tbody>
-		</table>';
 	}
 
-	if (!empty($context['available_other']))
+	$mods_available = false;
+	foreach ($context['modification_types'] as $type)
 	{
-		echo '
-		<br />
-		<div class="title_bar">
-			<h3 class="titlebg">' . $txt['unknown_package'] . '</h3>
-		</div>
-		<table class="table_grid" width="100%">
-		<thead>
-			<tr class="catbg">
-				<th class="first_th" width="32"></th>
-				<th class="lefttext" width="25%">', $txt['mod_name'], '</th>
-				<th class="lefttext" width="25%">', $txt['mod_version'], '</th>
-				<th class="lasst_th" width="49%"></th>
-			</tr>
-		</thead>
-		<tbody>';
-
-		foreach ($context['available_other'] as $i => $package)
+		if (!empty($context['available_' . $type]))
 		{
 			echo '
-			<tr class="windowbg2">
-				<td>' . ++$i . '.</td>
-				<td>' . $package['name'] . '</td>
-				<td>' . $package['version'];
-
-			if ($package['is_installed'] && !$package['is_newer'])
-				echo '
-					<img src="', $settings['images_url'], '/icons/package_', $package['is_current'] ? 'installed' : 'old', '.png" alt="" class="centericon" style="margin-left: 2ex;" />';
-
-			echo '
-				</td>
-				<td align="right">';
-
-		if ($package['can_uninstall'])
-			echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=uninstall;package=', $package['filename'], ';pid=', $package['installed_id'], '">[ ', $txt['uninstall'], ' ]</a>';
-		elseif ($package['can_upgrade'])
-			echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=install;package=', $package['filename'], '">[ ', $txt['package_upgrade'], ' ]</a>';
-		elseif ($package['can_install'])
-			echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=install;package=', $package['filename'], '">[ ', $txt['install_mod'], ' ]</a>';
-
-		echo '
-					<a href="', $scripturl, '?action=admin;area=packages;sa=list;package=', $package['filename'], '">[ ', $txt['list_files'], ' ]</a>
-					<a href="', $scripturl, '?action=admin;area=packages;sa=remove;package=', $package['filename'], ';', $context['session_var'], '=', $context['session_id'], '"', $package['is_installed'] && $package['is_current'] ? ' onclick="return confirm(\'' . $txt['package_delete_bad'] . '\');"' : '', '>[ ', $txt['package_delete'], ' ]</a>
-				</td>
-			</tr>';
+		<br />';
+		
+			template_show_list('packages_lists_' . $type);
+			$mods_available = true;
 		}
-
-		echo '
-		</tbody>
-		</table>';
 	}
 
-	if (empty($context['available_mods']) && empty($context['available_avatars']) && empty($context['available_languages']) && empty($context['available_other']))
+	if (!$mods_available)
 		echo '
-		<div class="information">', $txt['no_packages'], '</div>';
+		<div class="information">', $context['sub_action'] == 'browse' ? $txt['no_packages'] : $txt['no_mods_installed'], '</div>';
 
+	if ($context['sub_action'] == 'browse')
 	echo '
 		<div class="flow_auto">
-			<div class="padding smalltext floatleft">
-				', $txt['package_installed_key'], '
-				<img src="', $settings['images_url'], '/icons/package_installed.png" alt="" class="centericon" style="margin-left: 1ex;" /> ', $txt['package_installed_current'], '
-				<img src="', $settings['images_url'], '/icons/package_old.png" alt="" class="centericon" style="margin-left: 2ex;" /> ', $txt['package_installed_old'], '
-			</div>
-			<div class="padding smalltext floatright">
+			<div class="padding">
 				<a class="button_link" href="#" onclick="document.getElementById(\'advanced_box\').style.display = document.getElementById(\'advanced_box\').style.display == \'\' ? \'none\' : \'\'; return false;">', $txt['package_advanced_button'], '</a>
 			</div>
-		</div>
+		</div>';
+		
+	echo '
 		<form action="', $scripturl, '?action=admin;area=packages;sa=browse" method="get">
 			<div id="advanced_box" style="display: none;">
 				<div class="cat_bar">
@@ -859,7 +626,7 @@ function template_browse()
 							<dt>
 								<strong>', $txt['package_emulate'], ':</strong><br />
 								<span class="smalltext">
-									<a href="#" onclick="document.getElementById(\'ve\').value = \'', $forum_version, '\'; return false">', $txt['package_emulate_revert'], '</a>
+									<a href="#" onclick="document.getElementById(\'ve\').value = \'', $forum_version, '\';document.getElementsByName(\'version_emulate\')[0].value = \'', $forum_version, '\';return false">', $txt['package_emulate_revert'], '</a>
 								</span>
 							</dt>
 							<dd>
@@ -881,8 +648,8 @@ function template_browse()
 	<br class="clear" />
 	<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/suggest.js?fin20"></script>
 	<script type="text/javascript"><!-- // --><![CDATA[
-			var oAddMemberSuggest = new smc_AutoSuggest({
-			sSelf: \'oAddMemberSuggest\',
+			var oAddVersionSuggest = new smc_AutoSuggest({
+			sSelf: \'oAddVersionSuggest\',
 			sSessionId: smf_session_id,
 			sSessionVar: smf_session_var,
 			sControlId: \'ve\',
@@ -1039,10 +806,10 @@ function template_servers()
 							<input type="file" name="package" size="38" class="input_file" />
 						</dd>
 					</dl>
-					<div class="righttext">
-						<input type="submit" value="' . $txt['package_upload'] . '" class="button_submit" />
-						<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
-					</div>
+					<hr class="hrcolor" />
+					<input type="submit" value="' . $txt['package_upload'] . '" class="button_submit" />
+					<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
+					<br class="clear_right" />
 				</form>
 			</div>
 			<span class="botslice"><span></span></span>
@@ -1320,10 +1087,10 @@ function template_install_options()
 					</dl>
 					<label for="package_make_backups"><input type="checkbox" name="package_make_backups" id="package_make_backups" value="1" class="input_check"', $context['package_make_backups'] ? ' checked="checked"' : '', ' /> ', $txt['package_install_options_make_backups'], '</label><br /><br />
 					<label for="package_make_full_backups"><input type="checkbox" name="package_make_full_backups" id="package_make_full_backups" value="1" class="input_check"', $context['package_make_full_backups'] ? ' checked="checked"' : '', ' /> ', $txt['package_install_options_make_full_backups'], '</label><br /><br />
-					<div class="righttext">
-						<input type="submit" name="save" value="', $txt['save'], '" class="button_submit" />
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					</div>
+					<hr class="hrcolor" />
+					<input type="submit" name="save" value="', $txt['save'], '" class="button_submit" />
+					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<br class="clear_right" />
 				</form>
 			</div>
 			<span class="botslice"><span></span></span>
@@ -1837,10 +1604,10 @@ function template_file_permissions()
 
 	echo '
 				<span id="test_ftp_placeholder_full"></span>
-				<div class="righttext padding">
-					<input type="hidden" name="action_changes" value="1" />
-					<input type="submit" value="', $txt['package_file_perms_go'], '" name="go" class="button_submit" />
-				</div>
+				<hr class="hrcolor" />
+				<input type="hidden" name="action_changes" value="1" />
+				<input type="submit" value="', $txt['package_file_perms_go'], '" name="go" class="button_submit" />
+				<br class="clear_right" />
 			</div>
 			<span class="botslice"><span></span></span>
 		</div>';

+ 5 - 5
Themes/default/PersonalMessage.template.php

@@ -717,7 +717,7 @@ function template_search()
 			echo '
 				<input type="submit" name="pm_search" value="', $txt['pm_search_go'], '" class="button_submit floatright" />';
 			echo '
-				<br class="clear" />
+				<br class="clear_right" />
 			</div>
 			<span class="lowerframe"><span></span></span>
 		</fieldset>';
@@ -747,8 +747,8 @@ function template_search()
 				</ul>
 				<p>
 					<span class="floatleft"><input type="checkbox" name="all" id="check_all" value="" ', $context['check_all'] ? 'checked="checked"' : '', ' onclick="invertAll(this, this.form, \'searchlabel\');" class="input_check" /><em> <label for="check_all">', $txt['check_all'], '</label></em></span>
-					<input type="submit" name="pm_search" value="', $txt['pm_search_go'], '" class="button_submit floatright" />
-				</p><br class="clear" />
+					<input type="submit" name="pm_search" value="', $txt['pm_search_go'], '" class="button_submit" />
+				</p><br class="clear_right" />
 			</div>
 			<span class="lowerframe"><span></span></span>
 		</fieldset>';
@@ -1068,8 +1068,8 @@ function template_send()
 		<script type="text/javascript"><!-- // --><![CDATA[
 			var oPersonalMessageSend = new smf_PersonalMessageSend({
 				sSelf: \'oPersonalMessageSend\',
-				sSessionId: \'', $context['session_id'], '\',
-				sSessionVar: \'', $context['session_var'], '\',
+				sSessionId: smf_session_id,
+				sSessionVar: smf_session_var,
 				sTextDeleteItem: \'', $txt['autosuggest_delete_item'], '\',
 				sToControlId: \'to_control\',
 				aToRecipients: [';

+ 3 - 1
Themes/default/Post.template.php

@@ -484,7 +484,8 @@ function template_main()
 					<p class="smalltext" id="shortcuts">
 						', isBrowser('is_firefox') ? $txt['shortcuts_firefox'] : $txt['shortcuts'], '
 					</p>
-					<p id="post_confirm_buttons" class="righttext">
+					<p id="post_confirm_buttons">
+						<hr class="hrcolor" />
 						', template_control_richedit_buttons($context['post_box_name']);
 
 	// Option to delete an event if user is editing one.
@@ -493,6 +494,7 @@ 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>
 				</div>
 				<span class="lowerframe"><span></span></span>

+ 216 - 141
Themes/default/Profile.template.php

@@ -497,7 +497,7 @@ function template_editBuddies()
 		</div>
 		<table border="0" width="100%" cellspacing="1" cellpadding="4" class="table_grid" align="center">
 			<tr class="catbg">
-				<th class="first_th lefttext" scope="col" width="20%">', $txt['name'], '</th>
+				<th class="first_th" scope="col" width="20%">', $txt['name'], '</th>
 				<th scope="col">', $txt['status'], '</th>
 				<th scope="col">', $txt['email'], '</th>';
 	
@@ -558,19 +558,23 @@ function template_editBuddies()
 			</div>
 			<span class="upperframe"><span></span></span>
 			<div class="roundframe">
-					<label for="new_buddy">
-						<strong>', $txt['who_member'], ':</strong>
-					</label>
-					<input type="text" name="new_buddy" id="new_buddy" size="25" class="input_text" />';
-
+				<dl class="settings">
+					<dt>
+						<label for="new_buddy"><strong>', $txt['who_member'], ':</strong></label>
+					</dt>
+					<dd>
+						<input type="text" name="new_buddy" id="new_buddy" size="30" class="input_text" />
+					</dd>
+				</dl>';
+					
 	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="submit" value="', $txt['buddy_add_button'], '" class="button_submit" />
+				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+				<input type="submit" value="', $txt['buddy_add_button'], '" class="button_submit" />
+				<br class="clear_right" />
 			</div>
 			<span class="lowerframe"><span></span></span>
 		</div>
@@ -579,8 +583,8 @@ function template_editBuddies()
 	<script type="text/javascript"><!-- // --><![CDATA[
 		var oAddBuddySuggest = new smc_AutoSuggest({
 			sSelf: \'oAddBuddySuggest\',
-			sSessionId: \'', $context['session_id'], '\',
-			sSessionVar: \'', $context['session_var'], '\',
+			sSessionId: smf_session_id,
+			sSessionVar: smf_session_var,
 			sSuggestId: \'new_buddy\',
 			sControlId: \'new_buddy\',
 			sSearchType: \'member\',
@@ -642,7 +646,7 @@ function template_editIgnoreList()
 	echo '
 		</table>';
 
-	// Add a new buddy?
+	// Add to the ignore list?
 	echo '
 	<br />
 	<form action="', $scripturl, '?action=profile;u=', $context['id_member'], ';area=lists;sa=ignore" method="post" accept-charset="', $context['character_set'], '">
@@ -652,18 +656,23 @@ function template_editIgnoreList()
 			</div>
 			<span class="upperframe"><span></span></span>
 			<div class="roundframe">
-					<label for="new_buddy">
-						<strong>', $txt['who_member'], ':</strong>
-					</label>
-					<input type="text" name="new_ignore" id="new_ignore" size="25" class="input_text" />';
+				<dl class="settings">
+					<dt>
+						<label for="new_buddy"><strong>', $txt['who_member'], ':</strong></label>
+					</dt>
+					<dd>
+						<input type="text" name="new_ignore" id="new_ignore" size="25" class="input_text" />
+					</dd>
+				</dl>';
 
 	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="submit" value="', $txt['ignore_add_button'], '" class="button_submit" />
+				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+				<input type="submit" value="', $txt['ignore_add_button'], '" class="button_submit" />
+				<br class="clear_right" />
 			</div>
 			<span class="lowerframe"><span></span></span>
 		</div>
@@ -750,17 +759,28 @@ function template_trackIP()
 	// This function always defaults to the last IP used by a member but can be set to track any IP.
 	// The first table in the template gives an input box to allow the admin to enter another IP to track.
 	echo '
+	<div class="tborder">
 		<div class="cat_bar">
 			<h3 class="catbg">', $txt['trackIP'], '</h3>
 		</div>
-		<div class="windowbg2">
-			<span class="topslice"><span></span></span>
+		<span class="upperframe"><span></span></span>
+		<div class="roundframe">
 			<form action="', $context['base_url'], '" method="post" accept-charset="', $context['character_set'], '">
-				<div class="padding">', $txt['enter_ip'], ':&nbsp;&nbsp;<input type="text" name="searchip" value="', $context['ip'], '" class="input_text" />&nbsp;&nbsp;<input type="submit" value="', $txt['trackIP'], '" class="button_submit" /></div>
+				<dl class="settings">
+					<dt>
+						<label for="searchip"><strong>', $txt['enter_ip'], ':</strong></label>
+					</dt>
+					<dd>					
+						<input type="text" name="searchip" value="', $context['ip'], '" class="input_text" />
+					</dd>
+				</dl>
+				<input type="submit" value="', $txt['trackIP'], '" class="button_submit" />
+				<br class="clear_right" />
 			</form>
-			<span class="botslice"><span></span></span>
 		</div>
-		<br />';
+		<span class="lowerframe"><span></span></span>
+	</div>
+	<br />';
 
 	// The table inbetween the first and second table shows links to the whois server for every region.
 	if ($context['single_ip'])
@@ -1031,7 +1051,7 @@ function template_statPanel()
 	// If they haven't post at all, don't draw the graph.
 	if (empty($context['posts_by_time']))
 		echo '
-					<span>', $txt['statPanel_noPosts'], '</span>';
+					<span class="centertext">', $txt['statPanel_noPosts'], '</span>';
 	// Otherwise do!
 	else
 	{
@@ -1079,7 +1099,7 @@ function template_statPanel()
 
 	if (empty($context['popular_boards']))
 		echo '
-						<span>', $txt['statPanel_noPosts'], '</span>';
+						<span class="centertext">', $txt['statPanel_noPosts'], '</span>';
 
 	else
 	{
@@ -1325,9 +1345,6 @@ function template_edit_options()
 	if (!empty($context['profile_posthtml']))
 		echo '
 					<div>', $context['profile_posthtml'], '</div>';
-	elseif ($lastItem != 'hr')
-		echo '
-					<hr width="100%" size="1" class="hrcolor clear" />';
 
 	// Only show the password box if it's actually needed.
 	if ($context['require_password'])
@@ -1343,25 +1360,25 @@ function template_edit_options()
 					</dl>';
 
 	echo '
-					<div class="righttext">';
+					<hr class="hrcolor">';
 
 	// The button shouldn't say "Change profile" unless we're changing the profile...
 	if (!empty($context['submit_button_text']))
 		echo '
-						<input type="submit" value="', $context['submit_button_text'], '" class="button_submit" />';
+					<input type="submit" value="', $context['submit_button_text'], '" class="button_submit" />';
 	else
 		echo '
-						<input type="submit" value="', $txt['change_profile'], '" class="button_submit" />';
+					<input type="submit" value="', $txt['change_profile'], '" class="button_submit" />';
 
 	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'], '" />
-					</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'], '" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -1413,17 +1430,17 @@ function template_profile_pm_settings()
 
 	echo '
 								<dt>
-										<label for="pm_prefs">', $txt['pm_display_mode'], ':</label>
+									<label for="pm_prefs">', $txt['pm_display_mode'], ':</label>
 								</dt>
 								<dd>
-										<select name="pm_prefs" id="pm_prefs" onchange="if (this.value == 2 &amp;&amp; !document.getElementById(\'copy_to_outbox\').checked) alert(\'', $txt['pm_recommend_enable_outbox'], '\');">
-											<option value="0"', $context['display_mode'] == 0 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_all'], '</option>
-											<option value="1"', $context['display_mode'] == 1 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_one'], '</option>
-											<option value="2"', $context['display_mode'] == 2 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_linked'], '</option>
-										</select>
+									<select name="pm_prefs" id="pm_prefs" onchange="if (this.value == 2 &amp;&amp; !document.getElementById(\'copy_to_outbox\').checked) alert(\'', $txt['pm_recommend_enable_outbox'], '\');">
+										<option value="0"', $context['display_mode'] == 0 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_all'], '</option>
+										<option value="1"', $context['display_mode'] == 1 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_one'], '</option>
+										<option value="2"', $context['display_mode'] == 2 ? ' selected="selected"' : '', '>', $txt['pm_display_mode_linked'], '</option>
+									</select>
 								</dd>
 								<dt>
-										<label for="view_newest_pm_first">', $txt['recent_pms_at_top'], '</label>
+									<label for="view_newest_pm_first">', $txt['recent_pms_at_top'], '</label>
 								</dt>
 								<dd>
 										<input type="hidden" name="default_options[view_newest_pm_first]" value="0" />
@@ -1496,73 +1513,105 @@ function template_profile_theme_settings()
 	global $context, $settings, $options, $scripturl, $modSettings, $txt;
 
 	echo '
-							<dd></dd>
-						</dl>
-						<ul id="theme_settings">
-							<li>
+							<dt>
+								<label for="show_board_desc">', $txt['board_desc_inside'], '</label>
+							</dt>
+							<dd>
 								<input type="hidden" name="default_options[show_board_desc]" value="0" />
-								<label for="show_board_desc"><input type="checkbox" name="default_options[show_board_desc]" id="show_board_desc" value="1"', !empty($context['member']['options']['show_board_desc']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['board_desc_inside'], '</label>
-							</li>
-							<li>
+								<input type="checkbox" name="default_options[show_board_desc]" id="show_board_desc" value="1"', !empty($context['member']['options']['show_board_desc']) ? ' checked="checked"' : '', ' class="input_check" />
+							</dd>
+							<dt>
+								<label for="show_children">', $txt['show_children'], '</label>
+							</dt>
+							<dd>
 								<input type="hidden" name="default_options[show_children]" value="0" />
-								<label for="show_children"><input type="checkbox" name="default_options[show_children]" id="show_children" value="1"', !empty($context['member']['options']['show_children']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['show_children'], '</label>
-							</li>
-							<li>
+								<input type="checkbox" name="default_options[show_children]" id="show_children" value="1"', !empty($context['member']['options']['show_children']) ? ' checked="checked"' : '', ' class="input_check" />
+							</dd>
+							<dt>
+								<label for="use_sidebar_menu">', $txt['use_sidebar_menu'], '</label>
+							</dt>
+							<dd>
 								<input type="hidden" name="default_options[use_sidebar_menu]" value="0" />
-								<label for="use_sidebar_menu"><input type="checkbox" name="default_options[use_sidebar_menu]" id="use_sidebar_menu" value="1"', !empty($context['member']['options']['use_sidebar_menu']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['use_sidebar_menu'], '</label>
-							</li>
-							<li>
+								<input type="checkbox" name="default_options[use_sidebar_menu]" id="use_sidebar_menu" value="1"', !empty($context['member']['options']['use_sidebar_menu']) ? ' checked="checked"' : '', ' class="input_check" />
+							</dd>
+							<dt>
+								<label for="show_no_avatars">', $txt['show_no_avatars'], '</label>
+							</dt>
+							<dd>
 								<input type="hidden" name="default_options[show_no_avatars]" value="0" />
-								<label for="show_no_avatars"><input type="checkbox" name="default_options[show_no_avatars]" id="show_no_avatars" value="1"', !empty($context['member']['options']['show_no_avatars']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['show_no_avatars'], '</label>
-							</li>
-							<li>
+								<input type="checkbox" name="default_options[show_no_avatars]" id="show_no_avatars" value="1"', !empty($context['member']['options']['show_no_avatars']) ? ' checked="checked"' : '', ' class="input_check" />
+							</dd>
+							<dt>
+								<label for="show_no_signatures">', $txt['show_no_signatures'], '</label>
+							</dt>
+							<dd>
 								<input type="hidden" name="default_options[show_no_signatures]" value="0" />
-								<label for="show_no_signatures"><input type="checkbox" name="default_options[show_no_signatures]" id="show_no_signatures" value="1"', !empty($context['member']['options']['show_no_signatures']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['show_no_signatures'], '</label>
-							</li>';
-
-	if ($context['allow_no_censored'])
+								<input type="checkbox" name="default_options[show_no_signatures]" id="show_no_signatures" value="1"', !empty($context['member']['options']['show_no_signatures']) ? ' checked="checked"' : '', ' class="input_check" />
+							</dd>';
+							
+	if ($settings['allow_no_censored'])
 		echo '
-							<li>
+							<dt>
+								<label for="show_no_censored">' . $txt['show_no_censored'] . '</label>
+							</dt>
+							<dd>
 								<input type="hidden" name="default_options[show_no_censored]" value="0" />
-								<label for="show_no_censored"><input type="checkbox" name="default_options[show_no_censored]" id="show_no_censored" value="1"' . (!empty($context['member']['options']['show_no_censored']) ? ' checked="checked"' : '') . ' class="input_check" /> ' . $txt['show_no_censored'] . '</label>
-							</li>';
+								<input type="checkbox" name="default_options[show_no_censored]" id="show_no_censored" value="1"' . (!empty($context['member']['options']['show_no_censored']) ? ' checked="checked"' : '') . ' class="input_check" />
+							</dd>';
 
 	echo '
-							<li>
+							<dt>
+								<label for="return_to_post">', $txt['return_to_post'], '</label>
+							</dt>
+							<dd>
 								<input type="hidden" name="default_options[return_to_post]" value="0" />
-								<label for="return_to_post"><input type="checkbox" name="default_options[return_to_post]" id="return_to_post" value="1"', !empty($context['member']['options']['return_to_post']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['return_to_post'], '</label>
-							</li>
-							<li>
+								<input type="checkbox" name="default_options[return_to_post]" id="return_to_post" value="1"', !empty($context['member']['options']['return_to_post']) ? ' checked="checked"' : '', ' class="input_check" />
+							</dd>
+							<dt>
+								<label for="no_new_reply_warning">', $txt['no_new_reply_warning'], '</label>
+							</dt>
+							<dd>
 								<input type="hidden" name="default_options[no_new_reply_warning]" value="0" />
-								<label for="no_new_reply_warning"><input type="checkbox" name="default_options[no_new_reply_warning]" id="no_new_reply_warning" value="1"', !empty($context['member']['options']['no_new_reply_warning']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['no_new_reply_warning'], '</label>
-							</li>';
+								<input type="checkbox" name="default_options[no_new_reply_warning]" id="no_new_reply_warning" value="1"', !empty($context['member']['options']['no_new_reply_warning']) ? ' checked="checked"' : '', ' class="input_check" />
+							</dd>';
 
 	if (!empty($modSettings['enable_buddylist']))
 		echo '
-							<li>
+							<dt>
+								<label for="posts_apply_ignore_list">', $txt['posts_apply_ignore_list'], '</label>
+							</dt>
+							<dd>
 								<input type="hidden" name="default_options[posts_apply_ignore_list]" value="0" />
-								<label for="posts_apply_ignore_list"><input type="checkbox" name="default_options[posts_apply_ignore_list]" id="posts_apply_ignore_list" value="1"', !empty($context['member']['options']['posts_apply_ignore_list']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['posts_apply_ignore_list'], '</label>
-							</li>';
+								<input type="checkbox" name="default_options[posts_apply_ignore_list]" id="posts_apply_ignore_list" value="1"', !empty($context['member']['options']['posts_apply_ignore_list']) ? ' checked="checked"' : '', ' class="input_check" />
+							</dd>';
 
 	echo '
-							<li>
+							<dt>
+								<label for="view_newest_first">', $txt['recent_posts_at_top'], '</label>
+							</dt>
+							<dd>
 								<input type="hidden" name="default_options[view_newest_first]" value="0" />
-								<label for="view_newest_first"><input type="checkbox" name="default_options[view_newest_first]" id="view_newest_first" value="1"', !empty($context['member']['options']['view_newest_first']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['recent_posts_at_top'], '</label>
-							</li>';
+								<input type="checkbox" name="default_options[view_newest_first]" id="view_newest_first" value="1"', !empty($context['member']['options']['view_newest_first']) ? ' checked="checked"' : '', ' class="input_check" />
+							</dd>';
 
 	// Choose WYSIWYG settings?
 	if (empty($modSettings['disable_wysiwyg']))
 		echo '
-							<li>
+							<dt>
+								<label for="wysiwyg_default">', $txt['wysiwyg_default'], '</label>
+							</dt>
+							<dd>
 								<input type="hidden" name="default_options[wysiwyg_default]" value="0" />
-								<label for="wysiwyg_default"><input type="checkbox" name="default_options[wysiwyg_default]" id="wysiwyg_default" value="1"', !empty($context['member']['options']['wysiwyg_default']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['wysiwyg_default'], '</label>
-							</li>';
+								<input type="checkbox" name="default_options[wysiwyg_default]" id="wysiwyg_default" value="1"', !empty($context['member']['options']['wysiwyg_default']) ? ' checked="checked"' : '', ' class="input_check" />
+							</dd>';
 
 	if (empty($modSettings['disableCustomPerPage']))
 	{
 		echo '
-							<li>
+							<dt>
 								<label for="topics_per_page">', $txt['topics_per_page'], '</label>
+							</dt>
+							<dd>
 								<select name="default_options[topics_per_page]" id="topics_per_page">
 									<option value="0"', empty($context['member']['options']['topics_per_page']) ? ' selected="selected"' : '', '>', $txt['per_page_default'], ' (', $modSettings['defaultMaxTopics'], ')</option>
 									<option value="5"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 5 ? ' selected="selected"' : '', '>5</option>
@@ -1570,9 +1619,11 @@ function template_profile_theme_settings()
 									<option value="25"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 25 ? ' selected="selected"' : '', '>25</option>
 									<option value="50"', !empty($context['member']['options']['topics_per_page']) && $context['member']['options']['topics_per_page'] == 50 ? ' selected="selected"' : '', '>50</option>
 								</select>
-							</li>
-							<li>
+							</dd>
+							<dt>
 								<label for="messages_per_page">', $txt['messages_per_page'], '</label>
+							</dt>
+							<dd>
 								<select name="default_options[messages_per_page]" id="messages_per_page">
 									<option value="0"', empty($context['member']['options']['messages_per_page']) ? ' selected="selected"' : '', '>', $txt['per_page_default'], ' (', $modSettings['defaultMaxMessages'], ')</option>
 									<option value="5"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 5 ? ' selected="selected"' : '', '>5</option>
@@ -1580,40 +1631,43 @@ function template_profile_theme_settings()
 									<option value="25"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 25 ? ' selected="selected"' : '', '>25</option>
 									<option value="50"', !empty($context['member']['options']['messages_per_page']) && $context['member']['options']['messages_per_page'] == 50 ? ' selected="selected"' : '', '>50</option>
 								</select>
-							</li>';
+							</dd>';
 	}
 
 	if (!empty($modSettings['cal_enabled']))
 		echo '
-							<li>
+							<dt>
 								<label for="calendar_start_day">', $txt['calendar_start_day'], ':</label>
+							</dt>
+							<dd>
 								<select name="default_options[calendar_start_day]" id="calendar_start_day">
 									<option value="0"', empty($context['member']['options']['calendar_start_day']) ? ' selected="selected"' : '', '>', $txt['days'][0], '</option>
 									<option value="1"', !empty($context['member']['options']['calendar_start_day']) && $context['member']['options']['calendar_start_day'] == 1 ? ' selected="selected"' : '', '>', $txt['days'][1], '</option>
 									<option value="6"', !empty($context['member']['options']['calendar_start_day']) && $context['member']['options']['calendar_start_day'] == 6 ? ' selected="selected"' : '', '>', $txt['days'][6], '</option>
 								</select>
-							</li>';
+							</dd>';
 
 	echo '
-							<li>
+							<dt>
 								<label for="display_quick_reply">', $txt['display_quick_reply'], '</label>
+							</dt>
+							<dd>
 								<select name="default_options[display_quick_reply]" id="display_quick_reply">
 									<option value="0"', empty($context['member']['options']['display_quick_reply']) ? ' selected="selected"' : '', '>', $txt['display_quick_reply1'], '</option>
 									<option value="1"', !empty($context['member']['options']['display_quick_reply']) && $context['member']['options']['display_quick_reply'] == 1 ? ' selected="selected"' : '', '>', $txt['display_quick_reply2'], '</option>
 									<option value="2"', !empty($context['member']['options']['display_quick_reply']) && $context['member']['options']['display_quick_reply'] == 2 ? ' selected="selected"' : '', '>', $txt['display_quick_reply3'], '</option>
 								</select>
-							</li>
-							<li>
+							</dd>
+							<dt>
 								<label for="display_quick_mod">', $txt['display_quick_mod'], '</label>
+							</dt>
+							<dd>
 								<select name="default_options[display_quick_mod]" id="display_quick_mod">
 									<option value="0"', empty($context['member']['options']['display_quick_mod']) ? ' selected="selected"' : '', '>', $txt['display_quick_mod_none'], '</option>
 									<option value="1"', !empty($context['member']['options']['display_quick_mod']) && $context['member']['options']['display_quick_mod'] == 1 ? ' selected="selected"' : '', '>', $txt['display_quick_mod_check'], '</option>
 									<option value="2"', !empty($context['member']['options']['display_quick_mod']) && $context['member']['options']['display_quick_mod'] != 1 ? ' selected="selected"' : '', '>', $txt['display_quick_mod_image'], '</option>
 								</select>
-							</li>
-						</ul>
-						<dl>
-							<dd></dd>';
+							</dd>';
 }
 
 function template_notification()
@@ -1622,6 +1676,7 @@ function template_notification()
 
 	// The main containing header.
 	echo '
+		<form action="', $scripturl, '?action=profile;area=notification;save" method="post" accept-charset="', $context['character_set'], '" id="notify_options" class="flow_hidden">
 			<div class="cat_bar">
 				<h3 class="catbg">
 					<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />', $txt['profile'], '</span>
@@ -1631,59 +1686,76 @@ function template_notification()
 			<div class="windowbg2">
 				<span class="topslice"><span></span></span>
 				<div class="content">
-					<form action="', $scripturl, '?action=profile;area=notification;save" method="post" accept-charset="', $context['character_set'], '" id="notify_options" class="flow_hidden">';
+					<dl class="settings">';
 
 	// Allow notification on announcements to be disabled?
 	if (!empty($modSettings['allow_disableAnnounce']))
 		echo '
-						<input type="hidden" name="notify_announcements" value="0" />
-						<label for="notify_announcements"><input type="checkbox" id="notify_announcements" name="notify_announcements"', !empty($context['member']['notify_announcements']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['notify_important_email'], '</label><br />';
+						<dt>
+							<label for="notify_announcements">', $txt['notify_important_email'], '</label>
+						</dt>
+						<dd>
+							<input type="hidden" name="notify_announcements" value="0" />
+							<input type="checkbox" id="notify_announcements" name="notify_announcements"', !empty($context['member']['notify_announcements']) ? ' checked="checked"' : '', ' class="input_check" />
+						</dd>';
 
 	// More notification options.
 	echo '
-						<input type="hidden" name="default_options[auto_notify]" value="0" />
-						<label for="auto_notify"><input type="checkbox" id="auto_notify" name="default_options[auto_notify]" value="1"', !empty($context['member']['options']['auto_notify']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['auto_notify'], '</label><br />';
+						<dt>
+							<label for="auto_notify">', $txt['auto_notify'], '</label>
+						</dt>
+						<dd>
+							<input type="hidden" name="default_options[auto_notify]" value="0" />
+							<input type="checkbox" id="auto_notify" name="default_options[auto_notify]" value="1"', !empty($context['member']['options']['auto_notify']) ? ' checked="checked"' : '', ' class="input_check" />
+						</dd>';
 
 	if (empty($modSettings['disallow_sendBody']))
 		echo '
-						<input type="hidden" name="notify_send_body" value="0" />
-						<label for="notify_send_body"><input type="checkbox" id="notify_send_body" name="notify_send_body"', !empty($context['member']['notify_send_body']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['notify_send_body'], '</label><br />';
-
-	echo '
-						<br />
-						<label for="notify_regularity">', $txt['notify_regularity'], ':</label>
-						<select name="notify_regularity" id="notify_regularity">
-							<option value="0"', $context['member']['notify_regularity'] == 0 ? ' selected="selected"' : '', '>', $txt['notify_regularity_instant'], '</option>
-							<option value="1"', $context['member']['notify_regularity'] == 1 ? ' selected="selected"' : '', '>', $txt['notify_regularity_first_only'], '</option>
-							<option value="2"', $context['member']['notify_regularity'] == 2 ? ' selected="selected"' : '', '>', $txt['notify_regularity_daily'], '</option>
-							<option value="3"', $context['member']['notify_regularity'] == 3 ? ' selected="selected"' : '', '>', $txt['notify_regularity_weekly'], '</option>
-						</select>
-						<br /><br />
-						<label for="notify_types">', $txt['notify_send_types'], ':</label>
-						<select name="notify_types" id="notify_types">
-							<option value="1"', $context['member']['notify_types'] == 1 ? ' selected="selected"' : '', '>', $txt['notify_send_type_everything'], '</option>
-							<option value="2"', $context['member']['notify_types'] == 2 ? ' selected="selected"' : '', '>', $txt['notify_send_type_everything_own'], '</option>
-							<option value="3"', $context['member']['notify_types'] == 3 ? ' selected="selected"' : '', '>', $txt['notify_send_type_only_replies'], '</option>
-							<option value="4"', $context['member']['notify_types'] == 4 ? ' selected="selected"' : '', '>', $txt['notify_send_type_nothing'], '</option>
-						</select><br class="clear" />
-
-						<div>
-							<input id="notify_submit" type="submit" value="', $txt['notify_save'], '" class="button_submit floatright" />';
-
-	if (!empty($context['token_check']))
-		echo '
-						<input type="hidden" name="', $context[$context['token_check'] . '_token_var'], '" value="', $context[$context['token_check'] . '_token'], '" />';
+						<dt>
+							<label for="notify_send_body">', $txt['notify_send_body'], '</label>
+						</dt>
+						<dd>
+							<input type="hidden" name="notify_send_body" value="0" />
+							<input type="checkbox" id="notify_send_body" name="notify_send_body"', !empty($context['member']['notify_send_body']) ? ' checked="checked"' : '', ' class="input_check" />
+						</dd>';
 
 	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'], '" />
-						</div><br class="clear" />
-					</form>
+						<dt>
+							<label for="notify_regularity">', $txt['notify_regularity'], ':</label>
+						</dt>
+						<dd>
+							<select name="notify_regularity" id="notify_regularity">
+								<option value="0"', $context['member']['notify_regularity'] == 0 ? ' selected="selected"' : '', '>', $txt['notify_regularity_instant'], '</option>
+								<option value="1"', $context['member']['notify_regularity'] == 1 ? ' selected="selected"' : '', '>', $txt['notify_regularity_first_only'], '</option>
+								<option value="2"', $context['member']['notify_regularity'] == 2 ? ' selected="selected"' : '', '>', $txt['notify_regularity_daily'], '</option>
+								<option value="3"', $context['member']['notify_regularity'] == 3 ? ' selected="selected"' : '', '>', $txt['notify_regularity_weekly'], '</option>
+							</select>
+						</dd>
+						<dt>
+							<label for="notify_types">', $txt['notify_send_types'], ':</label>
+						</dt>
+						<dd>
+							<select name="notify_types" id="notify_types">
+								<option value="1"', $context['member']['notify_types'] == 1 ? ' selected="selected"' : '', '>', $txt['notify_send_type_everything'], '</option>
+								<option value="2"', $context['member']['notify_types'] == 2 ? ' selected="selected"' : '', '>', $txt['notify_send_type_everything_own'], '</option>
+								<option value="3"', $context['member']['notify_types'] == 3 ? ' selected="selected"' : '', '>', $txt['notify_send_type_only_replies'], '</option>
+								<option value="4"', $context['member']['notify_types'] == 4 ? ' selected="selected"' : '', '>', $txt['notify_send_type_nothing'], '</option>
+							</select>
+						</dd>
+					</dl>
+					<hr class="hrcolor" />
+					<div>
+						<input id="notify_submit" type="submit" value="', $txt['notify_save'], '" class="button_submit" />
+						<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'], '" />
+					</div>
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
-			<br />';
+		</form>
+		<br />';
 
 	template_show_list('topic_notification_list');
 
@@ -2259,7 +2331,7 @@ function template_issueWarning()
 		echo '
 						</select>
 						<span class="smalltext" id="new_template_link" style="display: none;">[<a href="', $scripturl, '?action=moderate;area=warnings;sa=templateedit;tid=0" target="_blank" class="new_win">', $txt['profile_warning_new_template'], '</a>]</span><br />
-						<textarea name="warn_body" id="warn_body" cols="40" rows="8">', $context['warning_data']['notify_body'], '</textarea>
+						<textarea name="warn_body" id="warn_body" cols="40" rows="8" style="min-width: 50%; max-width: 99%;">', $context['warning_data']['notify_body'], '</textarea>
 					</dd>';
 	}
 	echo '
@@ -2362,6 +2434,7 @@ function template_deleteAccount()
 					<span class="ie6_header floatleft"><img src="', $settings['images_url'], '/icons/profile_sm.png" alt="" class="icon" />', $txt['deleteAccount'], '</span>
 				</h3>
 			</div>';
+	
 	// If deleting another account give them a lovely info box.
 	if (!$context['user']['is_owner'])
 		echo '
@@ -2477,13 +2550,13 @@ function template_error_message()
 
 	echo '
 		<div class="errorbox">
-			<span>', !empty($context['custom_error_title']) ? $context['custom_error_title'] : $txt['profile_errors_occurred'], ':</span>
+			<span>', !empty($context['custom_error_title']) ? $context['custom_error_title'] : $txt['profile_errors_occurred'], '</span>
 			<ul class="reset">';
 
 		// Cycle through each error and display an error message.
 		foreach ($context['post_errors'] as $error)
 			echo '
-				<li>', isset($txt['profile_error_' . $error]) ? $txt['profile_error_' . $error] : $error, '.</li>';
+				<li>', isset($txt['profile_error_' . $error]) ? $txt['profile_error_' . $error] : $error, '</li>';
 
 		echo '
 			</ul>
@@ -2498,10 +2571,11 @@ function template_profile_group_manage()
 	echo '
 							<dt>
 								<strong>', $txt['primary_membergroup'], ': </strong><br />
-								<span class="smalltext">(<a href="', $scripturl, '?action=helpadmin;help=moderator_why_missing" onclick="return reqWin(this.href);">', $txt['moderator_why_missing'], '</a>)</span>
+								<span class="smalltext">[<a href="', $scripturl, '?action=helpadmin;help=moderator_why_missing" onclick="return reqWin(this.href);">', $txt['moderator_why_missing'], '</a>]</span>
 							</dt>
 							<dd>
 								<select name="id_group" ', ($context['user']['is_owner'] && $context['member']['group_id'] == 1 ? 'onchange="if (this.value != 1 &amp;&amp; !confirm(\'' . $txt['deadmin_confirm'] . '\')) this.value = 1;"' : ''), '>';
+		
 		// Fill the select box with all primary member groups that can be assigned to a member.
 		foreach ($context['member_groups'] as $member_group)
 			if (!empty($member_group['can_be_primary']))
@@ -2518,6 +2592,7 @@ function template_profile_group_manage()
 							<dd>
 								<span id="additional_groupsList">
 									<input type="hidden" name="additional_groups[]" value="0" />';
+									
 		// For each membergroup show a checkbox so members can be assigned to more than one group.
 		foreach ($context['member_groups'] as $member_group)
 			if ($member_group['can_be_additional'])
@@ -2570,7 +2645,7 @@ function template_profile_signature_modify()
 		echo '
 							</dt>
 							<dd>
-								<textarea class="editor" onkeyup="calcCharLeft();" name="signature" rows="5" cols="50">', $context['member']['signature'], '</textarea><br />';
+								<textarea class="editor" onkeyup="calcCharLeft();" name="signature" rows="5" cols="50" style="min-width: 50%; max-width: 99%;">', $context['member']['signature'], '</textarea><br />';
 
 	// If there is a limit at all!
 	if (!empty($context['signature_limits']['max_length']))
@@ -2867,7 +2942,7 @@ function template_profile_timeoffset_modify()
 								<span class="smalltext">', $txt['personal_time_offset'], '</span>
 							</dt>
 							<dd>
-								<input type="text" name="time_offset" id="time_offset" size="5" maxlength="5" value="', $context['member']['time_offset'], '" class="input_text" /> <a href="javascript:void(0);" onclick="currentDate = new Date(', $context['current_forum_time_js'], '); document.getElementById(\'time_offset\').value = autoDetectTimeOffset(currentDate); return false;">', $txt['timeoffset_autodetect'], '</a><br />', $txt['current_time'], ': <em>', $context['current_forum_time'], '</em>
+								<input type="text" name="time_offset" id="time_offset" size="5" maxlength="5" value="', $context['member']['time_offset'], '" class="input_text" /> ', $txt['hours'], ' [<a href="javascript:void(0);" onclick="currentDate = new Date(', $context['current_forum_time_js'], '); document.getElementById(\'time_offset\').value = autoDetectTimeOffset(currentDate); return false;">', $txt['timeoffset_autodetect'], '</a>]<br />', $txt['current_time'], ': <em>', $context['current_forum_time'], '</em>
 							</dd>';
 }
 
@@ -2881,7 +2956,7 @@ function template_profile_theme_pick()
 								<strong>', $txt['current_theme'], ':</strong>
 							</dt>
 							<dd>
-								', $context['member']['theme']['name'], ' <a href="', $scripturl, '?action=theme;sa=pick;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['change'], '</a>
+								', $context['member']['theme']['name'], ' [<a href="', $scripturl, '?action=theme;sa=pick;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['change'], '</a>]
 							</dd>';
 }
 

+ 49 - 29
Themes/default/Register.template.php

@@ -108,7 +108,7 @@ function template_registration_form()
 								</a>
 							</span>
 						</dd>
-						<dt><strong><label for="smf_autov_reserve1">', $txt['email'], ':</label></strong></dt>
+						<dt><strong><label for="smf_autov_reserve1">', $txt['user_email_address'], ':</label></strong></dt>
 						<dd>
 							<input type="text" name="email" id="smf_autov_reserve1" size="30" tabindex="', $context['tabindex']++, '" value="', isset($context['email']) ? $context['email'] : '', '" class="input_text" />
 						</dd>
@@ -142,7 +142,7 @@ function template_registration_form()
 
 	echo '
 					<dl class="register_form" id="password1_group">
-						<dt><strong><label for="smf_autov_pwmain">', $txt['choose_pass'], ':</label></strong></dt>
+						<dt><strong><label for="smf_autov_pwmain">', ucwords($txt['choose_pass']), ':</label></strong></dt>
 						<dd>
 							<input type="password" name="passwrd1" id="smf_autov_pwmain" size="30" tabindex="', $context['tabindex']++, '" class="input_password" />
 							<span id="smf_autov_pwmain_div" style="display: none;">
@@ -151,7 +151,7 @@ function template_registration_form()
 						</dd>
 					</dl>
 					<dl class="register_form" id="password2_group">
-						<dt><strong><label for="smf_autov_pwverify">', $txt['verify_pass'], ':</label></strong></dt>
+						<dt><strong><label for="smf_autov_pwverify">', ucwords($txt['verify_pass']), ':</label></strong></dt>
 						<dd>
 							<input type="password" name="passwrd2" id="smf_autov_pwverify" size="30" tabindex="', $context['tabindex']++, '" class="input_password" />
 							<span id="smf_autov_pwverify_div" style="display: none;">
@@ -454,7 +454,7 @@ function template_verification_sound()
 <html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>
 	<head>
 		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
-		<title>', $context['page_title'], '</title>
+		<title>', $txt['visual_verification_sound'], '</title>
 		<meta name="robots" content="noindex" />
 		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?fin20" />
 		<style type="text/css">';
@@ -464,7 +464,7 @@ function template_verification_sound()
 		</style>
 	</head>
 	<body style="margin: 1ex;">
-		<div class="popuptext" style="text-align: center;">';
+		<div class="windowbg description" style="text-align: center;">';
 	if (isBrowser('is_ie'))
 		echo '
 			<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="audio/x-wav">
@@ -477,10 +477,10 @@ function template_verification_sound()
 				<a href="', $context['verification_sound_href'], '" rel="nofollow">', $context['verification_sound_href'], '</a>
 			</object>';
 	echo '
-			<br />
-			<a href="', $context['verification_sound_href'], ';sound" rel="nofollow">', $txt['visual_verification_sound_again'], '</a><br />
-			<a href="javascript:self.close();">', $txt['visual_verification_sound_close'], '</a><br />
-			<a href="', $context['verification_sound_href'], '" rel="nofollow">', $txt['visual_verification_sound_direct'], '</a>
+		<br />
+		<a href="', $context['verification_sound_href'], ';sound" rel="nofollow">', $txt['visual_verification_sound_again'], '</a><br />
+		<a href="', $context['verification_sound_href'], '" rel="nofollow">', $txt['visual_verification_sound_direct'], '</a><br /><br />
+		<a href="javascript:self.close();">', $txt['visual_verification_sound_close'], '</a><br />
 		</div>
 	</body>
 </html>';
@@ -563,10 +563,10 @@ function template_admin_register()
 						<input type="checkbox" name="emailActivate" id="emailActivate_check" tabindex="', $context['tabindex']++, '"', !empty($modSettings['registration_method']) && $modSettings['registration_method'] == 1 ? ' checked="checked"' : '', ' onclick="onCheckChange();" class="input_check" />
 					</dd>
 				</dl>
-				<div class="righttext">
-					<input type="submit" name="regSubmit" value="', $txt['register'], '" tabindex="', $context['tabindex']++, '" class="button_submit" />
-					<input type="hidden" name="sa" value="register" />
-				</div>
+				<hr class="hrcolor" />
+				<input type="submit" name="regSubmit" value="', $txt['register'], '" tabindex="', $context['tabindex']++, '" class="button_submit" />
+				<input type="hidden" name="sa" value="register" />
+				<br class="clear_right" />
 			</div>
 			<span class="botslice"><span></span></span>
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
@@ -632,13 +632,13 @@ function template_edit_agreement()
 					<p>
 						<label for="requireAgreement"><input type="checkbox" name="requireAgreement" id="requireAgreement"', $context['require_agreement'] ? ' checked="checked"' : '', ' tabindex="', $context['tabindex']++, '" value="1" class="input_check" /> ', $txt['admin_agreement'], '.</label>
 					</p>
-					<div class="righttext">
-						<input type="submit" value="', $txt['save'], '" tabindex="', $context['tabindex']++, '" class="button_submit" />
-						<input type="hidden" name="agree_lang" value="', $context['current_agreement'], '" />
-						<input type="hidden" name="sa" value="agreement" />
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="', $context['admin-rega_token_var'], '" value="', $context['admin-rega_token'], '" />
-					</div>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['save'], '" tabindex="', $context['tabindex']++, '" class="button_submit" />
+					<input type="hidden" name="agree_lang" value="', $context['current_agreement'], '" />
+					<input type="hidden" name="sa" value="agreement" />
+					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<input type="hidden" name="', $context['admin-rega_token_var'], '" value="', $context['admin-rega_token'], '" />
+					<br class="clear_right" />
 				</form>
 			</div>
 			<span class="botslice"><span></span></span>
@@ -661,15 +661,35 @@ function template_edit_reserved_words()
 				<p class="reserved_names">
 					<textarea cols="30" rows="6" name="reserved" id="reserved">', implode("\n", $context['reserved_words']), '</textarea>
 				</p>
-				<ul class="reset">
-					<li><label for="matchword"><input type="checkbox" name="matchword" id="matchword" tabindex="', $context['tabindex']++, '" ', $context['reserved_word_options']['match_word'] ? 'checked="checked"' : '', ' class="input_check" /> ', $txt['admin_match_whole'], '</label></li>
-					<li><label for="matchcase"><input type="checkbox" name="matchcase" id="matchcase" tabindex="', $context['tabindex']++, '" ', $context['reserved_word_options']['match_case'] ? 'checked="checked"' : '', ' class="input_check" /> ', $txt['admin_match_case'], '</label></li>
-					<li><label for="matchuser"><input type="checkbox" name="matchuser" id="matchuser" tabindex="', $context['tabindex']++, '" ', $context['reserved_word_options']['match_user'] ? 'checked="checked"' : '', ' class="input_check" /> ', $txt['admin_check_user'], '</label></li>
-					<li><label for="matchname"><input type="checkbox" name="matchname" id="matchname" tabindex="', $context['tabindex']++, '" ', $context['reserved_word_options']['match_name'] ? 'checked="checked"' : '', ' class="input_check" /> ', $txt['admin_check_display'], '</label></li>
-				</ul>
-				<div class="righttext">
-					<input type="submit" value="', $txt['save'], '" name="save_reserved_names" tabindex="', $context['tabindex']++, '" style="margin: 1ex;" class="button_submit" />
-				</div>
+				<dl class="settings">
+					<dt>
+						<label for="matchword">', $txt['admin_match_whole'], '</label>
+					</dt>
+					<dd>
+						<input type="checkbox" name="matchword" id="matchword" tabindex="', $context['tabindex']++, '" ', $context['reserved_word_options']['match_word'] ? 'checked="checked"' : '', ' class="input_check" />
+					</dd>
+					<dt>
+						<label for="matchcase">', $txt['admin_match_case'], '</label>
+					</dt>
+					<dd>
+						<input type="checkbox" name="matchcase" id="matchcase" tabindex="', $context['tabindex']++, '" ', $context['reserved_word_options']['match_case'] ? 'checked="checked"' : '', ' class="input_check" />
+					</dd>
+					<dt>
+						<label for="matchuser">', $txt['admin_check_user'], '</label>
+					</dt>
+					<dd>
+						<input type="checkbox" name="matchuser" id="matchuser" tabindex="', $context['tabindex']++, '" ', $context['reserved_word_options']['match_user'] ? 'checked="checked"' : '', ' class="input_check" />
+					</dd>
+					<dt>
+						<label for="matchname">', $txt['admin_check_display'], '</label>
+					</dt>
+					<dd>
+						<input type="checkbox" name="matchname" id="matchname" tabindex="', $context['tabindex']++, '" ', $context['reserved_word_options']['match_name'] ? 'checked="checked"' : '', ' class="input_check" />
+					</dd>
+				</dl>
+				<hr class="hrcolor" />
+				<input type="submit" value="', $txt['save'], '" name="save_reserved_names" tabindex="', $context['tabindex']++, '" style="margin: 1ex;" class="button_submit" />
+				<br class="clear_right" />
 			</div>
 			<span class="botslice"><span></span></span>
 			<input type="hidden" name="sa" value="reservednames" />

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

@@ -46,10 +46,10 @@ function template_report_type()
 	}
 		echo '
 					</dl>
-					<div class="righttext">
-						<input type="submit" name="continue" value="', $txt['generate_reports_continue'], '" class="button_submit" />
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					</div>
+					<hr class="hrcolor" />
+					<input type="submit" name="continue" value="', $txt['generate_reports_continue'], '" class="button_submit" />
+					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>

+ 88 - 35
Themes/default/Search.template.php

@@ -63,32 +63,40 @@ function template_main()
 	else
 	{
 		echo '
-		<fieldset id="advanced_search">
 			<span class="upperframe"><span></span></span>
 			<div class="roundframe">
-				<input type="hidden" name="advanced" value="1" />
-				<span class="enhanced">
-					<strong>', $txt['search_for'], ':</strong>
-					<input type="text" name="search"', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' maxlength="', $context['search_string_limit'], '" size="40" class="input_text" />
-					<script type="text/javascript"><!-- // --><![CDATA[
-						createEventListener(window);
-						window.addEventListener("load", initSearch, false);
-					// ]]></script>
-					<select name="searchtype">
-						<option value="1"', empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt['all_words'], '</option>
-						<option value="2"', !empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt['any_words'], '</option>
-					</select>
-				</span>';
-
+				<dl class="settings" id="search_options">
+					<dt class="righttext">
+						<strong>', $txt['search_for'], ':</strong>
+					</dt>
+					<dd>
+						<input type="text" name="search"', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' maxlength="', $context['search_string_limit'], '" size="40" class="input_text" />';
+		
 		if (empty($modSettings['search_simple_fulltext']))
 			echo '
 				<em class="smalltext">', $txt['search_example'], '</em>';
-
+				
 		echo '
-				<dl id="search_options">
-					<dt>', $txt['by_user'], ':</dt>
-					<dd><input id="userspec" type="text" name="userspec" value="', empty($context['search_params']['userspec']) ? '*' : $context['search_params']['userspec'], '" size="40" class="input_text" /></dd>
-					<dt>', $txt['search_order'], ':</dt>
+					</dd>
+
+					<dt class="righttext">',
+						$txt['search_match'], ':
+					</dt>
+					<dd>
+						<select name="searchtype">
+							<option value="1"', empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt['all_words'], '</option>
+							<option value="2"', !empty($context['search_params']['searchtype']) ? ' selected="selected"' : '', '>', $txt['any_words'], '</option>
+						</select>
+					</dd>
+					<dt class="righttext">',
+						$txt['by_user'], ':
+					</dt>
+					<dd>
+						<input id="userspec" type="text" name="userspec" value="', empty($context['search_params']['userspec']) ? '*' : $context['search_params']['userspec'], '" size="40" class="input_text" />
+					</dd>
+					<dt class="righttext">', 
+						$txt['search_order'], ':
+					</dt>
 					<dd>
 						<select id="sort" name="sort">
 							<option value="relevance|desc">', $txt['search_orderby_relevant_first'], '</option>
@@ -98,14 +106,30 @@ function template_main()
 							<option value="id_msg|asc">', $txt['search_orderby_old_first'], '</option>
 						</select>
 					</dd>
-					<dt class="options">', $txt['search_options'], ':</dt>
+					<dt class="righttext options">', 
+						$txt['search_options'], ':
+					</dt>
 					<dd class="options">
-						<label for="show_complete"><input type="checkbox" name="show_complete" id="show_complete" value="1"', !empty($context['search_params']['show_complete']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['search_show_complete_messages'], '</label><br />
-						<label for="subject_only"><input type="checkbox" name="subject_only" id="subject_only" value="1"', !empty($context['search_params']['subject_only']) ? ' checked="checked"' : '', ' class="input_check" /> ', $txt['search_subject_only'], '</label>
+						<label for="show_complete">', $txt['search_show_complete_messages'], '
+							<input type="checkbox" name="show_complete" id="show_complete" value="1"', !empty($context['search_params']['show_complete']) ? ' checked="checked"' : '', ' class="input_check" />
+						</label><br />
+						<label for="subject_only">', $txt['search_subject_only'], '
+							<input type="checkbox" name="subject_only" id="subject_only" value="1"', !empty($context['search_params']['subject_only']) ? ' checked="checked"' : '', ' class="input_check" />
+						</label>
+					</dd>
+					<dt class="righttext between">', 
+						$txt['search_post_age'], ':
+					</dt>
+					<dd>', 
+						$txt['search_between'], ' <input type="text" name="minage" value="', empty($context['search_params']['minage']) ? '0' : $context['search_params']['minage'], '" size="5" maxlength="4" class="input_text" />&nbsp;', $txt['search_and'], '&nbsp;<input type="text" name="maxage" value="', empty($context['search_params']['maxage']) ? '9999' : $context['search_params']['maxage'], '" size="5" maxlength="4" class="input_text" /> ', $txt['days_word'], '
 					</dd>
-					<dt class="between">', $txt['search_post_age'], ': </dt>
-					<dd>', $txt['search_between'], ' <input type="text" name="minage" value="', empty($context['search_params']['minage']) ? '0' : $context['search_params']['minage'], '" size="5" maxlength="4" class="input_text" />&nbsp;', $txt['search_and'], '&nbsp;<input type="text" name="maxage" value="', empty($context['search_params']['maxage']) ? '9999' : $context['search_params']['maxage'], '" size="5" maxlength="4" class="input_text" /> ', $txt['days_word'], '</dd>
-				</dl>';
+				</dl>
+				</fieldset>
+				<script type="text/javascript"><!-- // --><![CDATA[
+					createEventListener(window);
+					window.addEventListener("load", initSearch, false);
+				// ]]></script>
+				<input type="hidden" name="advanced" value="1" />';
 
 		// Require an image to be typed to save spamming?
 		if ($context['require_verification'])
@@ -126,7 +150,7 @@ function template_main()
 		echo '
 			</div>
 			<span class="lowerframe"><span></span></span>
-		</fieldset>';
+		';
 
 		if (empty($context['search_params']['topic']))
 		{
@@ -183,15 +207,26 @@ function template_main()
 			echo '
 				<div class="padding">
 					<input type="checkbox" name="all" id="check_all" value=""', $context['boards_check_all'] ? ' checked="checked"' : '', ' onclick="invertAll(this, this.form, \'brd\');" class="input_check floatleft" />
-					<label for="check_all" class="floatleft">', $txt['check_all'], '</label>
-					<input type="submit" name="b_search" value="', $txt['search'], '" class="button_submit floatright" />
+					<label for="check_all" class="floatleft"><em>', $txt['check_all'], '</em></label>
+					<input type="submit" name="b_search" value="', $txt['search'], '" class="button_submit" />
 				</div>
-				<br class="clear" />
+				<br class="clear_right" />
 			</div>
 			<span class="lowerframe"><span></span></span>
 		</fieldset>';
 		}
-
+	echo '
+		<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/suggest.js?fin20"></script>
+		<script type="text/javascript"><!-- // --><![CDATA[
+			var oAddMemberSuggest = new smc_AutoSuggest({
+				sSelf: \'oAddMemberSuggest\',
+				sSessionId: smf_session_id,
+				sSessionVar: smf_session_var,
+				sControlId: \'userspec\',
+				sSearchType: \'member\',
+				bItemList: false
+			});
+		// ]]></script>';
 	}
 
 	echo '
@@ -221,9 +256,17 @@ function template_results()
 
 		echo '
 			<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
-				<strong>', $txt['search_for'], ':</strong>
-				<input type="text" name="search"', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' maxlength="', $context['search_string_limit'], '" size="40" class="input_text" />
+				<dl class="settings">
+					<dt class="righttext">
+						<strong>', $txt['search_for'], ':</strong>
+					</dt>
+					<dd>
+						<input type="text" name="search"', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' maxlength="', $context['search_string_limit'], '" size="40" class="input_text" />
+					</dd>
+				</dl>
+				
 				<input type="submit" name="edit_search" value="', $txt['search_adjust_submit'], '" class="button_submit" />
+				<br class="clear_right" />
 				<input type="hidden" name="searchtype" value="', !empty($context['search_params']['searchtype']) ? $context['search_params']['searchtype'] : 0, '" />
 				<input type="hidden" name="userspec" value="', !empty($context['search_params']['userspec']) ? $context['search_params']['userspec'] : '', '" />
 				<input type="hidden" name="show_complete" value="', !empty($context['search_params']['show_complete']) ? 1 : 0, '" />
@@ -260,13 +303,23 @@ function template_results()
 							<input type="checkbox" onclick="invertAll(this, this.form, \'topics[]\');" class="input_check" />';
 				echo '
 				</span>
-				<span class="ie6_header floatleft"><img src="' . $settings['images_url'] . '/buttons/search.png" alt="" />&nbsp;', $txt['mlist_search_results'],':&nbsp;',$context['search_params']['search'],'</span>
+				<span class="ie6_header floatleft"><img src="' . $settings['images_url'] . '/buttons/search.png" alt="?" />&nbsp;', $txt['mlist_search_results'],':&nbsp;',$context['search_params']['search'],'</span>
 			</h3>
-		</div>
+		</div>';
+		
+		// was anything even found?
+		if (!empty($context['topics']))
+		echo'
 		<div class="pagesection">
 			<span>', $txt['pages'], ': ', $context['page_index'], '</span>
 		</div>';
+		else
+			echo '
+		<span class="upperframe"><span></span></span>
+			<div class="roundframe">', $txt['find_no_results'], '</div>
+		<span class="lowerframe"><span></span></span>';
 
+		// while we have results to show ...
 		while ($topic = $context['get_topics']())
 		{
 			$color_class = '';

+ 7 - 6
Themes/default/SplitTopics.template.php

@@ -39,13 +39,13 @@ function template_ask()
 							<input type="radio" id="selective" name="step2" value="selective" class="input_radio" /> <label for="selective">', $txt['select_split_posts'], '</label>
 						</li>
 					</ul>
-					<div class="righttext">
-						<input type="submit" value="', $txt['split'], '" class="button_submit" />
-					</div>
+					<hr class="hrcolor" />
+					<input type="submit" value="', $txt['split'], '" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
+				<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 			</div>
-			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 		</form>
 	</div>';
 }
@@ -459,9 +459,10 @@ function template_merge_extra_options()
 					</fieldset>';
 	}
 	echo '
-					<input type="submit" value="' . $txt['merge'] . '" class="button_submit floatright" />
+					<input type="submit" value="' . $txt['merge'] . '" class="button_submit" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-					<input type="hidden" name="sa" value="execute" /><br class="clear" />
+					<input type="hidden" name="sa" value="execute" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>

+ 57 - 33
Themes/default/Themes.template.php

@@ -89,9 +89,9 @@ function template_main()
 							<span class="smalltext pick_theme"><a href="', $scripturl, '?action=theme;sa=pick;u=0;', $context['session_var'], '=', $context['session_id'], '">', $txt['theme_select'], '</a></span>
 						</dd>
 					</dl>
-					<div class="righttext">
-						<input type="submit" name="save" value="' . $txt['save'] . '" class="button_submit" />
-					</div>
+					<hr class="hrcolor" />
+					<input type="submit" name="save" value="' . $txt['save'] . '" class="button_submit" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -165,9 +165,9 @@ function template_main()
 
 	echo '
 					</dl>
-					<div class="righttext">
-						<input type="submit" name="save" value="', $txt['theme_install_go'], '" class="button_submit" />
-					</div>
+					<hr class="hrcolor" />
+					<input type="submit" name="save" value="', $txt['theme_install_go'], '" class="button_submit" />
+					</br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -264,6 +264,7 @@ function template_list_themes()
 						</dd>
 					</dl>
 					<input type="submit" name="save" value="', $txt['themeadmin_list_reset_go'], '" class="button_submit" />
+					<br class="clear_right" />
 					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
 					<input type="hidden" name="', $context['admin-tl_token_var'], '" value="', $context['admin-tl_token'], '" />
 				</div>
@@ -339,33 +340,50 @@ function template_set_options()
 			</div>
 			<div class="windowbg2">
 				<span class="topslice"><span></span></span>
-				<div class="content">
-					<ul class="theme_options">';
+				<div class="content">';
+	echo '
+					<dl class="settings">';
 
 	foreach ($context['options'] as $setting)
 	{
 		echo '
-						<li class="theme_option">';
-
+						<dt ', $context['theme_options_reset'] ? 'style="width:50%"' : '', '>';
+						
+		// Show the change option box ?
 		if ($context['theme_options_reset'])
 			echo '
-							<select name="', !empty($setting['default']) ? 'default_' : '', 'options_master[', $setting['id'], ']" onchange="this.form.options_', $setting['id'], '.disabled = this.selectedIndex != 1;">
+							<span class="floatleft"><select name="', !empty($setting['default']) ? 'default_' : '', 'options_master[', $setting['id'], ']" onchange="this.form.options_', $setting['id'], '.disabled = this.selectedIndex != 1;">
 								<option value="0" selected="selected">', $txt['themeadmin_reset_options_none'], '</option>
 								<option value="1">', $txt['themeadmin_reset_options_change'], '</option>
 								<option value="2">', $txt['themeadmin_reset_options_remove'], '</option>
-							</select>';
-
+							</select>&nbsp;</span>';
+		
+		// display checkbox options
 		if ($setting['type'] == 'checkbox')
 		{
 			echo '
+							<label for="options_', $setting['id'], '">', $setting['label'], '</label>';
+			if (isset($setting['description']))
+				echo '
+							<br /><span class="smalltext">', $setting['description'], '</span>';
+		echo '
+						</dt>
+						<dd ', $context['theme_options_reset'] ? 'style="width:40%"' : '', '>
 							<input type="hidden" name="' . (!empty($setting['default']) ? 'default_' : '') . 'options[' . $setting['id'] . ']" value="0" />
-							<label for="options_', $setting['id'], '"><input type="checkbox" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '"', !empty($setting['value']) ? ' checked="checked"' : '', $context['theme_options_reset'] ? ' disabled="disabled"' : '', ' value="1" class="input_check" /> ', $setting['label'], '</label>';
+							<input type="checkbox" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '"', !empty($setting['value']) ? ' checked="checked"' : '', $context['theme_options_reset'] ? ' disabled="disabled"' : '', ' value="1" class="input_check floatleft" />';
 		}
+		// how about selection lists, we all love them
 		elseif ($setting['type'] == 'list')
 		{
 			echo '
-							&nbsp;<label for="options_', $setting['id'], '">', $setting['label'], '</label>
-							<select name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '"', $context['theme_options_reset'] ? ' disabled="disabled"' : '', '>';
+							<label for="options_', $setting['id'], '">', $setting['label'], '</label>';
+			if (isset($setting['description']))
+				echo '
+							<br /><span class="smalltext">', $setting['description'], '</span>';
+		echo '
+						</dt>
+						<dd ', $context['theme_options_reset'] ? 'style="width:40%"' : '', '>
+							&nbsp;<select class="floatleft" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '"', $context['theme_options_reset'] ? ' disabled="disabled"' : '', '>';
 
 			foreach ($setting['options'] as $value => $label)
 			{
@@ -376,26 +394,32 @@ function template_set_options()
 			echo '
 							</select>';
 		}
+		// a textbox it is then
 		else
+		{
 			echo '
-							&nbsp;<label for="options_', $setting['id'], '">', $setting['label'], '</label>
-							<input type="text" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '" value="', $setting['value'], '"', $setting['type'] == 'number' ? ' size="5"' : '', $context['theme_options_reset'] ? ' disabled="disabled"' : '', ' class="input_text" />';
-
-		if (isset($setting['description']))
-			echo '
+							<label for="options_', $setting['id'], '">', $setting['label'], '</label>';
+			if (isset($setting['description']))
+				echo '
 							<br /><span class="smalltext">', $setting['description'], '</span>';
-
 		echo '
-					</li>';
+						</dt>
+						<dd ', $context['theme_options_reset'] ? 'style="width:40%"' : '', '>
+							<input type="text" name="', !empty($setting['default']) ? 'default_' : '', 'options[', $setting['id'], ']" id="options_', $setting['id'], '" value="', $setting['value'], '"', $setting['type'] == 'number' ? ' size="5"' : '', $context['theme_options_reset'] ? ' disabled="disabled"' : '', ' class="input_text" />';
+		}
+		
+		// end of this defintion 
+		echo '
+						</dd>';
 	}
-
+	
+	// close the option page up
 	echo '
-					</ul>
-					<div class="righttext">
-						<input type="submit" name="save" value="', $txt['save'], '" class="button_submit" />
-						<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
-						<input type="hidden" name="', $context['admin-sto_token_var'], '" value="', $context['admin-sto_token'], '" />
-					</div>
+					</dl>
+					<hr class="hrcolor" />
+					<input type="submit" name="submit" value="', $txt['save'], '" class="button_submit" />
+					<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>
@@ -603,9 +627,9 @@ function template_set_settings()
 
 	echo '
 					</dl>
-					<div class="righttext">
-						<input type="submit" name="save" value="', $txt['save'], '" class="button_submit" />
-					</div>
+					<hr class="hrcolor" />
+					<input type="submit" name="save" value="', $txt['save'], '" class="button_submit" /><br />
+					<br class="clear_right" />
 				</div>
 				<span class="botslice"><span></span></span>
 			</div>

+ 23 - 10
Themes/default/css/index.css

@@ -68,6 +68,7 @@ form
 
 /* We can style the different types of input buttons to be uniform throughout different browsers and their color themes.
 	.button_submit - covers input[type=submit], input[type=button], button[type=submit] and button[type=button] in all browsers
+	.button_link   - covers links to make them look like a submit button
 	.button_reset  - covers input[type=reset] and button[type=reset] throughout all browsers
 	.input_check   - covers input[type=checkbox] throughout all browsers
 	.input_radio   - covers input[type=radio] throughout all browsers
@@ -103,12 +104,19 @@ textarea
 }
 
 /* Buttons should be styled a bit differently, in order to make them look more button'ish. */
+#frmLogin input.button_submit, #guest_form  input.button_submit, #calendar_navigation input.button_submit
+{
+	float: none;
+	margin-left: inherit;
+}
 .button_submit, .button_reset
 {
 	background: #cde7ff url(../images/theme/submit_bg.png) no-repeat;
 	border: 1px solid #aaa;
 	cursor: pointer;
 	font-weight: normal;
+	margin-left: 1em;
+	float: right;
 }
 input:hover, textarea:hover, button:hover, select:hover
 {
@@ -127,14 +135,22 @@ input:focus, textarea:focus, button:focus, select:focus
 {
 	background: #cde7ff url(../images/theme/submit_bg.png) no-repeat;
 	border: 1px solid #aaa;
-	padding: 2px 5px 3px 4px;
+	padding: 3px 5px 3px 4px;
+	font: 95%/115% verdana, Helvetica, sans-serif;
 	cursor: pointer;
-	font-size: 1.1em;
 	font-weight: normal;
+	float: right;
 }
 a.button_link
 { 
 	color: #000;
+	margin: 0 !important;
+}
+.button_link:hover, .button_link:hover
+{
+	border: 1px solid #aaa;
+	text-decoration: none;
+	background: url(../images/theme/submit_bg.png) no-repeat 0 -140px #cde7ff;
 }
 
 /* the new "button" */
@@ -1206,7 +1222,7 @@ span.lowerframe span
 }
 .dropmenu li ul ul
 {
-    margin: -2.4em 0 0 15em;
+    margin: -2.2em 0 0 15em;
     padding: 2px 0;
 }
 
@@ -1748,13 +1764,10 @@ dl#ic_recentposts dd
 /* the small stats */
 #index_common_stats
 {
-	display: block;
-	margin: 0 0 0.5em 0;
-	text-align: right;
+	margin: -28px 0 0.5em 0;
+	float: right;
 	font-size: 0.9em;
-	position: relative;
-	top: -20px;
-	line-height: 1px;
+	line-height: 1.3em;
 }
 
 img.new_posts
@@ -2837,7 +2850,7 @@ tr.windowbg td, tr.windowbg2 td, tr.approvebg td, tr.highlight2 td
 
 .noticebox 
 {
-	color: #777;
+	color: #666;
 	background: #fff6ca url(../images/warning_moderate.png) center no-repeat;
 	background-position: 10px 50%;
 	text-align: left;

+ 9 - 5
Themes/default/languages/Admin.english.php

@@ -13,7 +13,7 @@ $txt['admin_members_list'] = 'Below is a listing of all the members currently re
 $txt['admin_next'] = 'Next';
 $txt['admin_censored_words'] = 'Censored Words';
 $txt['admin_censored_where'] = 'Put the word to be censored on the left, and what to change it to on the right.';
-$txt['admin_censored_desc'] = 'Due to the public nature of forums there may be some words that you wish to prohibit being posted by users of your forum. You can enter any words below that you wish to be censored whenever used by a member.<br />Blank a box to remove that word.';
+$txt['admin_censored_desc'] = 'Due to the public nature of forums there may be some words that you wish to prohibit being posted by users of your forum. You can enter any words below that you wish to be censored whenever used by a member.<br />Clear a box to remove that word from the censor.';
 $txt['admin_reserved_names'] = 'Reserved Names';
 $txt['admin_template_edit'] = 'Edit Your Forum Template';
 $txt['admin_modifications'] = 'Modification Settings';
@@ -48,7 +48,7 @@ $txt['admin_agreement_select_language'] = 'Language to edit';
 $txt['admin_agreement_select_language_change'] = 'Change';
 $txt['admin_delete_members'] = 'Delete Selected Members';
 $txt['admin_repair'] = 'Repair All Boards and Topics';
-$txt['admin_main_welcome'] = 'This is your &quot;%1$s&quot;.  From here, you can edit settings, maintain your forum, view logs, install packages, manage themes, and many other things.<div style="margin-top: 1ex;">If you have any trouble, please look at the &quot;Support &amp; Credits&quot; page.  If the information there doesn\'t help you, feel free to <a href="http://www.simplemachines.org/community/index.php" target="_blank" class="new_win">look to us for help</a> with the problem.</div>You may also find answers to your questions or problems by clicking the <img src="' . $settings['images_url'] . '/helptopics.gif" alt="%2$s" title="%3$s" /> symbols for more information on the related functions.';
+$txt['admin_main_welcome'] = 'This is your &quot;%1$s&quot;.  From here, you can edit settings, maintain your forum, view logs, install packages, manage themes, and many other things.<div style="margin-top: 1ex;">If you have any trouble, please look at the &quot;Support &amp; Credits&quot; page.  If the information there doesn\'t help you, feel free to <a href="http://www.simplemachines.org/community/index.php" target="_blank" class="new_win">look to us for help</a> with the problem.</div>You may also find answers to your questions or problems by clicking the <img src="' . $settings['images_url'] . '/helptopics.png" alt="%2$s" title="%3$s" /> symbols for more information on the related functions.';
 $txt['admin_news_desc'] = 'Please place one news item per box. BBC tags, such as <span title="Are you bold?">[b]</span>, <span title="I tall icks!!">[i]</span> and <span title="Brackets are great, no?">[u]</span> are allowed in your news, as well as smileys. Clear a news item\'s text box to remove it.';
 $txt['administrators'] = 'Forum Administrators';
 $txt['admin_reserved_desc'] = 'Reserved names will keep members from registering certain usernames or using these words in their displayed names. Choose the options you wish to use from the bottom before submitting.';
@@ -100,7 +100,7 @@ $txt['attachment_file_size'] = 'File Size';
 $txt['attachmentdir_size_not_set'] = 'No maximum directory size is currently set';
 $txt['attachment_delete_admin'] = '[attachment deleted by admin]';
 $txt['live'] = 'Live from Simple Machines...';
-$txt['remove_all'] = 'Remove All';
+$txt['remove_all'] = 'Clear Log';
 $txt['approve_new_members'] = 'Admin must approve all new members';
 $txt['agreement_not_writable'] = 'Warning - agreement.txt is not writable, any changes you make will NOT be saved.';
 
@@ -206,7 +206,7 @@ $txt['ban_log_ip'] = 'IP';
 $txt['ban_log_email'] = 'Email address';
 $txt['ban_log_member'] = 'Member';
 $txt['ban_log_date'] = 'Date';
-$txt['ban_log_remove_all'] = 'Remove all';
+$txt['ban_log_remove_all'] = 'Clear Log';
 $txt['ban_log_remove_all_confirm'] = 'Are you sure you want to delete all ban log entries?';
 $txt['ban_log_remove_selected'] = 'Remove selected';
 $txt['ban_log_remove_selected_confirm'] = 'Are you sure you want to delete all selected ban log entries?';
@@ -282,6 +282,7 @@ $txt['additional'] = 'Additional';
 $txt['messenger_address'] = 'Messenger Address';
 $txt['wild_cards_allowed'] = 'wildcard characters * and ? are allowed';
 $txt['search_for'] = 'Search for';
+$txt['search_match'] = 'Match';
 $txt['member_part_of_these_membergroups'] = 'Member is part of these membergroups';
 $txt['membergroups'] = 'Membergroups';
 $txt['confirm_delete_members'] = 'Are you sure you want to delete the selected members?';
@@ -361,6 +362,9 @@ $txt['attachment_image_paranoid_warning'] = 'The extensive security checks can r
 $txt['attachment_image_paranoid'] = 'Perform extensive security checks on uploaded image attachments';
 $txt['attachmentThumbnails'] = 'Resize images when showing under posts';
 $txt['attachment_thumb_png'] = 'Save thumbnails as PNG';
+$txt['attachment_thumb_memory'] = 'Adaptive thumbnail memory';
+$txt['attachment_thumb_memory_note2'] = 'If the system can not get the memory no thumbnail will be created.';
+$txt['attachment_thumb_memory_note1'] = 'Leave this unchecked to always attempt to create a thumbnail';
 $txt['attachmentThumbWidth'] = 'Maximum width of thumbnails';
 $txt['attachmentThumbHeight'] = 'Maximum height of thumbnails';
 
@@ -444,7 +448,7 @@ $txt['xmlnews_maxlen'] = 'Maximum message length:<div class="smalltext">(0 to di
 $txt['editnews_clickadd'] = 'Click here to add another item.';
 $txt['editnews_remove_selected'] = 'Remove selected';
 $txt['editnews_remove_confirm'] = 'Are you sure you want to delete the selected news items?';
-$txt['censor_clickadd'] = 'Click here to add another word.';
+$txt['censor_clickadd'] = 'Add another word';
 
 $txt['layout_controls'] = 'Forum';
 $txt['logs'] = 'Logs';

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

@@ -279,6 +279,9 @@ $helptxt['disableTemplateEval'] = 'By default, templates are evaluated instead o
 $helptxt['databaseSession_enable'] = 'This option makes use of the database for session storage - it is best for load balanced servers, but helps with all timeout issues and can make the forum faster.';
 $helptxt['databaseSession_loose'] = 'Turning this on will decrease the bandwidth your forum uses, and make it so clicking back will not reload the page - the downside is that the (new) icons won\'t update, among other things. (unless you click to that page instead of going back to it.)';
 $helptxt['databaseSession_lifetime'] = 'This is the number of seconds for sessions to last after they haven\'t been accessed.  If a session is not accessed for too long, it is said to have &quot;timed out&quot;.  Anything higher than 2400 is recommended.';
+$helptxt['cache_enable'] = 'SMF performs caching at a variety of levels. The higher the level of caching enabled the more CPU time will be spent retrieving cached information. If caching is available on your machine it is recommended that you try caching at level 1 first.';
+$helptxt['cache_memcached'] = 'If you are using memcached you need to provide the server details. This should be entered as a comma separated list as shown in the example below:<br /><br/>	&quot;server1,server2,server3:port,server4&quot;<br /><br />Note that if no port is specified SMF will use port 11211. SMF will attempt to perform rough/random load balancing across the specified servers.';
+$helptxt['cache_cachedir'] = 'This setting This is only for the smf file based cache system. It specifies the path to the cache directory.  It is recommended that you place this in /tmp/ if you are going to use this, although it will work in any directory';  
 $helptxt['enableErrorLogging'] = 'This will log any errors, like a failed login, so you can see what went wrong.';
 $helptxt['enableErrorQueryLogging'] = 'This will include the full query sent to the database in the error log.  Requires error logging to be turned on.<br /><br /><strong>Note:  This will affect the ability to filter the error log by the error message.</strong>';
 $helptxt['allow_disableAnnounce'] = 'This will allow users to opt out of notification of topics you announce by checking the &quot;announce topic&quot; checkbox when posting.';
@@ -305,6 +308,7 @@ $helptxt['attachment_manager_settings'] = 'Attachments are files that members ca
 		<strong>Maximum width and height of thumbnails</strong>:<br /> Only used with the &quot;Resize images when showing under posts&quot; option, the maximum width and height to resize attachments down from.  They will be resized proportionally.';
 $helptxt['attachment_image_paranoid'] = 'Selecting this option will enable very strict security checks on image attachments. Warning! These extensive checks can fail on valid images too. It is strongly recommended to only use this option together with image re-encoding, in order to have SMF try to resample the images which fail the security checks: if successful, they will be sanitized and uploaded. Otherwise, if image re-encoding is not enabled, all attachments failing checks will be rejected.';
 $helptxt['attachment_image_reencode'] = 'Selecting this option will enable trying to re-encode the uploaded image attachments. Image re-encoding offers better security. Note however that image re-encoding also renders all animated images static. <br /> This feature is only possible if the GD module is installed on your server.';
+$helptxt['attachment_thumb_memory'] = 'The larger the source image (size & width x height), the higher the memory requirements are for the system to successfully create a thumbnail image.<br />Checking this option, the system will estimate the needed memory and will then it will request that amount.  If successful, only then will it attempt to create the thumbnail.  This will result in fewer white screen errors but may result in fewer thumbnails being created.  Leaving this unchecked the system will always try to create the thumbnail (with a fixed amount of memory).  This may result in more white screen errors.';
 $helptxt['avatar_paranoid'] = 'Selecting this option will enable very strict security checks on avatars. Warning! These extensive checks can fail on valid images too. It is strongly recommended to only use this option together with avatars re-encoding, in order to have SMF try to resample the images which fail the security checks: if successful, they will be sanitized and uploaded. Otherwise, if re-encoding of avatars is not enabled, all avatars failing checks will be rejected.';
 $helptxt['avatar_reencode'] = 'Selecting this option will enable trying to re-encode the uploaded avatars. Image re-encoding offers better security. Note however that image re-encoding also renders all animated images static. <br /> This feature is only possible if the GD module is installed on your server.';
 $helptxt['karmaMode'] = 'Karma is a feature that shows the popularity of a member. Members, if allowed, can
@@ -580,7 +584,7 @@ $helptxt['chmod_flags'] = 'You can manually set the permissions you wish to set
 $helptxt['postmod'] = 'This section allows members of the moderation team (with sufficient permissions) to approve any posts and topics before they are shown.';
 
 $helptxt['field_show_enclosed'] = 'Encloses the user input between some text or html.  This will allow you to add more instant message providers, images or an embed etc. For example:<br /><br />
-		&lt;a href="http://website.com/{INPUT}"&gt;&lt;img src="{DEFAULT_IMAGES_URL}/icon.gif" alt="{INPUT}" /&gt;&lt;/a&gt;<br /><br />
+		&lt;a href="http://website.com/{INPUT}"&gt;&lt;img src="{DEFAULT_IMAGES_URL}/icon.png" alt="{INPUT}" /&gt;&lt;/a&gt;<br /><br />
 		Note that you can use the following variables:<br />
 		<ul class="normallist">
 			<li>{INPUT} - The input specified by the user.</li>

+ 3 - 1
Themes/default/languages/ManageMaintenance.english.php

@@ -100,7 +100,9 @@ $txt['error_message'] = 'Error message';
 $txt['clear_filter'] = 'Clear filter';
 $txt['remove_selection'] = 'Remove Selection';
 $txt['remove_filtered_results'] = 'Remove All Filtered Results';
-$txt['sure_about_errorlog_remove'] = 'Are you sure you want to remove all error messages?';
+$txt['sure_about_errorlog_remove'] = 'Are you sure you want to completely clear the error log?';
+$txt['remove_selection_confirm'] = 'Are you sure you want to delete the selected entries?';
+$txt['remove_filtered_results_confirm'] = 'Are you sure you want to delete the filtered entries?';
 $txt['reverse_direction'] = 'Reverse chronological order of list';
 $txt['error_type'] = 'Type of error';
 $txt['filter_only_type'] = 'Only show the errors of this type';

+ 2 - 1
Themes/default/languages/ManageScheduledTasks.english.php

@@ -52,6 +52,7 @@ $txt['scheduled_log_empty'] = 'There are currently no task log entries.';
 $txt['scheduled_log_time_run'] = 'Time Run';
 $txt['scheduled_log_time_taken'] = 'Time taken';
 $txt['scheduled_log_time_taken_seconds'] = '%1$d seconds';
-$txt['scheduled_log_empty_log'] = 'Empty Log';
+$txt['scheduled_log_empty_log'] = 'Clear Log';
+$txt['scheduled_log_empty_log_confirm'] = 'Are you sure you want to completely clear the log?';
 
 ?>

+ 22 - 29
Themes/default/languages/ManageSettings.english.php

@@ -44,7 +44,7 @@ $txt['pruneBanLog'] = 'Remove ban hit log entries older than<div class="smalltex
 $txt['pruneReportLog'] = 'Remove report to moderator log entries older than<div class="smalltext">(0 to disable)</div>';
 $txt['pruneScheduledTaskLog'] = 'Remove scheduled task log entries older than<div class="smalltext">(0 to disable)</div>';
 $txt['pruneSpiderHitLog'] = 'Remove search engine hit logs older than<div class="smalltext">(0 to disable)</div>';
-$txt['cookieTime'] = 'Default login cookies length (in minutes)';
+$txt['cookieTime'] = 'Default login cookies length';
 $txt['localCookies'] = 'Enable local storage of cookies<div class="smalltext">(SSI won\'t work well with this on.)</div>';
 $txt['globalCookies'] = 'Use subdomain independent cookies<div class="smalltext">(turn off local cookies first!)</div>';
 $txt['globalCookiesDomain'] = 'Main domain used for subdomain independent cookies <div class="smalltext">(enable subdomain independent cookies first!<br />The domain could be for example: "website.com" or "website.co.uk" without http:// or slashes)</div>';
@@ -96,35 +96,20 @@ $txt['karmaLabel'] = 'Karma label';
 $txt['karmaApplaudLabel'] = 'Karma applaud label';
 $txt['karmaSmiteLabel'] = 'Karma smite label';
 
-$txt['caching_information'] = '<div class="aligncenter underline"><strong>Important! Read this first before enabling these features.</strong></div><br />
-	SMF supports caching through the use of accelerators. The currently supported accelerators include:<br />
-	<ul class="normallist">
-		<li>APC</li>
-		<li>eAccelerator</li>
-		<li>Turck MMCache</li>
-		<li>Memcached</li>
-		<li>Zend Platform/Performance Suite (Not Zend Optimizer)</li>
-		<li>XCache</li>
-	</ul>
-	Caching will work best if you have PHP compiled with one of the above optimizers, or have memcache
-	available. If you do not have any optimizer installed SMF will do file based caching.<br /><br />
-	SMF performs caching at a variety of levels. The higher the level of caching enabled the more CPU time will be spent
-	retrieving cached information. If caching is available on your machine it is recommended that you try caching at level 1 first.
-	<br /><br />
-	Note that if you use memcached you need to provide the server details in the setting below. This should be entered as a comma separated list
-	as shown in the example below:<br />
-	&quot;server1,server2,server3:port,server4&quot;<br /><br />
-	Note that if no port is specified SMF will use port 11211. SMF will attempt to perform rough/random load balancing across the servers.
-	<br /><br />
-	%1$s';
+$txt['caching_information'] = '<div class="aligncenter underline"><strong>Important! Read this first before enabling these features.</strong></div>
+SMF supports caching through the use of accelerators. The currently supported accelerators include:
+<ul class="normallist">
+	<li>APC</li>
+	<li>eAccelerator</li>
+	<li>Turck MMCache</li>
+	<li>Memcached</li>
+	<li>Zend Platform/Performance Suite (Not Zend Optimizer)</li>
+	<li>XCache</li>
+</ul>
+Caching will work best if you have PHP compiled with one of the above optimizers, or have memcache available. If you do not have any optimizer installed SMF will do file based caching.';
+$txt['detected_no_caching'] = '<strong class="alert">SMF has not been able to detect a compatible accelerator on your server.  File based caching can be used instead.</strong>';
+$txt['detected_accelerators'] = '<strong class="success">SMF has detected the following accelerators: %1$s</strong>';
 
-$txt['detected_no_caching'] = '<strong class="alert">SMF has not been able to detect a compatible accelerator on your server.</strong>';
-$txt['detected_APC'] = '<strong style="color: green">SMF has detected that your server has APC installed.</strong>';
-$txt['detected_eAccelerator'] = '<strong style="color: green">SMF has detected that your server has eAccelerator installed.</strong>';
-$txt['detected_MMCache'] = '<strong style="color: green">SMF has detected that your server has MMCache installed.</strong>';
-$txt['detected_Zend'] = '<strong style="color: green">SMF has detected that your server has Zend installed.</strong>';
-$txt['detected_Memcached'] = '<strong style="color: green">SMF has detected that your server has Memcached installed.</strong>';
-$txt['detected_XCache'] = '<strong style="color: green">SMF has detected that your server has XCache installed.</strong>';
 
 $txt['cache_enable'] = 'Caching Level';
 $txt['cache_off'] = 'No caching';
@@ -132,6 +117,14 @@ $txt['cache_level1'] = 'Level 1 Caching (Recommended)';
 $txt['cache_level2'] = 'Level 2 Caching';
 $txt['cache_level3'] = 'Level 3 Caching (Not Recommended)';
 $txt['cache_memcached'] = 'Memcache settings';
+$txt['cache_accelerator'] = 'Caching Accelerator';
+$txt['default_cache'] = 'SMF file based caching';
+$txt['apc_cache'] = 'APC';
+$txt['eAccelerator_cache'] = 'eAccelerator';
+$txt['mmcache_cache'] = 'Turck MMCache';
+$txt['memcached_cache'] = 'Memcached';
+$txt['zend_cache'] = 'Zend Platform/Performance Suite';
+$txt['xcache_cache'] = 'XCache';
 
 $txt['loadavg_warning'] = '<span class="error">Please note: the settings below are to be edited with care. Setting any of them too low may render your forum <strong>unusable</strong>! The current load average is <strong>%01.2f</strong></span>';
 $txt['loadavg_enable'] = 'Enable load balancing by load averages';

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

@@ -5,6 +5,7 @@ $txt['smiley_sets_save'] = 'Save Changes';
 $txt['smiley_sets_add'] = 'New smiley Set';
 $txt['smiley_sets_delete'] = 'Delete selected';
 $txt['smiley_sets_confirm'] = 'Are you sure you want to remove these smiley sets?\\n\\nNote: This won\\\'t remove the images, just the choices.';
+$txt['smiley_sets_none'] = 'There are currently no smiley sets.';
 
 $txt['setting_smiley_sets_default'] = 'Default Smiley Set';
 $txt['setting_smiley_sets_enable'] = 'Enable smiley set selection by members';

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

@@ -64,6 +64,7 @@ $txt['mc_groupr_reject_w_reason'] = 'Reject Request with Reason';
 $txt['mc_groupr_warning'] = 'Are you sure you wish to do this?';
 
 $txt['mc_unapproved_attachments_none_found'] = 'There are currently no attachments awaiting approval';
+$txt['mc_unapproved_attachments_desc'] = 'From here you can approve or delete any attachments awaiting moderation.';
 $txt['mc_unapproved_replies_none_found'] = 'There are currently no posts awaiting approval';
 $txt['mc_unapproved_topics_none_found'] = 'There are currently no topics awaiting approval';
 $txt['mc_unapproved_posts_desc'] = 'From here you can approve or delete any posts awaiting moderation.';

+ 4 - 2
Themes/default/languages/Modlog.english.php

@@ -31,8 +31,10 @@ $txt['modlog_enter_comment'] = 'Enter Moderation Comment';
 $txt['modlog_moderation_log'] = 'Moderation Log';
 $txt['modlog_moderation_log_desc'] = 'Below is a list of all the moderation actions that have been carried out by moderators of the forum.<br /><strong>Please note:</strong> Entries cannot be removed from this log until they are at least twenty-four hours old.';
 $txt['modlog_no_entries_found'] = 'There are currently no moderation log entries.';
-$txt['modlog_remove'] = 'Remove';
-$txt['modlog_removeall'] = 'Remove All';
+$txt['modlog_remove'] = 'Delete Selected';
+$txt['modlog_removeall'] = 'Clear Log';
+$txt['modlog_remove_selected_confirm'] = 'Are you sure you want to delete the selected log entries?';
+$txt['modlog_remove_all_confirm'] = 'Are you sure you want to completely clear the log?';
 $txt['modlog_go'] = 'Go';
 $txt['modlog_add'] = 'Add';
 $txt['modlog_search'] = 'Quick Search';

+ 19 - 8
Themes/default/languages/Packages.english.php

@@ -29,10 +29,11 @@ $txt['no_mods_installed'] = 'No mods currently installed';
 $txt['browse_installed'] = 'Browse installed mods';
 $txt['uninstall'] = 'Uninstall';
 $txt['delete_list'] = 'Delete Mod List';
-$txt['php_safe_mode'] = 'Sorry, you server has PHP set to SAFE MODE.  This feature is not compatible with SAFE MODE.  Sorry.';
+$txt['package_delete_list_warning'] = 'Are you sure you wish to clear the installed modification list?';
+$txt['php_safe_mode'] = 'Sorry, you server has PHP set to SAFE MODE.  This feature is not compatible with SAFE MODE.';
 $txt['lets_try_anyway'] = 'Let me try anyway.';
 
-$txt['package_manager_desc'] = 'From the package manager you can download and install modifications to your forum through an easy to use interface.';
+$txt['package_manager_desc'] = 'From this easy to use interface, you can download and install modifications for use on your forum.';
 $txt['installed_packages_desc'] = 'You can use the interface below to view those packages currently installed on the forum, and remove the ones you no longer require.';
 $txt['download_packages_desc'] = 'From this section you can choose to either download new packages from package servers, or upload a package file directly to the forum.';
 
@@ -50,8 +51,8 @@ $txt['remove'] = 'Remove';
 $txt['package_type'] = 'Package Type';
 $txt['archiving'] = 'Archiving';
 $txt['extracting'] = 'Extracting';
-$txt['avatars_extracted'] = 'The avatars have been extracted, you can now use them.';
-$txt['language_extracted'] = 'The language pack has been extracted, you can now use it (by setting it in your settings).';
+$txt['avatars_extracted'] = 'The avatars have been installed, you should now be able to use them.';
+$txt['language_extracted'] = 'The language pack has been installed, you can now enable its use in the language settings area of your admin control panel.';
 
 $txt['mod_name'] = 'Mod Name';
 $txt['mod_version'] = 'Version';
@@ -79,6 +80,7 @@ $txt['packages_latest_fetch'] = 'Attempting to fetch the most popular and recent
 $txt['package_upgrade'] = 'Upgrade';
 $txt['package_uninstall_readme'] = 'Uninstallation Readme';
 $txt['package_install_readme'] = 'Installation Readme';
+$txt['package_install_license'] = 'License';
 $txt['package_install_type'] = 'Type';
 $txt['package_install_action'] = 'Action';
 $txt['package_install_desc'] = 'Description';
@@ -97,11 +99,16 @@ $txt['execute_database_changes'] = 'Adapt Database';
 $txt['execute_hook_add'] = 'Add Hook';
 $txt['execute_hook_remove'] = 'Remove Hook';
 $txt['execute_hook_action'] = 'Adapting hook %1$s';
+$txt['package_requires'] = 'Requires Modification';
+$txt['package_check_for'] = 'Check for installation:';
+$txt['execute_credits_add'] = 'Add Credits';
+$txt['execute_credits_remove'] = 'Remove Credits';
+$txt['execute_credits_action'] = 'Credits: %1$s';
 
 $txt['package_install_actions'] = 'Installations actions for';
 $txt['package_will_fail_title'] = 'Error in Package Installation';
 $txt['package_will_fail_warning'] = 'At least one error was encountered during a test installation of this package.
-	It is <strong>strongly</strong> recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently.
+	It is <strong>strongly</strong> recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently.<br />
 	This error may be caused by a conflict between the package you\'re trying to install and another package you have already installed, an error in the package, a package which requires another package that you don\'t have installed yet, or a package designed for another version of SMF.';
 // Don't use entities in the below string.
 $txt['package_will_fail_popup'] = 'Are you sure you wish to continue installing this modification, even though it will not install successfully?';
@@ -123,7 +130,7 @@ $txt['package_action_success'] = '<strong>Test successful</strong>';
 $txt['package_action_skipping'] = '<strong>Skipping file</strong>';
 
 $txt['package_uninstall_actions'] = 'Uninstall Actions';
-$txt['package_uninstall_done'] = 'The package has been uninstalled, it should no longer take effect.';
+$txt['package_uninstall_done'] = 'The package has been successfully uninstalled.';
 $txt['package_uninstall_cannot'] = 'This package cannot be uninstalled, because there is no uninstaller!<br /><br />Please contact the mod author for more information.';
 
 $txt['package_install_options'] = 'Installation Options';
@@ -138,7 +145,7 @@ $txt['package_install_options_make_full_backups'] = 'Create an entire backup (ex
 $txt['package_ftp_necessary'] = 'FTP Information Required';
 $txt['package_ftp_why'] = 'Some of the files the package manager needs to modify are not writable.  This needs to be changed by logging into FTP and using it to chmod or create the files and folders.  Your FTP information may be temporarily cached for proper operation of the package manager. Note you can also do this manually using an FTP client - to view a list of the affected files please click <a href="#" onclick="%1$s">here</a>.';
 $txt['package_ftp_why_file_list'] = 'The following files need to made writable to continue installation:';
-$txt['package_ftp_why_download'] = 'To download packages, the Packages directory and files in it need to be writable - and they are not currently.  The package manager can use your FTP information to fix this.';
+$txt['package_ftp_why_download'] = 'In order to download packages, the Packages directory, and any files in it, need to be writable.  Currently the system does not have the needed write permissions to this directory.  The package manager can use your FTP information to fix this problem.';
 $txt['package_ftp_server'] = 'FTP Server';
 $txt['package_ftp_port'] = 'Port';
 $txt['package_ftp_username'] = 'Username';
@@ -184,10 +191,12 @@ $txt['package_db_remove_table'] = 'Drop table &quot;%1$s&quot;';
 $txt['package_db_remove_column'] = 'Remove column &quot;%2$s&quot; from &quot;%1$s&quot;';
 $txt['package_db_remove_index'] = 'Remove index &quot;%1$s&quot; from &quot;%2$s&quot;';
 
-$txt['package_advanced_button'] = 'Advanced';
+$txt['package_advanced_button'] = 'Emulation Support';
 $txt['package_advanced_options'] = 'Advanced Options';
 $txt['package_apply'] = 'Apply';
 $txt['package_emulate'] = 'Emulate Version';
+$txt['package_emulate_install'] = 'Install Emulating:';
+$txt['package_emulate_uninstall'] = 'Uninstall Emulating:';
 $txt['package_emulate_revert'] = 'Revert';
 $txt['package_emulate_desc'] = 'Sometimes packages are locked to early versions of SMF but remain compatible with a newer version. Here you can choose to &quot;emulate&quot; a different SMF version within the package manager.';
 
@@ -263,5 +272,7 @@ $txt['package_confirm_go_back'] = 'Go back';
 
 $txt['package_readme_default'] = 'Default';
 $txt['package_available_readme_language'] = 'Available Readme Languages:';
+$txt['package_license_default'] = 'Default';
+$txt['package_available_license_language'] = 'Available License Languages:';
 
 ?>

+ 4 - 4
Themes/default/languages/Profile.english.php

@@ -22,7 +22,7 @@ $txt['age'] = 'Age';
 $txt['no_pic'] = '(no pic)';
 $txt['latest_posts'] = 'Latest posts of: ';
 $txt['additional_info'] = 'Additional Information';
-$txt['avatar_by_url'] = 'Specify your own avatar by URL. (e.g.: <em>http://www.mypage.com/mypic.gif</em>)';
+$txt['avatar_by_url'] = 'Specify your own avatar by URL. (e.g.: <em>http://www.mypage.com/mypic.png</em>)';
 $txt['my_own_pic'] = 'Specify avatar by URL';
 $txt['date_format'] = 'The format here will be used to show dates throughout this forum.';
 $txt['time_format'] = 'Time Format';
@@ -53,7 +53,7 @@ $txt['current_password'] = 'Current Password';
 // Don't use entities in the below string, except the main ones. (lt, gt, quot.)
 $txt['required_security_reasons'] = 'For security reasons, your current password is required to make changes to your account.';
 
-$txt['timeoffset_autodetect'] = '(auto detect)';
+$txt['timeoffset_autodetect'] = 'auto detect';
 
 $txt['secret_question'] = 'Secret Question';
 $txt['secret_desc'] = 'To help retrieve your password, enter a question here with an answer that <strong>only</strong> you know.';
@@ -78,7 +78,7 @@ $txt['reminder_openid_is'] = 'The OpenID identity associated with your account i
 $txt['reminder_continue'] = 'Continue';
 
 $txt['current_theme'] = 'Current Theme';
-$txt['change'] = '(change)';
+$txt['change'] = 'change';
 $txt['theme_preferences'] = 'Theme preferences';
 $txt['theme_forum_default'] = 'Forum or Board Default';
 $txt['theme_forum_default_desc'] = 'This is the default theme, which means your theme will change along with the administrator\'s settings and the board you are viewing.';
@@ -454,7 +454,7 @@ $txt['pm_display_mode_linked'] = 'As a conversation';
 $txt['pm_recommend_enable_outbox'] = 'To make the most of this setting we suggest you enable &quot;Save a copy of each Personal Message in my sent items by default&quot;\\n\\nThis will help ensure that the conversations flow better as you can see both sides of the conversation.';
 
 $txt['tracking'] = 'Tracking';
-$txt['tracking_description'] = 'This section allows you to review certain profile actions performed on this member\'s profile as well as track their IP address.';
+$txt['tracking_description'] = 'This section allows you to review certain profile actions performed on this member\'s profile as well as track their IP address and login history.';
 
 $txt['trackEdits'] = 'Profile Edits';
 $txt['trackEdit_deleted_member'] = 'Deleted Member';

+ 4 - 2
Themes/default/languages/Search.english.php

@@ -129,8 +129,8 @@ $txt['spider_agent'] = 'User Agent';
 $txt['spider_ip_info'] = 'IP Addresses';
 $txt['spiders_add'] = 'Add New Spider';
 $txt['spiders_edit'] = 'Edit Spider';
-$txt['spiders_remove_selected'] = 'Remove Selected Spiders';
-$txt['spider_remove_selected_confirm'] = 'Are you sure you wish to remove these spiders?\\n\\nAll associated statistics will also be deleted!';
+$txt['spiders_remove_selected'] = 'Remove Selected';
+$txt['spider_remove_selected_confirm'] = 'Are you sure you want to remove these spiders?\\n\\nAll associated statistics will also be deleted!';
 $txt['spiders_no_entries'] = 'There are currently no spiders configured.';
 
 $txt['add_spider_desc'] = 'From this page you can edit the parameters against which a spider is categorised. If a guest\'s user agent/IP address matches those entered below it will be detected as a search engine spider and tracked as per the forum preferences.';
@@ -144,6 +144,8 @@ $txt['spider_viewing'] = 'Viewing';
 $txt['spider_logs_empty'] = 'There are currently no spider log entries.';
 $txt['spider_logs_info'] = 'Note that logging of every spider action only occurs if tracking is set to either &quot;high&quot; or &quot;very high&quot;. Detail of every spiders action is only logged if tracking is set to &quot;very high&quot;.';
 $txt['spider_disabled'] = 'Disabled';
+$txt['spider_log_empty_log'] = 'Clear Log';
+$txt['spider_log_empty_log_confirm'] = 'Are you sure you want to completely clear the log';
 
 $txt['spider_logs_delete'] = 'Delete Entries';
 $txt['spider_logs_delete_older'] = 'Delete all entries older than';

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

@@ -3,7 +3,7 @@
 
 global $settings;
 
-$txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.gif';
+$txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.png';
 $txt['theme_description'] = 'The default theme from Simple Machines.<br /><br />Author: The Simple Machines Team';
 
 ?>

+ 3 - 0
Themes/default/languages/Who.english.php

@@ -141,6 +141,9 @@ $txt['credits_groups_marketing'] = 'Marketing';
 $txt['credits_groups_internationalizers'] = 'Localizers';
 $txt['credits_groups_servers'] = 'Servers Administrators';
 $txt['credits_groups_site'] = 'Site Administrators';
+$txt['credits_license'] = 'License';
+$txt['credits_copyright'] = 'Copyright';
+$txt['credits_version'] = 'Version';
 // Replace "English" with the name of this language pack in the string below.
 $txt['credits_groups_translation'] = 'English Translation';
 $txt['credits_groups_translators'] = 'Language Translators';

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

@@ -68,6 +68,7 @@ $txt['topics'] = 'Topics';
 $txt['modify_msg'] = 'Modify message';
 $txt['name'] = 'Name';
 $txt['email'] = 'Email';
+$txt['user_email_address'] = 'Email Address';
 $txt['subject'] = 'Subject';
 $txt['message'] = 'Message';
 $txt['redirects'] = 'Redirects';
@@ -286,6 +287,9 @@ $txt['www'] = 'WWW';
 $txt['by'] = 'by';
 
 $txt['hours'] = 'hours';
+$txt['minutes'] = 'minutes';
+$txt['seconds'] = 'seconds';
+
 // Used upper case in Paid subscriptions management
 $txt['hour'] = 'Hour';
 $txt['days_word'] = 'days';
@@ -293,6 +297,7 @@ $txt['days_word'] = 'days';
 $txt['newest_member'] = ', our newest member.';
 
 $txt['search_for'] = 'Search for';
+$txt['search_match'] = 'Match';
 
 $txt['aim'] = 'AIM';
 // In this string, please use +'s for spaces.
@@ -493,6 +498,7 @@ $txt['mail_send_unable'] = 'Unable to send mail to the email address \'%1$s\'';
 
 $txt['mlist_search'] = 'Search For Members';
 $txt['mlist_search_again'] = 'Search again';
+$txt['mlist_search_filter'] = 'Search Options';
 $txt['mlist_search_email'] = 'Search by email address';
 $txt['mlist_search_messenger'] = 'Search by messenger nickname';
 $txt['mlist_search_group'] = 'Search by position';

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

@@ -331,7 +331,7 @@ smf_ViewVersions.prototype.determineVersions = function ()
 
 function addNewWord()
 {
-	setOuterHTML(document.getElementById('moreCensoredWords'), '<div style="margin-top: 1ex;"><input type="text" name="censor_vulgar[]" size="20" class="input_text" /> => <input type="text" name="censor_proper[]" size="20" class="input_text" /><' + '/div><div id="moreCensoredWords"><' + '/div>');
+	setOuterHTML(document.getElementById('moreCensoredWords'), '<div style="margin-top: 1ex;"><input type="text" name="censor_vulgar[]" size="30" class="input_text" /> => <input type="text" name="censor_proper[]" size="30" class="input_text" /><' + '/div><div id="moreCensoredWords"><' + '/div>');
 }
 
 function toggleBBCDisabled(section, disable)

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

@@ -886,7 +886,7 @@ smc_Toggle.prototype.changeState = function(bCollapse, bInit)
 	if ('oCookieOptions' in this.opt && this.opt.oCookieOptions.bUseCookie)
 		this.oCookie.set(this.opt.oCookieOptions.sCookieName, this.bCollapsed ? '1' : '0');
 
-	if ('oThemeOptions' in this.opt && this.opt.oThemeOptions.bUseThemeSettings)
+	if (!bInit && 'oThemeOptions' in this.opt && this.opt.oThemeOptions.bUseThemeSettings)
 		smf_setThemeOption(this.opt.oThemeOptions.sOptionName, this.bCollapsed ? '1' : '0', 'sThemeId' in this.opt.oThemeOptions ? this.opt.oThemeOptions.sThemeId : null, smf_session_id, smf_session_var, 'sAdditionalVars' in this.opt.oThemeOptions ? this.opt.oThemeOptions.sAdditionalVars : null);
 }
 

+ 1 - 1
index.php

@@ -184,7 +184,7 @@ function smf_main()
 	// Load the current theme.  (note that ?theme=1 will also work, may be used for guest theming.)
 	else
 		loadTheme();
-
+	
 	// Check if the user should be disallowed access.
 	is_not_banned();
 

+ 26 - 6
other/Settings.php

@@ -114,7 +114,32 @@ $db_persist = 0;
  * 
  * @var int|bool
  */
-$db_error_send = 1;
+$db_error_send = 0;
+
+########## Cache Info ##########
+/**
+ * Select a cache system. You want to leave this up to the cache area of the admin panel for 
+ * proper detection of apc, eaccelerator, memcache, mmcache, output_cache, smf, or xcache 
+ * (you can add more with a mod).
+ * @var string
+ */
+$cache_accelerator = '';
+/**
+ * The level at which you would like to cache. Between 0 (off) through 3 (cache a lot).
+ * @var int
+ */
+$cache_enable = 0;
+/**
+ * This is only used for memcache / memcached. Should be a string of 'server:port,server:port'
+ * @var array
+ */
+$cache_memcached = '';
+/**
+ * This is only for the 'smf' file cache system. It is the path to the cache directory.
+ * It is also recommended that you place this in /tmp/ if you are going to use this.
+ * @var string
+ */
+$cachedir = dirname(__FILE__) . '/cache';
 
 ########## Directories/Files ##########
 # Note: These directories do not have to be changed unless you move things.
@@ -128,11 +153,6 @@ $boarddir = dirname(__FILE__);
  * @var string
  */
 $sourcedir = dirname(__FILE__) . '/Sources';
-/**
- * Path to the cache directory.
- * @var string
- */
-$cachedir = dirname(__FILE__) . '/cache';
 
 ########## Error-Catching ##########
 # Note: You shouldn't touch these settings.