DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: Flash detection

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed:2011-08-18T13:25:27
Author:André Steiling
Email:steiling@pilotprojekt.com
Info 3:
Info 4:

EXT: Flash detection

Extension Key: rlmp_flashdetection

Copyright 2006, André Steiling, <steiling@pilotprojekt.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

Table of Contents

EXT: Flash detection 1

Introduction 1

What does it do? 1

Screenshots 1

Credits / Terms and conditions 2

Users manual 2

Creating the Flash Movie record 2

Inserting the Flash Movie record into your page 3

Configuration 3

Reference 4

Known problems 4

To-Do list 4

Changelog 4

Introduction

What does it do?

This extension combines several features for integrating flash movies into your TYPO3 website. The key features are:

  • Flash player detection routine
  • The ability to provide a static picture as a fallback solution if no or wrong flash player is available
  • Support for external XML files (the path is accessable from the Flash movie via an external variable)
  • Field for additional parameters
  • Parameters for hide menu, width, height etc.
  • Accesable as a frontend plugin, directly via TypoScript or for usage in your own extension

Screenshots

img-1 The following screenshot shows an example of a flash record which can be used on multiple places of your website.

Credits / Terms and conditions

Since version 1.0.3 André Steiling is the new extension's maintainer. Thanks to Robert Lemke!!

Since version 1.1.0 a new flash detection routine was introduced: The „Detection Kit“ from Adobe. This feature was brought to you by Jose Antonio Guerra. The changes are:

  • Updated flash code detection, now using http://www.adobe.com/products/flashplayer/download/detection_kit/
  • Moock Flash Player Inspector by Colin Moock is not longer needed
  • Flash detection routine has no upper version limit any more
  • Most of the Javascript code is included from an external file
  • New code rids over the flash plugin patent problem in new versions of IE

Users manual

As a user you will insert Flash movies into your website by using the Insert Plugin content element. Just follow the next few steps and your animation will flicker on your desired webpage.

Creating the Flash Movie record

