衫衫 2008-3-4 19:58
首页信息美化for6.0
版本:dz6.0
演习请看:
[attach]4729[/attach]
[color=orange][size=5]修改之前请备份![/size][/color]
1.打开index.php查找 引用:[indent][quote]$newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;[/quote][/indent]
下面加 引用:[indent][quote]$today = mktime (0,0,0,date("m") ,date("d"),date("Y"));
$build_date = mktime (0,0,0,9,02,2007);//[color=red]请修改后面的三个数字,分别代表你论坛运行第一天的月,日,年。[/color]
$build_days = (int)(($today-$build_date)/(24*3600));[/quote][/indent]
继续查找 引用:[indent][quote]} else {
require_once DISCUZ_ROOT.'./include/category.inc.php';
}[/quote][/indent]
下面加 引用:[indent][quote]$malenum = $femalenum = $nofmnum = 0;
$query = $db->query("SELECT gender FROM {$tablepre}members");
while($chk = $db->fetch_array($query)) {
if($chk['gender'] == '1') {
$malenum++;
} else if($chk['gender'] == '2') {
$femalenum++;
} else {
$nofmnum++;
}
}[/indent][/quote]
2.打开template/default/discuz.htm查找并删除 引用:[indent][quote]<a href="search.php?srchfrom=$newthreads&searchsubmit=yes">{lang show_newthreads}</a>
<a href="member.php?action=markread" id="ajax_markread" >{lang mark_read}</a>[/quote][/indent]
3.继续查找 引用:[indent][quote]<div id="forumstats">
<p>
{lang index_today}: <em>$todayposts</em>, {lang index_yesterday}: <em>$postdata[0]</em>, {lang index_maxday}: <em>$postdata[1]</em> <a href="digest.php">{lang digest}</a>
<!--{if $rssstatus}--><a href="rss.php?auth=$rssauth" title="{lang rss_subscribe_all}" target="_blank"><img src="images/common/xml.gif" alt="{lang rss_subscribe_all}" /></a><!--{/if}-->
</p>
<p>{lang index_threads}: <em>$threads</em>, {lang index_posts}: <em>$posts</em>, {lang index_members}: <em>$totalmembers</em>, {lang welcome_newmember} <cite><a href="space.php?username=$memberenc">$lastmember</a></cite></p>
</div>[/indent][/quote]
更改为 引用:[indent][quote]<div id="forumstats">
<p>
<div class="right" style="line-height: 18px;">
<a href="search.php?srchfrom=$newthreads&searchsubmit=yes">{lang show_newthreads}</a> |
<a href="digest.php">{lang digest}</a> |
<a href="member.php?action=markread" id="ajax_markread" >{lang mark_read}</a>
<!--{if $rssstatus}--><a href="rss.php?auth=$rssauth" target="_blank"><img src="images/common/xml.gif" border="0" class="absmiddle" alt="{lang rss_subscribe_all}" /></a><!--{/if}-->
<br>
{lang total} <span class="smalltxt">$totalmembers</span> {lang index_members}: <img src="images/default/online_boy.gif" alt="共有帅哥"> <font color="#215CA1">{$malenum}</font>位 <img src="images/default/online_girl.gif" alt="共有美女"> <font color="#FF359A">{$femalenum}</font>位 <img src="images/default/baom.gif" alt="未定性别"> <font color="#007500">{$nofmnum}</font>位 | {lang welcome_newmember} <a href="space.php?username=$memberenc"><span class="bold"><b>$lastmember</b></span></a>
<p>{lang index_threads}: <em>$threads</em> | {lang index_posts}: <em>$posts</em> | {lang index_today}: <em>$todayposts</em> | {lang index_maxday}: <em>$postdata[1]</em> | 论坛已运行 <span class="bold"><font color="#FF0000">$build_days</font></span> 天<br>
</div>
</p>
</div>[/indent][/quote]
[size=5][color=navy]1.以下代码是显示时间代码(查看演戏,状态: 正常模式 字体上面)[/color][/size] 引用:[indent][quote]<b><span><font color=#215CA1 size=2><script language="javaScript">
<!--
now = new Date(),hour = now.getHours()
if(hour < 4){document.write("您好!清晨了! ")}
else if (hour < 10){document.write("您好!早上好! ")}
else if (hour < 12){document.write("您好!中午好! ")}
else if (hour < 18){document.write("您好!下午好! ")}
else if (hour < 21){document.write("您好!晚上好!! ")}
else if (hour < 22){document.write("您好!深夜了! ")}
else if (hour < 24){document.write("您好!深夜了,注意身体哦! ")}
// -->
</script></font></span><br></b>[/indent][/quote]
2.打开template/default/discuz.htm---建议把这段代码放在 引用:[indent][quote]<!--{if $discuz_uid}-->
<!--{if $allowinvisible}-->{lang online_status}:[/indent][/quote]
上面
颜色字体大小可以自己调--><font color=#215CA1 size=2>