This is for you, Jeff. Well, for his kids anyway.
Jeff recently asked how to embed video in Drupal. Since I’m working with a new Drupal installation I decided I would try and figure it out, just in case it came in handy for me and my sites at some point in the future. So I did, and here’s how I did it.
First, I installed the Embed Filter which allows for embedding and object tags. Once I installed it, I activated it, and added http://youtube.com into the allowed domains list. I also added http://www.youtube.com just for kicks. I may go back and add the ip address (http://208.65.153.251) to it as well, making it possible to see from other spots if I’m lucky.
But it didn’t work. I began to wonder what was happening. I had installed the FCKEditor plugin, which I LOVE. This plugin requires a separate download of the actual FCKEditor to work. When I used the source command the video would be seen upon returning to WYSIWYG mode, but then once saved it would not. Hmmm.
I then made it where FCKEditor opens in a popup rather than by default. This adds a link that says Open Rich Editor alongside the body of what you’re writing. Still didn’t work. My logic is that FCKEditor was cleaning the code and making it faulty. Nope, sorry to have blamed you FCKEditor.
Then it hit me, my code WAS being filtered, by Drupal.
I had to enable FULL HTML under the Input Format menu below the posting. Once I did that, I was golden.
Now, for student accounts on my site to be able to do this, the administrator (me) would have to enable it in the permissions. You can do this by clicking on Administer –> Input Formats and then configuring a certain role (student in my case) to be allowed to use FULL HTML. You will still have to click it on each post, but that’s an easy solution.
So there it is, Utecht’ers. Hope this helps!
Bill Fitzgerald says:
Hello, Chris,
Another way to do it — without giving one role access to “full html” — is to add the following tags to the input formats (at admin/filters): , and .
Additionally, students will need to input this without using the wysiwyg editor — my editor of choice is TinyMce, but, like many things, that’s a pretty subjective determination
Bill
9th December 2006 at 1:53 am
Bill Fitzgerald says:
Also, to clarify, my above comment assumes you have the Embed Filter installed –
9th December 2006 at 1:54 am
Hardware Heretic 404 says:
Thanks for teaching us how to embed YouTube videos, Mr. Craft! I added the EmbedFilter and enabled every variation of Youtube.com I could find – we’re testing it right now to see if it works.
Thanks,
Hardware Heretic 404
9th December 2006 at 2:45 am