已安裝 multicode 再安裝 flash mod 時的一些問題經驗分享 (若OP抱歉)
使用 [flash]http://xxx.swf[/flash] 可顯示資料,但只有100x100以內的大小
使用 [flash width=xxx height=xxx loop=true]http://xxx.swf[/flash] 沒有效果並顯示亂碼
解決方法 :
代碼: 選擇全部
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
//Begin Flash Mod for 2.0.11
//[flash width= height= loop= ]and[/flash]code..
$patterns[] = "#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-5]?[0-9]?[0-9]) loop=(true|false):$uid\](.*?)\[/flash:$uid\]#si";
$replacements[] = $bbcode_tpl[flash];
//[flash]and[/flash]code..
$patterns[] = "#\[flash:$uid\](.*?)\[/flash:$uid\]#si";
$replacements[] = $bbcode_tpl[cf];
//End Flash Mod for 2.0.11
#
#-----[ REPLACE WITH ]------------------------------------
#
# 此代碼將改變flash像素最大值至999x999 若要變更請修改[?-?]內數值
# ex : [0-6]?[0-4]?[0-0] = max pixel 640
#
//Begin Flash Mod for 2.0.11
//[flash width= height= loop= ]and[/flash]code..
$patterns[] = "#\[flash width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9]) loop=(true|false):$uid\](.*?)\[/flash:$uid\]#si";
$replacements[] = $bbcode_tpl[flash];
//[flash]and[/flash]code..
$patterns[] = "#\[flash:$uid\](.*?)\[/flash:$uid\]#si";
$replacements[] = $bbcode_tpl[cf];
//End Flash Mod for 2.0.11
#
#-----[ FIND ]------------------------------------------
#
//Begin Flash Mod for 2.0.11
//[flash width= heigth= loop=] and[ /flash ]
$text = preg_replace("#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-5]?[0-9]) loop=(true|false)\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flash width=\\1 height=\\2 loop=\\3:$uid\]\\4[/flash:$uid]", $text);
$text = preg_replace("#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-5]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flash width=\\1 height=\\2 loop=false:$uid\]\\3[/flash:$uid]", $text);
$text = preg_replace("#\[flash\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flash:$uid\]\\1[/flash:$uid]", $text);
//End Flash Mod for 2.0.11
#
#-----[ REPLACE WITH ]------------------------------------
#
# 此代碼將改變flash像素最大值至999x999 若要變更請修改[?-?]內數值
# ex : [0-6]?[0-4]?[0-0] = max pixel 640
#
//Begin Flash Mod for 2.0.11
//[flash width= heigth= loop=] and[ /flash ]
$text = preg_replace("#\[flash width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9]) loop=(true|false)\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flash width=\\1 height=\\2 loop=\\3:$uid\]\\4[/flash:$uid]", $text);
$text = preg_replace("#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flash width=\\1 height=\\2 loop=false:$uid\]\\3[/flash:$uid]", $text);
$text = preg_replace("#\[flash\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flash:$uid\]\\1[/flash:$uid]", $text);
//End Flash Mod for 2.0.11
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
配合樓上大大所釋出的修改方式 flash按鈕將不會再出現[stream][/stream]
若flash上的提示依然沒有出現 您可以使用下面的方式修改 (不確定這是否最好的方法)
解決方法 :
代碼: 選擇全部
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
n_help = "{L_BBCODE_N_HELP}";
#
#-----[ AFTER, ADD ]------------------------------------------
#
# z & Z 可以改成跟其他mod不衝突的字母並配合下一個步驟
#
z_help = "{L_BBCODE_Z_HELP}";
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['bbcode_help']['flash'] = 'Flash: [flash width=000 height=000 loop=(true|false)]url to swf file[/flash] (alt+%s)';
#
#-----[ REPLACE WITH ]------------------------------------
#
$lang['bbcode_z_help'] = 'Flash: [flash width=000 height=000 loop=(true|false)]url to swf file[/flash] (alt+%s)';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
flash bbcode按鈕所釋出的代碼只是單純的[flash][/flash]
插入的flash大小若超過100x100像素就一定要自行打出長串的代碼
以下方法可以改成直接加入[flash width=320 height=240 loop=true][/flash]
解決方法 :
代碼: 選擇全部
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
bbtags = new Array(
#
#-----[ IN-LINE FIND ]------------------------------------------
#
'[flash]','[/flash]'
#
#-----[ REPLACE WITH ]------------------------------------
#
# width&height可以隨意更改
#
'[flash width=320 height=240 loop=true]','[/flash]'
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
做許多修正若還是沒有反應 可能是沒有把mod啟動
解決方法 :
代碼: 選擇全部
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN flash -->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}">
<param name="allowScriptAccess" value="never" />
<param name="movie" value="{URL}" />
<param name="loop" value="{LOOP}" />
<param name="quality" value="high" />
<param name="scale" value="noborder" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="#000000" />
<embed allowScriptAccess="never" src="{URL}" loop="{LOOP}" quality="high" scale="noborder" wmode="transparent" bgcolor="#000000" width="{WIDTH}" height="{HEIGHT}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
</object><!-- END flash -->
<!-- BEGIN cf -->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0">
<param name="allowScriptAccess" value="never" />
<param name="movie" value="{URL}" />
<param name="quality" value="high" />
<param name="scale" value="noborder" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="#000000" />
<embed allowScriptAccess="never" src="{URL}" quality="high" scale="noborder" wmode="transparent" bgcolor="#000000" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
</object><!-- END cf -->
#
#-----[ REPLACE WITH ]------------------------------------
#
<!-- BEGIN flash -->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}">
<param name="movie" value="{URL}" />
<param name="loop" value="{LOOP}" />
<param name="quality" value="high" />
<param name="scale" value="noborder" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="#000000" />
<embed src="{URL}" loop="{LOOP}" quality="high" scale="noborder" wmode="transparent" bgcolor="#000000" width="{WIDTH}" height="{HEIGHT}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
</object><!-- END flash -->
<!-- BEGIN cf -->
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0">
<param name="movie" value="{URL}" />
<param name="quality" value="high" />
<param name="scale" value="noborder" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="#000000" />
<embed src="{URL}" quality="high" scale="noborder" wmode="transparent" bgcolor="#000000" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
</object><!-- END cf -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM