Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.229 diff -u -r1.229 theme.inc --- includes/theme.inc 13 Apr 2005 17:59:39 -0000 1.229 +++ includes/theme.inc 23 Apr 2005 14:54:52 -0000 @@ -230,6 +230,8 @@ 'mission' => '', 'default_logo' => 1, 'logo_path' => '', + 'default_favicon' => 1, + 'favicon_path' => '', 'toggle_logo' => 1, 'toggle_name' => 1, 'toggle_search' => 1, Index: modules/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system.module,v retrieving revision 1.205 diff -u -r1.205 system.module --- modules/system.module 11 Apr 2005 19:05:52 -0000 1.205 +++ modules/system.module 23 Apr 2005 14:54:53 -0000 @@ -640,6 +640,19 @@ } } +// Check for a new uploaded favicon, and use that instead. + if ($file = file_check_upload('favicon_upload')) { + $parts = pathinfo($file->filename); + $filename = ($key) ? str_replace('/', '_', $key) . '_favicon.' . $parts['extension'] : 'favicon.' . $parts['extension']; + + if ($file = file_save_upload('favicon_upload', $filename, 1)) { + $settings['default_favicon'] = 0; + $settings['favicon_path'] = $file->filepath; + + // Update the variable table with the new settings so that they take effect immediately. + variable_set($var, $settings); + } + } $form = ''; @@ -652,8 +665,19 @@ $group .= form_file(t('Upload logo image'), 'logo_upload', 40, t("If you don't have direct file access to the server, use this field to upload your logo.")); $group .= form_button(t('Upload'), 'fileop'); - $form = form_group(t('Logo image settings'), $group); + $form .= form_group(t('Logo image settings'), $group); + } + + // Icon settings + if ((!$key) || in_array('favicon', $features)) { + $group = form_checkbox(t('Use the default favorite icon'), "$var][default_favicon", 1, $settings['default_favicon'], t('Check here if you want the theme to use the default favorite icon.')); + $group .= form_textfield(t('Path to custom icon'), "$var][favicon_path", $settings['favicon_path'], 50, 128, t('The path to the image file you would like to use as your custom favorite icon.')); + + file_check_directory(variable_get('file_directory_path', 'files'), FILE_CREATE_DIRECTORY, 'file_directory_path'); + $group .= form_file(t('Upload icon image'), 'favicon_upload', 40, t("If you don't have direct file access to the server, use this field to upload your favorite icon.")); + $group .= form_button(t('Upload'), 'fileop'); + $form .= form_group(t('Favorite icon settings'), $group); } // System wide only settings. Index: themes/bluemarine/xtemplate.xtmpl =================================================================== RCS file: /cvs/drupal/drupal/themes/bluemarine/xtemplate.xtmpl,v retrieving revision 1.6 diff -u -r1.6 xtemplate.xtmpl --- themes/bluemarine/xtemplate.xtmpl 14 Nov 2004 19:34:09 -0000 1.6 +++ themes/bluemarine/xtemplate.xtmpl 23 Apr 2005 14:54:53 -0000 @@ -6,6 +6,7 @@ {head} {styles} + Index: themes/chameleon/chameleon.theme =================================================================== RCS file: /cvs/drupal/drupal/themes/chameleon/chameleon.theme,v retrieving revision 1.25 diff -u -r1.25 chameleon.theme --- themes/chameleon/chameleon.theme 31 Mar 2005 09:25:33 -0000 1.25 +++ themes/chameleon/chameleon.theme 23 Apr 2005 14:54:53 -0000 @@ -9,6 +9,7 @@ function chameleon_features() { return array( 'logo', + 'favicon', 'toggle_name', 'toggle_slogan', 'toggle_primary_links', @@ -26,6 +27,7 @@ $output .= " ". ($title ? strip_tags($title) ." | ". variable_get("site_name", "drupal") : variable_get("site_name", "drupal") ." | ". variable_get("site_slogan", "")) ."\n"; $output .= drupal_get_html_head(); $output .= " \n"; + $output .= " \n"; $output .= theme_get_styles(); $output .= ""; $output .= "\n"; Index: themes/engines/xtemplate/xtemplate.engine =================================================================== RCS file: /cvs/drupal/drupal/themes/engines/xtemplate/xtemplate.engine,v retrieving revision 1.12 diff -u -r1.12 xtemplate.engine --- themes/engines/xtemplate/xtemplate.engine 31 Mar 2005 09:25:33 -0000 1.12 +++ themes/engines/xtemplate/xtemplate.engine 23 Apr 2005 14:54:53 -0000 @@ -26,6 +26,7 @@ function xtemplate_features() { return array( 'logo', + 'favicon', 'toggle_name', 'toggle_search', 'toggle_slogan', @@ -121,7 +122,8 @@ "styles" => theme_get_styles(), "onload_attributes" => theme_onload_attribute(), "primary_links" => theme_get_setting('primary_links'), - "secondary_links" => theme_get_setting('secondary_links') + "secondary_links" => theme_get_setting('secondary_links'), + "favicon" => theme_get_setting('favicon_path') )); if ($logo = theme_get_setting('logo')) { Index: themes/pushbutton/xtemplate.xtmpl =================================================================== RCS file: /cvs/drupal/drupal/themes/pushbutton/xtemplate.xtmpl,v retrieving revision 1.5 diff -u -r1.5 xtemplate.xtmpl --- themes/pushbutton/xtemplate.xtmpl 31 Oct 2004 03:03:27 -0000 1.5 +++ themes/pushbutton/xtemplate.xtmpl 23 Apr 2005 14:54:53 -0000 @@ -5,6 +5,7 @@ {head} {styles} +