小弟我第一次发插件,也不知道其他人发过没有,希望各位DZ长辈们支持下
这个是我根据4.1的改过来的,版权不是我^_^,喜欢的就用咯~~改之前请备份好。
演示地址:http://www.whgxw.com/
1‧在index.php找
} else {
$showoldetails = false;
}
下面加上
$hack_subject_len=34; //每个标题最多显示得字数
$hack_subject_num=10; //需要显示记录数
//最新贴
$query = $db->query("SELECT dateline,tid,subject,author,views,replies FROM {$tablepre}threads ORDER BY dateline DESC LIMIT 0, $hack_subject_num");
while($thread = $db->fetch_array($query)) {
$thread[subject0]=$thread[subject];
$thread['subject'] = cutstr($thread['subject'], $hack_subject_len);
$hack_newthreads_threadlist[] = $thread;
}
$threadview = $threadreply = array();
//最新回复
$query = $db->query("SELECT replies, tid, subject,author,views,lastposter FROM {$tablepre}threads where replies !=0 ORDER BY lastpost DESC LIMIT 0, $hack_subject_num");
while($thread = $db->fetch_array($query)) {
$thread[subject0]=$thread[subject];
$thread[subject] = cutstr($thread[subject], $hack_subject_len);
$threadreply[] = $thread;
}
再找
$newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
下面加上
$today = mktime (0,0,0,date("m") ,date("d"),date("Y"));
$build_date = mktime (0,0,0,11,20,2005);//请修改后面的三个数字,分别代表你论坛运行第一天的月,日,年。
$build_days = (int)(($today-$build_date)/(24*3600));
2‧在discuz.htm 找
<!--{if !empty($newpmexists)}-->
<div style="clear: both; margin-top: 5px">
{template pmprompt}
</div>
<!--{/if}-->
下面加上
再找
<div class="right" style="line-height: 18px;">
<a href="search.php?srchfrom=$newthreads&searchsubmit=yes">{lang show_newthreads}</a> |
<!--{if $discuz_uid}-->
<!--{if $allowuseblog}-->
<a href="blog.php?uid=$discuz_uid" target="_blank">{lang blog}</a> |
<!--{/if}-->
<!--{/if}-->
<a href="digest.php">{lang digest}</a> |
<a href="member.php?action=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">$threads</span> {lang index_threads} / <span class="smalltxt">$posts</span> {lang index_posts} / {lang index_today} <span class="smalltxt">$todayposts</span> {lang index_posts}<br>
{lang total} <span class="smalltxt">$totalmembers</span> {lang index_members} / {lang welcome_newmember} <a href="viewpro.php?username=$memberenc"><span class="bold">$lastmember</span></a>
</div>
如果需要根据IP显示天气预报的请用以下代码替换,如果不需要的请全部删除
<div class="right" style="line-height: 18px;">
<tr>
<td><div class=txt><IFRAME name=I1 marginWidth=0 marginHeight=0 src="http://weather.369.com/weather.html" frameBorder=0 width=178 scrolling=no height=50></IFRAME></div>
<div></div>
<!--CS--></td>
</tr>
</div>
3.上传hot_topics.htm到./templates/default 完成
[ 本帖最后由 wh2206 于 2006-9-30 13:39 编辑 ] |