t=text.split('[media]'); if(t[1]) {t2=t[1].split('[/media]'); if(t2[0]) {parent.users.document.getElementById('video').innerHTML='<embed type=application/x-mplayer2 src='+t2[0]+' quarity=high width=250 height=200></embed>';text=text.replace('[media]'+t2[0]+'[/media]','<a href="'+t2[0]+'" target="_blank" title="ссылка откроется в новом окне">Видеоролик загружен!</a> ')} else {parent.users.document.getElementById('video').innerHTML='';text=text.replace('[media]'+t2[0]+'[/media]','Просмотр выключен! ');}} t=text.split('[video]'); if(t[1]) {t2=t[1].split('[/video]'); if(t2[0]) { var reg_rutube = new RegExp("(http:\/\/)(rutube\.ru\/)\\S+\\?v=(\\S+)"); var reg_youtube = new RegExp("(http:\/\/www\.youtube\.com\/)\\S+\\?v=(\\S+)"); var reg_veoh = new RegExp("(http:\/\/www\.veoh\.com\/)\\S+watch\/?%?3?D?(v\\S+)"); var reg_vimeo = new RegExp("(http:\/\/vimeo\.com\/)(\\S+)"); var reg_metacafe = new RegExp("(http:\/\/www\.metacafe\.com\/)watch(\\S+)\/?"); var reg_spike = new RegExp("(http:\/\/www\.spike\.com\/)video\/\\S+\/(\\S+)"); var reg_myspace = new RegExp("http:\/\/vids\.(myspace\.com\/)\\S+videoid=(\\S+)"); var reg_google = new RegExp("(http:\/\/video\.google\.com\/)\\S+docid=(\\S+)&\\S+"); var reg_dailymotion = new RegExp("(http:\/\/www\.dailymotion\.com\/)video\/([^_+]+)\\S+"); var reg_5min = new RegExp("http:\/\/www\.(5min\.com\/)\\S+-(\\d+)"); var reg_gamestar = new RegExp("(http:\/\/www\.gamestar\.de\/)\\S+=(\\d+)"); var reg_mail = new RegExp("http:\/\/(video\.mail\.ru)\/(\\S+)\/(\\S+)\/(\\S+)\/(\\S+)\.html"); var reg_gametrailers = new RegExp("(http:\/\/www\.gametrailers\.com)\/\\S+\/(\\d+)"); var reg_yahoo = new RegExp("(http:\/\/video\.yahoo\.com)\/watch\/(\\d+)\/(\\d+)"); var reg_libero = new RegExp("(http:\/\/video\.libero\.it)\/app\/\\S+id=(\\S+)"); var reg_ukr = new RegExp("(http:\/\/play\.ukr\.net)\/videos\/show\/(\\S+)\/"); var reg_online = new RegExp("(http:\/\/video\.online\.ua)\/(\\S+)\/"); var reg_rambler = new RegExp("(http:\/\/vision\.rambler\.ru)\/users\/(\\S+)\/"); var reg_bigmir = new RegExp("(http:\/\/video\.bigmir\.net)\/show\/(\\S+)\/"); var reg_sibnet = new RegExp("http:\/\/(video\.sibnet\.ru)\/\\S*?video(\\d+)\/"); var reg_irc = new RegExp("(http:\/\/irc\.lv)\/video\\?(id=.*)"); var reg_swf = new RegExp("(http:\/\/(.*\\.)(mp3|flv))"); var src = t2[0].replace(reg_rutube,"$1video.$2$3"); src = src.replace(reg_youtube,"$1v/$2&hl=ru_RU&fs=1"); src = src.replace(reg_veoh, "$1static/swf/webplayer/WebPlayer.swf?version=AFrontend.5.4.9.1006&permalinkId=$2&player=videodetailsembedded&videoAutoPlay=0&id=anonymous"); src = src.replace(reg_vimeo, "$1moogaloop.swf?clip_id=$2&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1"); src = src.replace(reg_metacafe, "$1fplayer$2.swf"); src = src.replace(reg_spike, '"$1efp" flashvars="flvbaseclip=$2"'); src = src.replace(reg_myspace, 'http://mediaservices.$1services/media/embed.aspx/m=$2,t=1,mt=video'); src = src.replace(reg_google, '$1googleplayer.swf?docid=$2&hl=ru&fs=true'); src = src.replace(reg_dailymotion, '$1swf/$2'); src = src.replace(reg_5min, 'http://embed.$1$2/'); src = src.replace(reg_gamestar, '$1emb/player.swf?config=$1emb/getVideoData.cfm?vid=$2'); src = src.replace(reg_mail, 'http://img.mail.ru/r/video2/player_v2.swf?par=http://content.$1/$2/$3/$4/$$$5$$0$39&imaginehost=$1&perlhost=$1&alias=$2&username=$3&albumid=$4&id=$5&catalogurl=http://video.mail.ru/themes/clips'); src = src.replace(reg_gametrailers, '$1/remote_wrap.php?umid=$2'); src = src.replace(reg_yahoo, '"http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" flashVars="id=$3&vid=$2&lang=en-us&intl=us"'); src = src.replace(reg_libero, '"$1/static/swf/eltvplayer.swf?id=$2.flv&ap=0"'); src = src.replace(reg_ukr, '"$1/player.swf?key=$2&StopAsking=0&self=0"'); src = src.replace(reg_online, '"http://i.online.ua/mplayer/player_logo.swf?file=$1/playlist/$2.xml&autostart=false&javascriptid=media_player&enablejs=true"'); src = src.replace(reg_rambler, '"$1/i/e.swf?id=$2&logo=1&where=home"'); src = src.replace(reg_bigmir, '"$1/extplayer/$2/"'); src = src.replace(reg_sibnet, '"http://$1/mediaplayer.swf" flashvars="file=http%3A%2F%2F$1%2Fupload%2Fvideo%2F$2.flv&image=http%3A%2F%2F$1%2Fupload%2Fcover%2Fvideo_$2_0.jpg"'); src = src.replace(reg_irc, '$1/player.swf?$2'); var autostart='true'; if(loaded==0) autostart='false'; if (src==t2[0]&&src.match(reg_swf))src = src.replace(reg_swf, '"http://mpchat.com/blank/player.swf" flashvars="file='+t2[0]+'&autostart='+autostart+'"'); var type = "application/x-shockwave-flash"; var file_tipe = new RegExp("(http:\/\/(.*\\.)(rmi|wmv|midi|mid|mpg|wav|snd|wma|mpeg|avi|mpe|m1v|mpa|aifc|aiff|au|aif|swf))"); if (src==t2[0]&&src.match(file_tipe)) type = "application/x-mplayer2"; if (src==t2[0]&&!src.match(file_tipe)){parent.users.document.getElementById('video').innerHTML='Данный тип файлов не поддерживается или неверная ссылка'} else {parent.users.document.getElementById('video').innerHTML='<embed src='+src+' type='+type+' allowscriptaccess=always allowfullscreen=true width=250 height=200></embed>'}; text=text.replace('[video]'+t2[0]+'[/video]','<a href="'+t2[0]+'" target="_blank" title="ссылка откроется в новом окне">Видеоролик загружен!</a> ')} else {text='Просмотр выключен';parent.users.document.getElementById('video').innerHTML=''}}
[video][/video]
t=text.split('<iframe src="'); if(t[1]) {t2=t[1].split('" width="607" height="360" frameborder="0"></iframe>'); if(t2[0].substr(0,25) == 'http://vkontakte.ru/video') {text=text.replace('<iframe src="'+t2[0]+'" width="607" height="360" frameborder="0"></iframe>','<a href="'+t2[0]+'" target="_blank" title="ссылка откроется в новом окне">Видеоролик загружен!</a> '); parent.users.document.getElementById('video').innerHTML='<iframe src="'+t2[0]+'" width="290" height="232" frameborder="0"></iframe>'}}
<iframe src="http://vkontakte.ru/video_ext.php?oid=9673837&id=160812090&hash=81f2423212993966" width="607" height="360" frameborder="0"></iframe>