http://phpbb-tw.net/phpbb/viewtopic.php?t=39374
代碼: 選擇全部
###############################################################
## Mod Title: color font bar
## Mod Version: 1.2
## Author: mat <mat100>
## Description: Add a bar in order to chose easily the color of your text
##
## Installation Level: EASY
## Installation Time: 2 minutes
## Files to Edit: 1
## Included Files:1 (color.js)
##############################################################
## For Security Purposes, This MOD Cannot Be Posted Or Added At Any Non-Official phpBB Site
##############################################################
##
## Author Note:
## The first box save the color when you click on the bar.(You can click on this box to use again this color)
## The second box show the color which is on the mouse cursor.
## You can include the color tag anywhere in the text or by highlighting the text you want.
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ OPEN ]------------------------------------------
#
/phpBB2/templatessubSilverposting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td nowrap="nowrap" align="right"><span class="gensmall"><a href="javascript:bbstyle(-1)" class="genmed">{L_BBCODE_CLOSE_TAGS}</a></span></td>
</tr>
</table>
</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<SCRIPT>
</SCRIPT>
<SCRIPT>
var height1 = 10;//define the height of the color bar
var pas = 28;// define the number of color in the color bar
var width1=Math.floor(-2/15*pas+6);//define the width of the color bar here automatic ajust for subsilver template.
var text1=s_help.substring(0,search(s_help,"="));
var text2=s_help.substring(search(s_help,"]"),search(s_help,"/"));
</SCRIPT>
<TR>
<TD>
<TABLE>
<TBODY>
<TR>
<TD>
<SCRIPT>
document.write('<IMG height='+height1+' src="templates/subSilver/images/spacer.gif"></TD>');</SCRIPT>
<TD>
<SCRIPT>
document.write('<IMG height='+height1+' src="templates/subSilver/images/spacer.gif"></TD>');</SCRIPT>
<TD>
<SCRIPT>
document.write('<IMG height='+height1+' src="templates/subSilver/images/spacer.gif"></TD>');</SCRIPT>
<TD>
<SCRIPT>
document.write('<IMG height='+height1+' src="templates/subSilver/images/spacer.gif"></TD>');</SCRIPT>
<SCRIPT>
<rgb>
</SCRIPT>
</TD></TR></TBODY></TABLE></TD></TR>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#
#
#-----[ UPLOAD ]------------------------------------------
#
color.js -- to your template directory (templatessubSilver for subSilver)