插件归原作者所有,本人只是修改适合DZ5.5用户供大家使用
演示网站:http://www.a-top.net.cn/forumdisplay.php?fid=147
http://www.a-top.net.cn/forumdisplay.php?fid=247
测试帐号:用户名密码一样:test
例
[wmv=360,300,1]影音档[/wmv]
[rm=360,300,1]影音档[/rm]
[swf=500,300]FLASH动画[/swf]
建议先备份好修改需要的文件
1、
修改 include/discuzcode.func.php 找到
- "/\[img=(\d{1,4})[x|\,](\d{1,4})\]\s*([^\[\<\r\n]+?)\s*\[\/img\]/ies"
复制代码
更换为
- "/\[img=(\d{1,3})[x|\,](\d{1,3})\]\s*([^\[\<\r\n]+?)\s*\[\/img\]/ies",
复制代码
然后下面加上
- "/\[swf=(\d{1,3})[x|\,](\d{1,3})\]\s*([^\[\<\r\n]+?)\s*\[\/swf\]/ies",
- "/\[wmv\]\s*(.+?)\s*\[\/wmv\]/ies",
- "/\[rm\]\s*(.+?)\s*\[\/rm\]/ies",
- "/\[wmv=(\d+?)[x|\,](\d+?)[x|\,](\d+?)\]\s*(.+?)\s*\[\/wmv\]/ies",
- "/\[rm=(\d+?)[x|\,](\d+?)[x|\,](\d+?)\]\s*(.+?)\s*\[\/rm\]/ies"
复制代码
2、
找到
- "bbcodeurl('\\3', '<img width="\\1" height="\\2" src="%s" border="0" alt="" />')"
复制代码
更换为
- "bbcodeurl('\\3', '<img width="\\1" height="\\2" src="%s" border="0" alt="" />')",
复制代码
然后下面加上
带下载地址链接的
- "bbcodeurl('\\3', '[<a href="%s" target="_blank">新开窗口</a>]<br><embed width="\\1" height="\\2" src="\\3" type="application/x-shockwave-flash"></embed> ')",
- "bbcodeurl('\\1', '[<a href="%s">下载播放</a>]<br><object align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="OBJECT" id="MediaPlayer" width="480" height="360" ><PARAM NAME="AutoStart" VALUE="0" ><param name="ShowStatusBar" value="-1"><param name="Filename" value="%s"><embed type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" flename="mp" src="%s" width="480" height="360"></embed></object>')",
- "bbcodeurl('\\1', '[<a href="%s">下载播放</a>]<br><object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="Player" width="480" height="360" viewastext><param name="Autostart" value="0"><param name="CONTROLS" value="ImageWindow"><param name="CONSOLE" value="_master"><param name="LOOP" value="-1"><param name="CENTER" value="0"></object><br><object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=64 id=Player width=480 VIEWASTEXT><param name="_ExtentX" value="18256"><param name="_ExtentY" value="794"><param name="Autostart" value="0"><param name="LOOP" value="0"><param name="CENTER" value="0"><param name="BACKGROUNDCOLOR" value="#000000"><param name="SRC" value="\\1"></object>')",
- "bbcodeurl('\\4', '[<a href="%s">下载播放</a>]<br><object align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="OBJECT" id="MediaPlayer" width="\\1" height="\\2" ><PARAM NAME="AutoStart" VALUE="\\3" ><param name="ShowStatusBar" value="-1"><param name="Filename" value="%s"><embed type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" width="\\1" height="\\2"></embed></object>')",
- "bbcodeurl('\\4', '[<a href="%s">下载播放</a>]<br><object width="\\1" height="\\2" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="Player" viewastext><param name="Autostart" value="\\3"><param name="CONTROLS" value="ImageWindow"><param name="CONSOLE" value="_master"><param name="LOOP" value="-1"><param name="CENTER" value="0"></object><br><object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=64 id=Player width="\\1" VIEWASTEXT><param name="_ExtentX" value="18256"><param name="_ExtentY" value="794"><param name="Autostart" value="\\3"><param name="LOOP" value="-1"><param name="CENTER" value="0"><param name="SRC" value="%s"></object>')"
复制代码
不带下载地址链接的
- "bbcodeurl('\\3', '<embed width="\\1" height="\\2" src="\\3" type="application/x-shockwave-flash"></embed> ')",
- "bbcodeurl('\\1', '<object align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="OBJECT" id="MediaPlayer" width="480" height="360" ><PARAM NAME="AutoStart" VALUE="0" ><param name="ShowStatusBar" value="-1"><param name="Filename" value="%s"><embed type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" flename="mp" src="%s" width="480" height="360"></embed></object>')",
- "bbcodeurl('\\1', '<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="Player" width="480" height="360" viewastext><param name="Autostart" value="0"><param name="CONTROLS" value="ImageWindow"><param name="CONSOLE" value="_master"><param name="LOOP" value="-1"><param name="CENTER" value="0"></object><br><object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=64 id=Player width=480 VIEWASTEXT><param name="_ExtentX" value="18256"><param name="_ExtentY" value="794"><param name="Autostart" value="0"><param name="LOOP" value="0"><param name="CENTER" value="0"><param name="BACKGROUNDCOLOR" value="#000000"><param name="SRC" value="\\1"></object>')",
- "bbcodeurl('\\4', '<object align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="OBJECT" id="MediaPlayer" width="\\1" height="\\2" ><PARAM NAME="AutoStart" VALUE="\\3" ><param name="ShowStatusBar" value="-1"><param name="Filename" value="%s"><embed type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" width="\\1" height="\\2"></embed></object>')",
- "bbcodeurl('\\4', '<object width="\\1" height="\\2" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="Player" viewastext><param name="Autostart" value="\\3"><param name="CONTROLS" value="ImageWindow"><param name="CONSOLE" value="_master"><param name="LOOP" value="-1"><param name="CENTER" value="0"></object><br><object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=64 id=Player width="\\1" VIEWASTEXT><param name="_ExtentX" value="18256"><param name="_ExtentY" value="794"><param name="Autostart" value="\\3"><param name="LOOP" value="-1"><param name="CENTER" value="0"><param name="SRC" value="%s"></object>')"
复制代码
后台加入按鈕
帖子相关=>Discuz! 代码=>新增以下代码
一、
1.标签:wmv
2.图标文件:bb_wmv.gif
可用打勾
1.标签:rm
2.图标文件:bb_rm.gif
可用打勾
1.标签:swf
2.图标文件:bb_flash.gif
可用打勾
二、
wmv详细修改
例子:[wmv=360,300,1]影音网址,支持影片及音乐,不自动播放将1改为0[/wmv]
解释:支持类型:wmv / wma / mid / mp3 / avi / 等...
参数个数及嵌套次数 ~ 都为1
rm详细修改
例子:[rm=360,300,1]影音网址,支持影片及音乐,不自动播放将1改为0[/rm]
解释:支持类型:ra / rm / rmvb / ram 等...
参数个数及嵌套次数 ~ 都为1
swf详细修改
例子:[swf=500,300] Flash 动画网址[/swf]
解释:插入 Flash 动画
参数个数及嵌套次数 ~ 都为1
建议:
后台修改=>Discuz! 选项=>其他设置=>默认的编辑器模式=>设为Discuz! 代码模式
更新缓存 |