Embed filter

Many great sites like YouTube, iFilm and NowPublic allow their media assets to be served to 3rd party websites (like this one). They usually offer snippets of code to be embedded in a web page that will then load a media object (usually Flash) from their servers. This module lets your site users embed such snippets into posts but gives you the power to decide which hosts to trust.

Here is an example of some code snippets from the sites mentioned above:

YouTube.com

<object width="425" height="350"><param name="movie"
  value="http://www.youtube.com/v/BqLvBUSJucg">
  </param><embed src="http://www.youtube.com/v/BqLvBUSJucg"
  type="application/x-shockwave-flash" width="425" height="350">
  </embed></object>

iFilm

<embed allowScriptAccess="never" width="448" height="365"
  src="http://www.ifilm.com/efp" quality="high" bgcolor="000000"
  name="efp" align="middle" type="application/x-shockwave-flash"
  pluginspage="http://www.macromedia.com/go/getflashplayer"
  flashvars="flvbaseclip=2761045" ></embed>

NowPublic

<script language="JavaScript"
  src="http://media.nowpublic.com/js/7ae70d3f8c890cebc5c9633f49607ae2.js"></script>

To use this moudule, start by entering a number of hosts that you wish to allow. This is done from the settings page. Examples taken from the sites mentioned above would be:

Note that variants on a host, such as http://www.youtube.com and http://youtube.com must be entered individually.From the settings page you can also define some HTML that will be embedded before and after any tags (in case you want to be able to visually identify them on your site), as well as some filter tip instructions to your users.

After you have configured the module from the settings page, you need to add the "Object and embed" filter to the appropriate input formats (such as "Filtered HTML") on the input formats administration page. Configure your HTML filter to accept <object>, <embed> and <script> tags by adding them to the list of accepted tags. Configure the order of the filters so that the "Object and embed tag" filter comes directly after the "HTML" filter. After this you should be ready to go!

Releases

Official releasesDateSizeLinksStatus
5.x-1.02007-May-219.68 KBRecommended for 5.xThis is currently the recommended release for 5.x.
Development snapshotsDateSizeLinksStatus
4.7.x-1.x-dev2007-Sep-2510 KBDevelopment snapshotDevelopment snapshots are automatically regenerated and their contents can frequently change, so they are not recommended for production use.


 
 

Drupal is a registered trademark of Dries Buytaert.