This module is excellent and I'm very excited about the direction it's going. I'm currently integrating an existing drupal site with my company's internal media software, and have written a couple of custom filefield widgets for the purpose (extending filefield much the same way imagefield does).
Unfortunately I had to hack filefield_sources.module to get my widgets to display the source links. In function filefield_sources_elements, I changed the following, ~ lines 48-52:
return array(
'filefield_widget' => $extras,
'imagefield_widget' => $extras,
);
I replaced those lines with the following to allow any filefield widget to reference sources:
$filefield_widgets = array();
$widget_types = _content_widget_types();
foreach ($widget_types AS $widget => $values) {
if (in_array('filefield', $values['field types'])) {
$filefield_widgets[$widget] = $extras;
}
}
return $filefield_widgets;
Not sure how safe it is to use _content_widget_types(), but this does seem like an extend-able way to incorporate any and all filefield widgets....
Comments
Comment #1
alan d. commented+1 Getting similar requests for ImageField extended.
#686142: Incompatible with FileField_Sources module
Comment #2
srobert72 commentedSubscribe
Comment #3
robbertnl commentedSubscribing, see also http://drupal.org/node/495210 (image crop)
Comment #4
srobert72 commentedAny latest news ?
Comment #5
benone commented+1
Comment #6
benone commentedI have filefield paths module installed also.
It's working with imagefield crop module after second Save.
need to edit and save again to get the image cropped.
in files/images directory are 4 instances instead of 2. 2x original file name and 2x files with names changed by filefield paths .
2 times because crop is adding secont instance with .crop. in the file name.
thanks
Comment #7
quicksketchA new hook has been added as part of #436174: Configuration Options.
Comment #8
alan d. commentedOut of interest, are there any modules that are incompatible with filefield sources? If not, why just not parse the base field type to prevent the need for all other modules to implement the hook? With the file / image in core, and well defined field alter hooks, it would seem very unlikely for any other modules to require this hook in D7.