With refer to the other topic at Reviewer's Corner Shop has gone live: please review
Our fellow member JohneeMac suggested the following for the Flash.
SWFObject: Javascript Flash Player detection and embed script
I had tested, it works, with more functions and with XHTML validation.
And below are the steps of the test which use the JavaScript download from the above site.
1. save the header Flash file to the following directory (just for example)
includes/templates/YOUR_TEMPLATE/images/flash/YOUR_HEADER.swf
2. download the zip packaged file from the above site
3. unzip and save the included swfobject.js file (not compressed and about 6.5 KB) to your ZC template directory
includes/templates/YOUR_TEMPLTE/jscript/swfobject.js
4. If in before, the tpl_header.php had not been modified,
then copy the following file:
includes/templates/template_default/common/tpl_header.php
and save it to your template override directory:
include/templates/YOUR_TEMPALTE/common/tpl_header.php
5. Open up the new saved tpl_header.php file in your override directory
include/templates/YOUR_TEMPALTE/common/tpl_header.php
Add and modify the codes according to your requirements.
For detail usuages, please refer to the docs and the original site for more infos.
For example,
in the tpl_header.php, just insert the codes for Flash below the section of:
<!--bof-branding display-->
<div id="logoWrapper">
PHP Code:
<!--bof-branding display-->
<div id="logoWrapper">
<script type="text/javascript" src="includes/templates/YOUR_TEMPLATE/jscript/swfobject.js"></script>
<div id="flashcontent">
This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
var so = new SWFObject("includes/templates/YOUR_TEMPLATE/images/flash/YOUR_HEADER.swf", "YOUR_HEADER", "750", "160", "7", "#000000");
so.write("flashcontent");
</script>
Note:
In the above codes, where:
YOUR_TEMPLATE = the name of your template.
YOUR_HEADER = the file name of your Flash file.
.
Bookmarks