| Tiêu Đề:------------------------------------------------------------------------- | | | | | | | | Clip.vn Mp3.Zing.Vn Video.zing.vn dailmotion.com youtube.com megavideo.com vimeo.vn metacafe.com nhincuoi.com megafun.vn (chưa hỗ trỡ chèn link trực tiếp) HTML5 Video (FF4, Chorme 10, IE9 trở lên, 2 trình duyệt còn lại ko nghiên cứu): OGG, WebM, OGV Các định dạng play dc bởi WMP: MP3, MP4, AVI, MGP (còn có thể hơn nếu cài codec) JWplayer: MP4, FLV, Youtube Các định dạng hình ảnh : Jpg, gif, bmp, ico, png.. .... Rất nhiều thứ khác đang chờ bạn
Xem demo tại : http://tpnhinho.hnsv.com/viewtopic.php?f=52&t=875&p=1840
- Code:
[media]{URL}[/media]
Mã thay thế
- Code:
<script> var Video= new Array(".ogg",".webm",".webM",".WebM",".OGG",".WEBM"); var WMP= new Array(".mp3",".wma",".wmv",".avi",".mpg",".MP3",".WMA",".WMV",".AVI",".MPG"); var FLash= new Array(".flv",".f4v",".mp4",".3gp",".asf",".FLV",".F4V",".MP4",".3GB",".ASF"); var Img= new Array(".jpg",".gif",".png",".bmp",".ico",".jpeg",".JPG",".GIF",".PNG",".BMP",".ICO",".JPEG"); function timchuoi(str,url){ if (str.indexOf(url) >= 0) val=true; else val=false; return val; } function cut_str(str_cut,str_c,val,d) { if (d==1) url=str_cut+str_c; else url=str_c + str_cut; url=str_c.split(str_cut); url=url[val]; return url; } function tpnhinho_player(string){ //Code by la.sinhvat //http://tpnhinho.tk //Base on code of movewho //Dừng thay đổi hoặc xóa bất kỳ thông tim nào! //Don't change or delete any infomation! var title="BBCode All In One"; embed='<p>Không thể tạo player từ link bạn cung cấp!</p></br>Bạn đã nhập link <input value="'+string+'"></br>Hãy chắc chắn rằng link này có thật'; http://Clip.vn if (timchuoi(string,'http://clip.vn')==true){ id = cut_str(',',string,1); title='clip.vn'; embed='<embed type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" width="430px" height="350px" src="http://clip.vn/w/'+id+'"></embed>'; //-----------------Dịch vụ của nước ngoài http://Megavideo.com }else if (timchuoi(string,'http://megavideo.com')==true){ id = cut_str('=',string,1); embed='<embed src="http://www.megavideo.com/v/'+id+'" type="application/x-shockwave-flash" width="800" height="334"/>'; https://www.youtube.com }else if (timchuoi(string,'http://www.youtube.com')==true){ id = cut_str('=',string,1); embed='<embed src="http://www.youtube.com/v/'+id+'" type="application/x-shockwave-flash" width="640" height="420"/></br><br><a href=http://ssyoutube.com/watch?v='+id+' target="_blank">Nhấn vào đây để tải clip về máy của bạn</a>'; //GoogleVideo }else if (timchuoi(string,'http://video.google.com')==true){ id = cut_str('=',string,1); embed='<embed src="http://video.google.com/googleplayer.swf?docid='+id+'&hl=en&fs=true" width="430" height="350" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"/>'; http://Vimeo.com }else if (timchuoi(string,'vimeo.com')==true){ id=string.replace("http://vimeo.com/","http://vimeo.com/moogaloop.swf?clip_id="); embed='<embed src="'+id+'" type="application/x-shockwave-flash" width="640" height="420"/>'; http://Metacafe.com }else if (timchuoi(string,'http://www.metacafe.com/watch/')==true){ id=string.replace("http://www.metacafe.com/watch/","http://www.metacafe.com/fplayer/"); id = id.substring(0, id.length-1); embed='<embed flashVars="playerVars=showStats=yes|autoPlay=no|videoTitle=Ban Dang xem Video Tren Metacafe.Com" src="'+id+'.swf" width="440" height="272" wmode="transparent" allowFullScreen="true" allowScriptAccess="always" name="Metacafe_6163599" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>'; http://DailyMotion.com }else if (timchuoi(string,'http://www.dailymotion.com/video/')==true){ id=string.replace("http://www.dailymotion.com/video/",""); embed='<embed type="application/x-shockwave-flash" src="http://www.dailymotion.com/swf/video/'+id+'?theme=none" width="560" height="419" wmode="direct" allowfullscreen="true" allowscriptaccess="always"></embed>'; https://facebook.com:Video }else if (timchuoi(string,'facebook.com')==true){ id = cut_str('=',string,1); embed='<embed src="http://www.facebook.com/v/'+id+'" type="application/x-shockwave-flash" width="400" height="224"/>'; //-----------------Kết khúc dịch vụ của nước ngoài http://NhacCuaTui.com }else if (timchuoi(string,'nhaccuatui.com')==true){ id = cut_str('=',string,1); title='nhaccuatui.com'; embed='<embed src="http://www.nhaccuatui.com/l/'+id+'" quality="high" wmode="transparent" type="application/x-shockwave-flash" width="300" height="400"></embed>'; http://Music.TamTay.vn }else if (timchuoi(string,'http://music2.tamtay.vn')==true){ id = cut_str('/',string,4); title='music2.tamtay.vn'; embed="<embed width='395' height='175' src='http://music2.tamtay.vn/players/ttplayer_1.swf?path=http://music2.tamtay.vn/main/embed/type/1/id/"+id+"' quality='high' wmode='transparent' type='application/x-shockwave-flash'></embed>"; http://Video.Tialia.net }else if (timchuoi(string,'http://video.tialia.com/')==true){ id = cut_str('_',string,1); id = cut_str('.html',id,0,1); embed='<embed src="http://video.tialia.com/player.swf?config={ playList: [ { name: \'ClickToPlay\', overlayId: \'play\' }, {url: \'http://video.tialia.com/videos.php?vid='+id+'\' }], useSmoothing: true,autoPlay: false, autoBuffering: false, startingBufferLength: 2, bufferLength: 5, loop: false,hideControls: false,initialScale: \'scale\', showPlayListButtons: false, useNativeFullScreen: true,controlBarGloss: \'high\', controlsOverVideo: \'locked\', controlBarBackgroundColor: \'0x253133\', progressBarColor1: \'0xFFFFFF\', progressBarColor2: \'0x000000\', timeDisplayFontColor: \'0xFFCC00\'}, menuItems: [ false, false, true, true, true, false, false ], showStopButton: true, useHwScaling: false, showOnLoadBegin: true }" type="application/x-shockwave-flash" width="430" height="350" allowScriptAccess="sameDomain" allowFullScreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" ></embed>'; http://Movie.Tialia.Com }else if (timchuoi(string,'http://movies.tialia.com/')==true){ id = cut_str('_',string,1); id = cut_str('.html',id,0,1); embed='<embed src="http://movies.tialia.com/player.swf?config={ playList: [ { name: \'ClickToPlay\', overlayId: \'play\' }, {url: \'http://movies.tialia.com/videos.php?vid='+id+'\' }], useSmoothing: true,autoPlay: false, autoBuffering: false, startingBufferLength: 2, bufferLength: 5, loop: false,hideControls: false,initialScale: \'scale\', showPlayListButtons: false, useNativeFullScreen: true,controlBarGloss: \'high\', controlsOverVideo: \'locked\', controlBarBackgroundColor: \'0x253133\', progressBarColor1: \'0xFFFFFF\', progressBarColor2: \'0x000000\', timeDisplayFontColor: \'0xFFCC00\'}, menuItems: [ false, false, true, true, true, false, false ], showStopButton: true, useHwScaling: false, showOnLoadBegin: true }" type="application/x-shockwave-flash" width="430" height="350" allowScriptAccess="sameDomain" allowFullScreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" ></embed>'; http://Blog.Com.vn }else if (timchuoi(string,'http://blog.com.vn')==true){ id = cut_str('_',string,1); id = cut_str('.html',id,0,1); embed="<embed src='http://blog.com.vn/embed/f/f/"+id+"&autoplay=false' quality='high' width='425' height='350' allowScriptAccess='sameDomain' allowFullScreen='true' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'/>"; //ZingMp3 }else if (timchuoi(string,'http://mp3.zing.vn')==true){ embed='<iframe src="http://www.autinhyeu.com/hnsv/TpNhiNho/zingmp3.php?url='+string+'" width="450" height="450" scrolling="no" frameborder="0"></iframe>'; //ZingVideo }else if (timchuoi(string,'http://video.zing.vn')==true){ embed='<iframe src="http://www.autinhyeu.com/hnsv/TpNhiNho/zingvideo.php?url='+string+'" width="476" height="390" scrolling="no" frameborder="0"></iframe>'; //MegaFun - Nhincuoi.com (xem phim online) }else if (timchuoi(string,'xmoov.reader.php')==true){ embed='<embed height="400" width="550" flashvars="autostart=false&enablejs=true&file=/'+string+'&streamer=http://ctl.megafun.vn/ctl/video/?bts=vs.forum&backcolor=0x000000&frontcolor=0xCCCCCC&lightcolor=0x557722&controlbar=over" allowfullscreen="true" allowscriptaccess="always" quality="high" src="http://binhthuan.megafun.vn/common/v2/player/player.swf" type="application/x-shockwave-flash"/>'; http://Chacha.vn }else if (timchuoi(string,'http://chacha.vn')==true){ id = cut_str('/',string,4); embed='<embed flashvars="blogmode=1&file=http://chacha.vn/embedded/v1.0/getMedia.php?songId='+id+'" type="application/x-shockwave-flash" src="http://chacha.vn/embedded/v1.0/mp3player.swf" wmode="transparent" allowscriptaccess="none" height="130px" width="430px"></embed>'; http://Music.NhacPro.Info }else if (timchuoi(string,"http://music.nhacpro.info")==true){ id = cut_str(',',string,1); embed='<embed type="application/x-mplayer2" wmode="opaque" quality="high" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://music.nhacpro.info/asx_change.php?type=1&id='+id+'" autostart="0" enablecontextmenu="0" mute="0" showstatusbar="1" width="430px" height="350px"/>'; //XtreMedia No Hack Mod Play }else if (timchuoi(string,'#Play')==true){ host = cut_str('/',string,2); title= host; if (timchuoi(string,',')==true){ id = cut_str(',',string,1); }else{ id = cut_str('/',string,4); } embed='<embed type="application/x-mplayer2" wmode="opaque" quality="high" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://'+host+'/asx.php?type=1&id='+id+'" autostart="0" enablecontextmenu="0" mute="0" showstatusbar="1" width="430px" height="350px"/>'; http://Nhincuoi.com (video clip) }else if (timchuoi(string,'http://www.nhincuoi.com')==true){ id=''+string+'/export'; embed='<embed type="application/x-shockwave-flash" src="http://player.longtailvideo.com/player.swf" flashvars="file='+id+' &backcolor=0x000000&frontcolor=0xCCCCCC&lightcolor=0x557722&controlbar=over&autostart=false" wmode="transparent" allowscriptaccess="none" width="600px" allowfullscreen="true" height="450px"/>';
// Post file *.swf }else if (timchuoi(string,'.swf')==true){ embed='<embed type="application/x-shockwave-flash" src="'+string+'" wmode="transparent" allowscriptaccess="none" width="430px" height="350px" allowfullscreen="true">'; //Truong hop post link music, video. }else{ for(i=0;i<=11;i++){ //Xu li link file play bang WMP if (timchuoi(string,WMP[i])==true){ embed='<embed type="application/x-mplayer2" wmode="opaque" quality="high" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="'+string+'" autostart="0" enablecontextmenu="0" mute="0" showstatusbar="1" width="387px" height="350px"/>'; break; //Xu li link play bang Flash Player }else if (timchuoi(string,FLash[i])==true){ embed='<embed type="application/x-shockwave-flash" src="http://player.longtailvideo.com/player.swf" flashvars="file='+string+'&skin=http://www.longtailvideo.com/files/skins/snel/5/snel.zip&autostart=false" wmode="transparent" allowscriptaccess="none" width="600px" allowfullscreen="true" height="450px"/>'; break; //Xu li link anh }else if (timchuoi(string,Img[i])==true){ embed='<img src="'+string+'" border=0 />'; break; //Xu li link HTML5 video }else if (timchuoi(string,Video[i])==true){ embed='<video width="320" height="240" preload="none" controls><source src="'+string+'" /></video>'; break; } } } //Tra ve player voi link cung cap html='<div align="center">'+embed+'</div>'; return html; } var str='{URL}'; document.write(tpnhinho_player(str)); </script>
Hướng dẫn sử dụng : - Code:
[media]địa chỉ site cần chèn[/media] | | | | | | | | | | | |