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.

CommentFileSizeAuthor
#3 drupalvideo.zip12.32 KBmpaler
#1 video_filter.patch6.47 KBmpaler
#1 drupalvideo.zip150 bytesmpaler

Comments

mpaler’s picture

StatusFileSize
new150 bytes
new6.47 KB

files attached...

neyoung’s picture

The drupalvideo.zip file seems to be empty. I'd love to experiment with this.

mpaler’s picture

StatusFileSize
new12.32 KB

uugh. I was having problems with attachments that day for some reason. Try this one.

TyraelTLK’s picture

Hi, 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)

jdotti’s picture

I try it with drupal 5.X and it is working.

Thank you

JD

jdotti’s picture

Status: Active » Reviewed & tested by the community

Update the satus

mpaler’s picture

Drupal 6.4 > 5.x

;-)

jdotti’s picture

Status: Reviewed & tested by the community » Needs work

Hi,

Now module got problems with {lang} tag since new wysiwyg dev version ...

JD

blackdog’s picture

Status: Needs work » Closed (won't fix)

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

moksa’s picture

Hi,

why i can't patch ??

/ww2/web/club/sites/all/modules/video_filter# patch < video_filter_1.patch
zsh: correct 'patch' to '_patch' [nyae]? n
patching file video_filter.codecs.inc
Hunk #1 FAILED at 7.
Hunk #2 FAILED at 43.
Hunk #3 FAILED at 59.
3 out of 3 hunks FAILED -- saving rejects to file video_filter.codecs.inc.rej
patching file video_filter.module
Hunk #1 FAILED at 215.
1 out of 1 hunk FAILED -- saving rejects to file video_filter.module.rej

Any idea ?

++

blackdog’s picture

The patch is outdated.

moksa’s picture

It's a pity. Nothing replaces?