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 .= "