1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 07:07:51 +02:00

Merge remote-tracking branch 'VSEphpbb/ticket/10390' into develop

* VSEphpbb/ticket/10390:
  [ticket/10390] Revert back to escaped script tags inside document.write
  [ticket/10390] Fix wording: fallback should be fall back
  [ticket/10390] Serve jQuery from Google CDN Yes/No button in ACP
  [ticket/10390] Use simpler HTML5 compliant js for the jQuery fallback
  [ticket/10390] Drop http protocol for Microsoft's CDN option
  [ticket/10390] Reword the language for jQuery host/server options
  [ticket/10390] Fix a type-o - captialize AJAX
  [ticket/10390] Improve the jQuery CDN url generation function
  [ticket/10390] Move jQuery version definition
  [ticket/10390] Allow option for jQuery to be hosted by a remote CDN

Conflicts:
	phpBB/install/database_update.php
This commit is contained in:
Oleg Pudeyev 2011-10-20 20:41:11 -04:00
commit 83d71ecb88
13 changed files with 26 additions and 7 deletions

View File

@ -12,7 +12,8 @@
</div>
</div>
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
</body>
</html>

View File

@ -20,7 +20,8 @@
</div>
</div>
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
</body>
</html>

View File

@ -16,7 +16,8 @@
</div>
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
</body>
</html>

View File

@ -99,6 +99,7 @@ class acp_board
'load_cpf_pm' => array('lang' => 'LOAD_CPF_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'load_jquery_cdn' => array('lang' => 'LOAD_JQUERY_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend3' => 'ACP_SUBMIT_CHANGES',
)

View File

@ -4570,6 +4570,8 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'T_STYLESHEET_LINK' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css',
'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/' . $user->lang_name . '/stylesheet.css',
'T_STYLESHEET_NAME' => $user->theme['theme_name'],
'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js",
'S_JQUERY_FALLBACK' => ($config['load_jquery_cdn']) ? true : false,
'T_THEME_NAME' => $user->theme['theme_path'],
'T_THEME_LANG_NAME' => $user->data['user_lang'],

View File

@ -124,6 +124,8 @@ function adm_page_footer($copyright_html = true)
'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
'S_COPYRIGHT_HTML' => $copyright_html,
'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$phpbb_root_path}assets/javascript/jquery.js",
'S_JQUERY_FALLBACK' => ($config['load_jquery_cdn']) ? true : false,
'VERSION' => $config['version'])
);

View File

@ -2090,6 +2090,9 @@ function change_database_data(&$no_updates, $version)
// Changes from 3.1.0-dev to 3.1.0-A1
case '3.1.0-dev':
set_config('load_jquery_cdn', 0);
set_config('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js');
if (!isset($config['use_system_cron']))
{
set_config('use_system_cron', 0);

View File

@ -165,6 +165,8 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewprofi
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_cpf_viewtopic', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_lastread', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_db_track', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_cdn', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jquery_url', '//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_jumpbox', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_moderators', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online', '1');

View File

@ -356,6 +356,8 @@ $lang = array_merge($lang, array(
'LOAD_CPF_PM' => 'Display custom profile fields in private messages',
'LOAD_CPF_VIEWPROFILE' => 'Display custom profile fields in user profiles',
'LOAD_CPF_VIEWTOPIC' => 'Display custom profile fields on topic pages',
'LOAD_JQUERY_CDN' => 'Serve jQuery using Googles CDN',
'LOAD_JQUERY_CDN_EXPLAIN' => 'If this setting is enabled, jQuery will be served from Googles AJAX API CDN instead of the copy included with phpBB on your server. If the CDN fails, phpBB will attempt to fall back to the copy included with phpBB.',
'LOAD_USER_ACTIVITY' => 'Show users activity',
'LOAD_USER_ACTIVITY_EXPLAIN' => 'Displays active topic/forum in user profiles and user control panel. It is recommended to disable this on boards with more than one million posts.',
'RECOMPILE_STYLES' => 'Recompile stale style components',

View File

@ -33,7 +33,8 @@
<!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
</div>
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
</body>
</html>

View File

@ -6,7 +6,8 @@
</div>
</div>
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
</body>
</html>

View File

@ -8,7 +8,8 @@
<!-- IF DEBUG_OUTPUT --><br /><bdo dir="ltr">[ {DEBUG_OUTPUT} ]</bdo><!-- ENDIF --></span>
</div>
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
</body>
</html>

View File

@ -5,7 +5,8 @@
<span class="copyright">Powered by <a href="http://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Group</span>
</div>
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/jquery.js"></script>
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
</body>
</html>