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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[已解决] 7.0常见问题,先瞧瞧有没有你要的答案

  [复制链接]
锋芒 发表于 2009-2-20 21:03:12 | 显示全部楼层 |阅读模式
本帖最后由 锋芒 于 2009-4-14 20:08 编辑

Discuz! 模版风格感谢您的支持!(转载请提供本帖连接)

部分颜色修改请见此帖:https://discuz.dismall.com/thread-1162982-1-1.html

界面首页相关内容

菜单栏ID与在线(隐身)距离过近
css_append.htm末尾添加
  1. #loginstatus { padding-left: 5px; }
复制代码
首面论坛名称文字颜色修改
即:Discuz! 论坛官方 >> 首页

css_append.htm或者css_common.htm
末尾添加
  1. #nav, #nav a { color: #000; }
复制代码
区版块添加背景色

css_append.htm添加
  1. #index .list h3 { background: #000; }
复制代码
图片
css_append.htm末尾加
  1. #index .list h3 { background: url({IMGDIR}/图片名称); }
复制代码
如果图片高度过小,css_common.htm查找:
  1. .content .list h3 { padding-left: 6px; color: {MIDTEXT}; line-height: 35px; }
复制代码
将35改为30
文字颜色,添加
  1. #index .list h3 a { color: #FFF; }
