网站之家技术交流论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1139|回复: 8

Discuz! 漂亮横排美化\直排美化[X2.0/2.5]

[复制链接]
发表于 2013-5-13 03:15:06 | 显示全部楼层 |阅读模式
本帖最后由 叮叮 于 2013-5-13 03:27 编辑

------------------------后台如何开启横排--------------------

有朋友加我QQ问,为什么修改/覆盖了还没有效果?

答:因为你后台分区没有设置下级横排。

那么如何设置横排呢?
答:请看我发的图片教程(如下),看完您就明白了。




设置横排后默认是什么效果呢?
答:请看我发的图片教程(如下),看完您就明白了。



设置横排后为什么默认是显示气泡?
答:版块图片,自己上传后,就会替换气泡的显示,如下图。



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

 楼主| 发表于 2013-5-13 03:16:10 | 显示全部楼层
--------------------分割线-----------横排去掉最后发表-----------------

  • 如果想去掉最后发表,效果图片如下图


  • 编辑/template/default/forum/中的discuz.htm (若非默认风格,则同样修改)

查找如下代码,删除即可 (搜索不到,请缩短搜索,既搜索内容中的两个 …… 之间全部删除 )

  1.                                                                         <!--{if $forum['permission'] == 1}-->
  2.                                                                                 {lang private_forum}
  3.                                                                         <!--{else}-->
  4.                                                                                 <!--{if $forum['redirect']}-->
  5.                                                                                         {lang url_link}
  6.                                                                                 <!--{elseif is_array($forum['lastpost'])}-->
  7.                                                                                         <!--{if $cat['forumcolumns'] < 3}-->
  8.                                                                                                 <!--{echo cutstr($forum[lastpost][subject], 30)}--> $forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}-->
  9.                                                                                         <!--{else}-->
  10.                                                                                                 {lang forum_lastpost}: $forum[lastpost][dateline]
  11.                                                                                         <!--{/if}-->
  12.                                                                                 <!--{else}-->
  13.                                                                                         {lang never}
  14.                                                                                 <!--{/if}-->
  15.                                                                         <!--{/if}-->
  16.                                                                         
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-5-13 03:18:14 | 显示全部楼层
---------------------------分割线-----------横排 最后发表 显出标题和作者-------------------


  • 最后发表 显出标题和时间,效果图片如下图
  • 编辑/template/default/forum/中的discuz.htm (若非默认风格,则同样修改)

    查找如下代码 (搜索不到,请缩短搜索,既搜索内容中的两个 …… 之间 )

  1.                                                                         <!--{if $forum['permission'] == 1}-->
  2.                                                                                 {lang private_forum}
  3.                                                                         <!--{else}-->
  4.                                                                                 <!--{if $forum['redirect']}-->
  5.                                                                                         {lang url_link}
  6.                                                                                 <!--{elseif is_array($forum['lastpost'])}-->
  7.                                                                                         <!--{if $cat['forumcolumns'] < 3}-->
  8.                                                                                                 <!--{echo cutstr($forum[lastpost][subject], 30)}--> $forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}-->
  9.                                                                                         <!--{else}-->
  10.                                                                                                 {lang forum_lastpost}: $forum[lastpost][dateline]
  11.                                                                                         <!--{/if}-->
  12.                                                                                 <!--{else}-->
  13.                                                                                         {lang never}
  14.                                                                                 <!--{/if}-->
  15.                                                                         <!--{/if}-->
  16.                                                                         
复制代码
然后将上面查找到的代码,替换成下面的即可(forum[lastpost][subject], 30)  30是最后发表的字节数


  1. <!--{if $forum['permission'] == 1}-->
  2. {lang private_forum}
  3. <!--{else}-->
  4. <!--{if $forum['redirect']}-->

  5. {lang url_link}
  6. <!--{elseif is_array($forum['lastpost'])}-->
  7. <!--{if $cat['forumcolumns'] < 3}-->
  8. <!--{echo cutstr($forum[lastpost][subject], 30)}--> $forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}-->
  9. <!--{else}-->
  10. {lang forum_lastpost}: {echo cutstr($forum[lastpost][subject], 30)}  $forum[lastpost][dateline]
  11. <!--{/if}-->
  12. <!--{else}-->
  13. {lang never}
  14. <!--{/if}-->
  15. <!--{/if}-->
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-5-13 03:19:42 | 显示全部楼层
---------------------------分割线-----------横排 最后发表 显出标题和时间 及版块简介-------------------
效果图片如下图



  • 编辑/template/default/forum/中的discuz.htm (若非默认风格,则同样修改)

    查找如下代码 (搜索不到,请缩短搜索,既搜索内容中的两个 …… 之间 )

  1.                                                                         <!--{if $forum['permission'] == 1}-->
  2.                                                                                 {lang private_forum}
  3.                                                                         <!--{else}-->
  4.                                                                                 <!--{if $forum['redirect']}-->
  5.                                                                                         {lang url_link}
  6.                                                                                 <!--{elseif is_array($forum['lastpost'])}-->
  7.                                                                                         <!--{if $cat['forumcolumns'] < 3}-->
  8.                                                                                                 <!--{echo cutstr($forum[lastpost][subject], 30)}--> $forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}-->
  9.                                                                                         <!--{else}-->
  10.                                                                                                 {lang forum_lastpost}: $forum[lastpost][dateline]
  11.                                                                                         <!--{/if}-->
  12.                                                                                 <!--{else}-->
  13.                                                                                         {lang never}
  14.                                                                                 <!--{/if}-->
  15.                                                                         <!--{/if}-->
  16.                                                                         
