因為有一隻野猴子
請我做這個
不小心就做出來了
要的話我在分享\r
因為我也還沒把文件寫好啦\r
先問問有沒有人要
功能就是增加一個iframe而已\r
大小可以自己調\r
打開includes/bbcode.php
#-----[ 找到]------------------------------------------
#
代碼: 選擇全部
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\\1', $bbcode_tpl['email']);
#-----[ 加在它後面 ]------------------------------------------
#
代碼: 選擇全部
//iframe join by 法蘭庫克 frank
$bbcode_tpl['iframe'] = str_replace('{WIDTH}', '\\\1', $bbcode_tpl['iframe']);
$bbcode_tpl['iframe'] = str_replace('{HEIGHT}', '\\\2', $bbcode_tpl['iframe']);
$bbcode_tpl['iframe'] = str_replace('{URL}', '\\\3', $bbcode_tpl['iframe']);
#-----[ 找到 ]------------------------------------------
#
代碼: 選擇全部
// [email]user@domain.tld[/email] code..
$patterns[5] = "#\[email\]([a-z0-9\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[5] = $bbcode_tpl['email'];
#-----[ 加在它後面 ]------------------------------------------
#注意你的array號碼 反正不要重複就對了
代碼: 選擇全部
// [iframe width= height= ] and [/iframe] code..
$patterns[8] = "#\[iframe width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9])\](.*?)\[/iframe:$uid\]#si";
$replacements[8] = $bbcode_tpl[iframe];
#-----[ 找到 ]------------------------------------------
#
代碼: 選擇全部
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\](([a-z]+?)://([^
]+?))\[/img\]#si", "[img:$uid]\\\1[/img:$uid]", $text);
#-----[ 加在它後面 ]------------------------------------------
#
代碼: 選擇全部
//[iframe width= heigth=] and [/iframe]
$text = preg_replace("#\[iframe width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9])\](([a-z]+?)://([^,
]+))\[\/iframe\]#si","[iframe width=\\\1 height=\\\2\]\\\3[/iframe:$uid]", $text);
#-----[ 打開 templates/your template/bbcode.tpl ]------------------------------------------
#
#
#-----[ 找到 ]------------------------------------------
#
代碼: 選擇全部
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
#-----[ 加在它後面 ]------------------------------------------
#
代碼: 選擇全部
<!-- BEGIN iframe -->
<!-- -->
<iframe marginwidth=0 marginheight=0 src="{URL}" frameborder="0"
WIDTH={WIDTH} HEIGHT={HEIGHT}>
</iframe>
<!-- END iframe -->
錯了告訴我唷\r
因為我剛貼貼剪剪\r
可能有錯\r
demo
http://www.bond.idv.tw/~frank/phpBB2/vi ... 9074#19074
懶人專用 直接下載我的壓縮檔
http://www.bond.idv.tw/~frank/phpBB2/vi ... 1&start=15
第十八篇的附件就是它