I know that this is documented in many places. So I just wanted to document it in one place what works today for me, so I don’t have to remember all the different places.
[Note: It has since come to our attention that an excellent guide exists in the SWFTools issues queue, which is supposed to be well worth checking out: http://drupal.org/node/181998 ]
- install swftools (dev version) from http://drupal.org/project/swftools
- download plugins – for example:
- media player: http://www.jeroenwijering.com/?item=JW_Media_Player
- image rotator: http://www.jeroenwijering.com/?item=JW_Image_Rotator
- install all plugins in ./sites/all/modules/swftools/shared !!!! ./sites/all/modules/swftools/shared/flash_media_player/mediaplayer.swf(wijering.module)
./sites/all/modules/swftools/shared/flash_image_rotator/imagerotator.swf (wijering.module) - final tree (from the ./shared/README.txt):
Links - Media Players: MODULE URL wijering http://jeroenwijering.com/?item=Flash_Media_Player wijering http://jeroenwijering.com/?item=Flash_Image_Rotator simpleviewer http://www.airtightinteractive.com/simpleviewer onepixelout http://www.1pixelout.net/code/audio-player-wordpress-plugin Links - Flash Replacement MODULE URL swfobject http://blog.deconcept.com/swfobject ufo http://www.bobbyvandersluis.com/ufo jquery.flash.js http://jquery.lukelutman.com/plugins/flash Default file structure for install players and scripts. You can change the "Default flash player path" in admin/media/swf/embed to change the "shared" directory. However, inside the "shared" directory, the paths to the player file are not configurable. swftools/ shared/ generic/generic_flv.swf generic/generic_mp3.swf 1pixelout/player.swf (onepixelout.module) flash_media_player/mediaplayer.swf (wijering.module) flash_image_rotator/imagerotator.swf (wijering.module) simpleviewer/viewer.swf (simpleviewer.module) swfobject/swfobject.js (swfobject.module) ufo/ufo.js (ufo.module) lutman/jquery.flash.js (lutman.module) Refer to http://drupal.org/project/swftools for documentation.
- enable module (and plugin modules) and grant permissions to swftools admin
- configure swftools
- Embedding settings
- The first time you enter, it creates ./files/playlists. You don’t
have to change any settings, simply click on Embedding settings to
enter the configuration page. Failure to do this will result in an error upon attempting to use the swftools module! The error will occur because the ./files/playlists directory doesn’t exist. - It clears the playlists it generates automatically every time you enter here.
- Enter the embedding settings (leave everthing on default).
- Next time you enter, if Default flash player path has anything in it, erase it and save again – this must be left blank!!!
- Media directory url is unfortunately hardcoded, so each time you
move the site, you must regenerate the automatically generated
playlists and edit your own to reflect the full new site url. - This is usually not a problem since most people with a lot of videos, etc., use off-site storage.
- The first time you enter, it creates ./files/playlists. You don’t
- File handling
- Set the plugins you have downloaded and for which you have enabled specific swftools plugin modules.
- Generic players
- Even though we are not going to use generic players, we are going
to enable Autostart MP3 and Autostart FLV anyway. Call me supersticious!
- Even though we are not going to use generic players, we are going
- Embedding settings
- Configure input format
- Go to administer > input formats (./admin/settings/filters).
- Include SWF Tools Filter in the input format(s) you wish.
- If the input format is filtered, configure it to add the appropriate required tags:
- swf
- swflist
- See input filter help for details on how to use.
- test swftools
- test with a single mp3 file
- Create a story
- Assuming you have uploaded a file (through upload to the files
directory via attachment, or through direct ftp upload to a dir in the
files directory) the body place the following:
<swf file="mp3/dock.mp3">
- test with three mp3 files
- Create a story
- Include something like the following in the body:
<swflist files="mp3/dock.mp3&&mp3/respect.mp3&&mp3/tenderness.mp3"> - This will get you the standard issue Drupal mp3 player with Drupal logo backdrop, and no playlist. But the songs are there
- test with flash movie
- Create a story
- Include something like the following in the body:
<swf file="flv/video.flv">
- test with rotating images
- Create a story
- Include something like the following in the body:
<swflist
player="wijering_imagerotator"
files="image01.jpg&&image02.jpg&&image03.jpg&&image04.jpg"
width="250" height="125" transition="random">
- Hava a ball!
- test with a single mp3 file