[外掛]I'mVlog Video BBCode
發表於 : 2008-01-18 20:54
代碼: 選擇全部
##############################################################
## MOD Title: I'mVlog Video BBCode
## MOD Author: 御津闇慈 < zxery3@hotmail.com > (IMOML) http://imoml.phpbb-tw.com
## MOD Description: 此外掛能讓I'mVlog Video 顯示於你的論壇上
## MOD Version: 0.0.1
##
## Installation Level: (Easy)
## Installation Time: ~5 Minutes
## Files To Edit: - includes/bbcode.php,
## - langugage/lang_english/lang_main.php,
## - templates/subSilver/bbcode.tpl,
## - templates/subSilver/posting_body.tpl
## Included Files: n/a
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## example:
## [imvlog]I'mVlog URL[/imvlog]
##
##
##############################################################
## MOD History:
##
## 2008-01-18 - Version 0.0.1
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]---------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]---------------------------------
#
$EMBB_widths = array(''
#
#-----[ IN-LINE FIND ]---------------------------------
#
array(''
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'60'
#
#-----[ FIND ]---------------------------------
#
$EMBB_values = array(''
#
#-----[ IN-LINE FIND ]---------------------------------
#
$EMBB_values = array(''
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'ImVlog'
#
#-----[ FIND ]------------------------------------------
#
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$bbcode_tpl['imvlog'] = str_replace('{IMVLOG_MID}', '\\1', $bbcode_tpl['imvlog']);
$bbcode_tpl['imvlog'] = str_replace('{IMVLOG_ID}', '\\2', $bbcode_tpl['imvlog']);
#
#-----[ FIND ]------------------------------------------
#
$replacements[] = $bbcode_tpl['email'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
// [imvlog]I'mVlog URL[/imvlog] code..
$patterns[] = "#\[imvlog\]http://(?:www\.)?im.tv/VLOG/Personal/([1-9]+)/([1-9]+)[^[]*\[/imvlog\]#is";
$replacements[] = $bbcode_tpl['imvlog'];
#
#-----[ 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_help']['imvlog'] = 'Imvlog: [imvlog]Imvloge URL[/imvlog]';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</a><!-- END email -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN imvlog -->
<object width="425" height="350">
<param name="movie" value="http://myvlog.im.tv/?id={IMVLOG_ID}&mid={IMVLOG_MID}"></param>
<embed src="http://myvlog.im.tv/?id={IMVLOG_ID}&mid={IMVLOG_MID}" type="application/x-shockwave-flash" width="425" height="350"></embed>
</object>
<!-- ENDimvlog -->
#
#-----[ OPEN ]---------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ 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 ]---------------------------------
#
,'[imvlog]','[/imvlog]'
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM