[問題] Multiple BBCode

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

主題已鎖定
love19870120
星球公民
星球公民
文章: 159
註冊時間: 2004-10-21 23:15

[問題] Multiple BBCode

文章 love19870120 »

問題外掛:Multiple BBCode

代碼: 選擇全部

## easymod compliant
############################################################## 
## MOD Title:    Multiple BBCode MOD
## MOD Author:   Nuttzy99 < nospam@blizzhackers.com > (n/a) http://www.blizzhackers.com
##
## MOD Description:  Allows you to install BBCode MODs that
##    add quick BBCode buttons in post edits.  Without this
##    MOD, there is no standard way of installing BBCode MODs.
## MOD Version:  1.2.1
## 
## Installation Level:  EASY
## Installation Time:   2 minutes
## Files To Edit:       posting.php
##                      templates/subSilver/posting_body.tpl
## Included Files:      n/a
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ 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/
############################################################## 
##
## Author Notes:
##     + if Multi BBCode MOD v1.0.1 is already installed, use the update to 1.2.0 MOD
##          and do NOT install this MOD script
##     + Works with phpBB 2.0.2 thru 2.0.6
##     + installable with EasyMOD
##
############################################################## 
##
## MOD History:
##    2003-09-25 - Version 1.2.1
##         + improved MOD Template compliance
##
##    2003-08-15 - Version 1.2.0
##         + updated for 2.0.6
##         + allows additional hotkeys - Xore did most of the work ;-)
##         + made EasyMOD compatiable
##
##    2003-02-03 - Version 1.0.1
##         + updated for 2.0.4
##         + no code changes required, just updated the header info
##
##    2002-08-31 - Version 1.0.0
##         + initial release
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 


# 
#-----[ OPEN ]---------------------------------
# 
posting.php


