Browse Source

Merge pull request #1433 from MissAllSunday/css/jsstuff

Css/jsstuff

Fix #1392
Jessica González 10 years ago
parent
commit
b02f201900
59 changed files with 144 additions and 89 deletions
  1. 4 1
      Sources/Admin.php
  2. 2 0
      Sources/BoardIndex.php
  3. 12 1
      Sources/Display.php
  4. 4 1
      Sources/Groups.php
  5. 6 6
      Sources/Load.php
  6. 5 0
      Sources/LogInOut.php
  7. 1 1
      Sources/ManageBans.php
  8. 1 0
      Sources/ManageBoards.php
  9. 2 0
      Sources/ManageMaintenance.php
  10. 2 0
      Sources/ManageMembergroups.php
  11. 2 0
      Sources/ManageNews.php
  12. 2 0
      Sources/ManagePaid.php
  13. 2 0
      Sources/ManageRegistration.php
  14. 5 2
      Sources/MessageIndex.php
  15. 4 1
      Sources/Packages.php
  16. 2 0
      Sources/PersonalMessage.php
  17. 7 0
      Sources/Profile-Modify.php
  18. 3 0
      Sources/Profile.php
  19. 6 0
      Sources/Register.php
  20. 5 0
      Sources/Reminder.php
  21. 3 0
      Sources/Search.php
  22. 1 0
      Sources/Security.php
  23. 1 0
      Sources/Stats.php
  24. 5 0
      Sources/Subs-Auth.php
  25. 2 2
      Sources/Subs.php
  26. 0 1
      Themes/default/Admin.template.php
  27. 0 1
      Themes/default/BoardIndex.template.php
  28. 1 4
      Themes/default/Display.template.php
  29. 2 2
      Themes/default/Errors.template.php
  30. 2 2
      Themes/default/GenericControls.template.php
  31. 5 5
      Themes/default/Help.template.php
  32. 3 3
      Themes/default/Likes.template.php
  33. 5 6
      Themes/default/Login.template.php
  34. 0 2
      Themes/default/ManageBans.template.php
  35. 0 1
      Themes/default/ManageBoards.template.php
  36. 0 1
      Themes/default/ManageMaintenance.template.php
  37. 0 2
      Themes/default/ManageMembergroups.template.php
  38. 0 1
      Themes/default/ManageNews.template.php
  39. 0 1
      Themes/default/ManagePaid.template.php
  40. 1 1
      Themes/default/ManageSmileys.template.php
  41. 0 1
      Themes/default/MessageIndex.template.php
  42. 2 2
      Themes/default/ModerationCenter.template.php
  43. 5 6
      Themes/default/Packages.template.php
  44. 0 2
      Themes/default/PersonalMessage.template.php
  45. 6 6
      Themes/default/Post.template.php
  46. 0 11
      Themes/default/Profile.template.php
  47. 2 4
      Themes/default/Register.template.php
  48. 1 3
      Themes/default/Reminder.template.php
  49. 2 2
      Themes/default/Reports.template.php
  50. 0 1
      Themes/default/Search.template.php
  51. 0 1
      Themes/default/Stats.template.php
  52. 2 2
      Themes/default/Wireless.template.php
  53. 1 0
      other/install_2-1_mysql.sql
  54. 1 0
      other/install_2-1_postgresql.sql
  55. 1 0
      other/install_2-1_sqlite.sql
  56. 1 0
      other/install_2-1_sqlite3.sql
  57. 4 0
      other/upgrade_2-1_mysql.sql
  58. 4 0
      other/upgrade_2-1_postgresql.sql
  59. 4 0
      other/upgrade_2-1_sqlite.sql

+ 4 - 1
Sources/Admin.php

@@ -29,7 +29,7 @@ function AdminMain()
 	// Load the language and templates....
 	loadLanguage('Admin');
 	loadTemplate('Admin', 'admin');
-	loadJavascriptFile('admin.js', array('default_theme' => true), 'admin.js');
+	loadJavascriptFile('admin.js', array('default_theme' => true), 'smf_admin');
 
 	// No indexing evil stuff.
 	$context['robot_no_index'] = true;
@@ -561,6 +561,9 @@ function AdminHome()
 		'http://www.simplemachines.org/redirect/smf_support',
 		'http://www.simplemachines.org/redirect/customize_support'
 	);
