Discuz! 7.0/7.1/7.2 通用横排美化方法;横排下只显示版块标题以

首先提示:修改前请备份,以防不测。

搜索下面的代码删除:分两步一,搜索下面的代码,删除:

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

二,搜索下面的代码,删除:

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

如果觉得去掉之后版块图标距离边界太近,可以将第二步中的删除,修改:

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

修改成

.list th {padding-left: 5px !important; }

padding-left: 5px 表示版块图标距离左边界5个相素

风格目录中的CSS文件,如:templates/default/css_common.htm (如果你的风格中没有这个文件,那么默认的也要修改掉哦。)注:如果现在你用的风格中也有css_common.htm(或者是css_append.htm),同样要修改。如果搜索不到,请用短一点搜索,例如搜索有无新贴的图片名称forum_new.gif forum.gif

然后开始:

打开风格目录中的./templates/你的风格文件包/discuz.htm文件

风格目录下没有此文件,就修改默认风格下此文件即可。./templates/default/discuz.htm搜索下面的代码 ,大概在86行到101行之间

<th width="$cat[forumcolwidth]"{$forum[folder]}><h2><a href="forumdisplay.php?fid=$forum[fid]" {if $forum[redirect]}target="_blank"{/if}>$forum[name]</a><!--{if $forum[todayposts]}--><em> ({lang index_today}: <strong>$forum[todayposts]</strong>)</em><!--{/if}--></h2><!--{if !$forum[redirect]}--><p>{lang forum_threads}: $forum[threads], {lang forum_posts}: $forum[posts]</p><!--{if $forum['permission'] == 1}--><p>{lang private_forum}<!--{else}--><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><!--{/if}--><!--{else}--><p>{lang url_link}</p><!--{/if}--></th>

替换为:

<th width="$cat[forumcolwidth]"{$forum[folder]}><a href="forumdisplay.php?fid=$forum[fid]">{$forum[icon]}</a><h2><a href="forumdisplay.php?fid=$forum[fid]" {if $forum[redirect]}target="_blank"{/if}>$forum[name]</a><!--{if $forum[todayposts]}--><em> ({lang index_today}: <strong>$forum[todayposts]</strong>)</em><!--{/if}--></h2><!--{if $forum[description]}--><p>$forum[description]</p><!--{/if}--><!--{if $forum['moderators']}--><!--{if $moddisplay == 'flat'}--></th>

增加显示版主,没有版主时候显示点击申请

上面刚才替换的代码</th>前面加入下面代码:

<p>{lang forum_moderators}: $forum[moderators]</p><!--{else}--><span class="dropmenu" id="mod$forum[fid]" onmouseover="showMenu({'ctrlid':this.id})">{lang forum_moderators}</span><ul class="popupmenu_popup headermenu_popup" id="mod$forum[fid]_menu" >

把里面的链接地址换成你的申请地址即可。

此方法不影响其他,效果演示图是人家的。 他添加版主显示了,不需要版主显示的就把版主显示那里忽略掉即可。

最后提示:别忘记把版块设置横排。

还有更新缓存

接受失败等于放松自己高压的心理,

Discuz! 7.0/7.1/7.2 通用横排美化方法;横排下只显示版块标题以

相关文章:

你感兴趣的文章:

标签云: