OOCN分享圈's Archiver

oocn 发表于 2014-10-14 15:12

discuz论坛模版制作教程—首页修改

菜单弹出导航相关问题

.postboardlist { background: #000; }

.postboardlist a { color: #000; }

.postboardlist a:hover { background: #000; }

.pbl_selected a, .pbl_selected a:hover { background-color: #000; color: #FFF !important;}

第一个为背景颜色,第二个为文字颜色,
第三个鼠标指向背景色,第四个为当前区版背景颜色

1、去掉首页的发帖图标

index_header.htm
查找删除

<span class="postbtn" id="prompt_index_postbtn"><a href="misc.php?action=nav" onclick="showWindow('nav', this.href);return false;">{lang send_posts}</a></span>

2、没开启边栏,公告占用地方过多,这里给大家提供一个很不错的美化

index_header.htm
查找

<!--{if empty($gid) && $announcements}-->


上面添加


<span class="headactions" style="line-height: 30px">
<FONT face=Wingdings color=#666666>v</FONT> <a href="search.php?srchfrom=$newthreads&amp;searchsubmit=yes" class="lightlink" target="_blank">{lang show_newthreads}</a>
<FONT face=Wingdings color=#666666>v</FONT> <a href="stats.php?type=postsrank" target="_blank">排行信息</a>
<FONT face=Wingdings color=#666666>v</FONT> <a href="stats.php?type=team" target="_blank">管理团队</a>
<FONT face=Wingdings color=#666666>v</FONT> <a href="member.php?action=list" target="_blank">会员列表</a>
</span>


如果公告过多,向上滚动觉得麻烦,可以用6.1的公告方式
下载附件,解压后上传到你所使用的风格文件里面
然后打开
查找


<div id="ann">
                <dl>
                        <dt>{lang announcements}:</dt>
                        <dd>
                                <div id="annbody"><ul id="annbodylis">$announcements</ul></div>
                        </dd>
                </dl>
        </div>
        <script type="text/javascript">announcement();</script>


替换


{subtemplate fengmang}


3、去掉打开/关闭边栏

discuz.htm查找删除


<!--{if $infosidestatus[allow] == 2}-->
        <a id="sidebar_img" href="javascript:;" onclick="sidebar_collapse(['{lang sidebar_collapsed_yes}', '{lang sidebar_collapsed_no}']);" class="$collapseimg[sidebar]"><!--{if $collapseimg[sidebar] == 'collapsed_yes'}-->{lang sidebar_collapsed_yes}<!--{else}-->{lang sidebar_collapsed_no}<!--{/if}--></a>
<!--{elseif $infosidestatus[allow] == 1}-->
        <a id="sidebar_img" href="javascript:;" onclick="sidebar_collapse(['', '{lang sidebar_collapsed_no}']);" class="collapsed_yes">{lang sidebar_collapsed_yes}</a>
<!--{/if}-->


4、版块分区添加边框线

添加


.list { border: 1px solid {WRAPBORDERCOLOR}; margin-bottom: 10px; }


10px为上下分区间距
添加竖线


.list td { border-left: 1px solid {COMMONBORDER}; }


如果标题过于靠近左侧的竖线
添加


.list td .forumlast { padding-left: 10px; }


5、分区名称更改文字颜色及添加背景色


.list h3 { background: url({IMGDIR}/header_bg.gif); border: 1px solid #FFF; border-bottom: none; }
.list h3 a { color: #FFF; }


background: url({IMGDIR}/header_bg.gif);背景图片
background: #FFFFFF; 将图片修改为颜色;
border: 1px solid #FFF; 背景色与边框线之间1px的线条间隔;
border-bottom: none; 底部边框线注释掉。(此两项不需要可删除)
.list h3 a { color: #FFF; } 分区名称文字颜色

定义分区高度


.content .list h3 { line-height: 30px; }


6、去掉有无新帖图标

.list th { background-image: none; padding-left: 0px !important; }
.list th.new { background-image: none; }

7、版块上面的虚线改为实线及上下间距

.list td, .list th { padding: 6px 0; border-top: 1px solid {COMMONBORDER}; }

修改6px,即版块内容区域上下距离

8、版块图标移动到简介后面
discuz.htm
查找删除: $forum[icon]
查找(第一个): </th>
后面添加

<td class="forumnums">
$forum[icon]
</td>

9、最后发表标题的作者、时间改为两行
discuz.htm
查找

<cite><!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}--> - $forum[lastpost][dateline]</cite>

替换

<cite><!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}--></cite><p>$forum[lastpost][dateline]</p>

想加点美化,<cite>后面添加作者: <p>后面添加时间:
上面的

<p><a href="redirect.php?tid=$forum[lastpost][tid]&amp;goto=lastpost#lastpost">{echo cutstr($forum[lastpost][subject], 30)}</a></p>

在<p>后面添加标题: 30为首页标题显示字符,如果修改为40可能导致折行,影响美观,
css_append.htm添加

.forumlast { width: 300px; }

即最后发表的区域宽度

10、修改友情链接及在线会员背景
在线会员背景
css_append.htm添加


#online h3, #bdays h3 { background: url({IMGDIR}/portalbox_bg.gif); line-height: 28px; }
#online h3, #online h3 a, #bdays h3 a  { color: #f00; }

#online h3 a在线会员连接的文字颜色,#online h3 其它文字颜色,#bdays h3今日生日的家伙

友情连接背景
添加:

.content .list h3 { background: url({IMGDIR}/portalbox_bg.gif); color: #F00; }

oocn 发表于 2014-10-14 15:23

去除  欢迎回来 oocn, 你上次访问时间是在 昨天 11:37, 我的帖子, 查看新帖, 标记已读

打开:index_header.htm

去除:[code]{lang home_welcome} {$discuz_userss}, <!--{if $lastvisit}-->{lang home_lastvisit} {$lastvisit}, <!--{/if}--><a href="my.php?item=threads" class="lightlink" target="_blank">{lang my_posts}</a>, <a href="search.php?srchfrom=$newthreads&amp;searchsubmit=yes" class="lightlink">{lang show_newthreads}</a>, <a href="member.php?action=markread" id="ajax_markread" onclick="ajaxmenu(this);doane(event);" class="lightlink">{lang mark_read}</a>

[/code]

人中龍 发表于 2020-5-17 00:35

[quote]他[她]看完这篇文章说:[img]http://oocn.258club.com/attachments/month_1412/1412040833ea63e7d385544a8a.png[/img][/quote]

人中龍 发表于 2020-5-17 00:35

[quote]他[她]看完这篇文章说:[img]http://oocn.258club.com/attachments/month_1412/14120408337ba0fabaa3f1d6b3.png[/img][/quote]

人中龍 发表于 2020-5-17 00:36

[quote]他[她]看完这篇文章说:[img]http://oocn.258club.com/attachments/month_1412/141204083334b4c301ee1ebc32.png[/img][/quote]

人中龍 发表于 2020-5-17 00:36

[quote]他[她]看完这篇文章说:[img]http://oocn.258club.com/attachments/month_1412/14120408337fc0e6dcfda418b0.png[/img][/quote]

人中龍 发表于 2020-9-11 00:16

[quote]他[她]看完这篇文章说:[img]http://oocn.258club.com/attachments/month_1412/1412040833ea63e7d385544a8a.png[/img][/quote]

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.