+
+	if ($context['admin_area'] == 'admin')
+		loadJavascriptFile('admin.js', array('default_theme' => true, 'defer' => false), 'smf_admin');
 }
 
 /**

+ 2 - 0
Sources/BoardIndex.php

@@ -130,6 +130,8 @@ function BoardIndex()
 
 	// Allow mods to add additional buttons here
 	call_integration_hook('integrate_mark_read_button');
+
+	loadJavascriptFile('fader.js', array('default_theme' => true, 'defer' => false), 'smf_fader');
 }
 
 /**

+ 12 - 1
Sources/Display.php

@@ -1137,7 +1137,7 @@ function Display()
 		$context['wireless_moderate'] = isset($_GET['moderate']) ? ';moderate' : '';
 	}
 
-	// You can't link an existing topoic to the calendar unless you can modify the first post...
+	// You can't link an existing topic to the calendar unless you can modify the first post...
 	$context['calendar_post'] &= allowedTo('modify_any') || (allowedTo('modify_own') && $context['user']['started']);
 
 	// Load up the "double post" sequencing magic.
@@ -1208,6 +1208,17 @@ function Display()
 	call_integration_hook('integrate_display_buttons', array(&$context['normal_buttons']));
 	// Note: integrate_mod_buttons is no more necessary and deprecated, but is kept for backward compatibility with 2.0
 	call_integration_hook('integrate_mod_buttons', array(&$context['mod_buttons']));
+
+	// Load the drafts js file
+	if ($context['drafts_autosave'])
+		loadJavascriptFile('drafts.js', array('default_theme' => true, 'defer' => false), 'smf_drafts');
+
+	// Spellcheck
+	if ($context['show_spellchecking'])
+		loadJavascriptFile('spellcheck.js', array('default_theme' => true, 'defer' => false), 'smf_spellcheck');
+
+	// topic.js
+	loadJavascriptFile('topic.js', array('default_theme' => true, 'defer' => false), 'smf_topic');
 }
 
 /**

+ 4 - 1
Sources/Groups.php

@@ -434,6 +434,9 @@ function MembergroupMembers()
 	$context['sub_template'] = 'group_members';
 	$context['page_title'] = $txt['membergroups_members_title'] . ': ' . $context['group']['name'];
 	createToken('mod-mgm');
+
+	if ($context['group']['assignable'])
+		loadJavascriptFile('suggest.js', array('default_theme' => true, 'defer' => false), 'smf_suggest');
 }
 
 /**
@@ -804,7 +807,7 @@ function list_getGroupRequestCount($where, $where_parameters)
  * @param int $start The result to start with
  * @param int $items_per_page The number of items per page
  * @param string $sort An SQL sort expression (column/direction)
- * @param string $where Data for the WHERE clause 
+ * @param string $where Data for the WHERE clause
  * @param string $where_parameters Parameter values to be inerted into the WHERE clause
  * @return array An array of group requests
  * Each group request has:

+ 6 - 6
Sources/Load.php

@@ -1811,7 +1811,7 @@ function loadTheme($id_theme = 0, $initialize = true)
 	loadJavascriptFile('smf_jquery_plugins.js', array('default_theme' => true));
 
 	// script.js and theme.js, always required, so always add them! Makes index.template.php cleaner and all.
-	loadJavascriptFile('script.js', array('default_theme' => true), 'smf_scripts');
+	loadJavascriptFile('script.js', array('default_theme' => true, 'defer' => false), 'smf_scripts');
 	loadJavascriptFile('theme.js', array(), 'theme_scripts');
 
 	// If we think we have mail to send, let's offer up some possibilities... robots get pain (Now with scheduled task support!)
@@ -2007,9 +2007,9 @@ function loadSubTemplate($sub_template_name, $fatal = false)
  */
 function loadCSSFile($filename, $params = array(), $id = '')
 {
-	global $settings, $context;
+	global $settings, $context, $modSettings;
 
-	$params['seed'] = (!isset($params['seed']) || $params['seed'] === true) ? '?alph21' : (is_string($params['seed']) ? ($params['seed'] = $params['seed'][0] === '?' ? $params['seed'] : '?' . $params['seed']) : '');
+	$params['seed'] = (!isset($params['seed']) || $params['seed'] === true) ? $modSettings['browser_cache'] : (is_string($params['seed']) ? ($params['seed'] = $params['seed'][0] === '?' ? $params['seed'] : '?' . $params['seed']) : '');
 	$params['force_current'] = !empty($params['force_current']) ? $params['force_current'] : false;
 	$theme = !empty($params['default_theme']) ? 'default_theme' : 'theme';
 
@@ -2056,13 +2056,13 @@ function loadCSSFile($filename, $params = array(), $id = '')
  *  - ['validate'] (true/false): if true script will validate the local file exists
  *  - ['seed'] (true/false/string): if true or null, use cache stale, false do not, or used a supplied string
  *
- * @param string $id An ID to stik on the end of the filename
+ * @param string $id An ID to stick on the end of the filename
  */
 function loadJavascriptFile($filename, $params = array(), $id = '')
 {
-	global $settings, $context;
+	global $settings, $context, $modSettings;
 
-	$params['seed'] = (!isset($params['seed']) || $params['seed'] === true) ? '?alph21' : (is_string($params['seed']) ? ($params['seed'] = $params['seed'][0] === '?' ? $params['seed'] : '?' . $params['seed']) : '');
+	$params['seed'] = (!isset($params['seed']) || $params['seed'] === true) ? $modSettings['browser_cache'] : (is_string($params['seed']) ? ($params['seed'] = $params['seed'][0] === '?' ? $params['seed'] : '?' . $params['seed']) : '');
 	$params['force_current'] = !empty($params['force_current']) ? $params['force_current'] : false;
 	$theme = !empty($params['default_theme']) ? 'default_theme' : 'theme';
 

+ 5 - 0
Sources/LogInOut.php

@@ -42,6 +42,7 @@ function Login()
 	{
 		loadLanguage('Login');
 		loadTemplate('Login');
+
 		$context['sub_template'] = 'login';
 
 		if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
@@ -69,6 +70,9 @@ function Login()
 	else
 		unset($_SESSION['login_url']);
 
+	// Need some js goodies.
+	loadJavascriptFile('sha1.js', array('default_theme' => true), 'smf_sha1');
+
 	// Create a one time token.
 	createToken('login');
 }
@@ -173,6 +177,7 @@ function Login2()
 		$context['sub_template'] = 'login';
 	}
 
+
 	// Set up the default/fallback stuff.
 	$context['default_username'] = isset($_POST['user']) ? preg_replace('~&#(\\d{1,7}|x[0-9a-fA-F]{1,6});~', '&#\\1;', $smcFunc['htmlspecialchars']($_POST['user'])) : '';
 	$context['default_password'] = '';

+ 1 - 1
Sources/ManageBans.php

@@ -1641,7 +1641,7 @@ function BanEditTrigger()
 		redirectexit('action=admin;area=ban;sa=edit' . (!empty($ban_group) ? ';bg=' . $ban_group : ''));
 	}
 
