Needs review
Project:
SWFObject API
Version:
6.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 May 2010 at 05:38 UTC
Updated:
24 Feb 2011 at 16:18 UTC
Jump to comment: Most recent file
Comments
Comment #1
arthurf commentedCommitted fix to 6.1.x
Comment #2
armyofda12mnkeys commentedis this it latest release?
My drupal claims it cannot find it on status page:
"SWFObject API Copy swfobject.js
Please download the swfobject package from http://code.google.com/p/swfobject/ and place the required files in the swfobject module directory. See README.txt for more info."
But seems like everything depending on swfobject is working.
My swfobject.js file(s) are unzipped to: sites/all/libraries/swfobject
Comment #3
jantoine commentedRather than allow a user to specify the location via settings, I think it's good to try to help site administrators follow Drupal best practices, in this case using the Libraries API module. This will allow users to share the swfobject code across multiple modules. I have attached a patch that does just this. It also fixes the issue in #2.
Cheers,
Antoine
Comment #4
jantoine commentedUpdated the title, version and attached a new patch that includes an updated README.txt file. I should note that the patch was actually created against CVS, but there is no 6.x-1.x-dev snapshot to set as the version.
Cheers,
Antoine
Comment #5
arthurf commentedThanks for the patch. I don't think depending on libraries is a good idea as this module has been out there for some time and would suddenly require existing installs to add more modules to their setups. I also don't think this method is being used that much anymore... with jquery and html5 it seems like people are taking other approaches. I would definitely accept a patch that conditionally used libraries, I just don't want to break any existing installs that are out there.
Comment #6
jantoine commentedHey arthurf,
Considering Drupal is meant to be modular, I don't think it is too much to ask users to download and install a module that appears to me is becoming standard. I have also implemented hook_update_N() that informs the user if Libraries does not exist and secondly, if the swfobject library could not be found. I do understand that this kind of a change after the module is already in beta may seem a bit progressive, so perhaps adding it to a 6.x-1.1 release after the 6.x-1.0 release is created would be more appropriate.
I was under the impression that this was just beginning to become the standard. Could you please point me to examples of these other approaches you mention that modules are using. I am happy to rewrite the patch for whatever is considered to be Drupal best practice.
Cheers,
Antoine