I only want to use this module with filefield to play flv files, but I do not want it auto load all my PDF files.
How to disable PDF autoload?

Comments

fredklopper’s picture

I'd like to know why it ignores the node types settings and just opens every PDF file.

With best regards,

Fred

aaron’s picture

fredklopper: that was a bug i fixed a few days ago; try the latest dev version and let me know if you still see that behavior.

faqing: for now, if possible, don't use pdf file uploads with other type uploads (i.e., different node types if possible), and make sure you use the latest dev. there may be a switch that can be sent to the plugin; i have to research that.

i'd like to add more intelligent switching, when i have a chance to continue development on the module.

Architeck’s picture

Version: 6.x-1.3 » 6.x-1.4-beta1

It seems I have the same issues with pdfs and enabling jquery media for different content types

I'm working with the latest beta release for drupal 6

Any insight on a workaround or fix would be great, I don't see any recent dev release?

Architeck’s picture

Got this working.

Rather than exclude or include any particular content types, as that functionality does not seem to work,

I simply used the option under the Jquery media settings section called classes and added my specific class .field-field-event-podcast a

This works great, although the ability to set auto invoke Jquery media per content type would be preferred.

kulfi’s picture

Same issue for 5.x

extect’s picture

Any chance this issue is being dealt with? Right now it does not seem to be possible to allow video/audio AND PDF uploads within the same node type without all PDFs being auto loaded within the node.

mchaplin’s picture

Component: User interface » Code
Category: support » bug

Looks like a very good module that we will use albeit with the above work around. Also recommend Sean Effel's video.

I'm also finding that the node type settings are completely ignored.

Using Drupal 6.9 + jquery_media-6.x-1.4-beta1.

Also using PHP 5.1.2.

rtackett’s picture

Version: 6.x-1.4-beta1 » 5.x-1.3

In version 5x, as a work around, I disabled the pdf rendering by removing ",pdf" at line 176 of the jquery.media.js file. It will probably work for 6x although I haven't tested it.

   // special cases
    iframe: {
        name:  'iframe',
        types: 'html' //removed ",pdf" to disable pdfs from rendering
    },
    silverlight: {
        name:  'silverlight',
        types: 'xaml'
    }
stackpool’s picture

I'd steer clear of doing that, at least in D6: the method Architeck describes in (#4) works just fine. For example, I've restricted jQuery (under Admin > jQuery Media > Classes > Media) to: .field-field-videofile a and it ignores everything but the video files I uploaded in Filefield. You can add other media as and when you need them. It's not very well explained in the module help text, but that should be all you need to filter media. No need to make a rod for your own back by editing the module's code...

neilnz’s picture

Building on #4's solution, I used jQuery's advanced selector syntax (http://docs.jquery.com/Selectors) to target just the filetypes I wanted using their extensions:

.filefield-file a[href$=flv],.filefield-file a[href$=mp4],.filefield-file a[href$=swf]

This seems to work perfectly, and means that I don't have to do any custom theming hacks to get the right behaviour.

strangeluck’s picture

#10- you sir, are a genius. thank you so much for this brilliant little piece of advice, this had been causing me such a headache.

wmostrey’s picture

Thanks for the tip in #10. It's a shame there is no a[href$!=pdf] option though, so I don't think it's a complete solution.

neilnz’s picture

It shouldn't be insurmountable. A couple of possibilities are:

.filefield-file a[href!=pdf]

Which simply does a "contains" check of the href making sure there's no string "pdf" in it.

Or use negation:

.filefield-file a:not([href$=pdf])

Which seems like a pretty good solution?

Once again you can combine these negations if you have a list of types you don't want to convert:

.filefield-file a:not([href$=pdf]), .filefield-file a:not([href$=mp3])

There may be a more efficient method for that, but I haven't looked very hard.

wmostrey’s picture

Status: Active » Fixed

The suggestions in #13 work for me, thanks.

Status: Fixed » Closed (fixed)

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