-	loadJavascriptFile('suggest.js', array('default_theme' => true), 'suggest.js');
+	loadJavascriptFile('suggest.js', array('default_theme' => true), 'smf_suggest');
 
 	if (empty($ban_id))
 	{

+ 1 - 0
Sources/ManageBoards.php

@@ -596,6 +596,7 @@ function EditBoard()
 	{
 		$context['sub_template'] = 'modify_board';
 		$context['page_title'] = $txt['boardsEdit'];
+		loadJavascriptFile('suggest.js', array('default_theme' => true, 'defer' => false), 'smf_suggest');
 	}
 	else
 	{

+ 2 - 0
Sources/ManageMaintenance.php

@@ -197,6 +197,8 @@ function MaintainMembers()
 
 	if (isset($_GET['done']) && $_GET['done'] == 'recountposts')
 		$context['maintenance_finished'] = $txt['maintain_recountposts'];
+
+	loadJavascriptFile('suggest.js', array('default_theme' => true, 'defer' => false), 'smf_suggest');
 }
 
 /**

+ 2 - 0
Sources/ManageMembergroups.php

@@ -1172,6 +1172,8 @@ function EditMembergroup()
 	if (!empty($context['possible_icons']))
 		loadJavascriptFile('icondropdown.js', array('validate' => true));
 
+		loadJavascriptFile('suggest.js', array('default_theme' => true, 'defer' => false), 'smf_suggest');
+
 	// Finally, get all the groups this could be inherited off.
 	$request = $smcFunc['db_query']('', '
 		SELECT id_group, group_name

+ 2 - 0
Sources/ManageNews.php

@@ -424,6 +424,8 @@ function SelectMailingMembers()
 	$smcFunc['db_free_result']($request);
 
 	$context['can_send_pm'] = allowedTo('pm_send');
+
+	loadJavascriptFile('suggest.js', array('default_theme' => true, 'defer' => false), 'smf_suggest');
 }
 
 /**

+ 2 - 0
Sources/ManagePaid.php

@@ -1345,6 +1345,8 @@ function ModifyUserSubscription()
 		$context['sub']['start']['last_day'] = (int) strftime('%d', mktime(0, 0, 0, $context['sub']['start']['month'] == 12 ? 1 : $context['sub']['start']['month'] + 1, 0, $context['sub']['start']['month'] == 12 ? $context['sub']['start']['year'] + 1 : $context['sub']['start']['year']));
 		$context['sub']['end']['last_day'] = (int) strftime('%d', mktime(0, 0, 0, $context['sub']['end']['month'] == 12 ? 1 : $context['sub']['end']['month'] + 1, 0, $context['sub']['end']['month'] == 12 ? $context['sub']['end']['year'] + 1 : $context['sub']['end']['year']));
 	}
+
+	loadJavascriptFile('suggest.js', array('default_theme' => true, 'defer' => false), 'smf_suggest');
 }
 
 /**

+ 2 - 0
Sources/ManageRegistration.php

@@ -156,10 +156,12 @@ function AdminRegister()
 	}
 	else
 		$context['member_groups'] = array();
+
 	// Basic stuff.
 	$context['sub_template'] = 'admin_register';
 	$context['page_title'] = $txt['registration_center'];
 	createToken('admin-regc');
+	loadJavascriptFile('register.js', array('default_theme' => true, 'defer' => false), 'smf_register');
 }
 
 /**

+ 5 - 2
Sources/MessageIndex.php

@@ -559,7 +559,7 @@ function MessageIndex()
 		{
 			// We'll use this in a minute
 			$boards_allowed = boardsAllowedTo('post_new');
-			
+
 			// How many boards can you do this on besides this one?
 			$context['can_move_any'] = count($boards_allowed) > 1;
 		}
@@ -685,6 +685,9 @@ function MessageIndex()
 	// Allow adding new buttons easily.
 	// Note: $context['normal_buttons'] is added for backward compatibility with 2.0, but is deprecated and should not be used
 	call_integration_hook('integrate_messageindex_buttons', array(&$context['normal_buttons']));
+
+	// Javascript for inline editing.
+	loadJavascriptFile('topic.js', array('default_theme' => true, 'defer' => false), 'smf_topic');
 }
 
 /**
@@ -826,7 +829,7 @@ function QuickModeration()
 			)
 		);
 		while ($row = $smcFunc['db_fetch_assoc']($request))
-		{		
+		{
 			if (!empty($board))
 			{
 				if ($row['id_board'] != $board || ($modSettings['postmod_active'] && !$row['approved'] && !allowedTo('approve_posts')))

+ 4 - 1
Sources/Packages.php

@@ -86,6 +86,9 @@ function Packages()
 		),
 	);
 
+	if ($context['sub_action'] == 'browse')
+		loadJavascriptFile('suggest.js', array('default_theme' => true, 'defer' => false), 'smf_suggest');
+
 	// Call the function we're handing control to.
 	$subActions[$context['sub_action']]();
 }
@@ -1927,7 +1930,7 @@ function ViewOperations()
 					'install_id' => $install_id,
 				)
 			);
-			
+
 			if ($smcFunc['db_num_rows']($request) == 1)
 			{
 				list ($old_themes) = $smcFunc['db_fetch_row']($request);

+ 2 - 0
Sources/PersonalMessage.php

@@ -1753,6 +1753,8 @@ function MessagePost()
 	if (!WIRELESS)
 	{
 		loadTemplate('PersonalMessage');
+		loadJavascriptFile('PersonalMessage.js', array('default_theme' => true, 'defer' => false), 'smf_pms');
+		loadJavascriptFile('suggest.js', array('default_theme' => true, 'defer' => false), 'smf_suggest');
 		$context['sub_template'] = 'send';
 	}
 

+ 7 - 0
Sources/Profile-Modify.php

@@ -1300,6 +1300,8 @@ function editBuddyIgnoreLists($memID)
 		),
 	);
 
+	loadJavascriptFile('suggest.js', array('default_theme' => true, 'defer' => false), 'smf_suggest');
+
 	// Pass on to the actual function.
 	$context['sub_template'] = $subActions[$context['list_area']][0];
 	$subActions[$context['list_area']][0]($memID);
@@ -1819,6 +1821,7 @@ function authentication($memID, $saving = false)
 	$context['member']['openid_uri'] = $cur_profile['openid_uri'];
 	$context['auth_method'] = empty($cur_profile['openid_uri']) ? 'password' : 'openid';
 	$context['sub_template'] = 'authentication_method';
+	loadJavascriptFile('register.js', array('default_theme' => true, 'defer' => false), 'smf_register');
 }
 
 /**
@@ -2738,6 +2741,10 @@ function profileLoadSignatureData()
 		$context['member']['signature'] = $_POST['signature'];
 	}
 
+	// Load the spell checker?
+	if ($context['show_spellchecking'])
+		loadJavascriptFile('spellcheck.js', array('default_theme' => true, 'defer' => false), 'smf_spellcheck');
+
 	return true;
 }
 

+ 3 - 0
Sources/Profile.php

@@ -564,6 +564,9 @@ function ModifyProfile($post_errors = array())
 	if (WIRELESS && $context['sub_template'] == 'summary' && WIRELESS_PROTOCOL != 'wap')
 		$context['sub_template'] = WIRELESS_PROTOCOL . '_profile';
 
+	if (!WIRELESS)
+		loadJavascriptFile('profile.js', array('default_theme' => true, 'defer' => false), 'smf_profile');
+
 	// These will get populated soon!
 	$post_errors = array();
 	$profile_vars = array();

+ 6 - 0
Sources/Register.php

@@ -89,6 +89,10 @@ function Register($reg_errors = array())
 	$context['sub_template'] = $current_step == 1 ? 'registration_agreement' : 'registration_form';
 	$context['page_title'] = $current_step == 1 ? $txt['registration_agreement'] : $txt['registration_form'];
 
+	// Kinda need this.
+	if ($context['sub_template'] == 'registration_form')
+		loadJavascriptFile('register.js', array('default_theme' => true, 'defer' => false), 'smf_register');
+
 	// Add the register chain to the link tree.
 	$context['linktree'][] = array(
 		'url' => $scripturl . '?action=register',
@@ -697,6 +701,8 @@ function Activate()
 		'never_expire' => false,
 		'description' => $txt['activate_success']
 	);
+
+	loadJavascriptFile('sha1.js', array('default_theme' => true), 'smf_sha1');
 }
 
 /**

+ 5 - 0
Sources/Reminder.php

@@ -188,6 +188,8 @@ function setPassword()
 		'memID' => (int) $_REQUEST['u']
 	);
 
+	loadJavascriptFile('register.js', array('default_theme' => true, 'defer' => false), 'smf_register');
+
 	// Tokens!
 	createToken('remind-sp');
 }
@@ -270,6 +272,8 @@ function setPassword2()
 		'never_expire' => false,
 		'description' => $txt['reminder_password_set']
 	);
+
+	loadJavascriptFile('sha1.js', array('default_theme' => true), 'smf_sha1');
 	createToken('login');
 }
 
@@ -316,6 +320,7 @@ function SecretAnswerInput()
 
 	$context['sub_template'] = 'ask';
 	createToken('remind-sai');
+	loadJavascriptFile('register.js', array('default_theme' => true, 'defer' => false), 'smf_register');
 }
 
 function SecretAnswer2()

+ 3 - 0
Sources/Search.php

@@ -45,7 +45,10 @@ function PlushSearch1()
 	loadLanguage('Search');
 	// Don't load this in XML mode.
 	if (!isset($_REQUEST['xml']))
+	{
 		loadTemplate('Search');
+		loadJavascriptFile('suggest.js', array('default_theme' => true, 'defer' => false), 'smf_suggest');
+	}
 
 	// Check the user's permissions.
 	isAllowedTo('search_posts');

+ 1 - 0
Sources/Security.php

@@ -155,6 +155,7 @@ function is_not_guest($message = '')
 	else
 	{
 		loadTemplate('Login');
+		loadJavascriptFile('sha1.js', array('default_theme' => true), 'smf_sha1');
 		$context['sub_template'] = 'kick_guest';
 		$context['robot_no_index'] = true;
 	}

+ 1 - 0
Sources/Stats.php

@@ -70,6 +70,7 @@ function DisplayStats()
 
 	loadLanguage('Stats');
 	loadTemplate('Stats');
+	loadJavascriptFile('stats.js', array('default_theme' => true, 'defer' => false), 'smf_stats');
 
 	// Build the link tree......
 	$context['linktree'][] = array(

+ 5 - 0
Sources/Subs-Auth.php

@@ -158,6 +158,9 @@ function KickGuest()
 	loadTemplate('Login');
 	createToken('login');
 
+	// Need some js goodies.
+	loadJavascriptFile('sha1.js', array('default_theme' => true), 'smf_sha1');
+
 	// Never redirect to an attachment
 	if (strpos($_SERVER['REQUEST_URL'], 'dlattach') === false)
 		$_SESSION['login_url'] = $_SERVER['REQUEST_URL'];
@@ -178,6 +181,7 @@ function InMaintenance()
 	loadLanguage('Login');
 	loadTemplate('Login');
 	createToken('login');
+	loadJavascriptFile('sha1.js', array('default_theme' => true), 'smf_sha1');
 
 	// Send a 503 header, so search engines don't bother indexing while we're in maintenance mode.
 	header('HTTP/1.1 503 Service Temporarily Unavailable');
@@ -203,6 +207,7 @@ function adminLogin($type = 'admin')
 
 	loadLanguage('Admin');
 	loadTemplate('Login');
+	loadJavascriptFile('sha1.js', array('default_theme' => true), 'smf_sha1');
 
 	// Validate what type of session check this is.
 	$types = array();

+ 2 - 2
Sources/Subs.php

@@ -3347,7 +3347,7 @@ function template_css()
 		// Try to keep only what's useful.
 		$repl = array($boardurl . '/Themes/' => '', $boardurl . '/' => '');
 		foreach ($context['css_files'] as $file)
-			$context['debug']['sheets'][] = strtr($file['filename'], $repl); 
+			$context['debug']['sheets'][] = strtr($file['filename'], $repl);
 	}
 
 	if (!empty($context['css_header']))
@@ -3715,7 +3715,7 @@ function setupMenuContext()
 	if (!isset($context['allow_calendar_event']))
 	{
 		$context['allow_calendar_event'] = $context['allow_calendar'] && allowedTo('calendar_post');
-		
+
 		// If you don't allow events not linked to posts and you're not an admin, we have more work to do...
 		if ($context['allow_calendar'] && $context['allow_calendar_event'] && empty($modSettings['cal_allow_unlinked']) && !$user_info['is_admin'])
 		{

+ 0 - 1
Themes/default/Admin.template.php

@@ -112,7 +112,6 @@ function template_admin()
 
 	// This sets the announcements and current versions themselves ;).
 	echo '
-					<script src="', $settings['default_theme_url'], '/scripts/admin.js?alp21"></script>
 					<script><!-- // --><![CDATA[
 						var oAdminIndex = new smf_AdminIndex({
 							sSelf: \'oAdminCenter\',

+ 0 - 1
Themes/default/BoardIndex.template.php

@@ -38,7 +38,6 @@ function template_newsfader()
 					</ul>
 				</div>
 			</div>
-			<script src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
 			<script><!-- // --><![CDATA[
 				// Create a news fader object.
 				var oNewsFader = new smc_NewsFader({

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

@@ -331,7 +331,6 @@ function template_main()
 	// draft autosave available and the user has it enabled?
 	if (!empty($context['drafts_autosave']) && !empty($options['drafts_autosave_enabled']))
 		echo '
-			<script src="', $settings['default_theme_url'], '/scripts/drafts.js?alp21"></script>
 			<script><!-- // --><![CDATA[
 				var oDraftAutoSave = new smf_DraftAutoSave({
 					sSelf: \'oDraftAutoSave\',
@@ -346,11 +345,9 @@ function template_main()
 
 	if ($context['show_spellchecking'])
 		echo '
-			<form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow"><input type="hidden" name="spellstring" value=""></form>
-				<script src="', $settings['default_theme_url'], '/scripts/spellcheck.js"></script>';
+			<form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow"><input type="hidden" name="spellstring" value=""></form>';
 
 	echo '
-				<script src="', $settings['default_theme_url'], '/scripts/topic.js"></script>
 				<script><!-- // --><![CDATA[';
 
 	if (!empty($context['some_likes']))

+ 2 - 2
Themes/default/Errors.template.php

@@ -192,14 +192,14 @@ function template_error_log()
 
 function template_show_file()
 {
-	global $context, $settings;
+	global $context, $settings, $modSettings;
 
 	echo '<!DOCTYPE html>
 <html', $context['right_to_left'] ? ' dir="rtl"' : '', '>
 	<head>
 		<title>', $context['file_data']['file'], '</title>
 		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '">
-		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21">
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
 	</head>
 	<body>
 		<table class="errorfile_table">';

+ 2 - 2
Themes/default/GenericControls.template.php

@@ -169,7 +169,7 @@ function template_control_richedit_buttons($editor_id)
 			<span id="throbber" style="display:none"><img src="' . $settings['images_url'] . '/loading_sm.gif" alt="" class="centericon">&nbsp;</span>
 			<span id="draft_lastautosave" ></span>
 		</span>
-		<script src="', $settings['default_theme_url'], '/scripts/drafts.js?alp21"></script>
+		<script src="', $settings['default_theme_url'], '/scripts/drafts.js', $modSettings['browser_cache'] ,'"></script>
 		<script><!-- // --><![CDATA[
 			var oDraftAutoSave = new smf_DraftAutoSave({
 				sSelf: \'oDraftAutoSave\',
@@ -197,7 +197,7 @@ function template_control_richedit_buttons($editor_id)
 			<span id="throbber" style="display:none"><img src="' . $settings['images_url'] . '/loading_sm.gif" alt="" class="centericon">&nbsp;</span>
 			<span id="draft_lastautosave" ></span>
 		</span>
-		<script src="', $settings['default_theme_url'], '/scripts/drafts.js?alp21"></script>
+		<script src="', $settings['default_theme_url'], '/scripts/drafts.js', $modSettings['browser_cache'] ,'"></script>
 		<script><!-- // --><![CDATA[
 			var oDraftAutoSave = new smf_DraftAutoSave({
 				sSelf: \'oDraftAutoSave\',

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

@@ -12,7 +12,7 @@
 
 function template_popup()
 {
-	global $context, $settings, $txt;
+	global $context, $settings, $txt, $modSettings;
 
 	// Since this is a popup of its own we need to start the html, etc.
 	echo '<!DOCTYPE html>
@@ -21,8 +21,8 @@ function template_popup()
 		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '">
 		<meta name="robots" content="noindex">
 		<title>', $context['page_title'], '</title>
-		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21">
-		<script src="', $settings['default_theme_url'], '/scripts/script.js"></script>
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
 	</head>
 	<body id="help_popup">
 		<div class="windowbg description">
@@ -44,8 +44,8 @@ function template_find_members()
 		<title>', $txt['find_members'], '</title>
 		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '">
 		<meta name="robots" content="noindex">
-		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21">
-		<script src="', $settings['default_theme_url'], '/scripts/script.js"></script>
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
 		<script><!-- // --><![CDATA[
 			var membersAdded = [];
 			function addMember(name)

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

@@ -12,7 +12,7 @@
 
 function template_popup()
 {
-	global $context, $settings, $txt;
+	global $context, $settings, $txt, $modSettings;
 
 	// Since this is a popup of its own we need to start the html, etc.
 	echo '<!DOCTYPE html>
@@ -21,8 +21,8 @@ function template_popup()
 		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '">
 		<meta name="robots" content="noindex">
 		<title>', $context['page_title'], '</title>
-		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21">
-		<script src="', $settings['default_theme_url'], '/scripts/script.js"></script>
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
 	</head>
 	<body id="likes_popup">
 		<div class="windowbg">

+ 5 - 6
Themes/default/Login.template.php

@@ -15,9 +15,12 @@ function template_login()
 {
 	global $context, $settings, $scripturl, $modSettings, $txt;
 
-	echo '
-		<script src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
+	// AJAX request?
+	if ($context['from_ajax'])
+		echo '
+		<script src="', $settings['default_theme_url'], '/scripts/sha1.js', $modSettings['browser_cache'] ,'"></script>';
 
+	echo '
 		<div class="tborder login">
 			<div class="cat_bar">
 				<h3 class="catbg">
@@ -97,7 +100,6 @@ function template_kick_guest()
 
 	// This isn't that much... just like normal login but with a message at the top.
 	echo '
-	<script src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
 	<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" name="frmLogin" id="frmLogin"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\', \'' . (!empty($context['login_token']) ? $context['login_token'] : '') . '\');"' : '', '>
 		<div class="tborder login">
 			<div class="cat_bar">
@@ -169,7 +171,6 @@ function template_maintenance()
 
 	// Display the administrator's message at the top.
 	echo '
-<script src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
 <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\', \'' . (!empty($context['login_token']) ? $context['login_token'] : '') . '\');"' : '', '>
 	<div class="tborder login" id="maintenance_mode">
 		<div class="cat_bar">
@@ -210,8 +211,6 @@ function template_admin_login()
 
 	// Since this should redirect to whatever they were doing, send all the get data.
 	echo '
-<script src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
-
 <form action="', $scripturl, $context['get_data'], '" method="post" accept-charset="', $context['character_set'], '" name="frmLogin" id="frmLogin" onsubmit="hash', ucfirst($context['sessionCheckType']), 'Password(this, \'', $context['user']['username'], '\', \'', $context['session_id'], '\', \'' . (!empty($context['login_token']) ? $context['login_token'] : '') . '\');">
 	<div class="tborder login" id="admin_login">
 		<div class="cat_bar">

+ 0 - 2
Themes/default/ManageBans.template.php

@@ -299,8 +299,6 @@ function template_ban_edit_trigger()
 			<input type="hidden" name="', $context['admin-bet_token_var'], '" value="', $context['admin-bet_token'], '">
 		</form>
 	</div>
-
-	<script src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
 	<script><!-- // --><![CDATA[
 		var oAddMemberSuggest = new smc_AutoSuggest({
 			sSelf: \'oAddMemberSuggest\',

+ 0 - 1
Themes/default/ManageBoards.template.php

@@ -574,7 +574,6 @@ function template_modify_board()
 		</form>
 	</div>
 
-<script src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
 <script><!-- // --><![CDATA[
 	var oModeratorSuggest = new smc_AutoSuggest({
 		sSelf: \'oModeratorSuggest\',

+ 0 - 1
Themes/default/ManageMaintenance.template.php

@@ -342,7 +342,6 @@ function template_maintain_members()
 		</div>
 	</div>
 
-	<script src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
 	<script><!-- // --><![CDATA[
 		var oAttributeMemberSuggest = new smc_AutoSuggest({
 			sSelf: \'oAttributeMemberSuggest\',

+ 0 - 2
Themes/default/ManageMembergroups.template.php

@@ -333,7 +333,6 @@ function template_edit_group()
 			<input type="hidden" name="', $context['admin-mmg_token_var'], '" value="', $context['admin-mmg_token'], '">
 		</form>
 	</div>
-		<script src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
 		<script><!-- // --><![CDATA[
 			var oModeratorSuggest = new smc_AutoSuggest({
 				sSelf: \'oModeratorSuggest\',
@@ -681,7 +680,6 @@ function template_group_members()
 
 	if (!empty($context['group']['assignable']))
 		echo '
-		<script src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
 		<script><!-- // --><![CDATA[
 			var oAddMemberSuggest = new smc_AutoSuggest({
 				sSelf: \'oAddMemberSuggest\',

+ 0 - 1
Themes/default/ManageNews.template.php

@@ -148,7 +148,6 @@ function template_email_members()
 			]
 		});
 	// ]]></script>
-	<script src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
 	<script><!-- // --><![CDATA[
 		var oMemberSuggest = new smc_AutoSuggest({
 			sSelf: \'oMemberSuggest\',

+ 0 - 1
Themes/default/ManagePaid.template.php

@@ -339,7 +339,6 @@ function template_modify_user_subscription()
 			</div>
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
 		</form>
-		<script src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
 		<script><!-- // --><![CDATA[
 		var oAddMemberSuggest = new smc_AutoSuggest({
 			sSelf: \'oAddMemberSuggest\',

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

@@ -39,7 +39,7 @@ function template_editsets()
 
 	if (empty($modSettings['disable_smf_js']))
 		echo '
-	<script src="', $scripturl, '?action=viewsmfile;filename=latest-smileys.js"></script>';
+	<script src="', $scripturl, '?action=viewsmfile;filename=latest-smileys.js', $modSettings['browser_cache'] ,'"></script>';
 
 	echo '
 	<script><!-- // --><![CDATA[

+ 0 - 1
Themes/default/MessageIndex.template.php

@@ -391,7 +391,6 @@ function template_main()
 
 	// Javascript for inline editing.
 	echo '
-<script src="', $settings['default_theme_url'], '/scripts/topic.js"></script>
 <script><!-- // --><![CDATA[
 	var oQuickModifyTopic = new QuickModifyTopic({
 		aHidePrefixes: Array("lockicon", "stickyicon", "pages", "newicon"),

+ 2 - 2
Themes/default/ModerationCenter.template.php

@@ -564,7 +564,7 @@ function template_moderation_settings()
 // Show a notice sent to a user.
 function template_show_notice()
 {
-	global $txt, $settings, $context;
+	global $txt, $settings, $context, $modSettings;
 
 	// We do all the HTML for this one!
 	echo '<!DOCTYPE html>
@@ -572,7 +572,7 @@ function template_show_notice()
 	<head>
 		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '">
 		<title>', $context['page_title'], '</title>
-		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21">
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
 	</head>
 	<body>
 		<div class="cat_bar">

+ 5 - 6
Themes/default/Packages.template.php

@@ -664,7 +664,6 @@ function template_browse()
 			]
 		});
 	// ]]></script>
-	<script src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
 	<script><!-- // --><![CDATA[
 			var oAddVersionSuggest = new smc_AutoSuggest({
 			sSelf: \'oAddVersionSuggest\',
@@ -1273,17 +1272,17 @@ function template_ftp_required()
 
 function template_view_operations()
 {
-	global $context, $txt, $settings;
+	global $context, $txt, $settings, $modSettings;
 
 	echo '<!DOCTYPE html>
 <html', $context['right_to_left'] ? ' dir="rtl"' : '', '>
 	<head>
 		<title>', $txt['operation_title'], '</title>
 		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '">
-		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21">
-		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/admin.css?alp21">
-		<script src="', $settings['default_theme_url'], '/scripts/script.js?alp21"></script>
-		<script src="', $settings['default_theme_url'], '/scripts/theme.js?alp21"></script>
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/admin.css', $modSettings['browser_cache'] ,'">
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
+		<script src="', $settings['default_theme_url'], '/scripts/theme.js', $modSettings['browser_cache'] ,'"></script>
 	</head>
 	<body>
 		<div class="padding windowbg">

+ 0 - 2
Themes/default/PersonalMessage.template.php

@@ -1267,8 +1267,6 @@ function template_send()
 	</div><br class="clear">';
 
 	echo '
-		<script src="', $settings['default_theme_url'], '/scripts/PersonalMessage.js?alp21"></script>
-		<script src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
 		<script><!-- // --><![CDATA[
 			var oPersonalMessageSend = new smf_PersonalMessageSend({
 				sSelf: \'oPersonalMessageSend\',

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

@@ -916,7 +916,7 @@ function template_main()
 // The template for the spellchecker.
 function template_spellcheck()
 {
-	global $context, $settings, $txt;
+	global $context, $settings, $txt, $modSettings;
 
 	// The style information that makes the spellchecker look... like the forum hopefully!
 	echo '<!DOCTYPE html>
@@ -924,7 +924,7 @@ function template_spellcheck()
 	<head>
 		<title>', $txt['spell_check'], '</title>
 		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '">
-		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css?alp21">
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
 		<style type="text/css">
 			body, td
 			{
@@ -957,8 +957,8 @@ function template_spellcheck()
 			var spell_formname = window.opener.spell_formname;
 			var spell_fieldname = window.opener.spell_fieldname;
 		// ]]></script>
-		<script src="', $settings['default_theme_url'], '/scripts/spellcheck.js"></script>
-		<script src="', $settings['default_theme_url'], '/scripts/script.js"></script>
+		<script src="', $settings['default_theme_url'], '/scripts/spellcheck.js', $modSettings['browser_cache'] ,'"></script>
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
 		<script><!-- // --><![CDATA[
 			', $context['spell_js'], '
 		// ]]></script>
@@ -990,14 +990,14 @@ function template_spellcheck()
 
 function template_quotefast()
 {
-	global $context, $settings, $txt;
+	global $context, $settings, $txt, $modSettings;
 
 	echo '<!DOCTYPE html>
 <html', $context['right_to_left'] ? ' dir="rtl"' : '', '>
 	<head>
 		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '">
 		<title>', $txt['retrieving_quote'], '</title>
-		<script src="', $settings['default_theme_url'], '/scripts/script.js"></script>
+		<script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script>
 	</head>
 	<body>
 		', $txt['retrieving_quote'], '

+ 0 - 11
Themes/default/Profile.template.php

@@ -15,9 +15,6 @@ function template_profile_above()
 {
 	global $context, $settings, $scripturl, $modSettings, $txt;
 
-	echo '
-	<script src="', $settings['default_theme_url'], '/scripts/profile.js"></script>';
-
 	// Prevent Chrome from auto completing fields when viewing/editing other members profiles
 	if (isBrowser('is_chrome') && !$context['user']['is_owner'])
 		echo '
@@ -676,7 +673,6 @@ function template_editBuddies()
 			</div>
 		</div>
 	</form>
-	<script src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
 	<script><!-- // --><![CDATA[
 		var oAddBuddySuggest = new smc_AutoSuggest({
 			sSelf: \'oAddBuddySuggest\',
@@ -778,7 +774,6 @@ function template_editIgnoreList()
 			</div>
 		</div>
 	</form>
-	<script src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
 	<script><!-- // --><![CDATA[
 		var oAddIgnoreSuggest = new smc_AutoSuggest({
 			sSelf: \'oAddIgnoreSuggest\',
@@ -2840,11 +2835,6 @@ function template_profile_signature_modify()
 		echo '
 								<span class="smalltext">', $context['signature_warning'], '</span>';
 
-	// Load the spell checker?
-	if ($context['show_spellchecking'])
-		echo '
-								<script src="', $settings['default_theme_url'], '/scripts/spellcheck.js"></script>';
-
 	// Some javascript used to count how many characters have been used so far in the signature.
 	echo '
 								<script><!-- // --><![CDATA[
@@ -3079,7 +3069,6 @@ function template_authentication_method()
 
 	// The main header!
 	echo '
-		<script src="', $settings['default_theme_url'], '/scripts/register.js"></script>
 		<form action="', $scripturl, '?action=profile;area=authentication;save" method="post" accept-charset="', $context['character_set'], '" name="creator" id="creator" enctype="multipart/form-data">
 			<div class="cat_bar">
 				<h3 class="catbg">

+ 2 - 4
Themes/default/Register.template.php

@@ -51,7 +51,6 @@ function template_registration_form()
 	global $context, $settings, $scripturl, $txt, $modSettings;
 
 	echo '
-		<script src="', $settings['default_theme_url'], '/scripts/register.js"></script>
 		<script><!-- // --><![CDATA[
 			function verifyAgree()
 			{
@@ -462,7 +461,7 @@ function template_coppa_form()
 // Show a window containing the spoken verification code.
 function template_verification_sound()
 {
-	global $context, $settings, $txt, $scripturl;
+	global $context, $settings, $txt, $scripturl, $modSettings;
 
 	echo '<!DOCTYPE html>
 <html', $context['right_to_left'] ? ' dir="rtl"' : '', '>
@@ -470,7 +469,7 @@ function template_verification_sound()
 		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '">
 		<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?alp21">
+		<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'">
 		<style type="text/css">';
 
 	// Just show the help text and a "close window" link.
@@ -506,7 +505,6 @@ function template_admin_register()
 	global $context, $settings, $scripturl, $txt, $modSettings;
 
 	echo '
-	<script src="', $settings['default_theme_url'], '/scripts/register.js"></script>
 	<div id="admincenter">
 		<div id="admin_form_wrapper">
 			<form id="postForm" class="windowbg2" action="', $scripturl, '?action=admin;area=regcenter" method="post" accept-charset="', $context['character_set'], '" name="postForm">

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

@@ -87,7 +87,6 @@ function template_set_password()
 	global $context, $settings, $txt, $scripturl, $modSettings;
 
 	echo '
-	<script src="', $settings['default_theme_url'], '/scripts/register.js"></script>
 	<br>
 	<form action="', $scripturl, '?action=reminder;sa=setpassword2" name="reminder_form" id="reminder_form" method="post" accept-charset="', $context['character_set'], '">
 		<div class="tborder login">
@@ -133,10 +132,9 @@ function template_set_password()
 
 function template_ask()
 {
-	global $context, $settings, $txt, $scripturl, $modSettings;
+	global $context, $txt, $scripturl, $modSettings;
 
 	echo '
-	<script src="', $settings['default_theme_url'], '/scripts/register.js"></script>
 	<br>
 	<form action="', $scripturl, '?action=reminder;sa=secret2" method="post" accept-charset="', $context['character_set'], '" name="creator" id="creator">
 		<div class="tborder login">

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

@@ -144,14 +144,14 @@ function template_main()
 // Header of the print page!
 function template_print_above()
 {
-	global $context, $settings, $txt;
+	global $context, $settings $modSettings;
 
 	echo '<!DOCTYPE html>
 <html', $context['right_to_left'] ? ' dir="rtl"' : '', '>
 	<head>
 		<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '">
 		<title>', $context['page_title'], '</title>
-		<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/report.css">
+		<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/css/report.css', $modSettings['browser_cache'] ,'">
 	</head>
 	<body>';
 }

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

@@ -207,7 +207,6 @@ function template_main()
 
 	echo '
 	</form>
-	<script src="', $settings['default_theme_url'], '/scripts/suggest.js?alp21"></script>
 	<script><!-- // --><![CDATA[
 		var oAddMemberSuggest = new smc_AutoSuggest({
 			sSelf: \'oAddMemberSuggest\',

+ 0 - 1
Themes/default/Stats.template.php

@@ -396,7 +396,6 @@ function template_main()
 		</table>
 		</div>
 	</div>
-	<script src="', $settings['default_theme_url'], '/scripts/stats.js"></script>
 	<script><!-- // --><![CDATA[
 		var oStatsCenter = new smf_StatsCenter({
 			sTableId: \'stats\',

+ 2 - 2
Themes/default/Wireless.template.php

@@ -889,7 +889,7 @@ function template_imode_below()
 // XHTMLMP (XHTML Mobile Profile) templates used for WAP 2.0 start here
 function template_wap2_above()
 {
-	global $context, $settings, $user_info;
+	global $context, $settings, $user_info, $modSettings;
 
 	echo '<?xml version="1.0" encoding="', $context['character_set'], '"?', '>
 <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
@@ -903,7 +903,7 @@ function template_wap2_above()
 		<link rel="canonical" href="', $context['canonical_url'], '" />';
 
 	echo '
-		<link rel="stylesheet" href="', $settings['default_theme_url'], '/css/wireless.css" type="text/css" />
+		<link rel="stylesheet" href="', $settings['default_theme_url'], '/css/wireless.css" type="text/css', $modSettings['browser_cache'] ,'" />
 	</head>
 	<body>';
 }

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

@@ -1878,6 +1878,7 @@ VALUES ('smfVersion', '{$smf_version}'),
 	('drafts_show_saved_enabled', '1'),
 	('drafts_keep_days', '7'),
 	('topic_move_any', '0'),
+	('browser_cache', '?alph21'),
 	('mail_limit', '5'),
 	('mail_quantity', '5');
 # --------------------------------------------------------

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

@@ -2389,6 +2389,7 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_autosave_enab
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_show_saved_enabled', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_keep_days', '7');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('topic_move_any', '0');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('browser_cache', '?alph21');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('mail_limit', '5');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('mail_quantity', '5');
 # --------------------------------------------------------

+ 1 - 0
other/install_2-1_sqlite.sql

@@ -2024,6 +2024,7 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_autosave_enab
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_show_saved_enabled', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_keep_days', '7');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('topic_move_any', '0');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('browser_cache', '?alph21');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('mail_limit', '5');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('mail_quantity', '5');
 COMMIT;

+ 1 - 0
other/install_2-1_sqlite3.sql

@@ -2024,6 +2024,7 @@ INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_autosave_enab
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_show_saved_enabled', '1');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('drafts_keep_days', '7');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('topic_move_any', '0');
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('browser_cache', '?alph21');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('mail_limit', '5');
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('mail_quantity', '5');
 COMMIT;

+ 4 - 0
other/upgrade_2-1_mysql.sql

@@ -61,6 +61,10 @@ if (!isset($modSettings['allow_no_censored']))
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('topic_move_any', '1');
 ---#
 
+---# Adding new "browser_cache" setting
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('browser_cache', '?alph21');
+---#
+
 /******************************************************************************/
 --- Updating legacy attachments...
 /******************************************************************************/

+ 4 - 0
other/upgrade_2-1_postgresql.sql

@@ -63,6 +63,10 @@ if (!isset($modSettings['allow_no_censored']))
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('topic_move_any', '1');
 ---#
 
+---# Adding new "browser_cache" setting
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('browser_cache', '?alph21');
+---#
+
 /******************************************************************************/
 --- Updating legacy attachments...
 /******************************************************************************/

+ 4 - 0
other/upgrade_2-1_sqlite.sql

@@ -61,6 +61,10 @@ if (!isset($modSettings['allow_no_censored']))
 INSERT INTO {$db_prefix}settings (variable, value) VALUES ('topic_move_any', '1');
 ---#
 
+---# Adding new "browser_cache" setting
+INSERT INTO {$db_prefix}settings (variable, value) VALUES ('browser_cache', '?alph21');
+---#
+
 /******************************************************************************/
 --- Updating legacy attachments...
 /******************************************************************************/