Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

1.5. Configuration

Both the audio and video versions of the Flash Presentation plugin have been developed with the goal of being highly configurable while still being easy to use.  The Users Manual section above described several different places where data may be entered.  The goal was to put the values that will change most often in a FlexForm, while those that will only change occasionally are placed in the Constant Editor so that their values can be shared across multiple instances of the Flash Presentation Plugins.  In addition to these locations, there are several variables that will only change on very rare occasions.  These variables are only set in the Typoscript setup.  

In an effort to enhance the customizablity of the extension, however, all variables can be set from Typoscript directly if you prefer.  Any FlexForm values that have been set will override the Typoscript values, but giving every variable a Typoscript object allows the plugin to be used in a very dynamic environment.  Likewise, the available Typoscript values and their FlexForm counterparts are in no way hard coded into the extension output.  If you need to modify the Flash source files to meet a specific requirement of your site, simply add a new Typoscript object and its value will automatically be passed through as part of the FlashVars output.

Video Only Parameters

Each video parameter can be found within plugin.tx_wecflashpresentation_pi1

Example: plugin.tx_wecflashpresentation_pi1.videobase.value = fileadmin/video/

Field Name

Description

Type

Notes

videobase

Directory that video files are stored in.

TEXT

Stored in Typoscript Setup.

Value defaults to the uploads folder (uploads/tx_wecflashpresentation) since uploaded files will be placed here.  

