How to Embed a Video in Drupal
by Christopher Heng, thesitewizard.comIf you have ever copied the embed code for a video, such as those provided by YouTube, and tried to paste it into your Drupal post, you may have found that your video does not even show up in your post. This article describes how you can correctly insert a video from a video sharing site into a Drupal article or post.
Steps to Inserting a Video in Drupal
Get the embed code
The first step is of course to upload your video to a video sharing site, and get the embed code that they supply to you. The embed code typically looks something like this:
<object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/tIBxavsiHzM" /> <embed src="http://www.youtube.com/v/tIBxavsiHzM" type="application/x-shockwave-flash" width="425" height="350" /> </object>
For the curious, the above code comes from thesitewizard.com's feedback form script How-To video. In YouTube, you can find the code to embed your video in the box labelled "Embed" on your video page. The other video sharing sites also provide easy-to-use cut and paste code for your videos.
Posting in Drupal
Log into your Drupal account, go to your "Create content" section, followed by "Blog entry" or whatever entry type that you are using. Give your post appropriate titles and content. It's best to say something, even if it's very brief, about what the video is about in the main body. The importance of this is explained in my article on creating search engine friendly websites at http://www.thesitewizard.com/sitepromotion/search-engine-friendly.shtml
Hit the ENTER (or RETURN) key a couple of times after your paragraph. Paste the embed code.
Setting the Input Format
Under the post box is a link called "Input format". Click it to expand the section. By default, the "Filtered HTML" button is enabled. This option only allows a limited set of HTML code to be used in your Post box. Since the embed code is not in the list of allowed HTML code, Drupal will filter your code when it displays your post, resulting in your video not appearing when your article is viewed.
Select the "Full HTML" radio box instead.
Submit the Post
When you've finished with your post and the post settings, click the Submit button. Your video should now appear correctly in your Drupal blog.
Copyright © 2008 by Christopher Heng. All rights reserved.
Get more free tips and articles like this,
on web design, promotion, revenue and scripting, from http://www.thesitewizard.com/.
If you find this article useful, please consider making a donation.
thesitewizard™ News Feed (RSS Site Feed)

Do you find this article useful? You can learn of new articles and scripts that are published on thesitewizard.com by subscribing to the RSS feed. Simply point your RSS feed reader or a browser that supports RSS feeds at http://www.thesitewizard.com/thesitewizard.xml. You can read more about how to subscribe to RSS site feeds from our RSS FAQ.
Please Do Not Reprint This Article
This article is copyrighted. Please do not reproduce this article in whole or part, in any form, without obtaining my written permission.
Related Pages
- How to Create a Cron Job (Scheduled Task) for Your Website or Blog
- WordPress Vs Drupal Vs Expression Engine: Which Blog Software Should I Use?
- The Pros and Cons of Using an Online Blog Software or a Content Management System (CMS)
- How to Register Your Own Domain Name
- Which Web Host Do You Recommend? (FAQ)
- Should I Start My Site Under a New Domain Name or as a Subdirectory (Or Subdomain) Of My Existing Site?
- How to Accept Credit Cards on Your Website
- Blog Theme Designing: How to Design a Good Theme/Template for Your Blog
New Pages
- How to Create and Use Cookies in PHP
- How to Insert Google AdSense Advertisements into Your Blogger Blog
- How to Design a Two Column Layout for Your Website Using CSS
- Is It Legal to Use Any Piece of Music, Image, or Article for my Website? And Other Questions on Copyright Relevant to Webmasters
- Why Do the Pictures on My Web Page Not Show Up in Nvu / KompoZer? Troubleshooting the Broken Images on Your Page.
- Should I Have a Multi-Column Newspaper Layout for My Website? More Tips on Usability
- Should I Use a Temporary Domain Name Till My Preferred Domain Becomes Available?
- Should You Use Cloaked Domain Redirection to Point to Your Website?
- Why Is My Site Not Ranking in the Search Engines?
- What Sort of Website Should I Create In Order to Earn Money?
Popular Pages
- How to Start / Create Your Own Website: The Beginner's A-Z Guide
- Tips on Choosing a Good Domain Name
- How to Create a Search Engine Friendly Website
- Dreamweaver Tutorial: How to Create a Website with Dreamweaver CS3
- How to Design and Publish Your Website with Nvu (free WYSIWYG web editor)
How to Link to This Page
It will appear on your page as:
How to Embed a Video in Drupal
thesitewizard™, thefreecountry™ and HowToHaven™ are trademarks of Christopher Heng.
Last updated: 16 February 2008.