How to Embed a Video in Drupal

Tips on how to insert a video into a post or article


How to Embed a Video in Drupal

by Christopher Heng, thesitewizard.com

If 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

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

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

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

  4. 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/.

thesitewizard™ News Feed (RSS Site Feed)  Subscribe to thesitewizard.com newsfeed

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 my 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

New Articles

Popular Articles

How to Link to This Page

It will appear on your page as:

How to Embed a Video in Drupal





Home
Donate
Contact Us
Link to Us
Topics
Site Map

Getting Started
Web Design
Search Engines
Revenue Making
Domains
Web Hosting
Blogging
JavaScripts
PHP
Perl / CGI
HTML
CSS
.htaccess / Apache
Newsletters
General
Seasonal
Reviews
FAQs
Wizards

 

 
Free webmasters and programmers resources, scripts and tutorials
 
HowtoHaven.com: Free How-To Guides
 
Site Design Tips at thesitewizard.com
Find this site useful?
Please link to us.