Skip to main content
8 events
when toggle format what by license comment
Jan 9, 2014 at 15:31 vote accept Jav
Jan 9, 2014 at 15:31 comment added Jav @Jimajamma, it was operator error :). I had my icon file named wrong. I needed to add an "-x-" to it. I hate that there are different naming conventions for these files, but I guess there's a reason. Thanks again for your help.
Jan 8, 2014 at 18:07 comment added Jimajamma not sure, I'd take a look at the file_icon_path() function in the file.module and make sure your naming conventions match what it is expecting, both with respect to the path as well as the image filenames. Most notably make sure your path is prefaced with something along the lines of drupal_get_path('module', 'YOURMODULE') and that the icons are in the expected name.ext format.
Jan 8, 2014 at 17:30 comment added Jav @Jimajamma, thanks for your help, that seems to be working to register the function, which I can apparently name whatever, but I'll keep that naming convention. Now, I have changed the $icon_directory to my module's icon directory (mymodule/images/icons), but it looks like the file_icon_url() function doesn't like it for some reason and returns no path. What could I be doing wrong now?
Jan 8, 2014 at 3:33 comment added Jimajamma I was curious about your latter comment as well @MPD, but that's what it does, I just copied it verbatim. As for your first, it's my understanding that the scans just pick up theme overrides, eg, THEMENAME_xyzzy(), not MODULENAME_xyzzy(), but I could very well be mistaken and making this far too difficult.
Jan 8, 2014 at 2:35 comment added mpdonadio I'm also curios why core builds up the img manually, rather than via theme('image')
Jan 8, 2014 at 2:32 comment added mpdonadio Being dense here. If theme_file_icon is a normal theme function, then why the manual registry alter? Shouldn't a theme registry rescan pick up the override?
Jan 8, 2014 at 2:07 history answered Jimajamma CC BY-SA 3.0