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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[插件] 首頁四格""天空""版 for D4 [轉]

[复制链接]
MacauNet 发表于 2005-12-16 14:43:17 | 显示全部楼层 |阅读模式
首页四格 for D4 [转] 简体版
https://discuz.dismall.com/viewthread.php?tid=205753&extra=page%3D1

作者 : deadxp

1‧在index.php找

  1. } else {
  2.         $showoldetails = false;
  3. }
复制代码


下面加上

  1. //首頁熱門貼 Start
  2. $hack_subject_len=34; //每個標題最多顯示得字數
  3. $hack_subject_num=10; //需要顯示記錄數
  4. //最新貼
  5. $query = $db->query("SELECT dateline,tid,subject,author,views,replies FROM {$tablepre}threads ORDER BY dateline DESC LIMIT 0, $hack_subject_num");
  6. while($thread = $db->fetch_array($query)) {
  7.          $thread[subject0]=$thread[subject];
  8.         $thread['subject'] = cutstr($thread['subject'], $hack_subject_len);
  9.         $hack_newthreads_threadlist[] = $thread;
  10. }


  11. $threadview = $threadreply = array();

  12. //最新回覆
  13. $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");
  14.         while($thread = $db->fetch_array($query)) {
  15.                  $thread[subject0]=$thread[subject];
  16.                 $thread[subject] = cutstr($thread[subject], $hack_subject_len);
  17.                 $threadreply[] = $thread;
  18.         }
  19. //首頁熱門貼 End
复制代码


再找

  1. $newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
复制代码


下面加上

  1. $today  = mktime (0,0,0,date("m")  ,date("d"),date("Y"));
  2. $build_date = mktime (0,0,0,11,20,2005);//請修改後面的三個數字,分別代表你論壇運行第一天的月,日,年。
  3. $build_days = (int)(($today-$build_date)/(24*3600));
复制代码


2‧在index.htm 找

  1. <!--{if !empty($newpmexists)}-->
  2.         {template pmprompt}
  3. <!--{/if}-->
复制代码


下面加上

  1. {template hot_topics}
复制代码


再找

  1. <table cellspacing="{TABLESPACE}" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center" class="outertxt">
  2. <tr><td class="smalltxt">
  3. {lang timenow} $currenttime, {lang your_lastvisit} $lastvisittime<br>
  4. {lang credits}: <span class="bold">$credits</span>&nbsp;
  5. <!--{loop $extcredits $id $credit}-->
  6.         $credit[title]: <span class="bold">$GLOBALS[extcredits.$id]</span>$credit[unit]&nbsp;
  7. <!--{/loop}-->
  8. / {lang index_status}:
  9. <!--{if $validdays}--><a href="member.php?action=groupexpiry"><span class="bold">$grouptitle</span>($validdays)</a><!--{else}--><span class="bold">$grouptitle</span><!--{/if}-->
  10. <!--{if !empty($invisible)}--> / {lang login_invisible_mode}<!--{/if}-->
  11. </td><td align="right" nowrap class="smalltxt">
  12. <a href="search.php?srchfrom=$newthreads&searchsubmit=yes">{lang show_newthreads}</a> |
  13. <!--{if $discuz_uid}-->
  14.         <a href="search.php?srchuid=$discuz_uid&mytopics=yes&searchsubmit=yes">{lang show_mytopics}</a> |
  15.         <!--{if $allowuseblog}-->
  16.                 <a href="blog.php?uid=$discuz_uid" target="_blank">{lang blog}</a> |
  17.         <!--{/if}-->
  18. <!--{/if}-->
  19. <a href="digest.php">{lang digest}</a> |
  20. <a href="member.php?action=markread">{lang mark_read}</a>
  21. | {lang welcome_newmember} <a href="viewpro.php?username=$memberenc"><span class="bold">$lastmember</span></a><br>
  22. {lang total} <span class="bold">$threads</span> {lang index_threads} / <span class="bold">$posts</span> {lang index_posts} / {lang index_today} <span class="bold">$todayposts</span> {lang index_posts} / <span class="bold">$totalmembers</span> {lang index_members}
  23. </td></tr></table>
复制代码


全部刪除

上傳hot_topics.htm到./templates/default 完成

[ 本帖最后由 MacauNet 于 2005-12-16 17:44 编辑 ]

评分

1

查看全部评分

 楼主| MacauNet 发表于 2005-12-16 14:43:54 | 显示全部楼层

演示

演示演示演示
回复

使用道具 举报

martha 发表于 2005-12-16 14:44:06 | 显示全部楼层
什么样子的?
回复

使用道具 举报

martha 发表于 2005-12-16 14:45:40 | 显示全部楼层
好漂亮,我喜欢!!!
回复

使用道具 举报

比翼鸟 发表于 2005-12-16 14:46:46 | 显示全部楼层
极品!!!!!!
回复

使用道具 举报

 楼主| MacauNet 发表于 2005-12-16 14:50:39 | 显示全部楼层
原帖由 比翼鸟 于 2005-12-16 14:46 发表
极品!!!!!!


等加分..
回复

使用道具 举报

 楼主| MacauNet 发表于 2005-12-16 14:51:07 | 显示全部楼层
原帖由 martha 于 2005-12-16 14:44 发表
什么样子的?


看演示...
回复

使用道具 举报

bobobbs 发表于 2005-12-16 14:51:38 | 显示全部楼层
这个是繁体的啊!有没有简体的?
回复

使用道具 举报

xjbl 发表于 2005-12-16 14:55:51 | 显示全部楼层
哦,只看...
回复

使用道具 举报

freddy 发表于 2005-12-16 14:58:00 | 显示全部楼层
我压根就不明白那个搜索是怎么做出来的
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-19 07:02 , Processed in 0.117595 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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