森林之原
五月 24, 2012, 03:35:50 am *
歡迎光臨, 訪客. 請先 登入註冊一個帳號.

請輸入帳號, 密碼以及預計登入時間
新聞: 森林之原歡迎您的蒞臨!
森林之原提供自由軟體的支援,包括繁體中文的翻譯。
 
   首頁   說明 搜尋 日曆 登入 註冊  
頁: [1]   向下
  寄送主題  |  列印  
作者 主題: 下拉式字型和大小選單  (閱讀 4925 次)
0 會員 以及 2 訪客 正在閱讀本篇主題.
Andrew::
魔,羯
*
離線 離線

文章: 217



個人網站
« 於: 六月 14, 2005, 04:21:50 pm »

這會把字型和文字大小按鈕改成下拉式選單。

Open Post.template.php:
Find:
程式碼:
<option value="LimeGreen">', $txt[275], '</option>
</select>';
echo '<br />';
刪除最後一行的:
程式碼:
echo '<br />';

Add after:
程式碼:

  // Begin Print a drop down list for font face . . . . . . .
    echo ' <select onchange="surroundText(\'[font=\'+this.options[this.selectedIndex].value+\']\', \'[/font]\', document.', $context['post_form'], '.', $context['post_box_name'], '); this.selectedIndex = 0;" style="margin-bottom: 1ex;">
            <option value="" selected="selected">', $txt[533], '</option>
            <option value="Arial">Arial</option>
            <option value="Times New Roman">Times New Roman</option>
            <option value="Tahoma">Tahoma</option>
            <option value="Verdana">Verdana</option>
            </select>';
  // End Print a drop down list for font face . . . . . . . .

  // Begin Print a drop down list for font size . . . . . . .
    echo ' <select onchange="surroundText(\'[size=\'+this.options[this.selectedIndex].value+\']\', \'[/size]\', document.', $context['post_form'], '.', $context['post_box_name'], '); this.selectedIndex = 0;" style="margin-bottom: 1ex;">
            <option value="" selected="selected">', $txt[532], '</option>
            <option value="10pt">10pt</option>
            <option value="14pt">14pt</option>
            <option value="18pt">18pt</option>
            </select>';
    echo '<br />';
  // End Print a drop down list for font size . . . . . . . .

接下來刪除文字大小和字型的圖示:
Find and remove:
程式碼:
'size' => array('code' => 'size', 'before' => '[size=10pt]', 'after' => '[/size]', 'description' => $txt[532]),
'face' => array('code' => 'font', 'before' => '[font=Verdana]', 'after' => '[/font]', 'description' => $txt[533]),


來源:http://www.simplemachines.org/community/index.php?topic=17867.msg146789#msg146789
« 最後編輯時間: 六月 14, 2005, 04:23:24 pm 由 Andrew » 向版主檢舉   已記錄

頁: [1]   向上
  寄送主題  |  列印  
 
前往:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006, Simple Machines LLC Valid XHTML 1.0! Valid CSS!