[問題]請問可以加入聲音文件嗎﹖
版主: 版主管理群
版面規則
本區是討論關於 phpBB 2.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
本區是討論關於 phpBB 2.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
[問題]請問可以加入聲音文件嗎﹖
使用PHPBB發帖時可以在帖中加入聲音文件嗎﹖好象只看見插入圖片而已\r
謝謝
謝謝
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
define("BBCODE_UID_LEN", 10);
// global that holds loaded-and-prepared bbcode templates, so we only have to do
// that stuff once.
$bbcode_tpl = null;
/**
* Loads bbcode templates from the bbcode.tpl file of the current template set.
* Creates an array, keys are bbcode names like "b_open" or "url", values
* are the associated template.
* Probably pukes all over the place if there's something really screwed
* with the bbcode.tpl file.
*
* Nathan Codding, Sept 26 2001.
*/
function load_bbcode_template()
{
global $template;
$tpl_filename = $template->make_filename('bbcode.tpl');
$tpl = fread(fopen($tpl_filename, 'r'), filesize($tpl_filename));
// replace \ with \\\ and then ' with \'.
$tpl = str_replace('\\\', '\\\\\\\', $tpl);
$tpl = str_replace('\'', '\\\\\'', $tpl);
// strip newlines.
$tpl = str_replace("
", '', $tpl);
// Turn template blocks into PHP assignment statements for the values of $bbcode_tpls..
$tpl = preg_replace('#<!-- BEGIN (.*?) -->(.*?)<!-- END (.*?) -->#', "
" . '$bbcode_tpls[\'\\\1\'] = \'\\\2\';', $tpl);
$bbcode_tpls = array();
eval($tpl);
return $bbcode_tpls;
}
{
die("Hacking attempt");
}
define("BBCODE_UID_LEN", 10);
// global that holds loaded-and-prepared bbcode templates, so we only have to do
// that stuff once.
$bbcode_tpl = null;
/**
* Loads bbcode templates from the bbcode.tpl file of the current template set.
* Creates an array, keys are bbcode names like "b_open" or "url", values
* are the associated template.
* Probably pukes all over the place if there's something really screwed
* with the bbcode.tpl file.
*
* Nathan Codding, Sept 26 2001.
*/
function load_bbcode_template()
{
global $template;
$tpl_filename = $template->make_filename('bbcode.tpl');
$tpl = fread(fopen($tpl_filename, 'r'), filesize($tpl_filename));
// replace \ with \\\ and then ' with \'.
$tpl = str_replace('\\\', '\\\\\\\', $tpl);
$tpl = str_replace('\'', '\\\\\'', $tpl);
// strip newlines.
$tpl = str_replace("
", '', $tpl);
// Turn template blocks into PHP assignment statements for the values of $bbcode_tpls..
$tpl = preg_replace('#<!-- BEGIN (.*?) -->(.*?)<!-- END (.*?) -->#', "
" . '$bbcode_tpls[\'\\\1\'] = \'\\\2\';', $tpl);
$bbcode_tpls = array();
eval($tpl);
return $bbcode_tpls;
}
●架設主機作業系統:Windows XP
●快速架站程式:Appserv
●您安裝的程式:Apache + php + MySql
●您的 phpBB2 版本:phpBB 2.0.3
●快速架站程式:Appserv
●您安裝的程式:Apache + php + MySql
●您的 phpBB2 版本:phpBB 2.0.3
代碼: 選擇全部
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\\1', $bbcode_tpl['email']);
#
#----[ AFTER, ADD ]-----------------------------------------
#
//Flash Mod Copyright David Smith 2002
$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']);
//Begin Strean Mod Copyright David Smith 2002
$bbcode_tpl['stream'] = str_replace('{URL}', '\\\1', $bbcode_tpl['stream']);
#
#-----[ FIND ]------------------------------------------
#
// user@domain.tld code..
$patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[] = $bbcode_tpl['email'];
#
#----[ AFTER, ADD ]-----------------------------------------
# Note: you may need to change array number if used with other BBcode mods
#
// [flash width= height= loop= ] and [/flash] code..
$patterns[] = "#\[flash width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9]) loop=(.*?):$uid\](.*?)\[/flash:$uid\]#si";
$replacements[] = $bbcode_tpl['flash'];
//[ stream ]and[ /stream ]for streaming audio.
$patterns[] = "#\[stream:$uid\](.*?)\[/stream:$uid\]#si";
$replacements[] = $bbcode_tpl['stream'];
#
#-----[ FIND ]------------------------------------------
#
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\]((ht|f)tp://)([^ \?&=\"
\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\\1' . str_replace(' ', '%20', '\\\3') . '[/img:$uid]'", $text);
#
#----[ AFTER, ADD ]-----------------------------------------
#
//[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=(.*?)\](([a-z]+?)://([^,
]+))\[\/flash\]#si","[flash width=\\\1 height=\\\2 loop=\\\3:$uid\]\\\4[/flash:$uid]", $text);
$text = preg_replace("#\[flash width=([0-9]?[0-9]?[0-9]) height=([0-9]?[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 width=600 height=450 loop=false:$uid\]\\\1[/flash:$uid]", $text);
//[ stream]image_url_here[/stream ]code..
$text = preg_replace("#\[stream\](([a-z]+?)://([^,
]+))\[/stream\]#si", "[stream:$uid]\\\1[/stream:$uid]", $text);
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
\n#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
#
#----[ 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 stream -->
<object id="wmp" width=300 height=300 classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0"
standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="FileName" value="{URL}">
<param name="ShowControls" value="1">
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="1">
<param name="AutoSize" value="1">
<param name="autoplay" value="0">
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp"
src="{URL}" name=MediaPlayer2 showcontrols=1 showdisplay=0 showstatusbar=1 autosize=1 autoplay=0 visible=1 animationatstart=0 transparentatstart=1 loop=0 height=70 width=300>
</embed>
</object>
<!-- END stream -->
請問一下上面這個可伸縮的程式碼表格是怎麼弄出來的?leeman 寫:?>[/php]代碼: 選擇全部
#-----[ OPEN ]------------------------------------------ # includes/bbcode.php # #-----[ FIND ]------------------------------------------ # $bbcode_tpl['email'] = str_replace('{EMAIL}', '\\\1', $bbcode_tpl['email']); # #----[ AFTER, ADD ]----------------------------------------- # //Flash Mod Copyright David Smith 2002 $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']); //Begin Strean Mod Copyright David Smith 2002 $bbcode_tpl['stream'] = str_replace('{URL}', '\\\1', $bbcode_tpl['stream']); # #-----[ FIND ]------------------------------------------ # // user@domain.tld code.. $patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si"; $replacements[] = $bbcode_tpl['email']; # #----[ AFTER, ADD ]----------------------------------------- # Note: you may need to change array number if used with other BBcode mods # // [flash width= height= loop= ] and [/flash] code.. $patterns[] = "#\[flash width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9]) loop=(.*?):$uid\](.*?)\[/flash:$uid\]#si"; $replacements[] = $bbcode_tpl['flash']; //[ stream ]and[ /stream ]for streaming audio. $patterns[] = "#\[stream:$uid\](.*?)\[/stream:$uid\]#si"; $replacements[] = $bbcode_tpl['stream']; # #-----[ FIND ]------------------------------------------ # // [img]image_url_here[/img] code.. $text = preg_replace("#\[img\]((ht|f)tp://)([^ \?&=" \t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\\1' . str_replace(' ', '%20', '\\\3') . '[/img:$uid]'", $text); # #----[ AFTER, ADD ]----------------------------------------- # //[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=(.*?)\](([a-z]+?)://([^, ]+))\[\/flash\]#si","[flash width=\\\1 height=\\\2 loop=\\\3:$uid\]\\\4[/flash:$uid]", $text); $text = preg_replace("#\[flash width=([0-9]?[0-9]?[0-9]) height=([0-9]?[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 width=600 height=450 loop=false:$uid\]\\\1[/flash:$uid]", $text); //[ stream]image_url_here[/stream ]code.. $text = preg_replace("#\[stream\](([a-z]+?)://([^, ]+))\[/stream\]#si", "[stream:$uid]\\\1[/stream:$uid]", $text); # #-----[ OPEN ]------------------------------------------ # templates/subSilver/bbcode.tpl # #-----[ FIND ]------------------------------------------ # <!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email --> # #----[ 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 stream --> <object id="wmp" width=300 height=300 classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"> <param name="FileName" value="{URL}"> <param name="ShowControls" value="1"> <param name="ShowDisplay" value="0"> <param name="ShowStatusBar" value="1"> <param name="AutoSize" value="1"> <param name="autoplay" value="0"> <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/windows95/downloads/contents/wurecommended/s_wufeatured/mediaplayer/default.asp" src="{URL}" name=MediaPlayer2 showcontrols=1 showdisplay=0 showstatusbar=1 autosize=1 autoplay=0 visible=1 animationatstart=0 transparentatstart=1 loop=0 height=70 width=300> </embed> </object> <!-- END stream -->
歡迎大家來碎碎唸
●架設主機作業系統:Linux(RedHat)竹貓虛擬主機
●上網方式:Hinet ADSL 2M/512K
●安裝的程式:
●phpBB2 版本:phpBB 2.0.17
●domain(網域名稱) :flythinking.net
●phpBB2 連結網址: http://flythinking.net
●架設主機作業系統:Linux(RedHat)竹貓虛擬主機
●上網方式:Hinet ADSL 2M/512K
●安裝的程式:
●phpBB2 版本:phpBB 2.0.17
●domain(網域名稱) :flythinking.net
●phpBB2 連結網址: http://flythinking.net
-
阳光社
- 星球普通子民

- 文章: 3
- 註冊時間: 2004-08-24 16:48
应该是Javascript做的神川小羽 寫:http://www.forumimages.com/forum/viewtopic.php?t=324skeptic 寫: 請問一下上面這個可伸縮的程式碼表格是怎麼弄出來的?


