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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

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

[复制链接]
山雪 发表于 2007-10-27 22:28:43 | 显示全部楼层
我用的是无图版的4格,具体地址在这里https://discuz.dismall.com/viewth ... p;extra=&page=1
请问我如何设置私密板块(如版主区)的帖子不被“最新主题、最新回复、精华热贴、最热主题”调用
有些管理的帖子被调用标题是很尴尬的
请各位指教,多谢!
回复

使用道具 举报

习明 发表于 2007-10-27 22:35:17 | 显示全部楼层

回复 493# 的帖子

请阅读主贴
回复

使用道具 举报

山雪 发表于 2007-10-27 22:40:29 | 显示全部楼层
非常感谢习明版主的及时回复,但是我实在不懂应该如何修改
主贴我有认真阅读的,但是对于说明的“可以直接在查询里加入,AND f.fid NOT IN (1,2) 等等 ”这句我不懂如何操作
属于新手级别
还烦请告知我这个4页我应该在什么部位修改
叩谢!
回复

使用道具 举报

习明 发表于 2007-10-27 22:42:10 | 显示全部楼层

回复 491# 的帖子

https://discuz.dismall.com/viewth ... ;page=49#pid6209421
之前很多回答 先试试有没有效果再说

再次提醒大家 开这个帖子就是为了总结解决方案 如果每个人的问题我们再逐一说一遍那实在没有意义 另外就是请大家不要只把症状和自己网站地址发上来 具体装的什么N格一起提供一下
回复

使用道具 举报

习明 发表于 2007-10-27 22:42:47 | 显示全部楼层

回复 492# 的帖子

未发现所描述的问题
回复

使用道具 举报

山雪 发表于 2007-10-27 23:02:17 | 显示全部楼层
非常感谢习明版主的及时回复,但是我实在不懂应该如何修改
主贴我有认真阅读的,但是对于说明的“可以直接在查询里加入,AND f.fid NOT IN (1,2) 等等 ”这句我不懂如何操作
属于新手级别
还烦请大侠们告知我这个4页我应该在什么部位修改
叩谢!
回复

使用道具 举报

习明 发表于 2007-10-27 23:10:20 | 显示全部楼层

回复 495# 的帖子

include/cache.func.php
  1. //TOPLIST_CACHE版
  2.         case 'newthread':
  3.             $table = 'threads t';
  4.             $cols = 't.tid, t.fid, t.author, t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight, f.name';
  5.             $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE t.displayorder!='-1' ORDER BY t.dateline DESC LIMIT 0, 6";
  6.             break;

  7.         case 'newreply':
  8.             $table = 'threads t';
  9.             $cols = 't.tid, t.fid, t.author, t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight, f.name';
  10.             $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE t.replies>0 and t.displayorder!='-1'  ORDER BY t.lastpost DESC LIMIT 0, 6";
  11.             break;
  12.                         
  13.         case 'topdigest':
  14.              $table = 'threads t';
  15.              $cols = 't.tid, t.fid, t.author, t.subject, t.digest, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight, f.name';
  16.              $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE digest>0 ORDER BY rand() LIMIT 0, 6";
  17.              break;

  18.         case 'topviews':
  19.                         $table = 'threads t';
  20.                         $timestamp=time();//添加
  21.                         $ctime=$timestamp-3600*24*7;//添加 最后7是天数,自己修改        
  22.                         $view = rand(1,3)==1 ? 'views' : 'replies';
  23.                         $cols = 't.tid, t.fid, t.author, t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight, f.name';
  24.                         $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE t.displayorder!='-1' and dateline>$ctime ORDER BY t.$view DESC LIMIT 0, 6";
  25.                         break;

  26.          //TOPLIST_CACHE版
复制代码
其中所有
  1. ORDER BY
复制代码
前面加上
  1. and fid not in (1,2)
复制代码
注意加入的代码前后都需要留一个空格
回复

使用道具 举报

山雪 发表于 2007-10-28 15:34:20 | 显示全部楼层
按照习明版主的版主,我修改上传后
更新缓存的提示如下:
SQL: SELECT t.tid, t.fid, t.author, t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight, f.name FROM [Table]threads t LEFT JOIN [Table]forums f ON f.fid=t.fid WHERE t.displayorder!='-1' and fid not in (29,30,31) ORDER BY t.dateline DESC LIMIT 0, 6
Error: Column 'fid' in where clause is ambiguous
Errno.: 1052

Similar error report has beed dispatched to administrator before.

不知道是哪里的错误,烦请继续指教,多谢!
回复

使用道具 举报

习明 发表于 2007-10-28 15:37:17 | 显示全部楼层
fid 改为 f.fid
回复

使用道具 举报

山雪 发表于 2007-10-28 15:56:15 | 显示全部楼层
非常感谢习明版主的帮助,万分感谢!
DZ用自己的实际行动向我们证明我们选择DZ的明智
向习明表示一名普通会员最诚挚的谢意!

如果贵站管理员看到这个信息,也希望给予这样积极的版主表示鼓励或奖励
谢谢!
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-23 01:32 , Processed in 0.125501 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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