I have installed filebrowser, and setup the icons directory to be icons. I have created the icons directory under the drupal install location, and have put 2 icon files in there file-folder.png and file-pdf.png.

However when I then use filebrowser to look at the directory none of the icons are showing.

Comments

Ceia’s picture

Ok I seem to have fixed it. You have to set your icons directory to be your files directory, and then the icons show up.

Susurrus’s picture

Status:Active» Fixed
Anonymous’s picture

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

carlone@www.drupalitalia.org’s picture

Version:5.x-1.x-dev» 5.x-1.0
Component:Code» Directory Listing Pages
Status:Closed (fixed)» Active

Hi,
I have this problem too. I' ve tried this way (same directory for module start-point and icons) but I can not see file's and directory's icons.

Directory and file listing goes well but the module seems not to consider the directory of icons that I have set.

Drupal 5.7, module version 5.x-1.0 and theme Garland.

Thanks, Carlo

Susurrus’s picture

Status:Active» Postponed (maintainer needs more info)

So what exactly were the settings you used? Where're your icons? Do they have the proper permissions?

Susurrus’s picture

Status:Postponed (maintainer needs more info)» Closed (fixed)

No activity in 2 months, closing.

asb’s picture

Version:5.x-1.0» 6.x-2.0-rc11
Status:Closed (fixed)» Active

Same issue on a plain 6.x installation.

The README.txt claims:

- File icons. This module includes part of the Tango Icon Library for use as file
   icons. Many common file types are supported by default. To extend the icons you
   may alter those in the "modules/filebrowser/icons" directory or override those
   with your own in an "icons" directory in your theme. The file naming convention
   is fb-FILETYPE-icon.png e.g. a PHP file would need a "fb-PHP-icon.png" icon.

However, in the archive I downloaded were no icons, and in ./sites/all/modules/filebrowser no "icons" folder was being created. This information should be updated in the README.txt.

Greetings, -asb

Carlos Miranda Levy’s picture

By looking at the code of function _filebrowser_get_default_thumbnail() in filebrowser.common.inc, it becomes clear that instructions in README.txt are not right at the moment:

function _filebrowser_get_default_thumbnail($file) {
   $main_type = dirname($file['mime-type']);
   $mime_type = str_replace("/", "-", $file['mime-type']);
   $module_path = drupal_get_path("module", "filebrowser") . "/images/mime-types/";
   //FIXME ça ne marche pas, la fonction path_to_theme ne renvoie pas le bon chemin...
   $theme_path = path_to_theme() . "/filebrowser/";
   $icons = array (
         $theme_path . $mime_type . ".png",
         $theme_path . $main_type . ".png",
         $module_path . $mime_type . ".png",
         $module_path . $main_type . ".png"
   );
   foreach ($icons as $icon) {
      if (file_exists($icon)) {
         return theme('image', $icon);
      }
   }
   return theme('image', $module_path . "unknown.png");
}

To get it to work you have to:

  1. create a subdirectory called "images/mime-types/" under your "sites/all/modules/filebrowser" directory.
  2. Put your icons there, named with the full name of the desired mime-types, changing the / with an -, as in:
    • application-pdf.png
    • application-msword.png
    • application-rtf.png
    • image-jpeg.png
    • audio-mpeg.png
    • application-zip.png
    • etc...

That should do it for the current release. I assume the developer will eventually work on the routine to complete the functionality described in README.txt or update README.txt with this instructions, so stay tuned for future changes :-).

In summary, create "images/mime-types/" under "sites/all/modules/filebrowser" and put application-pdf.png, application-msword.png, application-rtf.png, image-jpeg.png, application-zip.png, audio-mpeg.png, etc. and it should work for the current release.

bwoods’s picture

Thanks Carlos! #8 worked for me.

rdahiya’s picture

Is it assumed that we all have our own icons to install using these instructions?

Carlos Miranda Levy’s picture

Yes. Previous versions of the module came with icons. But I think the last version does not include an icons folder.
You might want to use the fam fam fam icons:
http://www.famfamfam.com/lab/icons/ in particular http://www.famfamfam.com/lab/icons/mini/

Yoran’s picture

Actually I had number of request not remove thumbnailling stuff. Main argument is that this can be done on the theming side. So I'll have to rework this.

Yoran’s picture

Status:Active» Fixed

Custom icons are corrected in trunk. You can copy module's icons folder in you theme, renamed as 'filebrowser' and change for your own icons.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

itrivino’s picture

Issue summary:View changes

This issue should be reopened. Icons don't show in Google Chrome. The solution is simple: in "filebrowser.theme.inc", line 129, change:
'style' => 'width:1%';
into:
'style' => 'width:1%; min-width:18px;'

clivesj’s picture

Easy fix indeed. I'm planning a new release somewhere next week.
Can you wait until then?
And maybe I'll have to move all in line styles to a separate css file to make customizing easier.