*********************************************************************
*
* HACK名称:漂亮的首页快速登陆专业美化版V3.5 for DZ 6.0.0
* 适用版本: 6.0.0
* 作 者: 水月无痕
* 安装难度: 易
* 数 据 表: 无
* 修改文件: index.php
* 修改模版: discuz.htm
* 增加文件: clock.swf、logining.gif
* 增加计划: 无
* 安装说明: 需要安装
* 演示地址: http://www.wzyds.cn/bbs/index.php
*
* 附:说明:
*
*********************************************************************
演示图:
安装过程:
1、修改 index.php
1-1、查找- $newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
复制代码 在下面加上:- $today = mktime (0,0,0,date("m") ,date("d"),date("Y"));
- $build_date = mktime (0,0,0,2,14,2006);//请修改后面的三个数字,分别代表你论坛运行第一天的月,日,年。
- $build_days = (int)(($today-$build_date)/(24*3600));
复制代码 1-2、查找在下面加上:- if($allowavatar || $avatarshowstatus || $allownickname) {
- $query = $db->query("SELECT mf.nickname, mf.avatar, mf.avatarwidth, mf.avatarheight, m.gender
- FROM {$tablepre}memberfields mf, {$tablepre}members m WHERE m.uid='$discuz_uid' AND mf.uid=m.uid");
- $member = $db->fetch_array($query);
- } else {
- $member = array('nickname' => '', 'avatar' => '');
- }
- $avatarshow = $avatarshowstatus ? $avatar = avatarshow($member['gender']) : '';
- $avatar = $avatarshowstatus != 2 && $member['avatar'] ? "<img src="$member[avatar]" width="$member[avatarwidth]" height="$member[avatarheight]" border="0">" : '';
复制代码 2、修改 discuz.htm 模版
查找:再查找:- <!--{if !empty($newpmexists) || $announcepm}-->
复制代码 把上面两个代码中间的部分替换成:
<br>
<div class="box">
<span class="headactions" align="center"><img id="forumlinks_img" src="{IMGDIR}/$collapseimg[forumlinks]" alt="" onclick="toggle_collapse('forumlinks');"></span>
<h4>社 区 公 告</h4>
<table cellspacing="{INNERBORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%" class="tableborder">
<tr class="category">
<td colspan="3" align="center">
<!--{if empty($gid) && $announcements}-->
<div id="announcement" onmouseover="if(!anncount) {clearTimeout(annst);annst = 0}" onmouseout="if(!annst) annst = setTimeout('announcementScroll()', anndelay);">
<div id="announcementbody"><ul>$announcements</ul></div>
</div>
<script type="text/javascript">
var anndelay = 3000;
var anncount = 0;var annheight = 36;var annst = 0;
function announcementScroll() {
if(!annst) {
$('announcementbody').innerHTML += '<br style="clear: both" />' + $('announcementbody').innerHTML;$('announcementbody').scrollTop = 0;
if($('announcementbody').scrollHeight > annheight * 3) {
annst = setTimeout('announcementScroll()', anndelay);
} else {
$('announcement').onmouseover = $('announcement').onmouseout = null;
}
return;
}
if(anncount == annheight) {
if($('announcementbody').scrollHeight - annheight <= $('announcementbody').scrollTop) {
$('announcementbody').scrollTop = $('announcementbody').scrollHeight / 2 - annheight;
}
anncount = 0;annst = setTimeout('announcementScroll()', anndelay);
} else {
$('announcementbody').scrollTop++;anncount++;annst = setTimeout('announcementScroll()', 10);
}
}
</script>
<!--{/if}-->
</td></tr>
<tr class="altbg2" align="center">
<td colspan="3" align="center">
<font color=blue>您的各项积分属性:</font>
<font face=Wingdings color=5CA408>v</font> {lang credits}: <font color=red>$credits</font>
<!--{loop $extcredits $id $credit}-->
<font face=Wingdings color=#5CA408>v</font>$credit[title]: <font color=red>$GLOBALS[extcredits.$id]</font>$credit[unit]
<!--{/loop}-->
</td></tr>
<td valign="middle" bgcolor=#FFFFFF onMouseOver=this.style.backgroundColor='#F7F8F8' onMouseOut=this.style.backgroundColor='#FFFFFF' class="altbg2" style="border:1px solid #BBE9FF;">
<!--{if $discuz_uid}-->
<TABLE width="98%" align=center border=0>
<font color=blue>您的头衔:</font>
<!--{if $validdays}--><a href="member.php?action=groupexpiry"><span class="bold">$grouptitle</span>($validdays)</a><!--{else}--><span class="bold">$grouptitle</span><!--{/if}-->
<!--{if !empty($invisible)}--> / {lang login_invisible_mode}<!--{/if}-->
<font color=blue>上次访问在:</font><font color=red> $lastvisittime</font>
<hr width="100%" style="height: 1px; color: {INNERBORDERCOLOR}">
<TBODY>
<TR>
<TD align=middle width=145 rowSpan=6>
<A href="memcp.php?action=profile" border="0" height="90" title="如果您想更新个性头像请点击这里" align="absmiddle">$avatar</A>
</TD>
<TR>
<TD height=22> :: <A href="memcp.php"> 我的个人控制面板</A></TD>
<TD colSpan=2> :: <A href="stats.php">我的论坛排名</A></TD></TR>
<TR>
<TD bgColor="{INNERBORDERCOLOR}" colSpan=3 height=1></TD></TR>
<TR>
<TD> :: <A href="my.php?item=threads">我发表的主题</A></TD>
<TD> :: <A href="pm.php?action=send">发送论坛短信</A></TD></TR>
<TR>
<TD> :: <A href="my.php?item=buddylist">我的论坛好友</A></TD>
<TD> :: <A href="my.php?item=grouppermission">查看我的权限</A></TD></TR>
<TR>
<TD> :: <A href="pm.php?folder=inbox">查看我的信件</A></TD>
<TD> :: <A href="my.php?item=favorites&type=thread">我的社区收藏</A>
</TD></TR></TBODY></TABLE></TD>
<!--{else}-->
<font color=red> 欢迎您访问 【雁荡山门户论坛】 !精彩内容等着你,赶快<a href="$link_register" class="notabs">$reglinkname</a>吧!<br>
如果您设置了安全提问设置,请您<a href="logging.php?action=login">点击这里进行高级登陆</a>!</font>
<hr width="100%" style="height: 1px; color: {INNERBORDERCOLOR}">
<table border=0 cellpadding=0 cellspacing=0 align="center">
<form method="post" action="logging.php?action=login">
<tr><td>
<img src="images/logining.gif" border=0 align="left" width="100" height="58" title="登陆后更精彩">
</tr>
<td>
<input class="radio" type="radio" name="loginfield" value="username" checked onclick="document.login.username.focus();">{lang username}<br>
<input class="radio" type="radio" name="loginfield" value="uid" onclick="document.login.username.focus();">{lang uid}</span>
<input type="text" name="username" size="15" maxlength="40" tabindex="1"><BR>
密 码 <input type="password" name="password" size="15" tabindex="2">
<input type="submit" name="loginsubmit" value="提 交" maxlength="4">
</td>
</form>
</table>
<!--{/if}-->
<td valign="middle" bgcolor=#FFFFFF onMouseOver=this.style.backgroundColor='#F7F8F8' onMouseOut=this.style.backgroundColor='#FFFFFF' class="altbg2" style="border:1px solid #BBE9FF;">
<TABLE width="98%" align=center border=0>
<tr>
<td height=22>共有 <span class="bold">$totalmembers</span> {lang index_members}</td>
<td>最新会员 <a href="viewpro.php?username=$memberenc"><span class="bold">$lastmember</span></a></td>
</tr>
<tr>
<td height="1" bgcolor="{INNERBORDERCOLOR}" colspan="2"></td>
</tr>
<tr>
<TD>今日发贴 <span class="bold">$todayposts</span> 篇</td>
<TD>主题总数 <span class="bold">$threads</span> 篇</td>
</tr>
<tr>
<td>昨日发贴 <span class="bold">$postdata[0]</span> 篇</td>
<td>帖子总数 <span class="bold">$posts</span> 篇</td>
</tr>
<tr>
<td>最高发贴 <span class="bold">$postdata[1]</span> 篇</td>
<td>在线运行 <span class="bold">$build_days</span> 天</td>
</tr>
<tr>
<td>目前社区中{lang total}有<span class="bold"><font color=red>$onlinenum</font></span>人在线</td>
</tr>
</table>
</td>
<td valign="middle" bgcolor=#FFFFFF onMouseOver=this.style.backgroundColor='#F7F8F8' onMouseOut=this.style.backgroundColor='#FFFFFF' class="altbg2" style="border:1px solid #BBE9FF;">
<DIV ALIGN="CENTER">
<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH="110" HEIGHT="105">
<PARAM NAME=movie VALUE="images/Clock.swf"> <PARAM NAME=quality VALUE=high><PARAM NAME="wmode" VALUE="transparent">
<EMBED SRC="images/Clock.swf" QUALITY=high
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
TYPE="application/x-shockwave-flash" WIDTH="100" HEIGHT="100" WMODE="transparent"></EMBED>
</OBJECT> </DIV>
</td>
</td>
<tr class="altbg2" align="center">
<td colspan="3" align="center">
<a href="index.php">回到首页</a> <font face=Wingdings color=#5CA408>v</font><a href="search.php?srchfrom=$newthreads&searchsubmit=yes"> {lang show_newthreads}</a> <font face=Wingdings color=#5CA408>v</font>
<!--{if $discuz_uid}-->
<a href="search.php?srchuid=$discuz_uid&mytopics=yes&searchsubmit=yes">{lang show_mytopics}</a> <font face=Wingdings color=#5CA408>v</font>
<a href="my.php?item=reward&type=question">我的悬赏</a> <font face=Wingdings color=#5CA408>v</font>
<a href="my.php?item=activities&type=orig&ended=no">我的活动</a> <font face=Wingdings color=#5CA408>v</font>
<!--{if $allowuseblog}-->
<a href="space.php?uid=$discuz_uid" target="_blank">个人空间</a> <font face=Wingdings color=#5CA408>v</font>
<!--{/if}-->
<!--{/if}-->
<a href="digest.php">查看精华</a> <font face=Wingdings color=#5CA408>v</font>
<a href="member.php?action=markread">{lang mark_read}</a> <font face=Wingdings color=#5CA408>v</font>
<a href="member.php?action=list">用户列表</a></td>
</table>
</div>
<br>
3、更新缓存,OK啦。
看看效果吧。
[ 本帖最后由 水月无痕 于 2007-9-17 22:14 编辑 ] |