--- includes/common.inc.orig 2005-01-17 13:11:36.000000000 +0100 +++ includes/common.inc 2005-01-17 13:28:22.000000000 +0100 @@ -58,8 +58,7 @@ function drupal_get_html_head() { global $base_url; $output = "\n"; - $output .= "\n"; - $output .= theme('stylesheet_import', 'misc/drupal.css'); + $output .= theme('stylesheet_import', $base_url.'/misc/drupal.css'); return $output . drupal_set_html_head(); } @@ -1404,7 +1403,7 @@ function form_weight($title = NULL, $nam function url($path = NULL, $query = NULL, $fragment = NULL, $absolute = FALSE) { global $base_url; - static $script; + static $script, $parts; if (empty($script)) { // On some web servers, such as IIS, we can't omit "index.php". So, we @@ -1419,7 +1418,15 @@ function url($path = NULL, $query = NULL $fragment = '#'. $fragment; } - $base = ($absolute ? $base_url . '/' : ''); + if ($absolute) { + $base = $base_url . '/'; + } + else { + if (!isset($parts)) { + $parts = parse_url($base_url); + } + $base = (($path == '/') ? '' : $parts['path'] . '/'); + } if (variable_get('clean_url', '0') == '0') { if (isset($path)) { --- includes/theme.inc.1 2005-01-17 13:46:19.000000000 +0100 +++ includes/theme.inc 2005-01-17 13:57:45.000000000 +0100 @@ -33,7 +33,7 @@ function theme_help($section) { * The name of the currently selected theme. */ function init_theme() { - global $user, $custom_theme, $theme_engine, $theme_key; + global $user, $custom_theme, $theme_engine, $theme_key, $base_url; $themes = list_themes(); @@ -62,7 +62,7 @@ function init_theme() { // File is a template/theme // Load its CSS, if it exists if (file_exists($stylesheet = dirname($themes[$theme]->filename) .'/style.css')) { - theme_add_style($stylesheet); + theme_add_style($base_url . '/' . $stylesheet); } } @@ -258,7 +258,7 @@ function theme_get_settings($key = NULL) * The value of the requested setting, NULL if the setting does not exist. */ function theme_get_setting($setting_name, $refresh = FALSE) { - global $theme_key; + global $theme_key, $base_url; static $settings; if (empty($settings) || $refresh) { @@ -276,11 +276,12 @@ function theme_get_setting($setting_name } if ($settings['toggle_logo']) { + $settings['logo'] = $base_url.'/'; if ($settings['default_logo']) { - $settings['logo'] = dirname($theme_object->filename) .'/logo.png'; + $settings['logo'] .= dirname($theme_object->filename) .'/logo.png'; } elseif ($settings['logo_path']) { - $settings['logo'] = $settings['logo_path']; + $settings['logo'] .= $settings['logo_path']; } } @@ -439,8 +440,10 @@ function theme_links($links, $delimiter * A string containing the image tag. */ function theme_image($path, $alt = '', $title = '', $attr = '', $getsize = true) { + global $base_url; + if (!$getsize || (file_exists($path) && (list($width, $height, $type, $attr) = @getimagesize($path)))) { - return "\"$alt\""; + return "\"$alt\""; } } --- themes/engines/xtemplate/xtemplate.engine.1 2005-01-17 13:47:06.000000000 +0100 +++ themes/engines/xtemplate/xtemplate.engine 2005-01-17 13:48:06.000000000 +0100 @@ -112,7 +112,9 @@ function xtemplate_comment($comment, $li } function xtemplate_page($content) { - global $xtemplate; + global $xtemplate, $base_url; + + $xtemplate->template->assign('base_url', $base_url.'/'); $xtemplate->template->assign(array( "language" => $GLOBALS['locale'], --- themes/bluemarine/xtemplate.xtmpl.1 2005-01-17 13:51:48.000000000 +0100 +++ themes/bluemarine/xtemplate.xtmpl 2005-01-17 13:54:05.000000000 +0100 @@ -15,11 +15,11 @@ - Home + Home -

{site_name}

+

{site_name}