森林之原
五月 23, 2012, 11:49:42 pm *
歡迎光臨, 訪客. 請先 登入註冊一個帳號.

請輸入帳號, 密碼以及預計登入時間
新聞: CPG 1.4.3 繁體中文完成,請到 CPG 的版面下載。
 
   首頁   說明 搜尋 日曆 登入 註冊  
頁: [1]   向下
  寄送主題  |  列印  
作者 主題: 用粗體顯示頂置的主題 (1.0 RC2)  (閱讀 8931 次)
0 會員 以及 2 訪客 正在閱讀本篇主題.
Capri
系統管理員
*
離線 離線

文章: 0


my name is...


個人網站
« 於: 九月 06, 2004, 03:00:31 am »

目前SMF論壇裡的頂置主題只用一個圖示, 而且不是很清楚.
使用這個小技巧可以讓你的頂置主題用粗體顯示, 讓你清楚的看出哪些是普通主題哪些是頂置主題.

In MessageIndex.template.php:
Find:
程式碼:
', $topic['first_post']['link'];

Replace with:
程式碼:
<span', $topic['is_sticky'] ? ' style="font-weight: bold;"' : '', '>', $topic['first_post']['link'], '</span>';
向版主檢舉   已記錄

I, Unknown W. Brackets, would rue the day SMF was not free and immediately leave the team.
--[Unknown]
======================================
SMF官方論壇: http://www.simplemachines.org
綠光森林: http://open.38.com
Andrew::
魔,羯
*
離線 離線

文章: 217



個人網站
« 回覆文章 #1 於: 十月 15, 2004, 07:35:13 pm »

改成用CSS樣式
向版主檢舉   已記錄

Andrew::
魔,羯
*
離線 離線

文章: 217



個人網站
« 回覆文章 #2 於: 十月 29, 2004, 10:24:21 pm »

如果要顯示 '頂置:' 在頂置主題的前面可以用這個, 如果是封鎖的主題會顯示 '封鎖:'
如果是頂置也是封鎖的主題就只會顯示頂置而已.

In MessageIndex.template.php:
程式碼:
', $topic['first_post']['link'];

Replace with:
程式碼:
<span style="', $topic['is_sticky'] ? 'font-weight: bold;' : '', $topic['is_locked'] ? 'font-style: italic;' : '', '">
                                ', $topic['is_sticky'] ? '頂置: ' : ($topic['is_locked'] ? '封鎖: ' : ''), ' ', $topic['first_post']['link'], '
                        </span>';
向版主檢舉   已記錄

ruyi_forever
訪客
« 回覆文章 #3 於: 三月 12, 2005, 01:16:33 am »

怎樣既“用粗體顯示頂置的主題”又可以“滑鼠移上預覽主題內容”???


滑鼠移上預覽主題內容:http://open.38.com/index.php/topic,148.0.html   



向版主檢舉   已記錄
Andrew::
魔,羯
*
離線 離線

文章: 217



個人網站
« 回覆文章 #4 於: 三月 12, 2005, 02:25:47 pm »

程式碼:
<span style="', $topic['is_sticky'] ? 'font-weight: bold;' : '', $topic['is_locked'] ? 'font-style: italic;' : '', '">
                                ', $topic['is_sticky'] ? '頂置: ' : ($topic['is_locked'] ? '封鎖: ' : ''), '<span title="', $topic['first_post']['preview'], '">', ' ', $topic['first_post']['link'], '</span>', '</span>';
向版主檢舉   已記錄

ruyi_forever
訪客
« 回覆文章 #5 於: 三月 12, 2005, 11:22:08 pm »

如果我不想顯示“頂置”“鎖定”之内的文字,是否可以用以下方法:

Find Out


程式碼:
', $topic['first_post']['link'];

Replaced With

程式碼:
<span title="', $topic['first_post']['preview'], '">', $topic['first_post']['link'], '</span>';
<span', $topic['is_sticky'] ? ' style="font-weight: bold;"' : '', '>', $topic['first_post']['link'], '</span>';

如有問題,幫忙修改一下啊!因爲文科出身,沒接觸過這些計算機語言啊!!!!

Thanks mucho !
« 最後編輯時間: 三月 12, 2005, 11:23:56 pm 由 ruyi_forever » 向版主檢舉   已記錄
Andrew::
魔,羯
*
離線 離線

文章: 217



個人網站
« 回覆文章 #6 於: 三月 13, 2005, 05:55:04 am »

如果我不想顯示“頂置”“鎖定”之内的文字

那你想顯示什麼? 只用粗體表示頂置文章嗎?
向版主檢舉   已記錄

ruyi_forever
訪客
« 回覆文章 #7 於: 三月 13, 2005, 07:38:04 am »

粗体顯示置頂文章(不要文字説明) AND 鼠標移上每個主題的Title時都可預覽(無論是不是置頂或者鎖定的主題)其内容 !

兩個條件同時滿足,即可!
向版主檢舉   已記錄
Andrew::
魔,羯
*
離線 離線

文章: 217



個人網站
« 回覆文章 #8 於: 三月 13, 2005, 02:14:44 pm »

程式碼:
<span style="', $topic['is_sticky'] ? 'font-weight: bold;' : '', $topic['is_locked'] ? 'font-style: italic;' : '', '">
                                ', $topic['is_sticky'] ? ' ' : ($topic['is_locked'] ? ' ' : ''), '<span title="', $topic['first_post']['preview'], '">', ' ', $topic['first_post']['link'], '</span>', '</span>';

封鎖的文章會以斜體顯示
向版主檢舉   已記錄

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

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