::NoName Magazine 无名杂志 » Project Parasy » Sai ~ 我忘记主页哪20条新帖在哪里控制显示条数了~
本主题共有 5 条回复 | 回到顶部
#1 - 2008-4-27 21:09
soar
中国
cache.func.php
case 'newthread':
$table = 'threads t';
$cols = 't.tid, t.fid, t.author,t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies,f.name,f.board_name, mf.avatar,mf.uid';
$conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid LEFT JOIN {$tablepre}memberfields mf ON mf.uid=t.authorid WHERE t.displayorder!='-1' ORDER BY t.lastpost DESC LIMIT 0, 20";
case 'newthread':
$table = 'threads t';
$cols = 't.tid, t.fid, t.author,t.subject, t.dateline, t.lastpost, t.lastposter, t.views, t.replies,f.name,f.board_name, mf.avatar,mf.uid';
$conditions = "LEFT JOIN {$tablepre}forums f ON f.fid=t.fid LEFT JOIN {$tablepre}memberfields mf ON mf.uid=t.authorid WHERE t.displayorder!='-1' ORDER BY t.lastpost DESC LIMIT 0, 20";
#2 - 2008-4-27 21:30
Sai
桂林
最好修改parasy_json_tab.php,因为cache.func.php里面生成的缓存不止是首页要调用
CODE:
if ((!in_array($topic['fid'], $disabled_forums))) {
$i++;
if ($i < 10){
$top[$i]['tid'] = $topic['tid'];
$top[$i]['uid'] = $topic['uid'];
$top[$i]['subject'] = iconv('gbk', 'utf-8', $topic['subject']);
$top[$i]['author'] = iconv('gbk', 'utf-8', $topic['author']);
$top[$i]['author_en'] = rawurlencode($topic['author']);
$top[$i]['avatar'] = avRESIZE($topic['avatar'],'s');
$top[$i]['name'] = iconv('gbk', 'utf-8', $topic['name']);
$top[$i]['board_name'] = $topic['board_name'];
$top[$i]['lastpost'] = iconv('gbk', 'utf-8', make_descriptive_time($topic['lastpost']));
$top[$i]['replies'] = $topic['replies'];
$top[$i]['color'] = rand_color();
}
}
$i++;
if ($i < 10){
$top[$i]['tid'] = $topic['tid'];
$top[$i]['uid'] = $topic['uid'];
$top[$i]['subject'] = iconv('gbk', 'utf-8', $topic['subject']);
$top[$i]['author'] = iconv('gbk', 'utf-8', $topic['author']);
$top[$i]['author_en'] = rawurlencode($topic['author']);
$top[$i]['avatar'] = avRESIZE($topic['avatar'],'s');
$top[$i]['name'] = iconv('gbk', 'utf-8', $topic['name']);
$top[$i]['board_name'] = $topic['board_name'];
$top[$i]['lastpost'] = iconv('gbk', 'utf-8', make_descriptive_time($topic['lastpost']));
$top[$i]['replies'] = $topic['replies'];
$top[$i]['color'] = rand_color();
}
}
#5 - 2008-5-5 17:01
yuanja
地球
if ((!in_array($topic['fid'], $disabled_forums))) {
$i++;
if ($i < 10){
$top[$i]['tid'] = $topic['tid'];
$top[$i]['uid'] = $topic['uid'];
$top[$i]['subject'] = iconv('gbk', 'utf-8', $topic['subject']);
$top[$i]['author'] = iconv('gbk', 'utf-8', $topic['author']);
$top[$i]['author_en'] = rawurlencode($topic['author']);
$top[$i]['avatar'] = avRESIZE($topic['avatar'],'s');
$top[$i]['name'] = iconv('gbk', 'utf-8', $topic['name']);
$top[$i]['board_name'] = $topic['board_name'];
$top[$i]['lastpost'] = iconv('gbk', 'utf-8', make_descriptive_time($topic['lastpost']));
$top[$i]['replies'] = $topic['replies'];
$top[$i]['color'] = rand_color();
}
}
}
$i++;
if ($i < 10){
$top[$i]['tid'] = $topic['tid'];
$top[$i]['uid'] = $topic['uid'];
$top[$i]['subject'] = iconv('gbk', 'utf-8', $topic['subject']);
$top[$i]['author'] = iconv('gbk', 'utf-8', $topic['author']);
$top[$i]['author_en'] = rawurlencode($topic['author']);
$top[$i]['avatar'] = avRESIZE($topic['avatar'],'s');
$top[$i]['name'] = iconv('gbk', 'utf-8', $topic['name']);
$top[$i]['board_name'] = $topic['board_name'];
$top[$i]['lastpost'] = iconv('gbk', 'utf-8', make_descriptive_time($topic['lastpost']));
$top[$i]['replies'] = $topic['replies'];
$top[$i]['color'] = rand_color();
}
}
}