打開/source/module/forum/forum_forumdisplay
找
- $threadids[$threadindex] = $thread['tid'];
复制代码
底下放
- include_once libfile('function/post');
- include_once libfile('function/attachment');
- // $thread['post'] = C::t('forum_post')->fetch_all_by_tid($thread['posttableid'],$thread['tid'],true,'',0,0,true);
- $thread['post'] = C::t('forum_post')->fetch_all_by_tid_position($thread['posttableid'],$thread['tid'],1);
- $thread['post'] = array_shift($thread['post']);
- // var_dump($thread['post']);
- $thread['preview'] = messagecutstr($thread['post']['message'], 120);
复制代码
PS:數字可調整
打開/template/default/forum/forumdisplay_list.htm
找
- <a href="forum.php?mod=viewthread&tid=$thread[tid]&{if $_GET['archiveid']}archiveid={$_GET['archiveid']}&{/if}extra=$extra"$thread[highlight]{if $thread['isgroup'] == 1 || $thread['forumstick']} target="_blank"{else} onclick="atarget(this)"{/if} class="s xst">$thread[subject]</a>
复制代码
底下放
- <p class="thread_preview"><font color="#C0C0C0">{$thread['preview']}</font></p>
复制代码
|