复制代码
版块名称颜色
css_append.htm
添加
.list h2 a { color: #F00; }

分区版主颜色修改
css_append.htm
末尾添加
  1. .headactions em, .headactions a{ color: #FFF; }
复制代码
打开discuz.htm
查找
  1. <!--{if $cat['moderators']}-->{lang forum_category_modedby}: $cat[moderators]<!--{/if}-->
复制代码
改为
  1. <em><!--{if $cat['moderators']}-->{lang forum_category_modedby}: $cat[moderators]<!--{/if}--></em>
复制代码
如何调整版块之间的距离
css_common.htm 查找
  1. .list td, .list th { height: 50px; padding: 6px 0;
复制代码
将6改为1

横排添加版块图标
discuz.htm
查找
  1. <th width="$cat[forumcolwidth]"{$forum[folder]}>
复制代码
后面加
  1. <a href="forumdisplay.php?fid=$forum[fid]">{$forum[icon]}</a>
复制代码
在线列表会员图标相关问题
css_common.htm
查找
  1. #onlinelist dd ul li { float: left; margin: 4px 0; width: 20%; height: 14px; line-height: 14px; }
复制代码
调小20%,可调整显示列数,height: 14px 为图标高度(图标错位修改),margin: 4px为上下行会员之间间距
如何恢复6.1在线列表缩略显示在线图标:
效果图对照




discuz.htm
查找:
  1. <span class="headactions"><a href="$indexname?showoldetails=yes#online" class="nobdr"><img src="{IMGDIR}/collapsed_yes.gif" alt="" /></a></span>
  2.                         <h3>
  3.                                 <strong><a href="member.php?action=online">{lang onlinemember}</a></strong>
  4.                                 - {lang total} <em>$onlinenum</em> {lang onlines}
  5.                                 - {lang index_mostonlines} <em>$onlineinfo[0]</em> {lang on} <em>$onlineinfo[1]</em>.
  6.                         </h3>
复制代码
下面添加:
  1. <dl id="onlinelist">
  2.                 <dt>$_DCACHE[onlinelist][legend]</dt>
  3.                 <!--{if $detailstatus}-->
  4.                         <dd>
  5.                         <ul class="s_clear">
  6.                         <!--{if $whosonline}-->
  7.                                 <!--{loop $whosonline $key $online}-->
  8.                                         <li title="{lang time}: $online[lastactivity]{LF}{lang action}: $online[action] <!--{if $online['fid']}-->{LF}{lang forum}: $online[fid]<!--{/if}-->">
  9.                                         <img src="images/common/$online[icon]" alt="" />
  10.                                         <!--{if $online['uid']}-->
  11.                                                 <a href="space.php?uid=$online[uid]">$online[username]</a>
  12.                                         <!--{else}-->
  13.                                                 $online[username]
  14.                                         <!--{/if}-->
  15.                                         </li>
  16.                                 <!--{/loop}-->
  17.                         <!--{else}-->
  18.                                 <li style="width: auto">{lang online_only_guests}</li>
  19.                         <!--{/if}-->
  20.                         </ul>
  21.                         </dd>
  22.                 <!--{/if}-->
  23.                 </dl>
复制代码
底部版权信息上下文字间距:

css_append.htm
添加
  1. #rightinfo p, #footlink p { padding: 4px 0; }
复制代码
风格切换按钮相关问题
css_common.htm
  1. #style_switch a { float: left; width: 8px; height: 8px; border: 1px solid #DDD;
复制代码
width为宽度,height为高度,1px solid #DDD;(1为边框厚度,不是当前使用风格的边框线及颜色)
#style_switch a:hover, #style_switch .current a { border-color: #FFF; }
#FFF(当前使用风格的边框线)


登录窗口安全提问背景色
css_append.htm
添加
  1. .selecttype { background: {WRAPBG};  width: 220px; margin-bottom: 10px; border: {WRAPBORDERCOLOR} 1px solid; }
复制代码
如果你觉得高度过大,需要修改的话,
默认模版templates/default/css_float.htm
查找
  1. .selecttype { margin-top: 10px; height: 31px; clear: both; }
复制代码
将31改为18


如何调整首页版块前面图片的高度
css_common.htm
查找
  1. .list th { background: url({IMGDIR}/forum.gif) 5px 10px no-repeat; padding-left: 45px !important; }
复制代码
将10px改为20px

如何添加竖线
css_append.htm添加
1、区域边框线,即版块周围的边框线,这个不需要的话不要加
  1. .list { border: 1px solid {COMMONBORDER}; }
复制代码
2、首页竖线
添加
  1. .list td {border-left: 1px dashed {COMMONBORDER}; }
  2. td.forumlast { padding-left: 10px; }
复制代码
主题/帖数左右的竖线,padding-left: 8px;为右侧最后发表左边距
也可以再添加
  1. .list th {border-right: 1px dashed {COMMONBORDER}; }
复制代码
版块横排之间的竖线
说明:
dashed为虚线,实线改为 solid
{COMMONBORDER};调用的是通用区域边框色,根据需要修改,如: #000;

主题列表页相关内容

限制标题显示字符数forumdisplay.htm
查找(第二个)
$thread[subject]
改为:
{echo cutstr($thread[subject], 60)}
60为显示字符数,可能各标题显示的并不太准确。



版块主题添加背景色
css_common.htm末尾加
  1. .fengmang { background: {SPECIALBG}; }
  2. .fengmang1 { background: {SPECIALBG}; }
复制代码
再打开forumdisplay.htm
查找:
  1. <td class="folder"></td><td>&nbsp;</td>
  2.                                                 <!--{if $forum['ismoderator']}--><td>&nbsp;</td><!--{/if}-->
  3.                                                 <th class="subject">{lang forum_thread}</th><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
复制代码
替换为
  1. <td class="fengmang"></td><td class="fengmang">&nbsp;</td>
  2.                                                 <!--{if $forum['ismoderator']}--><td class="fengmang">&nbsp;</td><!--{/if}-->
  3.                                                 <th class="fengmang1">{lang forum_thread}</th><td class="fengmang">&nbsp;</td><td class="fengmang">&nbsp;</td><td class="fengmang">&nbsp;</td>
复制代码
4、如何调整帖子内容上下间距
css_viewthread.htm
  1. .t_msgfont, .t_msgfont td { font-size: {MSGFONTSIZE}; line-height: 1.6em; }
复制代码
1.6改为1.8或2.0

子版块横排添加图标
forumdisplay_subforum.htm
查找
  1. <th width="{$forum[forumcolwidth]}"$sub[folder]>
复制代码
后面加
  1. <a href="forumdisplay.php?fid=$$sub[fid]">{$sub[icon]}</a>
复制代码
添加简介
查找
  1. <p>{lang forum_threads}sub[threads], {lang forum_posts}: $sub[posts]</p>
复制代码
后面加
  1. <!--{if $sub[description]}--><p>$sub[description]</p><!--{/if}-->
复制代码
帖子内容页相关内容
引用内容背景色
css_viewthread.htm
  1. .quote { padding-bottom: 5px; background: #F9F9F9 url({IMGDIR}/icon_quote_s.gif) no-repeat 20px 6px; }
  2.                         .quote blockquote { margin: 0; padding: 0 65px 5px 0; background: url({IMGDIR}/icon_quote_e.gif) no-repeat 100% 100%; line-height: 1.6em; }
复制代码
有两张图片,可在图片包内自行替换,background: #F9F9F9为背景色,修改颜色代码

插入代码的背景色
  1. .blockcode { padding: 10px 0 5px 10px; width: 598px; w\idth: 586px; border: 1px solid #CCC; background: #F7F7F7 url({IMGDIR}/codebg.gif) repeat-y 0 0; overflow: hidden; }
复制代码
codebg.gif为左侧背景图片, border: 1px solid #CCC;为边框线background: #F7F7F7为右侧背景

主题管理,回复、发帖区域间距调整

打开css_viewthread (第8行)
查找
  1. .forumcontrol td { padding: 15px; }
复制代码
改为
  1. .forumcontrol td { padding: 4px 15px; }
复制代码
4px即上下内边距,根据需要调整

如何修改发帖、回复文字颜色
css_viewthread 添加
.postbtn a, .replybtn a { color: #000; }

评分

12

查看全部评分

 楼主| 锋芒 发表于 2009-2-20 21:06:06 | 显示全部楼层
占位编辑
回复

使用道具 举报

1674 发表于 2009-2-20 21:15:40 | 显示全部楼层
前排支持。
回复

使用道具 举报

蓝豆 发表于 2009-2-20 21:24:19 | 显示全部楼层
大力支持
回复

使用道具 举报

肥爺 发表于 2009-2-25 03:09:12 | 显示全部楼层
友情支持
现在才发现呃~:)
回复

使用道具 举报

inonce 发表于 2009-2-25 03:23:22 | 显示全部楼层
支持了
帖子很有用。!!
回复

使用道具 举报

8460 发表于 2009-2-27 10:28:07 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

abcnic 发表于 2009-2-27 10:28:32 | 显示全部楼层
前排支持
回复

使用道具 举报

博爱小山 发表于 2009-3-8 17:40:20 | 显示全部楼层
第一页~~~
回复

使用道具 举报

popuppp 发表于 2009-3-16 11:25:41 | 显示全部楼层
老哥出手,必属精品
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-24 05:02 , Processed in 0.163658 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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