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

 找回密码
 立即注册
搜索

[修改] 首页美化,在最新帖子前面添加“新”字样!

[复制链接]
hackshow 发表于 2012-2-20 20:26:44 | 显示全部楼层 |阅读模式
首先呢,感谢朋友们看帖! 我这些教程都是收集整理好的教程。
按照教程修改可以修改成演示的效果!    具体演示可以看  电脑技术社区  http://bbs.dnjsb.com/forum.php



首先我们将附件图片上传至当前模板的图片文件夹下!默认模板路径为static/image/common

上传覆盖即可,然后我们接下来修改模板文件。

打开现在使用的模板文件,例如:现在我们使用的是官方默认的模板(default)
打开template/default/forum/discuz.htm
查找

  1. <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost" class="xi2 "><!--{echo cutstr($forum[lastpost][subject], 30)}--></a> <cite>$forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
复制代码
替换为:
  1. <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost" class="xi2 drtban_new"><!--{echo cutstr($forum[lastpost][subject], 30)}--></a> <cite>$forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
复制代码
然后我们在查找
  1. <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost" class="xi2 "><!--{echo cutstr($forum[lastpost][subject], 30)}--></a> <cite>$forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
复制代码
替换为
  1. <a href="forum.php?mod=redirect&tid=$forum[lastpost][tid]&goto=lastpost#lastpost" class="xi2 drtban_new"><!--{echo cutstr($forum[lastpost][subject], 30)}--></a> <cite>$forum[lastpost][dateline] <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G[setting][anonymoustext]<!--{/if}--></cite>
复制代码
然后我们在打开css文件
路径:template /default /common /module.css

然后在尾部添加
  1. .drtban_new{padding-left:18px;background-attachment: scroll;background-image: url({IMGDIR}/ban_new.gif);background-repeat: no-repeat;background-position: 0px 2px;
  2. background-size:auto;background-origin:padding-box;background-clip:border-box;background-color:transparent;}
复制代码
然后我们进入后台缓存,打开首页查看一下吧!
图标下载   
回复

使用道具 举报

逃跑的人 发表于 2012-2-20 20:42:03 | 显示全部楼层
看着不错   www.iqihuo.net
回复

使用道具 举报

限量版范儿 发表于 2012-2-20 21:00:24 | 显示全部楼层
支持了啊,,
来自:Discuz!官方论坛 Android客户端
回复

使用道具 举报

 楼主| hackshow 发表于 2012-2-20 23:32:26 | 显示全部楼层
顶起来~``
回复

使用道具 举报

傷痛無聲 发表于 2012-2-22 12:19:37 | 显示全部楼层
修改了 没效果
回复

使用道具 举报

 楼主| hackshow 发表于 2012-2-22 20:57:44 | 显示全部楼层
{:soso_e100:}                     
回复

使用道具 举报

A丶Star丿 发表于 2012-2-22 20:58:36 | 显示全部楼层
很简洁的一款美化
回复

使用道具 举报

abcnic 发表于 2012-2-22 21:20:13 | 显示全部楼层
支持呢 呵呵
回复

使用道具 举报

lysafe 发表于 2012-2-25 23:00:35 | 显示全部楼层
我看这个不错。我用不上啊
回复

使用道具 举报

qq308 发表于 2012-2-25 23:27:20 来自手机 | 显示全部楼层
        麻城论坛  http://www.gemerl.com   招友情连接。。 QQ :631134230
要求地方站。pr2 百度 权重大于1(本站百度权重2)百度收录5000+
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-8-25 04:48 , Processed in 0.109559 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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