diff options
-rw-r--r-- | phpBB/includes/functions.php | 73 | ||||
-rw-r--r-- | phpBB/includes/session.php | 2 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/overall_header.html | 18 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/simple_header.html | 16 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/overall_header.html | 6 |
5 files changed, 12 insertions, 103 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 41c022062f..e46afeb0fb 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4177,78 +4177,7 @@ function page_header($page_title = '', $display_online_list = true) 'SITE_LOGO_IMG' => $user->img('site_logo')) ); - // Once used, we do not want to have the whole theme data twice in memory... - if ($user->theme['theme_storedb']) - { - // Parse Theme Data - $replace = array( - '{T_THEME_PATH}' => "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme', - '{T_TEMPLATE_PATH}' => "{$phpbb_root_path}styles/" . $user->theme['template_path'] . '/template', - '{T_IMAGESET_PATH}' => "{$phpbb_root_path}styles/" . $user->theme['imageset_path'] . '/imageset', - '{T_IMAGESET_LANG_PATH}' => "{$phpbb_root_path}styles/" . $user->theme['imageset_path'] . '/imageset/' . $user->data['user_lang'], - '{T_STYLESHEET_NAME}' => $user->theme['theme_name'], - '{S_USER_LANG}' => $user->data['user_lang'] - ); - - $user->theme['theme_data'] = str_replace(array_keys($replace), array_values($replace), $user->theme['theme_data']); - - $matches = array(); - if (strpos($user->theme['theme_data'], '{IMG_') !== false) - { - preg_match_all('#\{IMG_([A-Za-z0-9_]*?)_(WIDTH|HEIGHT|SRC)\}#', $user->theme['theme_data'], $matches); - - $imgs = $find = $replace = array(); - if (isset($matches[0]) && sizeof($matches[0])) - { - foreach ($matches[1] as $i => $img) - { - $img = strtolower($img); - if (!isset($img_array[$img])) - { - continue; - } - - if (!isset($imgs[$img])) - { - $img_data = &$img_array[$img]; - $imgsrc = ($img_data['image_lang'] ? $img_data['image_lang'] . '/' : '') . $img_data['image_filename']; - $imgs[$img] = array( - 'src' => $phpbb_root_path . 'styles/' . $user->theme['imageset_path'] . '/imageset/' . $imgsrc, - 'width' => $img_data['image_width'], - 'height' => $img_data['image_height'], - ); - } - - switch ($matches[2][$i]) - { - case 'SRC': - $replace[] = $imgs[$img]['src']; - break; - - case 'WIDTH': - $replace[] = $imgs[$img]['width']; - break; - - case 'HEIGHT': - $replace[] = $imgs[$img]['height']; - break; - - default: - continue; - } - $find[] = $matches[0][$i]; - } - - if (sizeof($find)) - { - $user->theme['theme_data'] = str_replace($find, $replace, $user->theme['theme_data']); - } - } - } - - $template->assign_var('T_THEME_DATA', $user->theme['theme_data']); - $user->theme['theme_data'] = ''; - } + $user->theme['theme_data'] = ''; // application/xhtml+xml not used because of IE header('Content-type: text/html; charset=UTF-8'); diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 35d4b46bd9..90d4cc2f32 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -979,8 +979,6 @@ class session $this->session_create(ANONYMOUS); } - // Because we never have a fully working session we need to embed the style - $template->assign_var('S_FORCE_EMBED_STYLE', true); // Determine which message to output $till_date = ($ban_row['ban_end']) ? $this->format_date($ban_row['ban_end']) : ''; diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 8a6f129f50..7b578d2c1d 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -77,18 +77,12 @@ <script type="text/javascript" src="{T_TEMPLATE_PATH}/styleswitcher.js"></script> <script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script> -<!-- IF T_STYLESHEET_LINK and not S_FORCE_EMBED_STYLE --> - <link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" /> - <link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" /> - - <link href="{T_THEME_PATH}/normal.css" rel="stylesheet" type="text/css" title="A" /> - <link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" /> - <link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" /> -<!-- ELSE --> - <style type="text/css" media="screen, projection"> - {T_THEME_DATA} - </style> -<!-- ENDIF --> +<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" /> +<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" /> + +<link href="{T_THEME_PATH}/normal.css" rel="stylesheet" type="text/css" title="A" /> +<link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" /> +<link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" /> <!-- IF S_CONTENT_DIRECTION eq 'rtl' --> <link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" /> diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index eaf6e6dd03..e702dcc48b 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -43,18 +43,12 @@ </script> <script type="text/javascript" src="{T_TEMPLATE_PATH}/styleswitcher.js"></script> -<!-- IF T_STYLESHEET_LINK --> - <link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" /> - <link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" /> +<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" /> +<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" /> - <link href="{T_THEME_PATH}/normal.css" rel="alternate stylesheet" type="text/css" title="A" /> - <link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" /> - <link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" /> -<!-- ELSE --> - <style type="text/css" media="screen, projection"> - {T_THEME_DATA} - </style> -<!-- ENDIF --> +<link href="{T_THEME_PATH}/normal.css" rel="alternate stylesheet" type="text/css" title="A" /> +<link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" /> +<link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" /> <!-- DEFINE $POPUP = 1 --> </head> diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index 3eaae01108..4cdd0c993e 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -14,13 +14,7 @@ {META} <title>{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE}</title> -<!-- IF T_STYLESHEET_LINK --> <link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" /> -<!-- ELSE --> -<style type="text/css"> -{T_THEME_DATA} -</style> -<!-- ENDIF --> <script type="text/javascript"> <!-- |