Tanky WooRSS

修改论坛首页到极致简约

31 Mar 2013
这篇博客是从旧博客 WordPress 迁移过来,内容可能存在转换异常。

版本:Discuz X2.5

代码文件:./template/default/forum/discuz.htm

CSS文件:./template/default/common/module.css

(具体根据主题可能会有所变动)

  1. 删除分区名:
<div class="bm_h cl">
    <span class="o">
        <img id="category_$cat[fid]_img" src="{IMGDIR}/$cat[collapseimg]" title="{lang spread}" alt="{lang spread}" onclick="toggle_collapse('category_$cat[fid]');" />
    </span>
    <!--{if $cat['moderators']}--><span class="y">{lang forum_category_modedby}: $cat[moderators]</span><!--{/if}-->
    <!--{eval $caturl = !empty($cat['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$cat['domain'].'.'.$_G['setting']['domain']['root']['forum'] : '';}-->
    <h2><a href="{if !empty($caturl)}$caturl{else}forum.php?gid=$cat[fid]{/if}" style="{if $cat[extra][namecolor]}color: {$cat[extra][namecolor]};{/if}">$cat[name]</a></h2>
</div>
  1. 删除版块左边图标:

注释掉:

<img src="{IMGDIR}/forum{if $forum[folder]}_new{/if}.gif" alt="" />

修改CSS:

把31px改为1px

.fl_icn_g { float: left; width: 31px; }
.fl_g dl { margin-left: 31px; padding-left: 10px; }
  1. 删除掉版块下面的主题数、贴数、最后发表时间:

注释掉dd这一部分:

<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 $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>

效果图:

www.CppLeYuan.com

discuz

参考:

http://www.52poop.com/thread-8237-1-2.html

http://www.discuz.net/forum.php?mod=viewthread&tid=2903030

http://www.discuz.net/thread-3128677-1-1.html

http://www.discuz.net/thread-696461-1-1.html