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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

首页n格的问题整理与解决[最后更新:2007.11.05 JS调用附件]

[复制链接]
ccvsn.com 发表于 2007-7-10 00:23:07 | 显示全部楼层
你真太伟大了 哈哈 搞定
回复

使用道具 举报

懒懒的猫 发表于 2007-7-10 11:49:35 | 显示全部楼层
原帖由 习明 于 2007-7-9 21:14 发表
手工修改include/toplist_cache.php
$query = $db->query("SELECT
f.aid, f.attachment, f.isimage, f.filesize, t.dateline,t.tid,t.subject,t.author,t.highlight,t.authorid,t.views,t.replies,t.lastpos ...


先谢谢了...马上去试

===============
已经好了,谢谢了!

[ 本帖最后由 懒懒的猫 于 2007-7-10 13:15 编辑 ]
回复

使用道具 举报

PHPGene 发表于 2007-7-10 18:10:52 | 显示全部楼层
回复

使用道具 举报

逝水 发表于 2007-7-10 21:01:46 | 显示全部楼层
//最新话题 toplist by mousecat starts//
$hack_cut_str =28; //修改标题显示字数
$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;
}
//最新话题 toplist by mousecat ends//

要隐藏某版的帖子....是不是直接在 AND f.fid=t.fid 后面直接加  AND f.fid NOT IN (1,2)  ????  (1,2) 是替换成不要显示的版块的fid?
偶是小白 哥哥说详细点~~谢谢:)
回复

使用道具 举报

习明 发表于 2007-7-10 21:13:35 | 显示全部楼层

回复 #154 逝水 的帖子

回答正确
回复

使用道具 举报

ccvsn.com 发表于 2007-7-11 06:51:08 | 显示全部楼层
完了出问题了 习明大哥 我把热门帖子改成 发帖排行以后 开始还好好的 过了6-7个小时后突然出问题首页不能访问了别的页面都可以访问 给你看截图 我修改的方法用的是这样的
在index.php中找复制内容到剪贴板代码:
$threads = $posts = $todayposts = $fids = $announcepm = 0;在下面加入
//今日发贴排行
$tomonth=date(n);
$todate=date(j);
$toyear=date(Y);
$time=mktime(0,0,0,$tomonth,$todate,$toyear);
$query=$db->query("select count(pid) as num,authorid,author from $tablepre"."posts where dateline>=$time group by authorid order by num desc limit 0,10");
while($result=$db->fetch_array($query)){
$poststar.="<img src=images/bullet.gif border=0><a href=viewpro.php?uid=".$result[authorid].">".$result[author]."</a><font align=right>".$result[num]."</font><br>";
}
//今日发贴排行
然后在你的toplist.htm
<!--{loop $new_hot_threadlist $mthread}-->
<img src="images/bullet.gif" border="0"><a href="viewthread.php?tid=$mthread[tid]" $mthread['highlight'] title="热门话题 {LF}所在论坛: $mthread[forumname]{LF}主题标题: $mthread[subject]{LF}主题作者: $mthread[author]{LF}发表时间: $mthread[date]{LF}浏览次数: $mthread[views] 次{LF}回复次数: $mthread[replies] 次{LF}最后回复: $mthread[lastreplytime]{LF}{lang lastpost}: $mthread[lastposter]" >$mthread[view_subject]</a><br>
<!--{/loop}-->
把它替换成
$poststar
这样应该就可以了!LZ试试看吧,希望能够帮得上你!^_^
记得把toplist.htm中的“论坛最热的主题”改成“今日发帖排行”!^_^
这个就是我从论坛里找到的帖子教的方法 习明大哥帮看看我问题出在哪里 在说一下 是修改好以后可以用 但是过了大概6个小时以后出的问题 ,然后我换成原来的首页没修改过以前的就可正常访问 只要用这个修改过的就显示上图上的情况

用的方法也就是这个帖子第一页推荐的方法 https://discuz.dismall.com/viewth ... p;page=1#pid5110414

[ 本帖最后由 ccvsn.com 于 2007-7-11 08:56 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

习明 发表于 2007-7-11 09:07:27 | 显示全部楼层
数据库损坏或者服务器问题
https://discuz.dismall.com/viewth ... amp;page=1#pid41053

[ 本帖最后由 习明 于 2007-7-11 09:09 编辑 ]
回复

使用道具 举报

ccvsn.com 发表于 2007-7-11 09:34:57 | 显示全部楼层
习明大哥 我疯掉了 一个问题没解决另外一个又出来了晕 先说这个吧 我换了以前的首页文件为什么就可以打开了呢 没有提示1030错误了 换成新改的就不行

另外现在我论坛有一个版主发的帖子 他打不开 我也打不开 删不掉 移动不了 晕 别的帖子都正常  提示的都是1030和1062错误 我截图已经发上来了 在另外一个帖子里 地址是https://discuz.dismall.com/viewth ... e%3D1&frombbs=1 请习明大哥在帮我看看
回复

使用道具 举报

RobertRedford 发表于 2007-7-11 13:47:46 | 显示全部楼层

[5.5] 求助!!!! 此首頁四格隱藏指定板面的方法

[5.5] 求助!!!! 此首頁四格隱藏指定板面的方法
我裝的是這個首頁四格:
[插件] 首页四格(访客信息+论坛信息+最新发表+最新回复)for DZ5.5 by enbony

有沒有人能告訴我如何隱藏指定板面讓該板面的文章不會在首頁四格裡出現?
拜託拜託高手們幫忙
謝謝!!

[ 本帖最后由 RobertRedford 于 2007-7-11 13:49 编辑 ]
回复

使用道具 举报

习明 发表于 2007-7-11 13:49:14 | 显示全部楼层

回复 #159 RobertRedford 的帖子

如果你进这个帖子就是为了回复提出问题 我很遗憾 前面总结的内容就丝毫不能帮助你么?
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-22 07:30 , Processed in 0.216610 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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