效果图片如下图
编辑/template/default/forum/中的discuz.htm (若非默认风格,则同样修改)
查找如下代码 (搜索不到,请缩短搜索,既搜索内容中的两个 ……之间 )- <dd>
- <!--{if $forum['permission'] == 1}-->
- {lang private_forum}
- <!--{else}-->
- <!--{if $forum['redirect']}-->
- <a href="$forumurl" class="xi2">{lang url_link}</a>
- <!--{elseif is_array($forum['lastpost'])}-->
- <!--{if $cat['forumcolumns'] < 3}-->
- <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost" class="xi2"><!--{echo cutstr($forum[lastpost][subject], 30)}--></a> <cite>$forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
- <!--{else}-->
- <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost">{lang forum_lastpost}: $forum[lastpost][dateline]</a>
- <!--{/if}-->
- <!--{else}-->
- {lang never}
- <!--{/if}-->
- <!--{/if}-->
- </dd>
复制代码
然后将上面查找到的代码,替换成下面的即可(forum[lastpost][subject], 30) 30是最后发表的字节数)
- <dd>
- <!--{if $forum[description]}--><dd class="xg2">本版简介:$forum[description]</dd><!--{/if}-->
- <!--{if $forum['permission'] == 1}-->
- {lang private_forum}
- <!--{else}-->
- <!--{if $forum['redirect']}-->
- <a href="$forumurl" class="xi2">{lang url_link}</a>
- <!--{elseif is_array($forum['lastpost'])}-->
- <!--{if $cat['forumcolumns'] < 3}-->
- <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost" class="xi2"><!--{echo cutstr($forum[lastpost][subject], 30)}--></a> <cite>$forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
- <!--{else}-->
- <dd class="xg2">{lang forum_lastpost}: <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost">{echo cutstr($forum[lastpost][subject], 30)}</a> $forum[lastpost][dateline]</dd>
- <!--{/if}-->
- <!--{else}-->
- {lang never}
- <!--{/if}-->
- <!--{/if}-->
- </dd>
复制代码
修改后的discuz.htm上传直接覆盖
|