First you have to create a new record which will hold all information about your Flash movie. A good idea is to create a sysfolder (that's a page with a gray folder icon like the ones you see below) and store your Flash movie records at a central place. However, you may also create a Flash Movie record in any page you want, just select new and then „Flash Movie“:

img-2

Next step is to fill in all the details of you Flash movie. On the very first screenshot you have seen how the record form looks like, here is an explanation of the fields you encounter:

  • Description: Just punch in some descriptive name.
  • Required Flash version: Currently you may choose a number from 2 to 9 which relates to the version number of the Flash player being required. If the visitor has no Flash plugin or a Flash player with a version lower than the required one, a static picture will be displayed instead (see below).
  • AJAX request target ID: Maybe you want to use the plugin within an AJAX request, so the plugin hasn't to output the content according to the Javascript „document.write()“ method, instead of this the content has to be written into a target HTML element, mostly a DIV container. Insert it's ID here and the plugin regrads the special needs of an AJAX request.
  • Width / Height: The width and height of your movie in pixels (default). You can also use percent values – just add a „%“ after your value.
  • Quality: Choose between high and low.
  • Display menu: If you check this option, the visitor may rightclick your movie and do some actions like pausing the movie.
  • Loop: If checked, your movie will be looped.
  • AJAX: If checked, the extension outputs content in AJAX compatible mode, see reference for further information.
  • Alternate image: Just upload a picture which will be shown if no or no valid Flash player is available. It makes sense to upload a still picture of your Flash movie with the same width and height!
  • Link (for Alternate image): Here you may specify a link which will be wrapped around the alternate picture.
  • Alternate code: HTML-code which will be shown if no or no valid Flash player is available (the given code will replace the altenative image). Could be used to build a No-Flash Alternative with HTML & JavaScript.
  • Flash file: Upload your flash file here.
  • XML: You may upload any file here. The path to your uploaded file will be passed to the Flash movie by a special variable (FlashVars: xurl)
  • Additional parameters: This textarea is for special parameters you might want to pass over to your Flash movie. Just put one parameter per line, separate name and value by comma (e.g. enableBraintToFlash, true)

Inserting the Flash Movie record into your page

Now that you created a record with all the information about your Flash movie, you may insert it into one or more pages of your website. Just create a new content element and select the plugin „Flash movie“:

img-3

Now just select the page and the Flash Movie record which you like to display on this page by using the element browser:

img-4

That's it.

Configuration

Like you have seen in the user manual, it's very easy to include a Flash movie into your webpage. No configuration is neccessary if you want to use the extension with the Insert Plugin content element.

However, you might also want to include a Flash movie directly by using TypoScript.

((generated))

((generated))
Example I – a simple TypoScript setup:
plugin.tx_rlmpflashdetection_pi1 {
   conf {
      overrideUID = 99
      xmlfile = fileadmin/assets/xml/default.xml
   }
}

subparts.flashanimation < plugin.tx_rlmpflashdetection_pi1

Generally it works like this: By using the overrideUID parameter, you choose a Flash Movie record by stating the UID. It doesn't matter in which folder the Flash record is located, the scope is global. In our example we also define a XML file we want to pass over to the Flash movie, by using the xmlfile property.

Finally, we copy the plugin's output to a subpart of our template.

Example II – a TypoScript based XML menu for use within a Flash movie (example by Christian Wolff):

Setup a new page and generate the menu structure:

pageXML = PAGE
pageXML {
    config {
        doctype= xhtml_trans
        xhtmlDoctype = xhtml_trans
        disableAllHeaderCode = 1
    }
    typeNum = 123
    10 = TEXT
    10.value = <?xml version="1.0" encoding="utf-8" ?>
    20 = HMENU
    20 {
        wrap = <menudata>|</menudata>
        1 = TMENU
        1.wrap = <ul>|</ul>
        1.target = _top
        1.NO = 1
        1.NO.wrapItemAndSub =  <li>|</li>
        2 < .1
    }
}




Include the plugin in your page object and setup the xmlfile property. Be sure to define all link parameters you need in the typolink configuration. In our example we need the language and mountpoint parameter – and of course the typeNum.

page = PAGE
page {
    10 < plugin.tx_rlmpflashdetection_pi1
    10 {
        conf.overrideUID = 99
        conf.xmlfile {
            typolink.parameter = {TSFE:id}
            typolink.parameter.insertData = 1
            typolink.additionalParams = &L={GPvar:L}&MP={GPvar:MP}&type=123
            typolink.additionalParams.insertData = 1
            typolink.returnLast = url
            wrap = /|
            # or for absolute URLs:
            # wrap = http://yourserver.com/|
        }
    }
}

The page type „123“ outputs some XML like this:

<?xml version="1.0" encoding="utf-8" ?>
<menudata>
    <ul>
        <li><a href="index.php?id=13" target="_top" onfocus="blurLink(this);">News</a></li>
        <li><a href="index.php?id=12" target="_top" onfocus="blurLink(this);">Facts</a></li>
        <li><a href="index.php?id=11" target="_top" onfocus="blurLink(this);">Pics</a></li>
    </ul>
</menudata>

This XML data structure can be easyly parsed by your Flash movie to build a menu.

Please consider the Flash documentation if you haven't a specialist knowledge in using this technique.

Reference

The following properties are accessable via plugin.general :

allowScriptAccess

Property

allowScriptAccess

Data type

string

Description

Defines, if flash is allowed to call javascript.

Default

sameDomain

codeBase

Property

codeBase

Data type

string

Description

The codeBase being inserted into the HTML source.

pluginsPage

Property

pluginsPage

Data type

string

Description

The pluginsPage being inserted into the HTML source.

xmlFileFlashParamName

Property

xmlFileFlashParamName

Data type

string

Description

When you provide an XML file, the path to that file will be passed to your Flash movie via the FlashVars parameter.

By setting xmlFileFlashParamName you may specify the name of the variable you will access from your Flash movie.

Default

xurl

[tsref:plugin.rlmp_flashdetection.general]

The following properties are accessable via plugin.conf :

overrideUID

Property

overrideUID

Data type

integer

Description

UID of the Flash Movie record you want to show.

Default

xmlfile

Property

xmlfile

Data type

string/stdWrap

Description

Path and filename leading to the XML file you want to pass to the Flash movie.

Example:

plugin.conf.xmlfile=fileadmin/test.xml

Notice:

This parameter is stdWrap enabled!

Default

requiresflashversion

Property

requiresflashversion

Data type

bool/stdWrap

Description

Required Flash version: Currently you may choose a number from 2 to 9 which relates to the version number of the Flash player being required. If the visitor has no Flash plugin or a Flash player with a version lower than the required one, a static picture will be displayed instead (see below).

Default

width

Property

width

Data type

string/stdWrap

Description

Width of Flash movie in pixel.

Default

height

Property

height

Data type

string/stdWrap

Description

Height of Flash movie in pixel.

Default

alternatetext

Property

alternatetext

Data type

string/stdWrap

Description

Default

alternatepic

Property

alternatepic

Data type

string/stdWrap

Description

A picture which will be shown if no or no valid Flash player is available. It makes sense to define a still picture of your Flash movie with the same width and height!

Default

alternatecode

Property

alternatecode

Data type

string/stdWrap

Description

HTML-code which will be shown if no or no valid Flash player is available (the given code will replace the altenative image). Could be used to build a No-Flash Alternative withHTML & JavaScript.

Default

additionalparams

Property

additionalparams

Data type

string/stdWrap

Description

Default

flashloop

Property

flashloop

Data type

string/stdWrap

Description

Default

displaymenu

Property

displaymenu

Data type

string/stdWrap

Description

Default

quality

Property

quality

Data type

string/stdWrap

Description

Default

ajax

Property

ajax

Data type

bool/stdWrap

Description

If set, the Javascript routine is forced to avoid „document.write“, it outputs the Flash into a DIV with ID „tx-rlmp-flashdetection-pi1“ by „innerHTML“ instead. When extension is used in AJAX mode, a modified version of AC_OETags.js is included inline.

Default

flashmovie

Property

flashmovie

Data type

string/stdWrap

Description

You can define the flashmovie via TypoScript. It overrides all configuration trough Plugin and overrideUID.

Default

[tsref:plugin.rlmp_flashdetection.conf]

Known problems

None (anymore)

To-Do list

Perhaps I will add support for the „SWFObject 2.0“ as an alternative detection routine. You might choose between the Adobe routine and the Open source project.

Changelog

1.3.13

Version

1.3.13

Changes

- FEATURE: New field „alternativecode“,HTML-code which will be shown if no or no valid Flash player is available (the given code will replace the altenative image). Could be used to build a No-Flash Alternative with HTML & JavaScript. – Thanks to Dan Untenzu

1.3.12

Version

1.3.12

Changes

- BUGFIX: Split „normal“ and „AJAX“ mode a bit more to avoid strange behaviour in „normal“ mode and use untouched AC_OETags.js v1.6 again. – Thanks to Sebastian Kunze

- Deleted unused AC_OETags.js v1.5 in subfolder /res.

1.3.11

Version

1.3.11

Changes

- BUGFIX: Wrong handling of URL parameters by Flash detection when using more than one parameter in TypoScript property xmlfile. The xmlfile property is now raw URL encoded – Thanks to Jörg Wagner

1.3.10

Version

1.3.10

Changes

- FEATURE: Some programming changes according to use of the EXT within an AJAX request - only for special purpose.

1.3.9

Version

1.3.9

Changes

- BUGFIX: Add TypoScript condition to set different „codeBase“ property to prevent IE security alerts while browsing a SSL encrypted site – Thanks to Clemens Kalb

1.3.8

Version

1.3.8

Changes

- BUGFIX: TypoScript property „overrideUID“ lose value, if no stdWrap is used.

1.3.7

Version

1.3.7

Changes

- FEATURE: TypoScript property „overrideUID“ is now stdWrap enabled as well (marble).

- BUGFIX: FE <noscript>...</noscript> message appears now inside a DIV to produce valid xhtml output even with doctype „xhtml strict 1.1“ (marble)

- BUGFIX: Added „DEFAULT '' was missing in “description varchar(100) DEFAULT '' NOT NULL,“ (marble)

by marble (Martin Bless) 2009-11-04

1.3.6

Version

1.3.6

Changes

- FEATURE: TypoScript properties of „plugin.conf“ are completely stdWrap enabled now.

1.3.5

Version

1.3.5

Changes

- FEATURE: Updated „tables.sql“, optimized the size of some fields ...

1.3.2, 1.3.3, 1.3.4

Version

1.3.2, 1.3.3, 1.3.4

Changes

- FEATURE: TypoScript param „xmlfile“ is stdWrap enabled now – Thanks to Christian Wulff

- FEATURE: Width and height of movie could now include percent values, just enter a „%“ after your value – Thanks to Jan Lochner

- BUGFIX: Updated the AC_OETags.js to Rev. 1.6 – the latest versionat http://www.adobe.com/products/flashplayer/download/detection_kit/ . The old Rev. 1.5 still exists in subfolder „res“, names „AC_OETags1.5.js“.

There also is a Rev. 1.7–it comes along with CS3, but it seems Adobe only ships it included in the suite ...

1.3.0

Version

1.3.0

Changes

- FEATURE: Now you can choose if you want to use file references instead of copies. This is very useful, when you want to include not just a single flash file, but a whole set of file related to each other like a image gallery – Thanks to the authors of „MailformPlus“ for inspiration!

1.2.8

Version

1.2.8

Changes

- BUGFIX: TypoScript params „codeBase“, „pluginsPage“ and „allowScriptAccess“ work again – Thanks to Stephan Bauer

- BUGFIX: Single quotes in ALT- and TITLE-tags were not escaped – Thanks to Jörg Wagner

- FEATURE: Changed Javascript code, so you can use flash records without any assigned flash movie, only with an alternative image as a „placeholder“. Your flash movie can be added in a later time - when your screen designer has finished his job :)– Thanks to Jörg Wagner

