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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[发布] TOPLIST_首页四格_全Cache版FOR DZ5,DZ5.5完全正式修正版本

[复制链接]
zsc1980 发表于 2007-3-19 15:23:47 | 显示全部楼层
装完更新缓存出错  可能我数据库版本太低了? 4.021
回复

使用道具 举报

dk97531 发表于 2007-3-19 15:34:14 | 显示全部楼层
问下Cache版 是什么意思.  谢谢
回复

使用道具 举报

seasky0524 发表于 2007-3-21 14:02:00 | 显示全部楼层
少文件啊
/forumdata/cache/cache_toplist.php
我去你演示站点下了个^
回复

使用道具 举报

bd45037811 发表于 2007-3-22 02:01:04 | 显示全部楼层
   
回复

使用道具 举报

sldmz521 发表于 2007-3-26 22:24:47 | 显示全部楼层
1. 上传附件到论坛的模板目录中的缺省模板目录 这是哪个目录啊
回复

使用道具 举报

my0888 发表于 2007-3-27 19:39:03 | 显示全部楼层
纯支持。太麻烦。。。。。。。
回复

使用道具 举报

寒江 发表于 2007-3-29 01:23:27 | 显示全部楼层
是呀,,要是有一格能换成显示最新图片就好了,,,,
回复

使用道具 举报

icerainy 发表于 2007-3-29 02:45:33 | 显示全部楼层
隐藏版块

修改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, 10";
  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, 10";
  11.                         break;
  12.                 case 'topdigest':
  13.                         $table = 'threads t';
  14.                         $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';
  15.                         $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE digest>0 ORDER BY rand() LIMIT 0, 10";
  16.                         break;
  17.                
  18.                 case 'topviews':
  19.                         $table = 'threads t';
  20.                         $view = rand(1,3)==1 ? 'views' : 'replies';
  21.                         $cols = 't.tid, t.fid, t.author, t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight, f.name';
  22.                         $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE t.displayorder!='-1' ORDER BY t.$view DESC LIMIT 0, 10";
  23.                         break;

  24.                 //首页四格TOPLIST_CACHE版, 黄金俱乐部完善 代码尾
复制代码



修改成

  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,

  5. f.name';
  6.                         $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE t.displayorder!='-1' and f.fid!

  7. ='1' and f.fid!='2' ORDER BY t.dateline DESC LIMIT 0, 10";
  8.                         break;


  9.                 case 'newreply':
  10.                         $table = 'threads t';
  11.                         $cols = 't.tid, t.fid, t.author, t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight,

  12. f.name';
  13.                         $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE t.replies>0 and

  14. t.displayorder!='-1' and f.fid!='1' and f.fid!='2' ORDER BY t.lastpost DESC LIMIT 0, 10";
  15.                         break;
  16.                 case 'topdigest':
  17.                         $table = 'threads t';
  18.                         $cols = 't.tid, t.fid, t.author, t.subject, t.digest, t.dateline, t.lastpost, t.lastposter, t.views, t.replies,

  19. t.highlight, f.name';
  20.                         $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE digest>0 and f.fid!='1' and

  21. f.fid!='2' ORDER BY rand() LIMIT 0, 10";
  22.                         break;
  23.                
  24.                 case 'topviews':
  25.                         $table = 'threads t';
  26.                         $view = rand(1,3)==1 ? 'views' : 'replies';
  27.                         $cols = 't.tid, t.fid, t.author, t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies, t.highlight,

  28. f.name';
  29.                         $conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid WHERE t.displayorder!='-1' and f.fid!

  30. ='1' and f.fid!='2' ORDER BY t.$view DESC LIMIT 0, 10";
  31.                         break;

  32.                 //首页四格TOPLIST_CACHE版, 黄金俱乐部完善 代码尾
复制代码



其中的12是需要隐藏的版块FID

[ 本帖最后由 icerainy 于 2007-3-29 03:01 编辑 ]
回复

使用道具 举报

 楼主| Salty 发表于 2007-3-30 22:16:53 | 显示全部楼层
原帖由 icerainy 于 2007-3-29 02:45 发表
隐藏版块

修改include/cache.func.php

将原来的

//首页四格TOPLIST_CACHE版_黄金俱乐部完善,代码首
                case 'newthread':
                        $table = 'threads t';
          ...

不错的改进。

但我在更新缓存时没有通过。

所以,请有经验的同志再继续试验。

Time: 2007-3-30 10:04pm
Script: /forum/admincp.php

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 f.fid!

='1' and f.fid!='13' ORDER BY t.dateline DESC LIMIT 0, 10
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '!

='1' and f.fid!='13' ORDER BY t.dateline DESC LIMIT 0, 10'
Errno.: 1064

Similar error report has beed dispatched to administrator before.
回复

使用道具 举报

 楼主| Salty 发表于 2007-3-30 22:19:45 | 显示全部楼层
原帖由 sldmz521 于 2007-3-26 22:24 发表
1. 上传附件到论坛的模板目录中的缺省模板目录 这是哪个目录啊

晕S,解决了?

Templates/default
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-6-20 03:40 , Processed in 0.127502 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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