2007-3-25 14:14
windheart
首頁 顯示最後主題 For D5.5 build_0324 完美版(包括橫排版區的最後發表!)
插件名稱:首頁 顯示最後主題 For D5.5 build_0324 完美版(包括橫排版區的最後發表!)
適合版本:Discuz 5.5 build 0324
DZ5.5 原作者: By 折翼の天使♂
DZ 5.5 build 0324修改整理:By windheart
數據庫升級:無
修改模板:2個
PHP修改:1個
修改文件:
templates/default/discuz.htm
templates/default/forumdisplay_subforum.htm
include/forum.func.php
難易程度:容易
演示地址:http://www.windheart.com/bbs/index.php
1. templates/default/discuz.htm查找:(備註:此為首頁模板)
[code]
<td width="56%" align="left">{lang forum_name}</td>
<td width="5%">{lang forum_threads}</td>
<td width="5%">{lang forum_posts}</td>
<td width="13%">{lang forum_lastpost}</td>
[/code]
替換成:
[code]
<td width="49%" align="left">{lang forum_name}</td>
<td width="5%">{lang forum_threads}</td>
<td width="5%">{lang forum_posts}</td>
<td width="20%">{lang forum_lastpost}</td>
[/code]
再查找
[code]
<!--{if is_array($forum['lastpost'])}-->
<td align="center" title="{lang forum_lastpost_in}: {$forum[lastpost][subject]}" nowrap>
<span class="smalltxt"><a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost">$forum[lastpost][dateline]</a></span><br>{lang forum_lastpost_by} <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}-->
</td>
<!--{else}-->
[/code]
替換成:
【有邊框的】
[code]
<!--{if is_array($forum['lastpost'])}--><td nowrap><fieldset align=\"center\" title="發佈時間: $forum[lastpost][dateline]{LF}完整標題: $forum[lastpost][subject]"><legend><span class=\"smalltxt\"><strong></strong></span></legend> <br>┌標題: <a title="發佈時間: $forum[lastpost][dateline]{LF}完整標題: $forum[lastpost][subject]" href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost"> $forum[lastpost][subjectsc]</a><br>├時間: <a title="發佈時間: $forum[lastpost][dateline]{LF}完整標題: $forum[lastpost][subject]" href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost"> $forum[lastpost][dateline]</a><br>└作者: <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang guest}<!--{/if}--></fieldset></td><!--{else}-->[/code]
或 【無邊框的】
[code]
<!--{if is_array($forum['lastpost'])}--><td height="52" nowrap>┌標題: <a title="發佈時間: $forum[lastpost][dateline]{LF}完整標題: $forum[lastpost][subject]" href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost"> $forum[lastpost][subjectsc]</a><br>├時間: <a title="發佈時間: $forum[lastpost][dateline]{LF}完整標題: $forum[lastpost][subject]" href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost"> $forum[lastpost][dateline]</a><br>└作者: <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang guest}<!--{/if}--></td><!--{else}-->
[/code]
2. templates/default/forumdisplay_subforum.htm查找(備註:此為子論壇模板)
[code]
<td width="54%">{lang forum_name}</td>
<td width="6%">{lang forum_threads}</td>
<td width="6%">{lang forum_posts}</td>
<td width="13%">{lang forum_lastpost}</td>
[/code]
替換成:
[code]
<td width="49%">{lang forum_name}</td>
<td width="5%">{lang forum_threads}</td>
<td width="5%">{lang forum_posts}</td>
<td width="20%">{lang forum_lastpost}</td>
[/code]
再查找
[code]
<!--{if is_array($sub['lastpost'])}-->
<td align="center" title="{lang forum_lastpost_in}: $sub[lastpost][subject]" nowrap>
<span class="smalltxt"><a href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost">$sub[lastpost][dateline]</a></span><br>{lang forum_lastpost_by} <!--{if $sub['lastpost']['author']}-->$sub[lastpost][author]<!--{else}-->{lang anonymous}<!--{/if}-->
</td>
<!--{else}-->
[/code]
替換成:
【有邊框的】
[code]
<!--{if is_array($sub['lastpost'])}--><td height="52" nowrap><fieldset style=\"margin: 2em; margin-top: 3px; padding: 10px; border: ".INNERBORDERWIDTH."px solid ".BORDERCOLOR."; word-break: break-all\" align=\"center\"><legend><span class=\"smalltxt\"><strong></strong></span></legend> <br>┌標題: <a title="發佈時間: $sub[lastpost][dateline]{LF}完整標題: $sub[lastpost][subject]" href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost"> $sub[lastpost][subjectsc]</a><br>├時間: <a title="發佈時間: $sub[lastpost][dateline]{LF}完整標題: $sub[lastpost][subject]" href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost"> $sub[lastpost][dateline]</a><br>└作者: <!--{if $sub['lastpost']['author']}-->$sub['lastpost']['author']<!--{else}-->{lang guest}<!--{/if}--></fieldset></td><!--{else}-->[/code]
或【無邊框的】
[code]
<!--{if is_array($sub['lastpost'])}--><td height="52" nowrap>┌標題: <a title="發佈時間: $sub[lastpost][dateline]{LF}完整標題: $sub[lastpost][subject]" href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost"> $sub[lastpost][subjectsc]</a><br>├時間: <a title="發佈時間: $sub[lastpost][dateline]{LF}完整標題: $sub[lastpost][subject]" href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost"> $sub[lastpost][dateline]</a><br>└作者: <!--{if $sub['lastpost']['author']}-->$sub['lastpost']['author']<!--{else}-->{lang guest}<!--{/if}--></td><!--{else}-->[/code]
3. include/forum.func.php查找:
[code]$lastpost['dateline'] = gmdate("$dateformat $timeformat", $lastpost['dateline'] + $timeoffset * 3600);[/code]
下面添加
[code]$lastpost['subjectsc'] = cutstr($lastpost['subject'], 23);[/code]
以上23數值是標題的長度。
[color=blue][b]
作出以上修改後, 因為使用到custr 變數, 所以頁面可能會有亂碼問題, 強烈建議同時安裝以下插件:
[url=http://alan888.com/Discuz/viewthread.php?tid=105486]使用 cutstr 後 , 日/韓/簡體中文出現亂碼的問題 by alan888[/url]
[/color][/b]
[color=red][b]
橫排版區的最後發表改成顯示標題而不是顯示發表時間
[/color][/b]
I .在 templates/default/discuz.htm
找
[code]<a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost">$forum[lastpost][dateline]</a>[/code]
替換成
[code]
<a title="發佈時間: $forum[lastpost][dateline]{LF}完整標題: $forum[lastpost][subject]" href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost"> $forum[lastpost][subjectsc]</a>[/code]
II. 在 templates/default/forumdisplay_subforum.htm
找
[code]<a href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost">$sub[lastpost][dateline]</a>[/code]
替換成
[code]<a title="發佈時間: $sub[lastpost][dateline]{LF}完整標題: $sub[lastpost][subject]" href="redirect.php?tid=$sub[lastpost][tid]&goto=lastpost#lastpost"> $sub[lastpost][subjectsc]</a>[/code]
[[i] 本帖最後由 windheart 於 2007-3-26 22:46 編輯 [/i]]
2007-3-25 15:08
ecosway
不錯喔感謝大大的分享
2007-3-26 17:10
kyty27
有冇show out??
2007-3-26 22:47
windheart
已補上演示圖
2007-3-27 14:05
alvin222
Good 由5.0改過來!
2007-4-13 21:52
cyt
感謝大大無私既分享~
2007-4-13 22:00
滅影
不錯..努力:em21:
2007-4-15 00:51
windheart
感謝大家的支持~ 說真的5.5 要加強的地方不多.. 連這個也加不到10個hack.
2007-4-29 21:49
【無形風】
橫排顯示唔到[attach]43483[/attach]我個discuz
2007-4-29 22:08
芝麻貓
好似唔錯:em21:
2007-5-23 12:20
babevi
超感謝的,一直在找這樣的功能∼
2007-5-31 14:27
kenwan
多謝曬,已經裝左.:em21:
2007-6-1 19:08
sumtin
*** 作者被禁止或刪除 內容自動屏蔽 ***
2007-6-5 01:34
愉快無尾熊
想睇下有邊框既係點既樣@_@
有冇大大有圖比我睇下@_@"
2007-6-19 13:16
mingsteven
[url]http://www.alan888.com/Discuz/viewthread.php?tid=105781&extra=page%3D4%26amp%3Bfilter%3Dtype%26amp%3Btypeid%3D13[/url]
不錯...安裝了
2007-6-21 16:23
dh6917
以OK了~感謝一下1~
2007-6-21 16:48
Eric03
原來你用緊我發ge phpwind風格;)
當然支持啦:em33:
2007-6-21 22:24
teddy
謝謝, 不錯的插件:em141:
2007-6-30 21:11
柏柏
請問來自己安裝的模板也要改嗎
leo模板 都找不到你要改的
2007-7-11 03:37
雪ㄦ
QQ
感謝大大無私的分享
2007-7-17 14:52
小煩
沒有最後發表 有人知道要點解決?
2007-7-17 23:04
SCOOLMANTW
這東西不錯 沒有的話還真的不知道到底新增了啥勒
2007-7-24 09:35
winson9998
找了很久了謝謝了
2007-7-29 02:01
a751115
找不到這段文字耶
<a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost">$forum[lastpost][dateline]</a>
2007-8-1 13:51
a751115
改完後風格左邊顯示有問題....
原版使用正常....
不知改麼解決!!!
麻煩大大幫忙
很想用這個:em01:
2007-8-1 20:09
kilen
純支持..............
2007-8-14 03:12
heavymichael
大大為什麼我顯示不到...標題名呢?
2007-8-14 03:37
heavymichael
成功左...不過...個版主果到出現左的問題
[url=http://www.hkpopo.com]http://www.hkpopo.com[/url]
唔知係咪有咩做錯左呢
2007-8-25 10:04
a751115
標題名稱沒顯示
誰會改呢????
2007-8-25 16:36
heavymichael
[quote]原帖由 [i]a751115[/i] 於 2007-8-25 10:04 發表 [url=http://www.alan888.com/Discuz/redirect.php?goto=findpost&pid=1028831&ptid=105781][img=13,13]http://www.alan888.com/Discuz/images/common/back.gif[/img][/url]
標題名稱沒顯示
誰會改呢???? [/quote]
總供有3步要改的,你應該留了最後一步!!
2007-8-28 03:08
ken8yan
我的橫排都不成功,改小了那一個 ?
[attach]49564[/attach]
不想要最後發表時時間,想要標題
2007-8-28 13:37
孤獨南半球
COOL
支持!! 已經裝了 :em21: :em49: :em32:
2007-9-2 17:18
丫偉
唔錯呀~成功 :em21:
[url]http://k8zone.php.hk[/url]
2007-9-30 13:05
國崎往人
勁正...好好用謝謝貼出來
2007-10-1 10:46
kkk0913
支持支持...............
2008-9-30 19:42
monkey0406
thx~
好實用
2008-10-31 18:25
Nic!
正係想要下面果個唔想要上面果個應該點改
頁:
[1]
Powered by Discuz! Archiver 5.5.0
© 2001-2006 Comsenz Inc.