复制代码
  • 然后将上面查找到的代码,替换成下面的即可(forum[lastpost][subject], 30)  30是最后发表的字节数

  1.                                                                         <!--{if $forum[description]}-->本版简介:$forum[description]<!--{/if}-->
  2.                                                                         <!--{if $forum['permission'] == 1}-->
  3.                                                                                 {lang private_forum}
  4.                                                                         <!--{else}-->
  5.                                                                                 <!--{if $forum['redirect']}-->
  6.                                                                                 
  7.         {lang url_link}
  8.                                                                                 <!--{elseif is_array($forum['lastpost'])}-->
  9.                                                                                         <!--{if $cat['forumcolumns'] < 3}-->
  10.                                                                                                 <!--{echo cutstr($forum[lastpost][subject], 30)}--> $forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}-->
  11.                                                                                         <!--{else}-->
  12.                                                                                                 {lang forum_lastpost}: {echo cutstr($forum[lastpost][subject], 30)}  $forum[lastpost][dateline]
  13.                                                                                         <!--{/if}-->
  14.                                                                                 <!--{else}-->
  15.                                                                                         {lang never}
  16.                                                                                 <!--{/if}-->
  17.                                                                         <!--{/if}-->
  18.                                                                           
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-5-13 03:20:52 | 显示全部楼层
----------分割线-----------横排 去掉最后发表,若有版主,显示版主----------


  • 最终,效果图片如下图
  • 编辑/template/default/forum/中的discuz.htm (若非默认风格,则同样修改)

    查找如下代码 (搜索不到,请缩短搜索,既搜索内容中的两个 …… 之间 )

  1. <!--{if $forum['permission'] == 1}-->
  2. {lang private_forum}
  3. <!--{else}-->
  4. <!--{if $forum['redirect']}-->
  5. {lang url_link}
  6. <!--{elseif is_array($forum['lastpost'])}-->
  7. <!--{if $cat['forumcolumns'] < 3}-->
  8. <!--{echo cutstr($forum[lastpost][subject], 30)}--> $forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}-->
  9. <!--{else}-->
  10. {lang forum_lastpost}: $forum[lastpost][dateline]
  11. <!--{/if}-->
  12. <!--{else}-->
  13. {lang never}
  14. <!--{/if}-->
  15. <!--{/if}-->
复制代码
将搜索到的代码替换成以下即可
  1. <!--{if $forum['moderators']}--> {lang forum_moderators}: $forum[moderators]<!--{/if}-->
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-5-13 03:21:58 | 显示全部楼层
------分割线-----------横排 去掉最后发表,若有版主,显示版主;若无版主,显示招聘中-------------------


  • 最终,效果图片如下图




  • 编辑/template/default/forum/中的discuz.htm (若非默认风格,则同样修改)

    查找如下代码 (搜索不到,请缩短搜索,既搜索内容中的两个 …… 之间 )

  1. <!--{if $forum['permission'] == 1}-->
  2. {lang private_forum}
  3. <!--{else}-->
  4. <!--{if $forum['redirect']}-->
  5. {lang url_link}
  6. <!--{elseif is_array($forum['lastpost'])}-->
  7. <!--{if $cat['forumcolumns'] < 3}-->
  8. <!--{echo cutstr($forum[lastpost][subject], 30)}--> $forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}-->
  9. <!--{else}-->
  10. {lang forum_lastpost}: $forum[lastpost][dateline]
  11. <!--{/if}-->
  12. <!--{else}-->
  13. {lang never}
  14. <!--{/if}-->
  15. <!--{/if}-->
复制代码
将搜索到的代码替换成以下即可
  1. <!--{if $forum['moderators']}--> {lang forum_moderators}: $forum[moderators]<!--{else}-->版主招聘中<!--{/if}-->
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-5-13 03:23:48 | 显示全部楼层
----------分割线-----------横排 去掉最后发表,显示版块简介,若有版主,显示版主----------

  • 最终,效果图片如下图


编辑/template/default/forum/中的discuz.htm (若非默认风格,则同样修改)
查找:
  1. <!--{if empty($forum[redirect])}--><dd><em>{lang forum_threads}: $forum[threads]</em>, <em>{lang forum_posts}: $forum[posts]</em></dd><!--{/if}-->
复制代码
替换成:
  1. <!--{if $forum[description]}--><p class="xg2">本版简介:$forum[description]</p><!--{/if}-->
