Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[已解决] 如何实现版块横排介绍?

[复制链接]
我非平凡 发表于 2010-9-28 09:44:17 | 显示全部楼层 |阅读模式
论坛横排显示怎么去除主题和帖数还有最后发表时间,显示板块横排介绍,如下图的效果,请大家帮帮忙!
QQ截图未命名.jpg
回复

使用道具 举报

sisilovesi 发表于 2010-9-28 15:07:53 | 显示全部楼层
本帖最后由 sisilovesi 于 2010-9-28 15:08 编辑

打开  templates/default/ 下的disucz.htm
找到

<th width="$cat[forumcolwidth]"{$forum[folder]}>


如果只需要显示图片,则在后面加上下面的代码


<a href="forumdisplay.php?fid=$forum[fid]">{$forum[icon]}</a>


如果还要显示版块的介绍,则在

<!--{if $forum[todayposts]}--><em> ({lang index_today}: <strong>$forum[todayposts]</strong>)</em>


后面添加

<!--{/if}--><!--{if $forum[description]}--><p>$forum[description]</p><!--{/if}-->



如果要去掉最后发表,只需要删除下面的代码


    <p>{lang forum_lastpost}:

         <!--{if is_array($forum['lastpost'])}-->

          <a href="redirect.php?tid=$forum[lastpost][tid]&goto=lastpost#lastpost" title="{echo cutstr($forum[lastpost][subject], 30)} {lang forum_lastpost_by} {if $forum['lastpost']['author']}$forum['lastpost']['authorusername']{else}{lang anonymous}{/if}  ">$forum[lastpost][dateline]</a>

         <!--{else}-->

          {lang never}

         <!--{/if}-->

        </p>



去除有无新贴图标

打开template/default/css_common.htm
找到:


.list th { background: url({IMGDIR}/forum.gif) 5px 10px no-repeat; padding-left: 45px !important; }


.list th.new { background-image: url({IMGDIR}/forum_new.gif); }

打开  templates/default/ 下的disucz.htm

找到<p class="right forumcount">


{lang index_today}: <em>$todayposts</em>, {lang index_yesterday}: <em>$postdata[0]</em>, {lang index_members}: <em>$totalmembers</em>

替换成下面的代码选其中一个

这个是完整的统计
{lang index_today}: <em>$todayposts</em>, {lang index_yesterday}: <em>$postdata[0]</em>, {lang index_maxday}: <em>$postdata[1]</em>, {lang index_members}: <em>$totalmembers</em>, {lang index_threads}: <em>$threads</em>, {lang index_posts}: <em>$posts</em>, {lang welcome_newmember} <cite><a href="space.php?username=$memberenc">$lastmember</a></cite>

这个统计显示主题数 帖子数 会员数 欢迎新会员数
{lang index_threads}: <em>$threads</em>,
{lang index_posts}: <em>$posts</em>,
<!-- {lang index_today}: <em>$todayposts</em>,
{lang index_yesterday}: <em>$postdata[0]</em>, -->
{lang index_members}: <em>$totalmembers</em>,
{lang welcome_newmember}: <a href="space.php?username=$memberenc">$lastmember</a>

原答案在:https://discuz.dismall.com/forum.php?mod=viewthread&tid=1493581
回复

使用道具 举报

sisilovesi 发表于 2010-9-28 15:10:38 | 显示全部楼层
打开  templates/default/ 下的disucz.htm
找到

<th width="$cat[forumcolwidth]"{$forum[folder]}>


如果只需要显示图片,则在后面加上下面的代码


<a href="forumdisplay.php?fid=$forum[fid]">{$forum[icon]}</a>


如果还要显示版块的介绍,则在

<!--{if $forum[todayposts]}--><em> ({lang index_today}: <strong>$forum[todayposts]</strong>)</em>


后面添加

<!--{/if}--><!--{if $forum[description]}--><p>$forum[description]</p><!--{/if}-->



如果要去掉最后发表,只需要删除下面的代码


    <p>{lang forum_lastpost}:

         <!--{if is_array($forum['lastpost'])}-->

          <a href="redirect.php?tid=$forum[lastpost][tid]&amp;goto=lastpost#lastpost" title="{echo cutstr($forum[lastpost][subject], 30)} {lang forum_lastpost_by} {if $forum['lastpost']['author']}$forum['lastpost']['authorusername']{else}{lang anonymous}{/if}  ">$forum[lastpost][dateline]</a>

         <!--{else}-->

          {lang never}

         <!--{/if}-->

        </p>



去除有无新贴图标

打开template/default/css_common.htm
找到:


.list th { background: url({IMGDIR}/forum.gif) 5px 10px no-repeat; padding-left: 45px !important; }


.list th.new { background-image: url({IMGDIR}/forum_new.gif); }

打开  templates/default/ 下的disucz.htm

找到<p class="right forumcount">


{lang index_today}: <em>$todayposts</em>, {lang index_yesterday}: <em>$postdata[0]</em>, {lang index_members}: <em>$totalmembers</em>

替换成下面的代码选其中一个

这个是完整的统计
{lang index_today}: <em>$todayposts</em>, {lang index_yesterday}: <em>$postdata[0]</em>, {lang index_maxday}: <em>$postdata[1]</em>, {lang index_members}: <em>$totalmembers</em>, {lang index_threads}: <em>$threads</em>, {lang index_posts}: <em>$posts</em>, {lang welcome_newmember} <cite><a href="space.php?username=$memberenc">$lastmember</a></cite>

这个统计显示主题数 帖子数 会员数 欢迎新会员数
{lang index_threads}: <em>$threads</em>,
{lang index_posts}: <em>$posts</em>,
<!-- {lang index_today}: <em>$todayposts</em>,
{lang index_yesterday}: <em>$postdata[0]</em>, -->
{lang index_members}: <em>$totalmembers</em>,
{lang welcome_newmember}: <a href="space.php?username=$memberenc">$lastmember</a>

原答案就在这个论坛里,刚才编辑了一下结果要审核,所以只好再回复一次了
回复

使用道具 举报

jm611 发表于 2010-9-29 16:30:51 | 显示全部楼层
再顶顶咯
回复

使用道具 举报

zhiju 发表于 2010-9-29 20:54:02 | 显示全部楼层
我还想知道,这些图片,怎么达到不一样效果呢?
回复

使用道具 举报

cr180 发表于 2010-9-30 12:29:46 | 显示全部楼层
回复 我非平凡 的帖子

打开文件:templates/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}-->{lang anonymous}<!--{/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]}--><dd>$forum[description]</dd><!--{/if}-->
复制代码

回复

使用道具 举报

cfzbc 发表于 2010-10-19 20:49:15 | 显示全部楼层
首页横排去掉主题帖数、最后发表改为最后发表主题名称,增加版块简介

https://discuz.dismall.com/thread-1935324-1-1.html
回复

使用道具 举报

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

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-6 03:57 , Processed in 0.136587 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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