
I'd like to use the TinyMCE Media plugin to upload Flash into my text editor. Can someone help me add this plugin to my Drupal 5.x site? Thanks!
I'd like to use the TinyMCE Media plugin to upload Flash into my text editor. Can someone help me add this plugin to my Drupal 5.x site? Thanks!
Comments
Comment #1
ausvalue CreditAttribution: ausvalue commentedTry the following:
1) Obtain the media plugin and and install the media subdirectory as the following subdirectory:
..../modules/tinymce/tinymce/jscripts/tiny_mce/plugins/media
2) In the file:
..../modules/tinymce/plugin_reg.php
Add the following code
$plugins['media'] = array();
$plugins['media']['theme_advanced_buttons2'] = array('media');
$plugins['media']['extended_valid_elements'] = array('img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|obj|param|embed]');
Note: the 2 in theme_advanced_buttons2 specifies that the button will be in row 2 of the buttons. You can change this to 1, 3 or 4 etc. The order/position within the file specifies where in the row the button will be.
3) after doing the above you should be able to see the button in the buttons and plugins section within the edit tinymce profile within your administration profile.
->Administer->Site configuration->TinyMCE->edit(of profile)->Buttons and Plugins
I am not sure how much of the following needs to be done to get the changes through
perform browser refresh/Disable page cache in Performance section/run update.php/run cron/ etc
When it becomes visable in the Buttons and Plugins section the administration panel you then enable it there and you should be able to see it in your editor (maybe more refresh needed first)
If more problems ask here again.
Regards
Ken
http://AusValue.com
Comment #2
cgjohnson CreditAttribution: cgjohnson commentedThanks Ken, for responding. This is a simple question, really, but I am stuck on (1) -- I can't find the media plugin anywhere in order to install it in that directory. Is it a simple case of adding code to plugin_reg?
thanks,
cg
Comment #3
cgjohnson CreditAttribution: cgjohnson commentedHi Ken, Ignore that last note -- I see that it's already in the plugins of the TinyMCE installation, not the module... that was driving me crazy. For anyone else looking for it, it ships with tinyMCE. You can find it under modules/tinymce/tinymce/jscripts/tiny_mce/plugins. that's a mouthful.
Elementary as it may be, this could be useful (the last 5 mins esp.) Screencast: http://www.usingdrupal.com/node/11
thanks!
Comment #4
ausvalue CreditAttribution: ausvalue commentedYes, confusing to find it already there. I couldn't figure out why I couldn't find the download site either since I knew I once did find it as I had installed it.
I think that the Drupal TinyMCE customisation was initially created before the media plugin was available and has never been updated to include it. This plugin is meant to replace the old flash plugin. If you have code in plugin_reg.php relating to the old flash module you may want to delete that as well.
When using this media plugin, you may be interested in the following:
http://www.elijahlofgren.com/tutorials/embedding-flash-with-the-tinymce-...
Regards
Ken
Comment #5
hrayr CreditAttribution: hrayr commentedI am also having trouble with the media plugin. I have installed it as instructed on this page, and it works flawlessly on Firefox, however in IE7, when I enter a valid youtube url and click on Insert, I get a JavaScript error. For lack of good javascript tool in IE7, I can't be of help on what the error message contains.
Also note that once I paste the YouTube video link in the File/URL text field the dimensions and preview update as expected. The JavaScript error only happens when I click on the Insert button.
Any suggestions or comments? Thanks in advance.
Comment #6
giorgoskMedia plugin makes the YouTube plugin obsolete
Now I can paste the youtube url and all is handled by the media plugin
(by the way I am using drupal6 but instructions are the same)
One minor problem I faced was this code
and it made my flash movies dissapear when I saved the node
so changed "false" to "true"
Comment #7
rimu CreditAttribution: rimu commentedthanks Ken, that worked great :D
Comment #8
kreynen CreditAttribution: kreynen commentedComment #9
alexevasion CreditAttribution: alexevasion commentedI put that code in, but I haven't been able to see the new "media" button available in Tinymce admin. The media plugin was already in the right place and I've run cron and done all the other things that might make it show up.... but to no avail... any ideas where I might be slipping up? Thanks,
ALEX
www.youfitter.com
Comment #10
giorgoskWhy was this title changed ???
alex
you might want to do all the step you did from the beginning with a clean drupal installation and clean tinymce installation
Comment #11
scrambled CreditAttribution: scrambled commentedthanks for the help installing this. I was able to get this to work for firefox. But for IE7 i just get a blank box. Is there any known issues with ie7 or work-around?
Thanks
Comment #12
go7 CreditAttribution: go7 commentedHi GiorgosK,
I hope you can help me out here. I use the media plugin and it works fine for windows media files, but I can't seem to be able to get the flash videos to work. I tried the solution you mentioned above, but I don't seem to have the $init['cleanup'] = '' under function tinymce_config($profile) { in the tinymce.module. Should I just add it?
Also I need to upload .flv videos in addition to .swf videos. I added this extension to plugins/media/jscripts/media.js to fo = tinyMCE.getParam("media_types", "flash=swf,flv; but I am not sure if the flash player that the script calls actually would work for flv files. Any idea with that?
I tried to upload both flv and swf files. I can change the background and other features, but the videos don't load. When I go to either preview or the created page and right click on the video background Adobe tells me "movie not loaded".
Would I have to load a flash player to my server and then call it from the media plugin, or what am I missing here?
Thanks for the help