先 AD 下 本插件 支持 5.0
长春白领交友娱乐网 www.78tom.com
特别奉献先登陆后台 ---- 帖子管理 --- Discuz! 代码
添加 MV 图片自己弄哦 我的不好看
按下面的操作吧!
标签:
方括号中的标签代码,如 [tag] 的标签为 "tag"(不含引号)
替换内容:
标签替换为的 html 代码内容,支持至多三个动态参数
{1} 代表第一个参数
{2} 代表第二个参数
{3} 代表第三个参数
<script language="javascript">
var LINK = new Array("{1}","P2P之家资源链接");
var linkType = new Array();
linkType['WMA'] = 'WMP';
linkType['MP3'] = 'WMP';
linkType['WMV'] = 'WMP';
linkType['ASF'] = 'WMP';
linkType['MPG'] = 'WMP';
linkType['MPEG'] = 'WMP';
linkType['AVI'] = 'WMP';
linkType['ASX'] = 'WMP';
linkType['RM'] = 'Real';
linkType['RMVB'] = 'Real';
linkType['RAM'] = 'Real';
linkType['RA'] = 'Real';
linkType['SWF'] = 'Flash';
var sufFix = LINK[0].substring(LINK[0].lastIndexOf(".")+1,LINK[0].length).toUpperCase();
if(sufFix.indexOf("#")) sufFix = sufFix.split("#")[0];
if(sufFix.indexOf("?")) sufFix = sufFix.split("?")[0];
function WMP(){
document.writeln("<object id='mediaplayer' width='480' height="+((sufFix=="MP3"||sufFix=="WMA")?"64":"424")+" classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' align='center' border='0' type='application/x-oleobject' standby='Loading Windows Media Player components...'>");
document.writeln("<param name='url' value='"+LINK[0]+"'>");
document.writeln("<param name='AutoStart' value='1'><param name='Balance' value='0'><param name='enabled' value='-1'><param name='EnableContextMenu' value='0'><param name='PlayCount' value='1'><param name='rate' value='1'><param name='currentPosition' value='0'><param name='currentMarker' value='0'><param name='defaultFrame' value=''><param name='invokeURLs' value='-1'><param name='baseURL' value=''><param name='stretchToFit' value='0'><param name='volume' value='100'><param name='mute' value='0'><param name='uiMode' value='full'><param name='windowlessVideo' value='0'><param name='fullScreen' value='0'><param name='enableErrorDialogs' value='0'><param name='SAMIStyle' value=''><param name='SAMILang' value=''><param name='SAMIFilename' value=''><param name='captioningID' value=''>");
document.writeln("</object>");
document.close();
}
function Real(){
document.writeln("<object classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' width='400' height='300' id='amourReal'>");
document.writeln(" <param name='src' value='"+LINK[0]+"'>");
document.writeln(" <param name='autostart' value='true'>");
document.writeln(" <param name='controls' value='imagewindow'>");
document.writeln(" <param name='console' value='clip1'>");
document.writeln(" <embed src='"+LINK[0]+"' width='400' height='300' type='audio/x-pn-realaudio-plugin' autostart='true' controls='imagewindow' console='video'>");
document.writeln(" </embed>");
document.writeln("</object>");
document.writeln("<br />");
document.writeln("<object classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' width='400' height='50' id='amourReal'>");
document.writeln(" <param name='src' value='"+LINK[0]+"'>");
document.writeln(" <param name='autostart' value='true'>");
document.writeln(" <param name='controls' value='all'>");
document.writeln(" <param name='console' value='clip1'>");
document.writeln(" <embed type='audio/x-pn-realaudio-plugin' src='"+LINK[0]+"' width='400' height='50' autostart='true' controls='all' console='video'>");
document.writeln(" </embed>");
document.writeln("</object>");
document.close();
}
function Flash(){
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='600' height='480'>");
document.write("<param name='movie' value='"+LINK[0]+"'>");
document.write("<param name='quality' value='high'>");
document.write("<embed src='"+LINK[0]+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='480' height='330'></embed>");
document.write("</object>");
document.close();
}
function Default(){
document.writeln("<a href='"+ LINK[0] +"' target='_blank'>" + LINK[1] + "</a>");
document.close();
}
if(linkType[sufFix]){
eval(linkType[sufFix]+"()");
}else{
Default();
}
</script>
例子:
本代码作用的例子
解释:
本代码功能的解释
可自动播放的格式:wma,mp3,wmv,asf,mpg,mpeg,avi,asx,rm,rmvb,ra,ram,swf
参数个数:
本代码中使用到的动态参数个数
嵌套次数:
最大解析的代码嵌套次数(深度),范围从 1~3
[ 本帖最后由 78tom.com 于 2006-9-8 15:04 编辑 ] |