6 April 2011

Add video to Textpattern with custom fields

A very challenging projection mapping to celebrate the boost of innovative design of Dutch fashion. 
1 church, 16 projectors, 5 hippo's, 25 million pixels and 250 cups of coffee to create this perfectly matching 26 meters high projection.

You want to embed a video that is uploaded to textpattern in an article and you want this with more than one article. With cfm_videoplayer this is easy, just follow these steps

The basic setup

  1. Get the cfm_videoplayer plugin and activate it under the admin->plugins menu.
  2. Place the jwplayer in the root of your website and be shure it’s called player.swf
  3. Place the javascript that came with the player in /js folder (or a folder you prefer on the server) and embed it between the <head> </head> tags in the page template.
    <script src="/js/swfobject.js" type="text/javascript"></script>
  4. Create two custom fields called “video” and “poster”
  5. Add the cfm_videoplayer code to the form you use to output the article.
    <txp:cfm_videoplayer width="512" height="288" fieldname="video" pmfieldname="poster" js="true" scale="aspect" autoplay ="false" showdownload="true" bufferlength="2" controlbar="over" />

Create the article

  1. upload your file, set the title and description and remember the id
  2. upload the image you have chosen to use as a posterframe, do not forget to set the meta data and remember the id
  3. create the article and put the id of the movie file in the field video and put the id of the image in the poster field

Your done!


Comment

 
---