Hi. I've got a module up to first base in my sandbox:
I've called it Flashembed.
http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/sime/jstools/
The jquery side is that it integrates a jquery.flash.js plugin which is a flash replacement tool for jQuery after the likes of UFO etc. (See. http://jquery.lukelutman.com/plugins/flash/ )
But I'm breaking a few stones with one bird by adding automated embedding of up two four different Flash players so as to handle mp3, flv, gif, jpg, png (or an XML playlist of these, especially for the image files). These Flash players are favourites of mine, the behave consistently and are all found at: http://www.jeroenwijering.com/ . Another thing I love about these Flash players is with one off license fee, I can make (visual, functional) changes to the .fla files and have unlimited commercial use.
To quickly demonstrate a use for this module, I did a little demo page. I used the upload module to attach a number of different files. Then I added the following code in a PHP format node page:
<?php print flashembed_upload_render_all( node_load( arg(1) ) ); ?>
The result is this demo page:
http://millionplus.com.au/node/3
Another example. With a single function call hacked into upload_preview.module, I've allowed it to display previews of attached moves and music instead of "preview not available".
Although there is a big Flash element here, I've tried to make it generic and flexible. I'd like this to be part of jstools, let me know if this is possible.
Cheers
Simon
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | preview.png | 80.24 KB | sime |
Comments
Comment #1
simeAttached image is a few lines of code hacked into upload_preview. (OK, 1 line of code wasn't quite enough.)
Comment #2
simeGreat news, I have just got agreement from Luke, the writer of jquery.flash.js, that it will be duel licensed GPL and it can be mirrored in Drupal CVS.
Also, I spoke to kkaeffer in #drupal the other day and he didn't jump at the idea of putting this in jstools project, so I will probably put this in it's own project unless there is sudden interest. Also I should investigate overlap with flash_gallery.
Comment #3
nedjoThis looks like a useful addition. I'd say at first glance that, yes, this might work best as a stand-alone module. It's not dependent on the jquery.js file.
A couple of newbie type questions (I have little experience working with embeds): Would it be possible to extend this to support other types of embeds besides Flash? How does this relate to, e.g., TinyMCE's media plugin?
And have you looked at the embedfilter module? It might be a good combination with your work, to cover security issues associated with embeds.
Comment #4
simeThanks for the good questions.
Regarding the TinyMCE media plugin, I haven't specifically looked at that, however generally I can say that flash embedding is scattered all over Drupal contrib. Nothing is new in what I've got. For example:
So you get from this where I'm headed, but I've also started to thing there is enough to warrant a stand-alone, provided all the other modules can be incorporated into the one project. As mentioned in my previous comment, I've started by contacting DriesK of Flash Gallery. I might try and get in touch with the flash_filter maintainer as well.
Comment #5
simeI made a decision, thanks nedjo. I'm going to do that thing where you want to reduce the number of modules available so you create a new one :-/
http://drupal.org/project/swftools
.s