Discuz教程网

[代码修改] 横排 主题数,时间,最新发表

[复制链接]
authicon dly 发表于 2012-2-21 14:13:45 | 显示全部楼层 |阅读模式
最终,效果图片如下图
103227fzz0scuppp0aw6pe.jpg
编辑/template/default/forum/中的discuz.htm (若非默认风格,则同样修改)
查找如下代码 (搜索不到,请缩短搜索,既搜索内容中的两个 ……之间 )
  1. <dl{if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="margin-left: {$forum[extra][iconwidth]}px;"{/if}>
  2. <dt><a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}{if $forum[extra][namecolor]} style="color: {$forum[extra][namecolor]};"{/if}>$forum[name]</a><!--{if $forum[todayposts] && !$forum['redirect']}--><em class="xw0 xi1" title="{lang forum_todayposts}"> ($forum[todayposts])</em><!--{/if}--></dt>
  3. <!--{if empty($forum[redirect])}--><dd><em>{lang forum_threads}: $forum[threads]</em>, <em>{lang forum_posts}: $forum[posts]</em></dd><!--{/if}-->
  4. <dd>
  5. <!--{if $forum['permission'] == 1}-->
  6. {lang private_forum}
  7. <!--{else}-->
  8. <!--{if $forum['redirect']}-->
  9. <a href="$forumurl" class="xi2">{lang url_link}</a>
  10. <!--{elseif is_array($forum['lastpost'])}-->
  11. <!--{if $cat['forumcolumns'] < 3}-->
  12. <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>
  13. <!--{else}-->
  14. <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost">{lang forum_lastpost}: $forum[lastpost][dateline]</a>
  15. <!--{/if}-->
  16. <!--{else}-->
  17. {lang never}
  18. <!--{/if}-->
  19. <!--{/if}-->
  20. </dd>
  21. </dl>
复制代码

替换成:
  1. <dl{if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="margin-left: {$forum[extra][iconwidth]}px;"{/if}>
  2. <dt><a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}{if $forum[extra][namecolor]} style="color: {$forum[extra][namecolor]};"{/if}>$forum[name]</a><!--{if $forum[todayposts] && !$forum['redirect']}--><em class="xw0 xi1" title="{lang forum_todayposts}"> ($forum[todayposts])</em><!--{/if}--> 【<a href="forum.php?mod=post&action=newthread&fid=$forum[fid]" target="_blank">发新话题</a>】</dt>
  3. <!--{if empty($forum[redirect])}--><dd>{lang forum_threads}: $forum[threads] {lang forum_posts}: $forum[posts]</dd><!--{/if}-->
  4. <dd>时间: $forum[lastpost][dateline]</dd>
  5. <dd>

  6. <!--{if $forum['permission'] == 1}-->
  7. {lang private_forum}
  8. <!--{else}-->
  9. <!--{if $forum['redirect']}-->

  10. <a href="$forumurl" class="xi2">{lang url_link}</a>
  11. <!--{elseif is_array($forum['lastpost'])}-->
  12. <!--{if $cat['forumcolumns'] < 3}-->
  13. <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>
  14. <!--{else}-->
  15. <dd class="xg2">新主题: <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost">{echo cutstr($forum[lastpost][subject], 30)}</a></dd>
  16. <!--{/if}-->
  17. <!--{else}-->
  18. {lang never}
  19. <!--{/if}-->
  20. <!--{/if}-->
  21. </dd>
  22. </dl>
复制代码

修改好后的discuz.htm 直接覆盖:
游客,如果您要查看本帖隐藏内容请回复




上一篇:横排 去掉最后发表,显示版块简介,若有版主,显示版主
下一篇:刚刚手工制作的DZ默认头像,高手勿喷
authicon ‖龙腾ˉ王者 发表于 2012-3-6 20:22:51 | 显示全部楼层
sadasdsadasd
authicon 紫羽妃 发表于 2012-4-23 14:09:52 | 显示全部楼层
下载,感谢分享
authicon 明仔大叔 发表于 2012-6-25 16:30:22 | 显示全部楼层
看到这帖子真是高兴!
authicon 玛莎垃圾 发表于 2016-8-14 13:48:20 | 显示全部楼层
撒打算打算打
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-5-2 11:03

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表