I use different modules for CCK File :
http://drupal.org/project/filefield
http://drupal.org/project/imagefield
http://drupal.org/project/imagefield_extended
http://drupal.org/project/filefield_sources

For a PDF document 2 are in action :
filefield + filefield_sources : OK
I can use "Remote URL" (as on this picture : http://drupal.org/files/images/filefield-sources.preview.png)

For a normal image 3 are in action :
filefield + imagefield + filefield_sources : OK
I can use "Remote URL"

For an extended image the 4 are in action :
filefield + imagefield + filefield_sources + imagefield_extended : KO
Any options from FileField_Sources module is visible.

Could it be possible to have ImageField_Extended module compatible with FileField_Sources module ?

Comments

alan d.’s picture

I take a look next week sometime.

I'm thinking about changing the way the module works to use the new cck 2.5 hook_fields_alter(). This would allow the module to extend the filefield features list without requiring any new special widgets, then everything else would just work with no special tricks in the background. If you know of any issues related to the integration, can you list these, it will save me some time when I get a chance to look at this.

Cheers

srobert72’s picture

OK I'm ready to test it when DEV version released.

Just a question about this future upgrade.
If widget is removed, what about old CCK FileField_Sources fields ?

When a CCK field is created, it is impossible to change its widget.
If you remove this widget, shall we must recreate FileField_Sources field and lost data ?

alan d.’s picture

Project: ImageField Extended » FileField Sources
Version: 6.x-3.x-dev » 6.x-1.x-dev
Category: bug » feature
Status: Active » Closed (duplicate)

There appears to be a simple internal solution via FileField Sources itself, although I haven't tried it. See #541220: Allow custom filefield widgets to use filefield sources

Reopen & transfer back if there is no progress at a later date.

@ If widget is removed, what about old CCK FileField_Sources fields ?

There will be a extended period where both forms (an altered ImageField and the existing widget). During this time both version would have the same functionality and would not conflict

@ When a CCK field is created, it is impossible to change its widget.

Nope. You can change the widget. The only limitations are that you can not change the field type and field name.

srobert72’s picture

Project: FileField Sources » ImageField Extended
Version: 6.x-1.x-dev » 6.x-3.x-dev
Category: feature » bug
Status: Closed (duplicate) » Active

Hook has been added in FileField_Sources module.
See #541220: Allow custom filefield widgets to use filefield sources

Is it possible to update ImageField_Extended module in order to resolve this issue ?

alan d.’s picture

Category: bug » feature
Status: Active » Postponed (maintainer needs more info)

I'm extremely busy with other work ATM, can you direct me to either the exact procedure required or supply a patch to review. The other issue should mean that there is no changes required on this side, unless they implemented another strategy for the integration.

So if there is automatic integration, and this is not working, this is a bug in filefield sources. If it requires coding at this end then it is a feature request in the IF extended queue.

Thx

srobert72’s picture

My coding skills in Drupal don't permit me to write such a patch, sorry :-(

I can only describe you what happens.
Modules:
filefield_sources 6.x-1.x-dev (2010-Feb-22)
imagefield_extended 6.x-3.x-dev (2010-Jan-20)

I create a new File field with "Image" widget, and I configure it.
I have a block options for filefield_sources.

I create a new File field with "Image, with additionnal fields" widget, and I configure it.
I have a block options for imagefield_extended.

But I can't have both options together :
those from filefield_sources : to choose source of file (local, remote, etc..)
those from imagefield_extended : to choose additionnal options

imagefield_extended widget is "Image, with additionnal fields", so I supposed it will add its options on Image widget ones. But in fact it replaces them.

Can we make these 2 modules to work together ?

alan d.’s picture

At the very end of your copy try pasting in the following code:

<?php

/**
 * Implementation of hook_filefield_sources_widgets().
 */
function imagefield_extended_filefield_sources_widgets() {
  return array('imagefield_extended_widget');
}

?>

and if that doesn't work, try the following:

<?php
/**
 * Implementation of hook_filefield_sources_widgets().
 */
function imagefield_extended_filefield_sources_widgets() {
  return array('imagefield_extended');
}

?>

I haven't a testing environment, so I can not test myself. The top version is committed in dev and will get packaged in the next 24 hours sometime. Report back and I'll push this through into a new version asap

Thanks

srobert72’s picture

Thank you very much, I will try today and tell you result.
Which file must I update ?

alan d.’s picture

imagefield_extended.module :)

srobert72’s picture

Wonderfull !!

First option was the good one :

/**
* Implementation of hook_filefield_sources_widgets().
*/
function imagefield_extended_filefield_sources_widgets() {
  return array('imagefield_extended_widget');
}

I have now options from ImageField_Extended and FileField_Sources at the same time.
Options in CCK Admin page for my Field.
And options in CCK widget in author page of my nodes.

All works !!

Thank you very much for your work.

alan d.’s picture

Status: Postponed (maintainer needs more info) » Fixed

No worries. I'll give it a few days before tagging a new release.

Thanks for the feedback.

srobert72’s picture

I have installed fresh new DEV release : 6.x-3.x-dev (2010-Feb-22)
I confirm it works with it.

Status: Fixed » Closed (fixed)

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

gg4’s picture

Version: 6.x-3.x-dev » 6.x-4.x-dev
Category: feature » support
Status: Closed (fixed) » Active

When utilizing filefield_sources to reference an existing file that has data associated with it from imagefield_extended, is the data from the referenced file supposed to populate the imagefield_extended fields on the new (referencing) field along with the file?

I see that the widgets for imagefield_extended are being created correctly when used with filefield_sources, but data from the widgets is not being pulled from the referenced file — is this the expected behavior?

alan d.’s picture

Status: Active » Closed (fixed)

yes