Discuz教程网

[代码修改] 横排 去掉最后发表,显示版块简介,若有版主,显示版主

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

替换成:
  1. <!--{if $forum[description]}--><p class="xg2">本版简介:$forum[description]</p><!--{/if}-->
  2. <dd>最后发表: <!--{if is_array($forum['lastpost'])}--><a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost">{echo cutstr($forum[lastpost][subject], 16)}</a> by <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}-->


  3. <!--{else}-->
  4. {lang never}
  5. <!--{/if}-->

  6. </dd>
复制代码

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




上一篇:横排 去掉最后发表,显示版块简介,若有版主,显示版主
下一篇:横排 主题数,时间,最新发表
authicon 329551092 发表于 2012-2-21 20:00:00 | 显示全部楼层
看看了。谢谢分享
authicon 蒙娜丽莎的微笑 发表于 2012-2-21 22:20:53 | 显示全部楼层
学习一下~~~~
authicon 爱不起 发表于 2012-2-23 17:35:51 | 显示全部楼层
来看看。。。
authicon 马后炮化工 发表于 2012-2-23 20:50:51 | 显示全部楼层
借鉴学习一下。。。
authicon ynwpeivw 发表于 2012-2-24 10:04:37 | 显示全部楼层
顶。。。学习了。。
authicon 爱不起 发表于 2012-2-24 18:14:58 | 显示全部楼层
我用了,但出现了乱码,请问老大怎么解决。

“最后发表:”和“版块简介”变成了这样“鏈
authicon 明仔大叔 发表于 2012-2-26 00:07:10 | 显示全部楼层
给力支持!
authicon ▍丶_17k 发表于 2012-2-29 19:23:23 | 显示全部楼层
authicon zhangge 发表于 2012-3-6 14:54:14 | 显示全部楼层
我都不好意思留外链。。。直接顶了
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2024-5-16 00:22

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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