discuz 首页四格:最新话题+最新回复+热门话题+精华文章插件_PHP教程
首页四格:最新话题+最新回复+热门话题+精华文章 for DZ5.5 正式版
适用版本: Discuz!5.5 正式版
修改难度: 易
数据库升级: 无
演示网站:http://fhxye.cn/
作者:我只是修改罢了~!!!
更新了一下,感谢[url=profile-uid-141096.html]efrog[/url]:lol
原贴:http://www.discuz.net/thread-397572-1-5.html
第一步:index.php
找到:
require_once DISCUZ_ROOT.'./include/forum.func.php';
下面加入:
require_once DISCUZ_ROOT.'./include/misc.func.php';
找到:
$newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
下面添加:
//---------------hack Meminfo start
if(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "MSIE 6.0")) {
$visitor_browser = "Internet Explorer 6.0";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "MSIE 5.5")) {
$visitor_browser = "Internet Explorer 5.5";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "MSIE 5.0")) {
$visitor_browser = "Internet Explorer 5.0";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "MSIE 4.01")) {
$visitor_browser = "Internet Explorer 4.01";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "NetCaptor")) {
$visitor_browser = "NetCaptor";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Netscape")) {
$visitor_browser = "Netscape";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Lynx")) {
$visitor_browser = "Lynx";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Opera")) {
$visitor_browser = "Opera";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Konqueror")) {
$visitor_browser = "Konqueror";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Mozilla")) {
$visitor_browser = "Mozilla";
} else {
$visitor_browser = "其它";
}
//上面的是浏览器//
if(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "NT 5.1")) {
$visitor_os = "Windows XP";
}elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "NT 5.2")) {
$visitor_os = "Windows Server 2003";
}elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "NT 5")) {
$visitor_os = "Windows 2000";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "4.9")) {
$visitor_os = "Windows ME";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "NT 4")) {
$visitor_os = "Windows NT 4.0";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "98")) {
$visitor_os = "Windows 98";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "95")) {
$visitor_os = "Windows 95";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Mac")) {
$visitor_os = "Mac";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Linux")) {
$visitor_os = "Linux";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "Unix")) {
$visitor_os = "Unix";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "FreeBSD")) {
$visitor_os = "FreeBSD";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "SunOS")) {
$visitor_os = "SunOS";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "BeOS")) {
$visitor_os = "BeOS";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "OS/2")) {
$visitor_os = "OS/2";
} elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], ";PC")) {
$visitor_os = "Macintosh";
}elseif(strpos($HTTP_SERVER_VARS[HTTP_USER_AGENT], "AIX")) {
$visitor_os = "AIX";
} else {
$visitor_os = "其他";
}
$mem_home = convertip($onlineip, $datadir = "./");
//info//
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
//新贴//
$hack_cut_str =24; //修改标题显示字数
$hack_cut_strauthor = 9;
$new_post_threadlist = array();
$nthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid'$fid' AND f.fid=t.fid ORDER BY t.dateline DESC LIMIT 0, 8");
while($nthread = $db->fetch_array($query)) {
$nthread['forumname'] = $nthread['name'];
$nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
$nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
$nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
$nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
if($nthread['highlight']) {
$string = sprintf('%02d', $nthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$nthread['highlight'] = 'style="';
$nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$nthread['highlight'] .= '"';
} else {
$nthread['highlight'] = '';
}
$new_post_threadlist[] = $nthread;
}
//新贴//
//新回覆
$hack_cut_str = 24; //修改标题显示字数
$hack_cut_strauthor = 9;
$new_reply_threadlist = array();
$rthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 ORDER BY t.lastpost DESC LIMIT 0, 8");
while($rthread = $db->fetch_array($query)) {
$rthread['forumname'] = $rthread['name'];
$rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
$rthread['view_lastposter'] = cutstr($rthread['lastposter'],$hack_cut_strauthor);
$rthread['date']= gmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
$rthread['lastreplytime']= gmdate("$dateformat $timeformat", $rthread[lastpost] + ($timeoffset * 3600));
if($rthread['highlight']) {
$string = sprintf('%02d', $rthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$rthread['highlight'] = 'style="';
$rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$rthread['highlight'] .= '"';
} else {
$rthread['highlight'] = '';
}
$new_reply_threadlist[] = $rthread;
}
//回覆//
//热帖
$hack_cut_str = 24; //修改标题显示字数
$hack_cut_strauthor = 9;
[color=red]//这个可以选择安装或者不安装//[/color]
[color=red]//热贴指定天数//[/color]
[color=red]$this_time= time();[/color]
[color=red]$sort_time = $today - ( 60*60*24*7); //7天内
[/color]$new_hot_threadlist = array();
$mthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 [color=red]and t.dateline > $sort_time[/color][b][color=red] [/color][/b]ORDER BY t.views DESC LIMIT 0, 8");
while($mthread = $db->fetch_array($query)) {
$mthread['forumname'] = $mthread['name'];
$mthread['view_subject'] = cutstr($mthread['subject'],$hack_cut_str);
$mthread['view_lastposter'] = cutstr($mthread['lastposter'],$hack_cut_strauthor);
$mthread['date']= gmdate("$dateformat $timeformat", $mthread['dateline'] + $timeoffset * 3600);
$mthread['lastreplytime']= gmdate("$dateformat $timeformat", $mthread[lastpost] + ($timeoffset * 3600));
if($mthread['highlight']) {
$string = sprintf('%02d', $mthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$mthread['highlight'] = 'style="';
$mthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$mthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$mthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$mthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$mthread['highlight'] .= '"';
} else {
$mthread['highlight'] = '';
}
$new_hot_threadlist[] = $mthread;
}
//热帖//
//精华帖
$hack_cut_str =24; //修改标题显示字数
$hack_cut_strauthor = 9;
$new_digest_threadlist = array();
$dthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE digest>'0' AND t.fid'$fid' AND f.fid=t.fid ORDER BY t.dateline DESC LIMIT 0, 8"); //修改显示帖子条数
while($dthread = $db->fetch_array($query)) {
$dthread['forumname'] = $dthread['name'];
$dthread['view_subject'] = cutstr($dthread['subject'],$hack_cut_str);
$dthread['view_author'] = cutstr($dthread['author'],$hack_cut_strauthor);
$dthread['date']= gmdate("$dateformat $timeformat", $dthread['dateline'] + $timeoffset * 3600);
$dthread['lastreplytime']= gmdate("$dateformat $timeformat", $dthread[lastpost] + ($timeoffset * 3600));
if($dthread['highlight']) {
$string = sprintf('%02d', $dthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$dthread['highlight'] = 'style="';
$dthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$dthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$dthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$dthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$dthread['highlight'] .= '"';
} else {
$dthread['highlight'] = '';
}
$new_digest_threadlist[] = $dthread;
}
//精华帖//
如果要修改调用的显示条数,则修改以下代码位置(有4处要修改)
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid'$fid' AND f.fid=t.fid ORDER BY t.dateline DESC LIMIT 0, [b][color=red]8[/color][/b]");
把8修改成你要的数目就可以了.
2./templates/default/discuz.htm
找到
下面添加:

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











DDREASE는 하드 드라이브, SSD, RAM 디스크, CD, DVD 및 USB 저장 장치와 같은 파일 또는 블록 장치에서 데이터를 복구하기 위한 도구입니다. 한 블록 장치에서 다른 블록 장치로 데이터를 복사하여 손상된 데이터 블록은 남겨두고 양호한 데이터 블록만 이동합니다. ddreasue는 복구 작업 중에 간섭이 필요하지 않으므로 완전히 자동화된 강력한 복구 도구입니다. 게다가 ddasue 맵 파일 덕분에 언제든지 중지하고 다시 시작할 수 있습니다. DDREASE의 다른 주요 기능은 다음과 같습니다. 복구된 데이터를 덮어쓰지 않지만 반복 복구 시 공백을 채웁니다. 그러나 도구에 명시적으로 지시된 경우에는 잘릴 수 있습니다. 여러 파일이나 블록의 데이터를 단일 파일로 복구

1. 오늘 Toutiao에 기사를 게시하여 어떻게 돈을 벌 수 있습니까? 오늘 Toutiao에 기사를 게시하여 더 많은 수입을 얻는 방법! 1. 기본 권익 활성화: 기사의 원본은 광고를 통해 수익을 얻을 수 있으며, 동영상은 가로 화면 모드에서 원본이어야 수익을 얻을 수 있습니다. 2. 팬 100명 권리 활성화: 팬 수가 100명 이상에 도달하면 마이크로 헤드라인, 오리지널 Q&A 작성, Q&A 수익을 얻을 수 있습니다. 3. 독창적인 작품을 고집하라: 독창적인 작품에는 기사, 마이크로 헤드라인, 질문 등이 포함되며, 300단어 이상이어야 합니다. 불법 표절 저작물을 원작으로 출판할 경우 크레딧 점수가 차감되며, 수익금도 차감되므로 주의하시기 바랍니다. 4. 수직성: 전문 분야에서 기사를 작성할 때 분야를 넘나들며 마음대로 기사를 작성할 수 없으며 적절한 추천을 받을 수 없으며, 작품의 전문성과 정확성을 확보할 수 없으며 팬을 유치하기가 어렵습니다. 그리고 독자들. 5. 활동: 높은 활동,

사용자가 Edge 브라우저를 사용할 때 더 많은 요구 사항을 충족하기 위해 일부 플러그인을 추가할 수 있습니다. 그런데 플러그인을 추가하면 해당 플러그인이 지원되지 않는다고 표시됩니다. 이 문제를 해결하는 방법은 무엇입니까? 오늘은 에디터가 세 가지 해결 방법을 알려드리겠습니다. 방법 1: 다른 브라우저를 사용해 보세요. 방법 2: 브라우저의 Flash Player가 오래되었거나 누락되어 플러그인이 지원되지 않을 수 있습니다. 공식 웹사이트에서 최신 버전을 다운로드할 수 있습니다. 방법 3: "Ctrl+Shift+Delete" 키를 동시에 누르세요. "데이터 지우기"를 클릭하고 브라우저를 다시 엽니다.

Discuz 사용자의 필수품! 소품명칭 종합분석! Discuz 포럼에서 이름 변경 기능은 항상 사용자들로부터 많은 관심과 요구를 받아왔습니다. 이름을 변경해야 하는 일부 사용자의 경우 이름 변경 소품을 사용하면 사용자 이름을 쉽게 수정할 수 있으며 이는 흥미로운 상호 작용 방법이기도 합니다. Discuz의 이름 바꾸기 소품을 얻는 방법, 사용 방법, 몇 가지 일반적인 문제에 대한 해결 방법을 포함하여 심층적으로 살펴보겠습니다. 1. 개명 소품은 Discuz에서 구입하세요. 개명 소품은 주로 포인트나 관리자를 통해 구매합니다.

이 플랫폼에서는 흥미로운 짧은 동영상을 보는 것 외에도 흥미로운 댓글을 탐색하는 것도 많은 사용자에게 즐거운 경험이 되었습니다. 재미있는 틱톡 댓글은 웃음을 유발할 뿐만 아니라 공감을 불러일으키고 때로는 콘텐츠에 반짝임을 더해주는 답글입니다. 1. Douyin 댓글에 흥미로운 답변 문장을 작성하는 방법은 무엇입니까? 1. 시사 핫스팟 통합: 시사 핫스팟은 모두의 관심의 초점입니다. 이를 댓글과 답글에 통합하면 다른 사람들의 관심을 빠르게 불러일으킬 수 있습니다. 예를 들어, Douyin의 인기 댄스 동영상에서 다음과 같이 댓글을 달 수 있습니다. "이게 우리나라에서 유행했던 '사회적 동요'인가요? 정말 활력이 넘칩니다. 이런 댓글은 유머러스하고 적절하며 사람들이 이해할 수 있습니다." 내 마음은 웃는다. 과장을 사용하는 것은 유머러스한 논평에서 흔히 사용되는 기법입니다. 사물이나 상황을 적당히 과장함으로써 리뷰를 더욱 흥미롭게 만들고

소셜 미디어가 정보로 넘쳐나는 세상에서 사람들은 자신이 플랫폼에 게시하는 콘텐츠와 다른 사람들과 상호 작용하는 방식에 점점 더 많은 관심을 기울이고 있습니다. 특정 게시물에 댓글을 남겼을 때, 작성자가 이를 삭제하면 해당 댓글이 계속 존재할 수 있는지가 뜨거운 논란이 되고 있습니다. 1. 원래 댓글이 삭제됐는데 댓글이 아직도 남아있나요? 첫째, 소셜 미디어 플랫폼이 사용자 정보와 상호 작용을 처리하는 방식에 있어 매우 유연하다는 점을 분명히 해야 합니다. 원래 댓글이 삭제되더라도 직접 연결되지 않은 것처럼 보이더라도 답변이 게시물 아래에 남아 있는 경우가 많습니다. 즉, 원래 댓글이 사라졌더라도 후속 독자는 여전히 답변을 보고 해당 답변을 기반으로 일부 정보를 추론할 수 있습니다. 따라서 원본 댓글을 삭제해도 상호작용의 흔적이 완전히 사라지지는 않습니다.

Snapdragon 프로세서는 뛰어난 성능과 안정적인 성능으로 항상 폭넓은 인정을 받아 왔으며 휴대폰, 태블릿 등 모바일 장치에서 선호되는 프로세서 중 하나입니다. 지속적인 기술 개발로 Snapdragon 프로세서도 지속적으로 업데이트되고 있으며 각각의 새로운 세대의 제품이 광범위한 관심을 끌 것입니다. 최근 한 권위 있는 기관에서 최신 Snapdragon 프로세서 순위 목록을 발표하여 사람들이 각 프로세서의 성능을 보다 명확하게 이해할 수 있도록 했습니다. 우선, 목록에 따르면 Snapdragon 8 시리즈 프로세서는 항상 가장 강력한 프로세서 중 하나였으며 시장에서 높은 인기를 얻었습니다. 최신호

"Discus 등록 프로세스에 대한 자세한 설명: 개인 정보를 쉽게 수정할 수 있도록 하기 위해 구체적인 코드 예제가 필요합니다." Discuz는 다양한 웹 사이트에서 널리 사용되는 강력한 커뮤니티 포럼 프로그램으로, 풍부한 사용자 등록 및 개인 정보 수정 기능을 제공합니다. 그리고 인터페이스. 이 글에서는 Discuz의 등록 프로세스를 자세히 소개하고, 개인 정보를 쉽게 사용자 정의하고 수정할 수 있도록 구체적인 코드 예제를 제공합니다. 1. 사용자 등록 과정 Discuz에서 사용자 등록은 등록 과정의 원활한 진행과 사이트의 중요한 기능 중 하나입니다.