Path can be rellative to TYPO3 root (uploads/tx_wecflashpresentation) or absolute (http://www.mysite.com/uploads/tx_wecflashpresentation).

videolow

Filename of low bandwidth video.

TEXT

Stored  in FlexForm or Typoscript Setup.

File is expected to be in the FLV video format at a resolution of 320 x 240 or less.

videohigh

Filename of high bandwidth video.

TEXT

Stored in FlexForm or Typoscript Setup

File is expected to be in the FLV video format at a resolution of 320 x 240 or less.

radioLabelLow

Radio button label for low bandwidth option.

TEXT

Stored in Constant Editor or Typoscript Setup.

Value defaults to “Low (Dialup)”.

radioLabelHigh

Radio button label for high bandwidth option.

TEXT

Stored in Constant Editor or Typoscript Setup.

Value defaults to “High (Broadband)”.

videolowEC

Encoding bitrate for low bandwidth video,.

TEXT

Stored in FlexForm, Typoscript Setup.

Encoding should be entered as kbps.

videohighEC

Encoding bitrate for high bandwidth video,.

TEXT

FlexForm, Typoscript Setup.

Encoding should be entered as kbps.

swapUI

Swaps the location for slides and video.

TEXT

Stored in Constant Editor or Typoscript Setup.

By default, slides are on the left and video is on the right.  Setting swapUI to 1 will reverse this.

Audio Only Parameters

Each audio parameter can be found within plugin.tx_wecflashpresentation_pi2

Example: plugin.tx_wecflashpresentation_pi2.audiobase.value = fileadmin/audio/

Field Name

Description

Type

Notes

audiobase

Directory that audio files are stored in.

TEXT

Stored in Typoscript Setup.

Value defaults to the uploads folder (uploads/tx_wecflashpresentation) since uploaded files will be placed here.

audiofile

Filename of MP3 audio file.

TEXT

Stored in FlexForm or Typoscript Setup.

File is expected to be in the MP3 audio format.

audioEC

Encoding bitrate for MP3 audio..

TEXT

Stored in Flexform or Typoscript Setup.

Encoding should be entered as kbps.

See Known Issues for a description of common audioEC problems.

Common Parameters

Common parameters can be found in both plugin.tx_wecflashpresentation_pi1 and plugin.tx_wecflashpresentation_pi2, depending on whether you want to set the parameter for video (pi1) or audio (pi2)

Example: plugin.tx_wecflashpresentation_pi1.flashPath.value = fileadmin/flash_video.flaplugin.tx_wecflashpresentation_pi2.flashPath.value = fileadmin/flash_audio.fla

Field Name

Description

Type

Notes

flashPath

Path to Flash movie to be loaded.

TEXT

Stored in Constant Editor.

Value may be an absolute or relative URL.

Defaults to typo3conf/ext/wec_flashpresentation/fla/video_chart_final.swf for video version or typo3conf/ext/wec_flashpresentation/fla/mp3_chart_final.swf for audio version.

This value is only used in the HTML markup and is not passed to the Flash movie.

width

Width of the the Flash movie.

TEXT

Stored in Constant Editor.

Defaults to 770 for video version or 400 for audio version.

This value is only used in the HTML markup and is not passed to the Flash movie.

height

Height of the Flash movie.

TEXT

Stored in Constant Editor.

Defaults to 400 for video version or 420 for audio version.

This value is only used in the HTML markup and is not passed to the Flash movie.

bgcolor

Background color for the Flash movie.

TEXT

Stored in Constant Editor.

Defaults to #FFFFFF (white).

This value is only used in the HTML markup and is not passed to the Flash movie.

textcolor

Text Color.

TEXT

Stored in Constant Editor or Typoscript Setup.

Default value is #000000 (black).

wmode

Windowless mode for the Flash movie.

TEXT

The value of wmode can be opaque, transparent, or window. Opaque is the default behavior and is allows the Flash movie to be layered below DHTML menus.

This value is only used in the HTML markup and is not passed to the Flash movie.

classtitle

Title of class / video.

TEXT

Stored in FlexForm or Typoscript Setup.

intromessage

A welcome or intro/directions message.

TEXT

Stored in FlexForm or Typoscript Setup.

bwbase

Directory that bandwidth testing image is stored in.

TEXT

Stored in Typoscript setup.

Default value is res folder within the extension directory (typo3conf/ext/wec_flashpresentation/res).

bwimage

Filename of bandwidth checker image.

TEXT

Stored in Typoscript Setup.

bgbase

Directory that background image is stored in.

TEXT

Stored in FlexForm, Typoscript Setup.

Value defaults to the uploads folder (uploads/tx_wecflashpresentation) since uploaded files will be placed here.

bgimage

Filename of background image.

TEXT

Stored in FlexForm or Typoscript Setup.

imagesbase

Directory that slide images are stored in.

TEXT

Stored in FlexForm or Typoscript Setup.

slides

Pairing of image filenames and corresponding timing.

TEXT

Stored in FlexForm or Typoscript Setup.

Date should be entered in the following format:

image1.jpg 7

image2.jpg 05:15

image3.jpg 01:10:24

This example creates three slide image/timing pairs.  The first slide will appear when the video playback reaches 7 second, the second at 5 minutes, 15 seconds, and the third at 1 hour, 10 minutes, 24 seconds. Time should always be entered in the HH:MM:SS format but any time entered will default to the lowest possibility (ex. 7:10 is interpreted as 7 minutes, 10 seconds rather than 7 hours, 10 seconds).

This field will be transformed on output and split the slide images and timings into two separate fields, slideImages and slideTimings.  The example above would be passed to Flash in the following format.

slideImages=image1.jpg,image2.jpg,image3.jpg&slideTimings=7,315,4224

If a timing is entered without a corresponding slide image, the timing is ignored completely and is not passed to Flash.

If a slide image is entered without a corresponding timing, a default timing is created one second after the last slide image/timing pair.

baseurl

Base URL that all media files are read from.

UNDEFINED

By default, the baseurl is not manually defined and is instead automatically set to the main TYPO3 path.

To use a custom URL, set up a TEXT cObject with the base URL that media should be loaded from.

Setting Fields Dynamically

As alluded to above, it is possible to set extension parameters dynamically through Typoscript.  By default, the title of a Flash player is assigned in the Frontend Plugin's FlexForm.  In this default configuration, the following Typoscript setup is defined.

plugin.tx_wecflashpresentation_pi1.classtitle = TEXTplugin.tx_wecflashpresentation_pi1.classtitle.value = 

If you'd like to set a static value in Typoscript, simple change the second line.

plugin.tx_wecflashpresentation_pi1.classtitle.value = My Class Title

More interesting is a dynamic value.  The following example will set the class title to the title of the current page.

plugin.tx_wecflashpresentation_pi1.classtitle = TEXTplugin.tx_wecflashpresentation_pi1.classtitle.field = title

For each of these example, a value in the FlexForm will take precedence over any special Typoscript configuration you may perform.

It is also possible to set up the entire extension via Typoscript, following similar concepts as shown above.  The following Typoscript would render the Flash Video presentation.

page.10 < plugin.tx_wecflashpresentation_pi1
page.10 {
  classtitle.value = My Class Title
  intromessage.value = Loading...
  bgbase.value = fileadmin/introvideo
  bgimage.value = background.jpg
  videolow.value = low.flv
  videolowEC.value = 128
  videohigh.value = high.flv
  videohighEC.value = 256
  imagesbase.value = fileadmin/introvideo
  slides.value ( 
    slide01.jpg 0
    slide02.jpg 5
    slide03.jpg 10
 )
}

Calling the Flash Presentation via HTML

In addition to the dynamic, Typoscript-based configurations, it is also possible to use the Flash Presentation within a static HTML page.  The disadvantage of using static HTML is that many of the default values provided by TYPO3 must now be manually entered so it is recommended that you use Typoscript whenever possible.  An example of using the Flash Video Presentation from a static HTML context is shown below.

<div class="tx-wecflashpresentation-pi1">
  <embed src="typo3conf/ext/wec_flashpresentation/res/video_chart.swf" flashvars="textcolor=#000000&classtitle=My Class Title&intromessage=Loading...&bgbase=fileadmin/&bgimage=bg.jpg&bwbase=typo3conf/ext/wec_flashpresentation/res/&bwimage=100k.jpg&videobase=uploads/tx_wecflashpresentation/&videolow=low.flv&videolowEC=128&radioLabelLow=Low&videohigh=high.flv&videohighEC=256&radioLabelHigh=High&imagesbase=fileadmin/&slideImages=01.jpg,02.jpg&slideTimes=0,5&baseurl=http://typo3.dev/&lastloaded=true" width="760" height="400" bgcolor="#FFFFFF" quality="high"  pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</div>

There are a couple things worth noting in this example.  There are several values (src, width, height, bgcolor, etc) that are not passed along to the Flash movie and are only used in generating the HTML.  In the table of parameters above, the special variables are noted.  Aside from these special cases, all parameters are passed to the Flash movie inside the flashvars attribute.  The parameter names used in the HTML are identical to those described in the table above.  Parameters and their values are separated by an equal sign while parameter / value pairs are separated by an ampersand.  

In addition to those parameters described in the table above, there are two paramters that are always included automatically by TYPO3:  baseurl and lastloaded.  When generating the Flash movie from static HTML, you'll need to set lastloaded to true and baseurl to the root URL of your site.