# 
#-----[ FIND ]---------------------------------
#
#  NOTE - the full line to look for is:
# make_jumpbox('viewforum.'.$phpEx);
#
make_jumpbox(


# 
#-----[ AFTER, ADD ]---------------------------------
#

// MULTI BBCODE-begin
//NOTE: the first element of each array must be ''   Add new elements AFTER the ''
$EMBB_keys = array('') ;
$EMBB_widths = array('') ;
$EMBB_values = array('') ;
\r
for ($i=1; $i<count($EMBB_values); $i++)
{
	// load BBcode MODs info
	$val = ($i*2)+16 ;
	$template->assign_block_vars('MultiBB', array(
		'KEY' => $EMBB_keys[$i],
		'NAME' => "addbbcode$val",
		'WIDTH' => $EMBB_widths[$i],
		'VALUE' => $EMBB_values[$i],
		'STYLE' => "bbstyle($val)")
	);
}
// MULTI BBCODE-end

# 
#-----[ OPEN ]---------------------------------
# 
templates/subSilver/posting_body.tpl


#
#-----[ FIND ]---------------------------------
#
#   NOTE - the complete line to find is:
# function helpline(help) {
#

function helpline(


# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
// MULTI BBCODE-start
	// put an "n" in front of the value to make it an acceptable variable name
	if ((help == '1') || (help == '2') || (help == '3') || (help == '4') || (help == '5') || (help == '6') || (help == '7') || (help == '8') || (help == '9') || (help == '0'))
	{
		help = 'n' + help ;
	}
// MULTI BBCODE-end

#
#-----[ FIND ]---------------------------------
#
#  NOTE - the full line to look for is:
#			  <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
#			  </span></td>
#
	name="addbbcode16"
	</td>

# 
#-----[ AFTER, ADD ]---------------------------------
#

			<!-- BEGIN MultiBB -->
			<td><span class="genmed">
			  <input type="button" class="button" accesskey="{MultiBB.KEY}" name="{MultiBB.NAME}" value="{MultiBB.VALUE}" style="width: {MultiBB.WIDTH}px" onClick="{MultiBB.STYLE}" onMouseOver="helpline('{MultiBB.KEY}')" />
			  </span></td>
			<!-- END MultiBB -->
# 
#-----[ FIND ]---------------------------------
#
#  NOTE - the full line to look for is:
#					<select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcodefontcolor.options[this.form.addbbcodefontcolor.selectedIndex].value + ']', '[/color]')" onMouseOver="helpline('s')">
#
	name="addbbcode18"


# 
#-----[ IN-LINE FIND ]---------------------------------
#
name="addbbcode18"


# 
#-----[ IN-LINE REPLACE ]---------------------------------
#
name="addbbcodefontcolor"


# 
#-----[ IN-LINE FIND ]---------------------------------
#
this.form.addbbcode18.options


# 
#-----[ IN-LINE REPLACE ]---------------------------------
#
this.form.addbbcodefontcolor.options


# 
#-----[ IN-LINE FIND ]---------------------------------
#
this.form.addbbcode18.selectedIndex


# 
#-----[ IN-LINE REPLACE ]---------------------------------
#
this.form.addbbcodefontcolor.selectedIndex


# 
#-----[ FIND ]---------------------------------
#
#  NOTE - the full line to look for is:
#					</select> &nbsp;{L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcodefontsize.options[this.form.addbbcodefontsize.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">
#
	name="addbbcode20"

# 
#-----[ IN-LINE FIND ]---------------------------------
#
name="addbbcode20"


# 
#-----[ IN-LINE REPLACE ]---------------------------------
#
name="addbbcodefontsize"


# 
#-----[ IN-LINE FIND ]---------------------------------
#
this.form.addbbcode20.options


# 
#-----[ IN-LINE REPLACE ]---------------------------------
#
this.form.addbbcodefontsize.options


# 
#-----[ IN-LINE FIND ]---------------------------------
#
this.form.addbbcode20.selectedIndex


# 
#-----[ IN-LINE REPLACE ]---------------------------------
#
this.form.addbbcodefontsize.selectedIndex


#
#-----[ SAVE/CLOSE ALL FILES ]---------------------------------
#
# EoM
請問一下,中間有幾段都談到全句的。可是又叫我家在句子中間。//...//

渴式那怎麼辦,我家在中間又說錯誤。= =
StickyKid
竹貓忠實會員
竹貓忠實會員
文章: 1019
註冊時間: 2003-01-31 10:32
來自: Taichung, Taiwan
聯繫:

文章 StickyKid »

我想你的問題是這個吧?
#-----[ IN-LINE REPLACE ]---------------------------------
那不是加在中間..
是要你取代在此行中找到的字串
Helvetica is a feature-length independent film about typography.
love19870120
星球公民
星球公民
文章: 159
註冊時間: 2004-10-21 23:15

文章 love19870120 »

那個我看的董><

我是說。

#
#-----[ FIND ]---------------------------------
#
# NOTE - the full line to look for is:
# make_jumpbox('viewforum.'.$phpEx);
#
make_jumpbox(

這一個。
風格努力學習中,學習完成度5%。
誕生風格的距離之路5%。
StickyKid
竹貓忠實會員
竹貓忠實會員
文章: 1019
註冊時間: 2003-01-31 10:32
來自: Taichung, Taiwan
聯繫:

文章 StickyKid »

喔~ 那是說 找到make_jumpbox(
然後上面的注釋是說完整為 make_jumpbox('viewforum.'.$phpEx);
要你在make_jumpbox('viewforum.'.$phpEx);
下行加入\r
/ MULTI BBCODE-begin
//NOTE: the first element of each array must be '' Add new elements AFTER the ''
$EMBB_keys = array('') ;
$EMBB_widths = array('') ;
$EMBB_values = array('') ;

for ($i=1; $i<count($EMBB_values); $i++)
{
// load BBcode MODs info
$val = ($i*2)+16 ;
$template->assign_block_vars('MultiBB', array(
'KEY' => $EMBB_keys[$i],
'NAME' => "addbbcode$val",
'WIDTH' => $EMBB_widths[$i],
'VALUE' => $EMBB_values[$i],
'STYLE' => "bbstyle($val)")
);
}
// MULTI BBCODE-end
Helvetica is a feature-length independent film about typography.
love19870120
星球公民
星球公民
文章: 159
註冊時間: 2004-10-21 23:15

文章 love19870120 »

我加在...
make_jumpbox(
後面= =


感謝您的執導喔^^
風格努力學習中,學習完成度5%。
誕生風格的距離之路5%。
主題已鎖定

回到「外掛問題討論」