1.2.5

Version

1.2.5

Changes

- BUGFIX: Removed all „range“ and „max_size“ attributes out of TCA, so there are no more limits.

1.2.4

Version

1.2.4

Changes

- FEATURE: Switched the sequence of requesting the flash record's uid: By now the plugin checks first the assigned flash record and not theTypoScriptparameter overrideUID . So you can use plugin settings and (global)TypoScriptration at one page! – Thanks to Tilman Schlereth - FEATURE: Added field „ alternative ALT-/TITLE-TAG text “ for the alternative image – Thanks to Björn Kraus

- BUGFIX: Cleaned up ll-XML files, some fields were missed.- BUGFIX: Changed DB fields „alternatelink“ form tinytext to varchar(255) and „additionalparams“ from text to tinytext .

1.2.1, 1.2.2, 1.2.3

Version

1.2.1, 1.2.2, 1.2.3

Changes

- BUGFIXES: Small updates all over the extension like changing tables.sql to standard TYPO3 DB structure in order to use all types of "enableFields".

1.2.0

Version

1.2.0

Changes

- FEATURE: The extension now uses the TYPO3 DB-API for the SQL- queries – Thanks to Marc Bastian - FEATURE: Alternative image is now rendered by cObj->IMAGE – Thanks to Marc Bastian Heinrichs - FEATURE: If the wrong flash version is detected, the plugin puts out some needfull information either in the Alt-/ Title- TAG or just as pure text. – Thanks to Marc Bastian Heinrichs - FEATURE: Cleaned up the whole extension!- FEATURE: Moved all localizations out of ll-XML files.- FEATURE: Updated the manual a little bit.- BUGFIX: Additional Flash params work again – Thanks to Arne Bippes

