How do I get it to work together?

When I create a file field it only gives me the option of Upload and Image, no SWFTools option.

Thanks in advance,

Comments

Stuart Greenfield’s picture

It should "just work".

If you've upgraded from a previous version of SWF Tools then you need to either run update.php, or go to your modules page and hit Save configuration to rebuild the theme registry. You don't have to disable and re-enable SWF Tools - just resaving the module page is enough to trigger the rebuild.

If that isn't the problem, can you confirm the version of Filefield that you're using - it's working ok here, and I know other users have it working.

Thanks.

jfha73’s picture

Tried and it did not work, I'm using Filefield version 6.x-3.0

Stuart Greenfield’s picture

I tested this locally with a download of Filefield 6.x-3.0 straight from the project and the integration is working fine (although I noticed that I didn't make the playlist support an official release yet).

I'm not sure why your integration isn't working - it's only a standard hook that is called by CCK to register the filefield formatters.

If you're comfortable with PHP then you can verify if the hook is being called by adding a diagnostic message to swftools by adding a drupal_set_message() to function swftools_field_formatter_info() as illustrated below.

function swftools_field_formatter_info() {

  // Diagnostic message to confirm the formatters are being asked to register
  drupal_set_message('Registering formatters.');

  return array(
    'swftools_no_file' => array('label' => t('SWF Tools - no download link'),
      'field types' => array('filefield'),
      'multiple values' => CONTENT_HANDLE_CORE,
    ),
    'swftools_playlist' => array('label' => t('SWF Tools - playlist'),
      'field types' => array('filefield'),
      'multiple values' => CONTENT_HANDLE_MODULE,
    ),
    'swftools' => array('label' => t('SWF Tools - with download link'),
      'field types' => array('filefield'),
      'multiple values' => CONTENT_HANDLE_CORE,
    ),    
  );
}

Then go to your modules page, hit save configuration, and you should see four instances of Registering formatters..

If that appears then the hook is being called properly and it should be working.

If you don't see those messages then for some reason CCK isn't calling the swftools hook, but I don't know why that should be.

If you could try this and post again with your result it might help pin down where things are going wrong.

jfha73’s picture

StatusFileSize
new13.06 KB

I think I might be missing something here, what are this formatters that you are talking about?

This is all I see wfter update.php, enable and disable swftools module and save configuration of modules.

Stuart Greenfield’s picture

Priority: Critical » Normal
Status: Active » Fixed

Now I've seen the screenshot I can see the issue.

You need to create your filefield first (the drop down you have in your screen shot).

When you've added the filefield click the "Display field" tab and you'll see the filefield, and some new dropdowns where you can choose the formatter for your filefield. It's in these formatter lists that you'll find the SWF Tools options.

jfha73’s picture

Status: Fixed » Active
StatusFileSize
new72.1 KB

Do you mean here:

jfha73’s picture

By the way, this is what the people from filefield told me:

SWFTools doesn't provide an uploader. The library that provides an uploader is called SWFupload, but the Drupal module currently only works with upload.module and hasn't been ported to Drupal 6. The alternative so far is the Image FUpload project, which uses the same library to do the same thing.

I really would like this to be working on my websites so it's easier for my users to post videos

jfha73’s picture

OK, tell me if I'm missing something here:

  1. I downloaded and enabled filefield
  2. I downloaded and enabled SWFTools
  3. I downloaded and enabled swftff (downloaded swftff_0.tgz - by the way, I did not see "Registering formatters" message)

Is there anything else I'm not doing?

Stuart Greenfield’s picture

  1. Download and enable CCK
  2. Download and enabled FileField
  3. Download and enable SWF Tools - these are the three modules you need
  4. Create a content type, and add a filefield. Field type is file, widget is file upload. Save this content type to add the field.
  5. Now go to to the display fields tab for that content type - this is where you find the formatters for the teaser and full node view.
  6. Select the appropriate SWF Tools formatter.
  7. Save the settings.
  8. You upload a file (or files) to your filefield, and SWF Tools will display it.

SWF Tools only provides formatting for a filefield - it doesn't provide any file handling facility of its own.

jfha73’s picture

That is what I tried the first time, with only those three modules but after I create a filefield field it doesn't show me any kind of SWF Tools formatter.

Stuart Greenfield’s picture

Can you post a screenshot of what you are seeing in the dropdowns on the "Display fields" page when you try to assign a formatter to the filefield. Are you seeing the plain filefield formatters? If you've installed imagefield then do you see their formatters?

Stuart Greenfield’s picture

StatusFileSize
new46.88 KB

I've attached a screenshot from my dev set up as an example of what you should see.

jfha73’s picture

Status: Active » Fixed

Now I got it, thanks for your screenshot

vizint’s picture

StatusFileSize
new81.85 KB

How do you setup the Display Fields so that the an image that has been uploaded using FileField can be pass the thumbnail to the JW Media Player 4?

I've got the FLV and skin working great, but can't seem to pass the thumbnail correctly.

jfha73’s picture

I'm not passing Thumbnails, but I'm going to try to see if I have the same problem.

Stuart Greenfield’s picture

Please try to avoid posting to fixed threads, unless you need to re-open it because the original issue wasn't fixed.

I think what you're asking for might be a feature request - so I'm going to start a NEW thread to track this through.

The new thread is #450946: Pass thumbnails to media players.

Thanks.

Status: Fixed » Closed (fixed)

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