private static function embedFLV($text) {\r
global $content_base_href;\r
\r
- // .flv - uses Flowplayer 3.0 from flowplayer.org (playing file via full URL)\r
- preg_match_all("#\[media[0-9a-z\|]*\]http://([\w\./-]+)\.flv\[/media\]#i",$text,$media_matches[0],PREG_SET_ORDER);\r
- $media_replace[0] ="<a class=\"flowplayerholder\"\r
- style=\"display:block;width:##WIDTH##px;height:##HEIGHT##px;\"\r
- href=\"http://##MEDIA1##.flv\">\r
- </a>";\r
- \r
- // .flv - uses Flowplayer 3.0 from flowplayer.org (playing file from AT_content_dir)\r
- preg_match_all("#\[media[0-9a-z\|]*\]([\w\./-]+)\.flv\[/media\]#i",$text,$media_matches[1],PREG_SET_ORDER);\r
- $media_replace[1] ="<a class=\"flowplayerholder\"\r
- style=\"display:block;width:##WIDTH##px;height:##HEIGHT##px;\"\r
- href=\"".TR_BASE_HREF."get.php/".$content_base_href."##MEDIA1##.flv\">\r
- </a>";\r
+ $media_replace = array();\r
+ $media_matches = array();\r
+ \r
+ // .flv (playing file via full URL)\r
+ preg_match_all("#\[media[0-9a-z\|]*\]http://([\w\./-]+)\.flv\[/media\]#i",$text,$media_matches[],PREG_SET_ORDER);\r
+ $media_replace[] ="<a class=\"flowplayerholder\" style=\"display:block;width:##WIDTH##px;height:##HEIGHT##px;\" href=\"http://##MEDIA1##.flv\"></a>";\r
+ \r
+ // .flv (playing file from TR_content_dir)\r
+ preg_match_all("#\[media[0-9a-z\|]*\]([.\w\d]+[^\s\"]+)\.flv\[/media\]#i",$text,$media_matches[],PREG_SET_ORDER);\r
+ $media_replace[] ="<a class=\"flowplayerholder\" style=\"display:block;width:##WIDTH##px;height:##HEIGHT##px;\" href=\"".TR_BASE_HREF."get.php/".$content_base_href."##MEDIA1##.flv\"></a>";\r
+ \r
+ // .mp4 (playing file via full URL)\r
+ preg_match_all("#\[media[0-9a-z\|]*\]http://([\w\./-]+)\.mp4\[/media\]#i",$text,$media_matches[],PREG_SET_ORDER);\r
+ $media_replace[] ="<a class=\"flowplayerholder\" style=\"display:block;width:##WIDTH##px;height:##HEIGHT##px;\" href=\"http://##MEDIA1##.mp4\"></a>";\r
+ \r
+ // .mp4 (playing file from TR_content_dir)\r
+ preg_match_all("#\[media[0-9a-z\|]*\]([.\w\d]+[^\s\"]+)\.mp4\[/media\]#i",$text,$media_matches[],PREG_SET_ORDER);\r
+ $media_replace[] ="<a class=\"flowplayerholder\" style=\"display:block;width:##WIDTH##px;height:##HEIGHT##px;\" href=\"".TR_BASE_HREF."get.php/".$content_base_href."##MEDIA1##.mp4\"></a>";\r
+ \r
+ // .mov (playing file via full URL)\r
+ preg_match_all("#\[media[0-9a-z\|]*\]http://([\w\./-]+)\.mov\[/media\]#i",$text,$media_matches[],PREG_SET_ORDER);\r
+ $media_replace[] ="<a class=\"flowplayerholder\" style=\"display:block;width:##WIDTH##px;height:##HEIGHT##px;\" href=\"http://##MEDIA1##.mov\"></a>";\r
+ \r
+ // .mov (playing file from TR_content_dir)\r
+ preg_match_all("#\[media[0-9a-z\|]*\]([.\w\d]+[^\s\"]+)\.mov\[/media\]#i",$text,$media_matches[],PREG_SET_ORDER);\r
+ $media_replace[] ="<a class=\"flowplayerholder\" style=\"display:block;width:##WIDTH##px;height:##HEIGHT##px;\" href=\"".TR_BASE_HREF."get.php/".$content_base_href."##MEDIA1##.mov\"></a>";\r
+ \r
+ // .mp3 (playing file via full URL)\r
+ preg_match_all("#\[media[0-9a-z\|]*\]http://([\w\./-]+)\.mp3\[/media\]#i",$text,$media_matches[],PREG_SET_ORDER);\r
+ $media_replace[] ="<a class=\"flowplayerholder\" style=\"display:block;width:##WIDTH##px;height:##HEIGHT##px;\" href=\"http://##MEDIA1##.mp3\"></a>";\r
+ \r
+ // .mp3 (playing file from TR_content_dir)\r
+ preg_match_all("#\[media[0-9a-z\|]*\](.+[^\s\"]+)\.mp3\[/media\]#i",$text,$media_matches[],PREG_SET_ORDER);\r
+ $media_replace[] ="<a class=\"flowplayerholder\" style=\"display:block;width:##WIDTH##px;height:##HEIGHT##px;\" href=\"".TR_BASE_HREF."get.php/".$content_base_href."##MEDIA1##.mp3\"></a>";\r
\r
$has_flv = false;\r
// Executing the replace\r