复制代码
查找如下代码 (搜索不到,请缩短搜索,既搜索内容中的两个 <dd>……</dd> 之间 )
  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['moderators']}--> <dd>{lang forum_moderators}: $forum[moderators]</dd><!--{else}--><dd>{lang forum_moderators}: <a href="http://bbs.zmd5.com/"target="_blank">招聘中,链接修改为自己的</a></dd><!--{/if}-->
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-5-13 03:24:38 | 显示全部楼层
----------分割线-----------横排 去掉最后发表,显示版块简介,若有版主,显示版主----------


  • 最终,效果图片如下图




编辑/template/default/forum/中的discuz.htm (若非默认风格,则同样修改)
查找如下代码 (搜索不到,请缩短搜索,既搜索内容中的两个 …… 之间 )

  1.                                                                         <!--{if $forum['permission'] == 1}-->
  2.                                                                                 {lang private_forum}
  3.                                                                         <!--{else}-->
  4.                                                                                 <!--{if $forum['redirect']}-->
  5.                                                                                         {lang url_link}
  6.                                                                                 <!--{elseif is_array($forum['lastpost'])}-->
  7.                                                                                         <!--{if $cat['forumcolumns'] < 3}-->
  8.                                                                                                 <!--{echo cutstr($forum[lastpost][subject], 30)}--> $forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}-->
  9.                                                                                         <!--{else}-->
  10.                                                                                                 {lang forum_lastpost}: $forum[lastpost][dateline]
  11.                                                                                         <!--{/if}-->
  12.                                                                                 <!--{else}-->
  13.                                                                                         {lang never}
  14.                                                                                 <!--{/if}-->
  15.                                                                         <!--{/if}-->
  16.                                                                         
复制代码
替换成:
  1. <!--{if $forum[description]}-->本版简介:$forum[description]<!--{/if}-->
  2.                                                                         最后发表: <!--{if is_array($forum['lastpost'])}-->{echo cutstr($forum[lastpost][subject], 16)} by <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}-->


  3.                                                                                 <!--{else}-->
  4.                                                                                         {lang never}
  5.                                                                                 <!--{/if}-->
  6.                                                                     
  7.                                                                         
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-5-13 03:26:02 | 显示全部楼层
----------分割线-----------横排 主题数,时间,最新发表----------

  • 最终,效果图片如下图


编辑/template/default/forum/中的discuz.htm (若非默认风格,则同样修改)
查找如下代码 (搜索不到,请缩短搜索,既搜索内容中的两个 …… 之间 )

  1.                                                                         $forum[name]<!--{if $forum[todayposts] && !$forum['redirect']}--> ($forum[todayposts])<!--{/if}-->
  2.                                                                         <!--{if empty($forum[redirect])}-->{lang forum_threads}: $forum[threads], {lang forum_posts}: $forum[posts]<!--{/if}-->
  3.                                                                         
  4.                                                                         <!--{if $forum['permission'] == 1}-->
  5.                                                                                 {lang private_forum}
  6.                                                                         <!--{else}-->
  7.                                                                                 <!--{if $forum['redirect']}-->
  8.                                                                                         {lang url_link}
  9.                                                                                 <!--{elseif is_array($forum['lastpost'])}-->
  10.                                                                                         <!--{if $cat['forumcolumns'] < 3}-->
  11.                                                                                                 <!--{echo cutstr($forum[lastpost][subject], 30)}--> $forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}-->
  12.                                                                                         <!--{else}-->
  13.                                                                                                 {lang forum_lastpost}: $forum[lastpost][dateline]
  14.                                                                                         <!--{/if}-->
  15.                                                                                 <!--{else}-->
  16.                                                                                         {lang never}
  17.                                                                                 <!--{/if}-->
  18.                                                                         <!--{/if}-->
  19.                                                                         
  20.                                                                  
复制代码
替换成

  1.                                                                         $forum[name]<!--{if $forum[todayposts] && !$forum['redirect']}--> ($forum[todayposts])<!--{/if}--> 【发新话题】
  2.                                                                         <!--{if empty($forum[redirect])}-->{lang forum_threads}: $forum[threads] {lang forum_posts}: $forum[posts]<!--{/if}-->
  3.                                                                         时间: $forum[lastpost][dateline]
  4.                                                                         

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

  9. {lang url_link}
  10. <!--{elseif is_array($forum['lastpost'])}-->
  11. <!--{if $cat['forumcolumns'] < 3}-->
  12. <!--{echo cutstr($forum[lastpost][subject], 30)}--> $forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}-->
  13. <!--{else}-->
  14. 新主题: {echo cutstr($forum[lastpost][subject], 30)}
  15. <!--{/if}-->
  16. <!--{else}-->
  17. {lang never}
  18. <!--{/if}-->
  19. <!--{/if}-->

  20.                                                                
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|网站之家技术交流论坛 ( 粤ICP备09092995号 )

GMT+8, 2024-5-19 00:27 , Processed in 0.093728 second(s), 8 queries , File On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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