Untitled Document
 
birkit.com: Website Craftsmanship

EXT: Video Switcher

Extension Key: tx_videoswitcher

Copyright 2006-2007, Lucas Birk, <lbirk at birkit com>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Introduction

What does it do?

"Video Switcher" is a front end Plugin for TYPO3 that allows a video media file to be linked to directly from the RTE.

Linking to a file (or a page containing embedded media) is not a problem in the RTE but, if there media is available in several different formats, we would have to create a separate link to each format. This could quickly become unmanageable!

The Video Switcher extension:

  • Generates a link to a media file from anywhere in the body text of the RTE directly to a special page where the front-end user can choose his/her preferred viewing format.
  • Displays links to every available format as a text-link or logo-link.
  • Displays links to external download pages where users can get media player Plugins.
  • Embeds the chosen player on a special display page.
  • Provides forward and back links to the original starting page--no matter where that page be in the page tree.
  • Optional download file link.
  • Based on templates.
  • organizes all media in a Sys-folder for easy sorting.

Screenshots:

Video records types:

  • Video titles contain the basic information about the title such as it's name and description.
  • Formats For Title: These records setup the title to be displayed in different formats.
  • (Title of)Format: A format record is created for each kind of file. If there are .wmv, .mov and .swf formats then a format record would be created for each.
  • Categories. (Not yet implemented).

Links in RTE text

Links can appear anywhere in RTE text. The Video Switcher Plugin will build the link using a special tag (see fig. 7) to produce something link can be seen in fig. 2.

Choose Format Page

After clicking a link to watch a video, the user is presented with a page (fig. 3) where they can select their desired format.

The links can be either images or text and the download link can be disabled via TS.

Users Manual

Note: To configure the extension see the section “Configuration†below.

In LIST view:

  1. Create a TITLE for a video by clicking Create new record- > Video Title:.
    Titles contain only basic information about the video. The title will be the title as seen in the front end will be referenced by the Title Types and Video Formats records.

  1. Create a FORMAT for a video by clicking Create new record- > Video Formats.
    A "Video Format" contains the configuration settings of the format. This is where we specify things like link text/logo, download logos etc. We can also "setup" the default parameters that will define the HTML tags for all media of the format

  1. Create a Title Type for a video by clicking Create new record- > Title Types.
    There are two important fields here: Attach this Video to Title and Format.

Attach this Video to Title: Ties the Title Type to the selected Video Title.
Format: Ties the selected Video Format to the Title Type.

Notes:

Examples for the "Params" can be found in the examples section of this document.
Param values entered in the Title Type will override those of Video Format.

In PAGE view:

  1. Open a page in the page tree where a video link should be placed.
  2. In the RTE enter the special tag with (fig. 1.) the text that will become the link to the media and the id of the media itself. The id is the id of the Video Title.

Administration

Example pageTSconfig

RTE.default {
   proc{
      allowTags (
          a, abbr, acronym, h1, h2, h3, h4, h5, h6,
          hr, i, img, li, ol, p, pre, vs
     )
     HTMLparser_rte.tags.vs.protect = 1
  }
}

Configuration

  1. Create a Sysfolder to store the videoswitcher data in.
  2. Create a page where users will pick their player and set the starting point to the aforementioned Sysfolder. The pid of this page will become the pickPid.
  3. Create a page for the video to play on and set the starting point to the aforementioned Sysfolder. The pid of this page will become the viewPid.
  4. Add the static template Video Switcher (videoswitcher) to the list of static templates.
  5. In the constant editor:
    • Set the pickPid to the pid of the first page (point 1).
    • Set the viewPid to the pid of the second page created (point 2).
  6. Configure the RTE to keep the special tag the plugin needs to create the links.

Reference

Property:

Type:

Description:

Default:

pickPid int The PID of the page that lists the different player types.  
viewPid int The PID of the page where the video will be shown.  
displayDownloadOnViewPid boolean Show logo to download player on viewPid page. 1
displayDownloadOnPickPid boolean Show logo to download player on pickPid page. 1
showDownloadLinkAs int Show the download links as 0-text 1-image 2-both. 1
showFormatLinkAs int Show the format links as 0-text 1-image 2-both. 1
displayTrademarks int Display trademark information with logos. 1

Param Tag Examples:

<!--Example code for Windows Mediaâ„¢ Player -->
<object id="MediaPlayer1" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" height="210" width="240">
   <param name="FileName" value="###SOURCEFILE###">
   <param name="src" value="###SOURCEFILE###">
   <param name="ShowControls" value="1">
   <param name="ShowPositionControls" value="0">
   <param name="ShowAudioControls" value="1">
   <param name="ShowTracker" value="0">
   <param name="ShowDisplay" value="0">
   <param name="ShowStatusBar" value="0">
   <param name="AutoSize" value="0">
   <param name="ShowGotoBar" value="0">
   <param name="ShowCaptioning" value="0">
   <param name="AutoStart" value="1">
   <param name="AnimationAtStart" value="1">
   <param name="TransparentAtStart" value="0">
   <param name="AllowScan" value="0">
   <param name="EnableContextMenu" value="0">
   <param name="ClickToPlay" value="0">
   <param name="InvokeURLs" value="0">
   <param name="DefaultFrame" value="datawindow">
   <embed src="###SOURCEFILE###" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="MediaPlayer1" autostart="true" showcontrols="1" showpositioncontrols="0" showaudiocontrols="1" showtracker="0" showdisplay="0" showstatusbar="0" autosize="0" showgotobar="0" showcaptioning="0" autorewind="0" animationatstart="1" transparentatstart="0" allowscan="0" enablecontextmenu="0" clicktoplay="0" invokeurls="0" defaultframe="datawindow" height="210" width="240">
</object>


<!--Example code for RealMediaâ„¢ Player -->
<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="320" height="240" hspace="11" vspace="11" id="video593">
   <param name="FileName" value="###SOURCEFILE###" />
   <param name="src" value="http://www.akquinet.de/uploads/tx_videoswitcher/Kraft.rm" />
   <param name="controls" value="ImageWindow" />
   <param name="console" value="video593" />
   <param name="autostart" value="true" />
   <param name="loop" value="false" />
   <embed src="###SOURCEFILE###" width="320" autostart="true" loop="false" height="240" hspace="11" vspace="11" type="audio/x-pn-realaudio-plugin" console="video593" controls="ImageWindow">
</object>

Tutorial

None yet

Known Problems

None known.

To Do

  • Enable Categories
  • Enable embed directly on page (instead of link).
  • Option to save users preferred format in cookie so they only need to pick once.
  • Go directly to media if only one type.
  • Improve Docs.

Change Log

 

06-10-24

  • Initial release

06-10-25

  • Enabled download link.

  • Documentation

  • Fixed some spelling errors etc.

06-11-09

Version: 0.0.4

Feedback

Since this plugin is in "Alpha" state I would like to hear your feedback about what things that can be improved upon or added. This goes for the documentation too! Since I wrote it and know how to use it without reading, it is inevitable (Mr. Anderson) that I have left some key steps out or have not explained things throughly!

Please feel free to contact me here.

Lucas.