1.1.2

Version

1.1.2

Changes

- BUGFIX: Database field "loop" renamed to "flashloop", because of problems using mySQL 5.x – Thanks to Christoph Köpernick and Adeline Lamiaux

1.1.1

Version

1.1.1

Changes

- BUGFIX: Only small changes in relation to DTD xHTML strict output (obsolete with version 1.2.0)

1.1.0

Version

1.1.0

Changes

- FEATURE: New flash detection, now using http://www.adobe.com/products/flashplayer/download/detection_kit/.

- FEATURE: Moock FPI was used before, but it's obsolete until now.- FEATURE: Flash detection routine has no upper version limit any more.- FEATURE: Most of the Javascript code is included from an external file.- FEATURE: New code rids over the flash plugin patent problem in new versions of IE. Thanks to Jose Antonio Guerra

1.0.3

Version

1.0.3

Changes

New maintainer for the extension (hey, that's me!), so I changed only the visible author data. – Thanks to Robert Lemke, the extension's creator.

1.0.2

Version

1.0.2

Changes

- BUG FIX: JavaScript syntax error when no XML file was attached to the movie – Maybe I uploaded a wrong file as version 1.0.1? Sorry for that

- FEATURE: The alternate picture which is displayed if no Flash is available now contains a proper ALT and TITLE parameter using the Flash Movie title

- FEATURE: Now you may specify a link which will be wrapped around the alternate picture.

1.0.1

Version

1.0.1

Changes

- BUGFIX: JavaScript syntax error when no XML file was attached to the movie

- BUGFIX: Flash records could not be inserted into normal pages as explained in the manual

- minor changes

1.0.0

Version

1.0.0

Changes

First public release.

img-5 EXT: Flash detection - 8