[外掛]Color Font Bar Mod 1.5

MODs Released by Other phpbb Sites
非官方認證通過之 MOD ,或許有安全性之疑慮,所有問題由原發表者回覆!

版主: 版主管理群

主題已鎖定
頭像
sh85216s
竹貓忠實會員
竹貓忠實會員
文章: 306
註冊時間: 2003-09-04 20:13
來自: 阿里阿度

[外掛]Color Font Bar Mod 1.5

文章 sh85216s »

我在phpBB2.0.6中安裝color bar 1.2
結果和"竹貓"一樣,點選顏色條後, [color=#xxxxxx] 和[/color]會加在文字的後面,必須手動調整才能正常.

安裝1.5版本,問題就能迎刃而解, :lol: .

Description: This Mod adds a color font Bar to your Posting Site to simply choose a Posting Color
Submited by: stefan
Author: Unknown
Date: Sun 01 Jun, 2003 13:29
Last Updated: Thu 01 Jan, 1970 01:00
Last Download: Tue 28 Oct, 2003 21:53
File Size: 2.24 Kilo Byte

What is it ? this hack adds a color bar in order to choose the font color. You can find a
What's new? Now it is compatible with "the selection"(select the text and click on the color which you want), easy change of height, translation (perhaps it this mod become popular I add an lang_file entry).I have also optimize the code. And finaly thanks to Bummer for is idea to use spacer.gif
How to install it? it is very easy.

In posting_body .tpl

After this Code:

代碼: 選擇全部

  <option  value="24" class="genmed">{L_FONT_HUGE}</option> 
               </select> 
               </span></td> 
              <td nowrap="nowrap" align="right"><span class="gensmall"><a href="javascript:bbstyle(-1)" class="genmed" onMouseOver="helpline('a')">{L_BBCODE_CLOSE_TAGS}</a></span></td> 
            </tr> 
           </table> 
         </td> 
        </tr>
Add this Code:

代碼: 選擇全部

<SCRIPT language=JavaScript 
              src="templates/subSilver/color.js"> 
      </SCRIPT> 
      <SCRIPT language=JavaScript> 
      var height1 = 10;//define the height of the color bar 
      var pas = 30;// define the number of color in the color bar 
      var text1="Font color: Syntax : "; 
      var text2="text"; 
      </SCRIPT> 
              <TR> 
                <TD colSpan=12> 
                  <TABLE id=ColorPanel cellSpacing=0 cellPadding=0 align=left 
                  border=0> 
                    <TBODY> 
                    <TR> 
                      <TD id=ColorUsed onmouseover="helpline('s')" 
                      onclick="if(this.bgColor.length > 0) bbfontstyle('[color=' + this.bgColor + ']', '[/color]')" 
                      vAlign=center align=middle ridge? 2px BORDER-BOTTOM: 
                      default; CURSOR: ridge; BORDER-LEFT: BORDER-TOP: 
                      BORDER-RIGHT:> 
         <SCRIPT language=JavaScript> 
         document.write('<IMG height='+height1+' src="templates/subSilver/images/spacer.gif" width='+height1+' border=1></TD>');</SCRIPT> 
                      <TD width=5> 
         <SCRIPT language=JavaScript> 
         document.write('<IMG height='+height1+' src="templates/subSilver/images/spacer.gif" width=5 border=0></TD>');</SCRIPT> 
                      <SCRIPT language=JavaScript> 
                      <!-- 
                         rgb(pas,4,height1,text1,text2) 
                      // --> 
                      </SCRIPT> 
                    </TR></TBODY></TABLE></TD></TR>
and upload color.js in your template directory

下載 color.js

顏色棒太長修改如下:
vi posting_body .tpl

找到\r

代碼: 選擇全部

      </SCRIPT> 
      <SCRIPT language=JavaScript> 
      var height1 = 10;//define the height of the color bar 
      var pas = [color=red]30[/color];// define the number of color in the color bar 
      var text1="Font color: Syntax : "; 
      var text2="text"; 
      </SCRIPT>
30修改為適當的數字
主題已鎖定

回到「非官方認證外掛」