免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
设为首页收藏本站开启辅助访问站点地图

美化代码新人必看赚取圈币

返回列表 发帖
查看: 2191|回复: 6 收起左侧
开启左侧收起左侧开启左侧
上一主题 下一主题 打印

discuz论坛模版制作教程—首页修改   [复制链接]

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

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

x
菜单弹出导航相关问题

.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; }

最近看过此主题的圈友

九七
访问时间:2021-07-28 17:02
吾爱社区
访问时间:2020-11-28 13:20
小可爱
访问时间:2020-10-13 14:58
人中龍
访问时间:2020-09-11 00:16
爱谁谁
访问时间:2020-06-29 20:59
梅子爱阿政
访问时间:2017-11-28 04:36
冒险家
访问时间:2015-12-19 06:41
劣绅
访问时间:2015-09-16 20:22
似水流年
访问时间:2015-06-08 07:27

点评
B Color Link Smilies

您还可以输入:个字符
X

 X

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

打开:index_header.htm

去除:
  1. {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>
复制代码
点评
B Color Link Smilies

您还可以输入:个字符
X

 X

今天你帮助了别人,明天别人帮助你.
他[她]看完这篇文章说:

获得 大衰神卡 一张

卡片说明:人中龍 在论坛发帖时没有注意,被小偷偷去了 2 圈币

卡片效果:-2

点评
B Color Link Smilies

您还可以输入:个字符
X

 X

他[她]看完这篇文章说:
点评
B Color Link Smilies

您还可以输入:个字符
X

 X

他[她]看完这篇文章说:

获得 土地神卡 一张

卡片说明:人中龍 乐于助人,奖励 5圈币.

卡片效果:+5

点评
B Color Link Smilies

您还可以输入:个字符
X

 X

他[她]看完这篇文章说:
点评
B Color Link Smilies

您还可以输入:个字符
X

 X

他[她]看完这篇文章说:
点评
B Color Link Smilies

您还可以输入:个字符
X

 X

返回列表 发帖
快速
返回顶部
返回首页