2 // input string. DO NOT CHANGE.
3 global $_input, $_content_base_href;
5 //Output for flowplayer module.
7 // .flv - uses Flowplayer 3.0 from flowplayer.org (playing file via full URL)
8 preg_match_all("#\[media[0-9a-z\|]*\]http://([\w\./-]+)\.flv\[/media\]#i",$_input,$media_matches[0],PREG_SET_ORDER);
9 $media_replace[0] ="<a class=\"flowplayerholder\"
10 style=\"display:block;width:##WIDTH##px;height:##HEIGHT##px;\"
11 href=\"http://##MEDIA1##.flv\">
14 // .flv - uses Flowplayer 3.0 from flowplayer.org (playing file from AT_content_dir)
15 preg_match_all("#\[media[0-9a-z\|]*\]([\w\./-]+)\.flv\[/media\]#i",$_input,$media_matches[1],PREG_SET_ORDER);
16 $media_replace[1] ="<a class=\"flowplayerholder\"
17 style=\"display:block;width:##WIDTH##px;height:##HEIGHT##px;\"
18 href=\"".AT_BASE_HREF."get.php/".$_content_base_href."##MEDIA1##.flv\">
22 // Executing the replace
23 for ($i=0;$i<count($media_replace);$i++){
24 foreach($media_matches[$i] as $media)
26 if (is_array($media)) $has_flv = true;
28 //find width and height for each matched media
29 if (preg_match("/\[media\|([0-9]*)\|([0-9]*)\]*/", $media[0], $matches))
32 $height = $matches[2];
40 //replace media tags with embedded media for each media tag
41 $media_input = $media_replace[$i];
42 $media_input = str_replace("##WIDTH##","$width",$media_input);
43 $media_input = str_replace("##HEIGHT##","$height",$media_input);
44 $media_input = str_replace("##MEDIA1##","$media[1]",$media_input);
45 $media_input = str_replace("##MEDIA2##","$media[2]",$media_input);
46 $_input = str_replace($media[0],$media_input,$_input);
53 <script language="JavaScript">
54 $f("a.flowplayerholder", "'.AT_BASE_HREF.'/mods/flowplayer/flowplayer-3.1.2.swf", {
55 clip: { autoPlay: false },