云水论坛
标题: Discuz X1.5论坛版块有无新帖图标今日帖数美化代码(仿动网)整理 [打印本页]
作者: 森森 时间: 2011-2-18 15:10
标题: Discuz X1.5论坛版块有无新帖图标今日帖数美化代码(仿动网)整理
方法整理中:
竖排美化某方法一:
1、将无新帖图片default.png,上传到./static/image目录下
2、打开./template/(当前风格目录)/forum/discuz.htm,
查找:
<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>
==========修改为:
<h2><img src="static/image/gid_pic/gid_pic_$cat[fid].png" width="20" height="20" align="absmiddle" /> <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>
所有分区小图标需放在./static/image/gid_pic目录下
小图标档案格式为gid_pic(分区gid).png
default.png为默认图标,切勿删除
===============================
方法2
论坛首页版块有无新帖及今日贴数美化(包括横排) For Discuz X1.5
方法:
1、下载附件,将里面的一个图片文件上传到./static/image/common目录下
2、打开./template/(当前风格目录)/forum/discuz.htm,查找:
- <td class="fl_icn" {if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="width: {$forum[extra][iconwidth]}px;"{/if}>
- <!--{if $forum[icon]}-->
- $forum[icon]
- <!--{else}-->
- <a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}><img src="{IMGDIR}/forum{if $forum[folder]}_new{/if}.gif" alt="$forum[name]" /></a>
- <!--{/if}-->
- </td>
复制代码
修改为:
- <td class="fl_icn" style="width:42px;">
- <!--{if $forum[todayposts] && !$forum['redirect']}--><div class="today">$forum[todayposts]<br /><span style="color:#000;">今日</span></div><!--{else}--><div class="today">N/A<br /><span style="color:#000;">今日</span></div><!--{/if}-->
- </td>
复制代码
再查找:(2010年9月5日 9:08新增)
- <div class="fl_icn_g"{if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="width: {$forum[extra][iconwidth]}px;"{/if}>
- <!--{if $forum[icon]}-->
- $forum[icon]
- <!--{else}-->
- <a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}><img src="{IMGDIR}/forum{if $forum[folder]}_new{/if}.gif" alt="$forum[name]" /></a>
- <!--{/if}-->
- </div>
复制代码
修改为:
- <div class="fl_icn_g" style="width:58px;">
- <!--{if $forum[todayposts] && !$forum['redirect']}--><div class="today">$forum[todayposts]<br /><span style="color:#000;">今日</span></div><!--{else}--><div class="today">N/A<br /><span style="color:#000;">今日</span></div><!--{/if}-->
复制代码
</div>
3、打开./template/default/common/common.css,在文件最末尾加:
- /*Added By Marco129@DSU - Today Post*/
- .today { width:42px; height:44px; float:left; background:url({IMGDIR}/today.jpg) no-repeat center top; margin:5px; text-align:center; color:#FF6600; font-size:12px; line-height:23px; font-family: Microsoft Yahei,Lucida Grande,Calibri,Trebuchet MS,Helvetica,Arial,Hiragino Sans GB,STHeiti,Microsoft Jhenghei,sans-serif; }
复制代码
4、登陆管理中心 -> 界面 -> 风格管理 -> 更新CSS缓存 !
作者: 森森 时间: 2011-2-18 15:18
美化方法:
1、下载附件
[DSU] today.zip
,将里面的一个图片文件上传到./static/image/common目录下
2、打开./template/(当前风格目录)/forum/discuz.htm,查找:
- <td class="fl_icn" {if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="width: {$forum[extra][iconwidth]}px;"{/if}>
- <!--{if $forum[icon]}-->
- $forum[icon]
- <!--{else}-->
- <a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}><img src="{IMGDIR}/forum{if $forum[folder]}_new{/if}.gif" alt="$forum[name]" /></a>
- <!--{/if}-->
- </td>
复制代码
修改为:
- <td class="fl_icn" style="width:42px;">
- <!--{if $forum[todayposts] && !$forum['redirect']}--><div class="today">$forum[todayposts]<br /><span style="color:#000;">今日</span></div><!--{else}--><div class="today">N/A<br /><span style="color:#000;">今日</span></div><!--{/if}-->
- </td>
复制代码
再查找:(2010年9月5日 9:08新增)
- <div class="fl_icn_g"{if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="width: {$forum[extra][iconwidth]}px;"{/if}>
- <!--{if $forum[icon]}-->
- $forum[icon]
- <!--{else}-->
- <a href="$forumurl"{if $forum[redirect]} target="_blank"{/if}><img src="{IMGDIR}/forum{if $forum[folder]}_new{/if}.gif" alt="$forum[name]" /></a>
- <!--{/if}-->
- </div>
复制代码
修改为:
- <div class="fl_icn_g" style="width:58px;">
- <!--{if $forum[todayposts] && !$forum['redirect']}--><div class="today">$forum[todayposts]<br /><span style="color:#000;">今日</span></div><!--{else}--><div class="today">N/A<br /><span style="color:#000;">今日</span></div><!--{/if}-->
- </div>
复制代码
3、打开./template/(当前风格目录)/forum/forumdisplay_subforum.htm,查找:(2010年9月14日 22:08新增)
- <div class="fl_icn_g"{if !empty($sub[extra][iconwidth]) && !empty($sub[icon])} style="width: {$sub[extra][iconwidth]}px;"{/if}>
- <!--{if $sub[icon]}-->
- $sub[icon]
- <!--{else}-->
- <a href="$forumurl"{if $sub[redirect]} target="_blank"{/if}><img src="{IMGDIR}/forum{if $sub[folder]}_new{/if}.gif" alt="$sub[name]" /></a>
- <!--{/if}-->
- </div>
复制代码 修改为:
- <div class="fl_icn_g" style="width:58px;">
- <!--{if $sub[todayposts] && !$sub['redirect']}--><div class="today">$sub[todayposts]<br /><span style="color:#000;">今日</span></div><!--{else}--><div class="today">N/A<br /><span style="color:#000;">今日</span></div><!--{/if}-->
- </div>
复制代码 4.再查找:(2010年9月29日 17:55新增)
- <td class="fl_icn" {if !empty($sub[extra][iconwidth]) && !empty($sub[icon])} style="width: {$sub[extra][iconwidth]}px;"{/if}>
- <!--{if $sub[icon]}-->
- $sub[icon]
- <!--{else}-->
- <a href="$forumurl"{if $sub[redirect]} target="_blank"{/if}><img src="{IMGDIR}/forum{if $sub[folder]}_new{/if}.gif" alt="$sub[name]" /></a>
- <!--{/if}-->
- </td>
复制代码 修改为:
- <td class="fl_icn" style="width:58px;">
- <!--{if $sub[todayposts] && !$sub['redirect']}--><div class="today">$sub[todayposts]<br /><span style="color:#000;">今日</span></div><!--{else}--><div class="today">N/A<br /><span style="color:#000;">今日</span></div><!--{/if}-->
- </td>
复制代码
5、打开./template/default/common/common.css,在文件最末尾加:
- /*Added By Marco129@DSU - Today Post*/
- .today { width:42px; height:44px; float:left; background:url({IMGDIR}/today.jpg) no-repeat center top; margin:5px; text-align:center; color:#FF6600; font-size:12px; line-height:23px; font-family: Microsoft Yahei,Lucida Grande,Calibri,Trebuchet MS,Helvetica,Arial,Hiragino Sans GB,STHeiti,Microsoft Jhenghei,sans-serif; }
复制代码 6、登陆管理中心 -> 界面 -> 风格管理 -> 更新CSS缓存 !
作者: 森森 时间: 2011-2-18 15:31
体无完肤方法步骤:
1、下载附件,将里面的两个图片文件上传到论坛的static\image\common目录下;
2、打开当前风格目录下的discuz.htm文件【默认风格路径template/default/forum/discuz.htm,类推】,查找:
- <div class="icn"{if !empty($forum[extra][iconwidth]) && !empty($forum[icon])} style="width: {$forum[extra][iconwidth]}px;"{/if}>
- <!--{if $forum[icon]}-->
- $forum[icon]
- <!--{else}-->
- <img src="{IMGDIR}/forum{if $forum[folder]}_new{/if}.gif" alt="" />
- <!--{/if}-->
复制代码 修改为:
- <div class="icn" style="width:70px;">
-
- <!--{if $forum[todayposts] && !$forum['redirect']}--><div class="today_new">$forum[todayposts]</div><!--{else}--><div class="today">0</div><!--{/if}-->
复制代码 3、打开template\default\common文件,在文件最末尾加:
- .today_new { width:70px; height:57px; float:left; background:url({IMGDIR}/today_new.gif) no-repeat center top; margin:5px; text-align:center; color:#ffffff; font-weight:bold; font-size:15px; line-height:23px; font-family: Georgia, "Times New Roman", Times, serif; }
- .today { width:70px; height:57px; float:left; background:url({IMGDIR}/today.gif) no-repeat center top; margin:5px; text-align:center; color:#ffffff; font-weight:bold; font-size:15px; line-height:23px; font-family: Georgia, "Times New Roman", Times, serif; }
复制代码 4、登陆后台 -- 界面 -- 风格管理 -- 更新CSS缓存;后台 -- 工具 -- 更新缓存!
演示:
作者: 森森 时间: 2011-2-19 14:53
横排 体无完肤
1、下载附件,将里面的两个图片文件上传到论坛的static\image\common目录下; 2、打开当前风格目录下的discuz.htm文件,查找:
- <div class="icn"{if !empty($forum[extra][iconwidth]) &&
!empty($forum[icon])} style="width: {$forum[extra][iconwidth]}px;"{/if}>
- <!--{if $forum[icon]}-->
- $forum[icon]
- <!--{else}-->
- <img
src="{IMGDIR}/forum{if $forum[folder]}_new{/if}.gif" alt="" />
-
<!--{/if}-->
复制代码 修改为:
- <div class="icn" style="width:70px;">
-
- <!--{if $forum[todayposts]
&& !$forum['redirect']}--><div
class="today_new">$forum[todayposts]</div><!--{else}--><div
class="today">0</div><!--{/if}-->
复制代码 3、打开template\default\common文件,在文件最末尾加:
- .today_new { width:70px; height:57px; float:left;
background:url({IMGDIR}/today_new.gif) no-repeat center top; margin:5px;
text-align:center; color:#ffffff; font-weight:bold; font-size:15px;
line-height:23px; font-family: Georgia, "Times New Roman", Times, serif; }
- .today { width:70px; height:57px; float:left;
background:url({IMGDIR}/today.gif) no-repeat center top; margin:5px;
text-align:center; color:#ffffff; font-weight:bold; font-size:15px;
line-height:23px; font-family: Georgia, "Times New Roman", Times, serif;
}
复制代码 4、登陆后台 -- 界面
-- 风格管理 -- 更新CSS缓存;后台 -- 工具 -- 更新缓存!
演示:
|
欢迎光临 云水论坛 (http://www.yunshui.net/) |
Powered by Discuz! X2.5 |