打开 include/bbcode.inc.php文件,找到下面一句代码:- $discuzcodes['replacearray']['bbcode_regexp'][] = "payto('\\1',array('subject'=>'\\3','body'=>'\\5','price'=>'\\7','price'=>'\\9','url'=>'\\11','type'=>'\\13','transport'=>'\\15','ordinary_fee'=>'\\17','express_fee'=>'\\19'))";
复制代码 在它后面添加两句代码,如下:- $discuzcodes['searcharray']['bbcode_regexp'][] = "/\[flash\]\s*(.*?)\s*\[\/flash\]/ies";
- $discuzcodes['replacearray']['bbcode_regexp'][] = "parseflash('\\1')";
复制代码 在文件的最后添加flash文件解析函数:- function parseflash($url) {
- return '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" WIDTH="670" height="450"><PARAM NAME="movie" VALUE="'.$url.'"><PARAM NAME="quality" VALUE="high"><EMBED src="'.$url.'" loop="false" menu="false" quality="high" WIDTH="670" height="450" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>';
- }
复制代码 更新缓存,刷新页面,搞定。 |