使用版本:phpBB 2.0.6
網站位置:http://cyberkd.com
狀況描述:
我安裝完後,發表新主題時沒有flash的icon,但是我自己輸入[flash][/flash]
時flash又能正常在文章中顯示出來,我己跟說明的去做,不知問題出在那裡??
還有一個問題,flash在文章中只能顯示一個正方形,要修改那裡才能顯示flash的全圖,希望有人可以幫忙!!
代碼: 選擇全部
##############################################################
## MOD Title: Macromedia Flash Player BBcode MOD, for QBB
## MOD Author: davidls < davidls14@yahoo.com.au > (David Smith) http://www27.brinkster.com/bb2c
## MOD Description: This mod adds a flash tag to your forum, this version removes the need to use the loop param,
## and if you want you can remove the width and height params as well.
## MOD Version: 2.0.6
##
## Installation Level: easy
## Installation Time: 8 minutes
## Files To Edit: includes/bbcode.php
## posting.php
## language/lang_english/lang_main.php
## language/lang_english/lang_bbcode.php
## templates/subSilver/bbcode.tpl
## templates/subSilver/posting_body.tpl
## language/lang_english/lang_bbcode.php
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Author Notes: please not only the follow syntax works
##
## [flash width=123 height=123 loop=true|false]http://mydomain.com/myfile.swf[/flash]
## [flash width=123 height=123]http://mydomain.com/myfile.swf[/flash]
## [flash]http://mydomain.com/myfile.swf[/flash]
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
# IMPORTANT: You MUST first install the Multi Quick BBCode Mod.
#
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
# NOTE: the complete line to find is:
#$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\\1', $bbcode_tpl['email']);
#
$bbcode_tpl['email']
#
#-----[ AFTER, ADD ]------------------------------------------
#
//Begin Flash Mod for 2.0.6
$bbcode_tpl['flash'] = str_replace('{WIDTH}', '\\\1', $bbcode_tpl['flash']);
$bbcode_tpl['flash'] = str_replace('{HEIGHT}', '\\\2', $bbcode_tpl['flash']);
$bbcode_tpl['flash'] = str_replace('{LOOP}', '\\\3', $bbcode_tpl['flash']);
$bbcode_tpl['flash'] = str_replace('{URL}', '\\\4', $bbcode_tpl['flash']);
$bbcode_tpl['cf'] = str_replace('{URL}', '\\\1', $bbcode_tpl['cf']);
//End Flash Mod for 2.0.6
#
#-----[ FIND ]---------------------------------
#
$replacements[] = $bbcode_tpl['email'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//Begin Flash Mod for 2.0.6
//[ flash width= height= loop= ]and[ /flash ]code..
$patterns[] = "#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-4]?[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.6
#
#-----[ FIND ]---------------------------------
#
#
$text = preg_replace("#\[img\]((ht|f)tp://)
#
#-----[ AFTER, ADD ]------------------------------------------
#
//Begin Flash Mod for 2.0.6
//[flash width= heigth= loop=] and[ /flash ]
$text = preg_replace("#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9]) loop=(true|false)\](([a-z]+?)://([^,
]+))\[\/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-9]?[0-9])\](([a-z]+?)://([^,
]+))\[\/flash\]#si","[flash width=\\\1 height=\\\2 loop=false:$uid\]\\\3[/flash:$uid]", $text);
$text = preg_replace("#\[flash\](([a-z]+?)://([^,
]+))\[\/flash\]#si","[flash:$uid\]\\\1[/flash:$uid]", $text);
//End Flash Mod for 2.0.6
#
#-----[ OPEN ]---------------------------------
#
posting.php
#
#-----[ FIND ]---------------------------------
#
$EMBB_keys = array(''
$EMBB_widths = array(''
$EMBB_values = array(''
#
#-----[ IN-LINE FIND ]---------------------------------
#
$EMBB_keys = array(''
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'m'
#
#-----[ IN-LINE FIND ]---------------------------------
#
$EMBB_widths = array(''
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'50'
#
#-----[ IN-LINE FIND ]---------------------------------
#
$EMBB_values = array(''
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'flash'
#
#-----[ FIND ]---------------------------------
#
# NOTE: the full line to look for is:
# 'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
#
'L_BBCODE_F_HELP' =>
#
#-----[ AFTER, ADD ]--------------------------------
#
'L_BBCODE_M_HELP' => $lang['bbcode_m_help'],
##
##
## --- NOTE: You will have to make this change to ALL languages that you ---
## --- plan to support on your board. I use "English" as an example ---
##
##
#
#-----[ OPEN ]---------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]---------------------------------
#
# NOTE: the full line to look for is:
#$lang['bbcode_f_help'] = "Font size: [size=x-small]small text[/size]";
#
$lang['bbcode_f_help']
#
#-----[ AFTER, ADD ]---------------------------------
#
$lang['bbcode_m_help'] = "flash: [flash width= height= loop=]text[/flash] (alt+<hotkey>)";
#
#-----[ OPEN ]---------------------------------
#
language/lang_english/lang_bbcode.php
#
#-----[ FIND ]---------------------------------
#
# NOTE: the full line to look for is:
# $faq[] = array("How to change the text colour or size", [..SNIP..] </ul>");
#
array("How to change the text colour or size"
#
#-----[ AFTER, ADD ]---------------------------------
#
#TODO: add BBcode faq here
##
##
## --- NOTE: You will have to make this change to ALL themes you have ---
## --- installed. I use "subSilver" as an example. ---
##
##
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]---------------------------------
#
# NOTE: the full line to look for is:
#<!-- BEGIN b_close --></span><!-- END b_close -->
<!-- END b_close -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN flash --><!-- URL's used in the movie-->
<!-- text used in the movie-->
<!-- -->
<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 --><!-- URL's used in the movie-->
<!-- text used in the movie-->
<!-- -->
<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 -->
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]---------------------------------
#
# NOTE: the full line to look for is:
#f_help = "{L_BBCODE_F_HELP}";
#
f_help =
#
#-----[ AFTER, ADD ]------------------------------------------
#
m_help = "{L_BBCODE_M_HELP}";
#
#-----[ FIND ]---------------------------------
#
# NOTE: the actual line to find is MUCH longer, containing all the bbcode tags
#
bbtags = new Array(
#
#-----[ IN-LINE FIND ]---------------------------------
#
'[url]','[/url]'
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'[flash width=100 height=100]','[/flash]'
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_bbcode.php
#
#-----[ FIND ]------------------------------------------
#
//
// This ends the BBCode guide entries
//
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$faq[] = array("--", "Using Flash");
$faq[] = array("Using Macromedia Flash", "phpBB BBCode Flash tag supports a number of ways of
using flash URIs, Uniform Resource Indicators better known as URLs, to display
stunning flash animations, games etc...
<p>You may use the flash tag in your posts, and signature, and any other BBcode
enabled fields on your site. Flash isn't for the faint hearted, and it is
recommended that you know what you are doing before using these tags.</p>
<ul><li>The first of these uses the <b>[flash][/flash]</b> tag, everything
inbetween the tags, it the URI for the swf file. For example to make a flash tag with this file you could use:<br /><br /><b>[flash]</b>http://www.macromedia.com/software/flash/header_fl_main.swf<b>[/flash]</b><br /><br />This would generate the following
,</li></ul>
<p>
<object codeBase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" height=\"240\" width=\"420\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\">
<param NAME=\"_cx\" VALUE=\"11113\">
<param NAME=\"_cy\" VALUE=\"6350\">
<param NAME=\"Movie\" VALUE=\"http://www.macromedia.com/software/flash/header_fl_main.swf\">
<param NAME=\"Src\" VALUE=\"http://www.macromedia.com/software/flash/header_fl_main.swf\">
<param NAME=\"WMode\" VALUE=\"Transparent\">
<param NAME=\"Play\" VALUE=\"1\">
<param NAME=\"Loop\" VALUE=\"-1\">
<param NAME=\"Quality\" VALUE=\"High\">
<param NAME=\"SAlign\" VALUE>
<param NAME=\"Menu\" VALUE=\"-1\">
<param NAME=\"Base\" VALUE>
<param NAME=\"Scale\" VALUE=\"NoBorder\">
<param NAME=\"DeviceFont\" VALUE=\"0\">
<param NAME=\"EmbedMovie\" VALUE=\"0\">
<param NAME=\"BGColor\" VALUE=\"000000\">
<param NAME=\"SWRemote\" VALUE>
<param NAME=\"Stacking\" VALUE=\"below\"><embed src=\"http://www.macromedia.com/software/flash/header_fl_main.swf\" 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\">
</object>
</p>
<ul><li>If you want the so set the width, height and loop params yourself:<br /><br /><b>[flash
width=500 height=45 loop=true]</b>http://www.macromedia.com/software/flash/header_fl_main.swf<b>[/flash]</b><br /><br />This would generate the following, </li></ul>
<p>
<object codeBase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\\" height=\"45\" width=\"500\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\">
<param NAME=\"_cx\" VALUE=\"13229\">
<param NAME=\"_cy\" VALUE=\"1191\">
<param NAME=\"Movie\" VALUE=\"http://www.macromedia.com/software/flash/header_fl_main.swf\">
<param NAME=\"Src\" VALUE=\"http://www.macromedia.com/software/flash/header_fl_main.swf\">
<param NAME=\"WMode\" VALUE=\"Transparent\">
<param NAME=\"Play\" VALUE=\"-1\">
<param NAME=\"Loop\" VALUE=\"-1\">
<param NAME=\"Quality\" VALUE=\"High\">
<param NAME=\"SAlign\" VALUE>
<param NAME=\"Menu\" VALUE=\"-1\">
<param NAME=\"Base\" VALUE>
<param NAME=\"Scale\" VALUE=\"NoBorder\">
<param NAME=\"DeviceFont\" VALUE=\"0\">
<param NAME=\"EmbedMovie\" VALUE=\"0\">
<param NAME=\"BGColor\" VALUE=\"000000\">
<param NAME=\"SWRemote\" VALUE>
<param NAME=\"Stacking\" VALUE=\"below\"><embed src=\"http://www.macromedia.com/software/flash/header_fl_main.swf\" loop=\"true\" quality=\"high\" scale=\"noborder\" wmode=\"transparent\" bgcolor=\"#000000\" WIDTH=\"500\" HEIGHT=\"45\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">
</object>
<br>
</p>
<ul><li>You may also not use the loop param, and just post using the width and
height params. for example <b>[flash
width=500 height=45]</b>http://www.macromedia.com/software/flash/header_fl_main.swf<b>[/flash]</b>
produces the same as not using the loop, except loop is set to a default
value of, off.</li></ul>
<p>Make sure you use flash correctly otherwise you may end up with a mess (like
the first flash posted), it is better to set the height and width params
yourself. By param, we mean parameter which is just a value which makes it
behave the way it does.</p>
<p>Enjoy the flash tag.");
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM 
