How to diable PDF file auto load
faqing - September 6, 2008 - 00:23
| Project: | jQuery Media |
| Version: | 5.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
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?

#1
I'd like to know why it ignores the node types settings and just opens every PDF file.
With best regards,
Fred
#2
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.
#3
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?
#4
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.
#5
Same issue for 5.x
#6
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.
#7
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.
#8
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 casesiframe: {
name: 'iframe',
types: 'html' //removed ",pdf" to disable pdfs from rendering
},
silverlight: {
name: 'silverlight',
types: 'xaml'
}
#9
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...
#10
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.