I think JW Player(flash player) by longtailvideo.com is well known to u all. There are so many extension for joomla, wordpress, drupal and other cms using this tool. Simple_video_flash_player is a joomla module to show flash and other videos. Today I used it with one of project. But after checking in ie6 I was tempered becuase it was showing a js error in ie and the modules config file I meant he xml file has not param to show module class suffix which is very important to style module using css. I searched google and got so many solution. Here is my code that helped to solve this issue in ie6.
Here is portion module code I mean the main php file of this module (mod_simple_video_flash_player.php)
[code=’php’]
[/code]
If u check the last lines I meant he js code that embed the flash player to that a div having a id like videoplayer1, videoplayer2 etc.
Here the problem was with the width and height problem for ie and I solved just adding two extra var for height and with like bellow
[code=’php’]
s1.addVariable(“width”,”< ?php echo $width ?>“);
s1.addVariable(“height”,”< ?php echo $height ?>“);
[/code]
To I have retouched the js code so that the flash object is added after the window is load I mean the dom is ready so that no issue about id unavailability
Just check my code and compare with the original code
[code=’php’]
/* function show_simple_video_flash_player(){ var s1 = new SWFObject(“< ?php echo JURI::base();;?>modules/mod_simple_video_flash_player/< ?php echo $player ?>“,”ply< ?php echo $count ?>“,”< ?php echo $width ?>“,”< ?php echo $height ?>“,”< ?php echo $version ?>“,”#FFFFFF”); s1.addParam(”allowfullscreen”,”true”); s1.addParam(”allowscriptaccess”,”always”); s1.addParam(’wmode’,’opaque’); s1.addVariable(”width”,”< ?php echo $width ?>“); s1.addVariable(”height”,”< ?php echo $height ?>“); s1.addParam(”flashvars”,”file=< ?php echo $video ?>< ?php echo $preview ?>< ?php echo $logo ?>< ?php echo $link ?>< ?php echo $repeat ?>< ?php echo $shuffle ?>< ?php echo $autostart ?>“); s1.write(”videoplayer< ?php echo $count ?>“); //alert(”hi”);
} */window.addEvent(’domready’, function(){ var s1 = new SWFObject(”< ?php echo JURI::base();;?>modules/mod_simple_video_flash_player/< ?php echo $player ?>“,”ply< ?php echo $count ?>“,”< ?php echo $width ?>“,”< ?php echo $height ?>“,”< ?php echo $version ?>“,”#FFFFFF”); s1.addParam(”allowfullscreen”,”true”); s1.addParam(”allowscriptaccess”,”always”); s1.addParam(’wmode’,’opaque’); s1.addVariable(”width”,”< ?php echo $width ?>“); s1.addVariable(”height”,”< ?php echo $height ?>“); s1.addParam(”flashvars”,”file=< ?php echo $video ?>< ?php echo $preview ?>< ?php echo $logo ?>< ?php echo $link ?>< ?php echo $repeat ?>< ?php echo $shuffle ?>< ?php echo $autostart ?>“); s1.write(”videoplayer< ?php echo $count ?>“); });
[/code]
Again as the default module’s config file mod_simple_video_flash_player.xml has no param for module class suffix so I added just one line.
and the whole file’s code is like now # Simple Video Flash Player Module # For download, demo and documentation use http://www.time2online.de. # JW Player License # Below you see a simple embedded example of the JW Player! Licensing: The player is licensed under a http://creativecommons.org/licenses/by-nc-sa/2.0/ Creative Commons License. It allows you to use, modify and redistribute the script, but only for noncommercial purposes. For corporate use, http://www.longtailvideo.com/players/order Order commercial licenses please apply for a commercial license. ]]>
[code=’php’]
< ?xml version="1.0" encoding="utf-8"?>
[/code]
One thing to note that that modules uses a free js tool to embed flash in html and that can be found here. So if there is any error about the swfobject.js then u can download the latest one from the above link.
Bye for today.
- Related Content by Tag
- Joomla
Nice thnx man . that help me now