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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[修改] 首页 美化 显示最后主题/回复 For 5.0RC+4.1

[复制链接]
xzc910413 发表于 2006-8-15 12:17:16 | 显示全部楼层
谢了

   偶第一个装好的插件
回复

使用道具 举报

stbeckham 发表于 2006-8-15 15:50:44 | 显示全部楼层
5.0
我的标题出不来,空白的显示!!
求解
回复

使用道具 举报

zjhcr 发表于 2006-8-16 10:59:31 | 显示全部楼层
时间显示错误啊……显示格式成了这个样子:时间: 1155180929
回复

使用道具 举报

qiu13928 发表于 2006-8-16 11:35:23 | 显示全部楼层
不错`````瞒漂亮的````
回复

使用道具 举报

界加 发表于 2006-8-16 14:26:42 | 显示全部楼层
收藏了。
回复

使用道具 举报

chunposoft 发表于 2006-8-16 20:08:11 | 显示全部楼层
会不会太复杂了?
回复

使用道具 举报

laohe121 发表于 2006-8-16 22:40:36 | 显示全部楼层
回复

使用道具 举报

 楼主| 折翼の天使♂ 发表于 2006-8-17 23:39:41 | 显示全部楼层
喜欢要顶..
回复

使用道具 举报

星期⒈ 发表于 2006-8-18 06:25:27 | 显示全部楼层
原帖由 折翼の天使♂ 于 2006-8-9 15:59 发表



给我你的.DISCUZ.php


我的5.0的也不显示标题
  1. <?php
  2. /*
  3. [Discuz!] (C)2001-2006 Comsenz Inc.
  4. This is NOT a freeware, use is subject to license terms
  5. $RCSfile: discuz.php,v $
  6. $Revision: 1.6.2.2 $
  7. $Date: 2006/07/17 07:50:17 $
  8. */
  9. define('CURSCRIPT', 'index');
  10. require_once './include/common.inc.php';
  11. require_once DISCUZ_ROOT.'./include/forum.func.php';
  12. $discuz_action = 1;
  13. $validdays = $discuz_uid && !empty($groupexpiry) && $groupexpiry >= $timestamp ?
  14. ceil(($groupexpiry - $timestamp) / 86400) : 0;
  15. if(isset($showoldetails)) {
  16. switch($showoldetails) {
  17.   case 'no': dsetcookie('onlineindex', 0, 86400 * 365); break;
  18.   case 'yes': dsetcookie('onlineindex', 1, 86400 * 365); break;
  19. }
  20. } else {
  21. $showoldetails = false;
  22. }
  23. $currenttime = gmdate($timeformat, $timestamp + $timeoffset * 3600);
  24. $lastvisittime = gmdate("$dateformat $timeformat", $lastvisit + $timeoffset * 3600);
  25. $memberenc = rawurlencode($lastmember);
  26. $newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
  27. $navigation = $navtitle = '';
  28. $searchboxstatus = substr(sprintf('%03b', $qihoo_searchbox), -1, 1);
  29. $keywordlist = isset($qihoo_links['keywords']) ? $qihoo_links['keywords'] : '';
  30. $topiclist = isset($qihoo_links['topics']) ? $qihoo_links['topics'] : '';
  31. if($qihoo_maxtopics) {
  32. $customtopics = '';
  33. foreach(explode("\t", isset($_DCOOKIE['customkw']) ? $_DCOOKIE['customkw'] : '') as $topic) {
  34.   $topic = dhtmlspecialchars(trim(stripslashes($topic)));
  35.   $customtopics .= '<a href="topic.php?keyword='.rawurlencode($topic).'" target="_blank">'.$topic.'</a> ';
  36. }
  37. }
  38. $catlist = $forumlist = $sublist = array();
  39. $threads = $posts = $todayposts = $fids = 0;
  40. if(empty($gid)) {
  41. $announcements = $space = '';
  42. if($_DCACHE['announcements']) {
  43.   foreach($_DCACHE['announcements'] as $announcement) {
  44.    if(empty($announcement['redirect'])) {
  45.     $announcements .= $space.'<a href="announcement.php?id='.$announcement['id'].'#'.$announcement['id'].'"><span class="bold">'.$announcement['subject'].'</span> '.
  46.      '('.gmdate($dateformat, $announcement['starttime'] + $timeoffset * 3600).')</a>';
  47.    } else {
  48.     $announcements .= $space.'<a href="'.$announcement['message'].'" target="_bland"><span class="bold">'.$announcement['subject'].'</span> '.
  49.      '('.gmdate($dateformat, $announcement['starttime'] + $timeoffset * 3600).')</a>';
  50.    }
  51.    $space = '       ';
  52.   }
  53. }
  54. unset($_DCACHE['announcements']);
  55. $threads = $posts = $todayposts = 0;
  56. $sql = !empty($accessmasks) ?
  57.     "SELECT f.fid, f.fup, f.type, f.name, f.threads, f.posts, f.todayposts, f.lastpost, f.inheritedmod, f.forumcolumns, ff.description, ff.moderators, ff.icon, ff.viewperm, a.allowview FROM {$tablepre}forums f
  58.      LEFT JOIN {$tablepre}forumfields ff ON ff.fid=f.fid
  59.      LEFT JOIN {$tablepre}access a ON a.uid='$discuz_uid' AND a.fid=f.fid
  60.      WHERE f.status='1' ORDER BY f.type, f.displayorder"
  61.     : "SELECT f.fid, f.fup, f.type, f.name, f.threads, f.posts, f.todayposts, f.lastpost, f.inheritedmod, f.forumcolumns, ff.description, ff.moderators, ff.icon, ff.viewperm FROM {$tablepre}forums f
  62.      LEFT JOIN {$tablepre}forumfields ff USING(fid)
  63.      WHERE f.status='1' ORDER BY f.type, f.displayorder";
  64. $query = $db->query($sql);
  65. while($forum = $db->fetch_array($query)) {
  66.   $forumname[$forum['fid']] = strip_tags($forum['name']);
  67.   if($forum['type'] != 'group') {
  68.    $threads += $forum['threads'];
  69.    $posts += $forum['posts'];
  70.    $todayposts += $forum['todayposts'];
  71.    if($forum['type'] == 'forum') {
  72.     if(forum($forum)) {
  73.      $catlist[$forum['fup']]['forums'][] = $forum['fid'];
  74.      $forum['orderid'] = $catlist[$forum['fup']]['forumscount']++;
  75.      $forum['subforums'] = '';
  76.      $forumlist[$forum['fid']] = $forum;
  77.     }
  78.    } elseif(isset($forumlist[$forum['fup']])) {
  79.     $forumlist[$forum['fup']]['threads'] += $forum['threads'];
  80.     $forumlist[$forum['fup']]['posts'] += $forum['posts'];
  81.     $forumlist[$forum['fup']]['todayposts'] += $forum['todayposts'];
  82.     if($subforumsindex && $forumlist[$forum['fup']]['permission'] == 2) {
  83.      $forumlist[$forum['fup']]['subforums'] .= '<a href="forumdisplay.php?fid='.$forum['fid'].'"><u>'.$forum['name'].'</u></a>  ';
  84.     }
  85.    }
  86.   } else {
  87.    if(!isset($_COOKIE['discuz_collapse']) || strpos($_COOKIE['discuz_collapse'], 'category_'.$forum['fid'].' ') === FALSE) {
  88.     $forum['collapseimg'] = 'collapsed_no.gif';
  89.     $collapse['category_'.$forum['fid']] = '';
  90.    } else {
  91.     $forum['collapseimg'] = 'collapsed_yes.gif';
  92.     $collapse['category_'.$forum['fid']] = 'display: none';
  93.    }
  94.    if($forum['moderators']) {
  95.      $forum['moderators'] = moddisplay($forum['moderators'], 'flat');
  96.    }
  97.    $forum['forumscount']  = 0;
  98.    $catlist[$forum['fid']] = $forum;
  99.   }
  100. }
  101. foreach($catlist as  $catid => $category) {
  102.   if($catlist[$catid]['forumscount'] && $category['forumcolumns']) {
  103.    $catlist[$catid]['forumcolwidth'] = floor(100 / $category['forumcolumns']).'%';
  104.    $catlist[$catid]['endrows'] = '';
  105.    if($colspan = $category['forumscount'] % $category['forumcolumns']) {
  106.     while(($category['forumcolumns'] - $colspan) > 0) {
  107.      $catlist[$catid]['endrows'] .= '<td></td>';
  108.      $colspan ++;
  109.     }
  110.     $catlist[$catid]['endrows'] .= '</tr>';
  111.    }
  112.   } elseif(empty($category['forumscount'])) {
  113.    unset($catlist[$catid]);
  114.   }
  115. }
  116. if(isset($catlist[0]) && $catlist[0]['forumscount']) {
  117.   $catlist[0]['fid'] = 0;
  118.   $catlist[0]['type'] = 'group';
  119.   $catlist[0]['name'] = $bbname;
  120.   $catlist[0]['collapseimg'] = 'collapsed_no.gif';
  121. } else {
  122.   unset($catlist[0]);
  123. }
  124. foreach(array('forumlinks', 'birthdays') as $key) {
  125.   if(!isset($_COOKIE['discuz_collapse']) || strpos($_COOKIE['discuz_collapse'], $key.' ') === FALSE) {
  126.    $collapseimg[$key] = 'collapsed_no.gif';
  127.    $collapse[$key] = '';
  128.   } else {
  129.    $collapseimg[$key] = 'collapsed_yes.gif';
  130.    $collapse[$key] = 'display: none';
  131.   }
  132. }
  133. if($whosonlinestatus == 1 || $whosonlinestatus == 3) {
  134.   $whosonlinestatus = 1;
  135.   $onlineinfo = explode("\t", $onlinerecord);
  136.   $detailstatus = ((empty($_DCOOKIE['onlineindex']) && $onlineinfo[0] < 500) || (!empty($_DCOOKIE['onlineindex']) || $showoldetails == 'yes')) && $showoldetails != 'no';
  137.   if($detailstatus) {
  138.    @include language('actions');
  139.    updatesession();
  140.    $onlinenum = $membercount = $invisiblecount = 0;
  141.    $whosonline = array();
  142.    $groupids = array_keys($_DCACHE['onlinelist']);
  143.    array_shift($groupids);
  144.    $groupids = implode(',',$groupids);
  145.    if($maxonlinelist) {
  146.     if($db->version() < '4.0.0') {
  147.      $query = $db->query("SELECT uid, username, groupid, invisible, action, lastactivity, fid FROM {$tablepre}sessions WHERE groupid IN (".$groupids.") ORDER BY uid DESC LIMIT ".$maxonlinelist);
  148.      $onlinenum = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}sessions"), 0);
  149.      if($onlinenum > $maxonlinelist) {
  150.       $membercount = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}sessions WHERE uid <> '0'"), 0);
  151.       $invisiblecount = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}sessions WHERE invisible = '1'"), 0);
  152.      }
  153.     } else {
  154.      $query = $db->query("SELECT SQL_CALC_FOUND_ROWS uid, username, groupid, invisible, action, lastactivity, fid FROM {$tablepre}sessions WHERE groupid IN (".$groupids.") ORDER BY uid DESC LIMIT ".$maxonlinelist);
  155.      $onlinenum = $db->result($db->query("SELECT FOUND_ROWS()"), 0);
  156.      if($onlinenum > $maxonlinelist) {
  157.       $membercount = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}sessions WHERE uid <> '0'"), 0);
  158.       $invisiblecount = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}sessions WHERE invisible = '1'"), 0);
  159.      }
  160.     }
  161.    } else {
  162.     $query = $db->query("SELECT uid, username, groupid, invisible, action, lastactivity, fid FROM {$tablepre}sessions ORDER BY uid DESC");
  163.     $onlinenum = $db->num_rows($query);
  164.    }
  165.    while($online = $db->fetch_array($query)) {
  166.     if($online['uid']) {
  167.      if(!$maxonlinelist || $maxonlinelist && $onlinenum <= $maxonlinelist) $membercount++;
  168.      if(!$online['invisible']) {
  169.       $online['icon'] = isset($_DCACHE['onlinelist'][$online['groupid']]) ? $_DCACHE['onlinelist'][$online['groupid']] : $_DCACHE['onlinelist'][0];
  170.      } else {
  171.       if(!$maxonlinelist || $maxonlinelist && $onlinenum <= $maxonlinelist) $invisiblecount++;
  172.       continue;
  173.      }
  174.      $online['fid'] = $online['fid'] ? $forumname[$online['fid']] : 0;
  175.      $online['action'] = $actioncode[$online['action']];
  176.      $online['lastactivity'] = gmdate($timeformat, $online['lastactivity'] + ($timeoffset * 3600));
  177.      $whosonline[] = $online;
  178.     } else {
  179.      if(isset($_DCACHE['onlinelist'][7])) {
  180.       $online['icon'] = $_DCACHE['onlinelist'][7];
  181.       $online['username'] = 'Guest';
  182.       $online['fid'] = $online['fid'] ? $forumname[$online['fid']] : 0;
  183.       $online['action'] = $actioncode[$online['action']];
  184.       $online['lastactivity'] = gmdate($timeformat, $online['lastactivity'] + ($timeoffset * 3600));
  185.       $whosonline[] = $online;
  186.      }
  187.     }
  188.    }
  189.    $guestcount = $onlinenum - $membercount;
  190.    unset($online);
  191.   } else {
  192.    $query = $db->query("SELECT COUNT(*) FROM {$tablepre}sessions");
  193.    $onlinenum = $db->result($query, 0);
  194.   }
  195.   if($onlinenum > $onlineinfo[0]) {
  196.    $db->query("UPDATE {$tablepre}settings SET value='$onlinenum\t$timestamp' WHERE variable='onlinerecord'");
  197.    require_once DISCUZ_ROOT.'./include/cache.func.php';
  198.    updatecache('settings');
  199.    $onlineinfo = array($onlinenum, $timestamp);
  200.   }
  201.   $onlineinfo[1] = gmdate($dateformat, $onlineinfo[1] + ($timeoffset * 3600));
  202. } else {
  203.   $whosonlinestatus = 0;
  204. }
  205. if(!isset($_COOKIE['discuz_collapse']) || strpos($_COOKIE['discuz_collapse'], 'birthdays ') === FALSE) {
  206.   $collapse['birthdays'] = '';
  207.   $collapseimg['birthdays'] = 'collapsed_no.gif';
  208. } else {
  209.   $collapse['birthdays'] = 'display:none';
  210.   $collapseimg['birthdays'] = 'collapsed_yes.gif';
  211. }
  212. if(!isset($_COOKIE['discuz_collapse']) || strpos($_COOKIE['discuz_collapse'], 'supe_updateusers ') === FALSE) {
  213.   $collapse['supe_updateusers'] = '';
  214.   $collapseimg['supe_updateusers'] = 'collapsed_no.gif';
  215. } else {
  216.   $collapse['supe_updateusers'] = 'display:none';
  217.   $collapseimg['supe_updateusers'] = 'collapsed_yes.gif';
  218. }
  219. if($discuz_uid && $newpm) {
  220.   require_once DISCUZ_ROOT.'./include/pmprompt.inc.php';
  221. }
  222. } else {
  223. require_once DISCUZ_ROOT.'./include/category.inc.php';
  224. }
  225. include template('discuz');
复制代码
回复

使用道具 举报

无敌蛋糕 发表于 2006-8-18 23:15:04 | 显示全部楼层
4.1的 全部改了都没有用!!!怎么办????求助
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-12-23 06:25 , Processed in 0.021975 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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