3 global $_input, $_content_base_href;
5 $media_replace = array();
6 $media_matches = array();
9 preg_match_all("/\[media(\|([0-9]+)\|([0-9]+))?\]http\:\/\/[0-9a-z.]*vimeo\.com\/(.*)\[\/media\]/i",$_input,$media_matches,PREG_SET_ORDER);
11 foreach ($media_matches as $media_match) {
12 $width = $media_match[2];
13 $height = $media_match[3];
15 $width = DEFAULT_VIDEO_PLAYER_WIDTH;
18 $height = DEFAULT_VIDEO_PLAYER_HEIGHT;
20 $video_id = $media_match[4];
22 $media_replace ='<iframe src="http://player.vimeo.com/video/'.$video_id.'" width="'.$width.'" height="'.$height.'" frameborder="0"></iframe>';
23 $_input = str_replace($media_match[0],$media_replace,$_input);