Hi,
I've created a patch/plugin to add a button to TinyMCE wysiwyg editor to work with the video filter. This new TinyMCE button simply pops up a single field form that let's enduser input supported video urls and said url is converted and inserted in proper video filter format.
I am suggesting housing this plugin within the video filter module rather than creating an entirely separate module. This is a situation similar to the tinymce button provided by the img_assist module.
In both cases, the custom TinyMCE plugin relies on the hook_wysiwyg_plugin provided by the Wysiwyg Module (http://drupal.org/project/wysiwyg), the new and soon-to-be defacto controller for wysiwyg support in Drupal. This hook (essentially an api) allows third party modules (eg. Video Filter) to have accompanying editor plugins without having to modify the core code of the parent wyswyg modules (see for example (http://drupal.org/node/152046).
That means this patch/plugin won't work if you don't have TinyMCE enabled via the Wysiwyg Module.
----------------
In the patch, I'm suggesting adding a sample url to a codec. In my situation it helps so I can print out instructions. It might be useful for other situations...
$codecs['google'] = array(
'name' => t('Google Video'),
'sample_url' => 'http://video.google.com/videoplay?docid=-uN1qUeId',
'callback' => 'video_filter_google',
'regexp' => '/video\.google\.com\/videoplay\?docid=(\-?[0-9]+)/',
'ratio' => 400 / 326,
);
Attached is a patch file and a separate zip file that contains the actual tinymce pluging a folder drupalvideo which must be placed into your video_filter directory...
Overall, this patch/plugin is based on the img_assist tinymce plugin.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | drupalvideo.zip | 12.32 KB | mpaler |
| #1 | video_filter.patch | 6.47 KB | mpaler |
| #1 | drupalvideo.zip | 150 bytes | mpaler |
Comments
Comment #1
mpaler commentedfiles attached...
Comment #2
neyoung commentedThe drupalvideo.zip file seems to be empty. I'd love to experiment with this.
Comment #3
mpaler commenteduugh. I was having problems with attachments that day for some reason. Try this one.
Comment #4
TyraelTLK commentedHi, I'm getting:
warning: Missing argument 1 for video_filter_menu() in /DRUPALDIR/sites/default/modules/video_filter/video_filter.module on line 221.
(drupal 6.4)
Comment #5
jdotti commentedI try it with drupal 5.X and it is working.
Thank you
JD
Comment #6
jdotti commentedUpdate the satus
Comment #7
mpaler commentedDrupal 6.4 > 5.x
;-)
Comment #8
jdotti commentedHi,
Now module got problems with {lang} tag since new wysiwyg dev version ...
JD
Comment #9
blackdog commentedI won't add any new features to the 5.x branch, except codecs, so i'm afraid this won't get in. I did however commit a wysiwyg feature to the 6.x branch tonight.
Comment #10
moksa commentedHi,
why i can't patch ??
Any idea ?
++
Comment #11
blackdog commentedThe patch is outdated.
Comment #12
moksa commentedIt's a pity. Nothing replaces?