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
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

fredklopper - September 10, 2008 - 18:42

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

With best regards,

Fred

#2

aaron - September 10, 2008 - 19:13

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

Architeck - October 7, 2008 - 20:34
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?

#4

Architeck - October 22, 2008 - 17:10

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

kulfi - November 24, 2008 - 09:52

Same issue for 5.x

#6

extect - January 27, 2009 - 16:31

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

mchaplin - March 9, 2009 - 11:40
Component:User interface» Code
Category:support request» bug report

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

naptown - March 17, 2009 - 15:52
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'
    }

#9

stackpool - April 5, 2009 - 19:44

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

neilnz - August 18, 2009 - 23:00

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.

 
 

Drupal is a registered trademark of Dries Buytaert.