A better way to achieve this is to just change the file icon path in your theme and put the modified icons somewehere outside the drupal core, so as being ably to upgrade your site and modules without any extra configuration steps.
function THEMENAME_file_icon($vars) { $file = $vars['file']; $icon_directory = drupal_get_path('theme', '
THEMENAME
') . '/images/file_icons'; $mime = check_plain($file->filemime); $icon_url = file_icon_url($file, $icon_directory); return '<img alt="" class="file-icon" src="' . $icon_url . '" title="' . $mime . '" />'; }
Copy the map modules/file/icons to a the images directory in your theme.
Rename the map file_icons
Change any image in this map to your (or your beloved designers) liking and you're set.
No comments:
Post a Comment