模板DEMO站:bbs2.x4code.com 模板目前最新版本:1.3.2
需要在 帖子列表显示 精华帖和标题变色功能的 需要修改以下2处:
Action/Forum.php 大约在77行 添加
{hook a_forum_empty_41} 例:
if(empty($data) || DEBUG){
//{hook a_forum_empty_4}
$data = $Thread->read_list($pageid,$this->conf['forumlist'],$desc,$id); //$id = 分类ID
$Thread->format($data);
foreach ($data as $key => $value) {
if($value['top'] != 0)
unset($data[$key]);
}
//{hook a_forum_empty_41}
$this->CacheObj->set("forum_data_{$id}_{$pageid}_{$type}",$data);
}
Action/Index.php 大约在29行 添加 {hook a_index_index_23} 例: if(empty($data) || DEBUG){
//{hook a_index_index_22}
$data = $Thread->read_list($pageid,$this->conf['homelist'],$desc);
$Thread->format($data);
foreach ($data as $key => $value) {
if($value['top'] == 2)
unset($data[$key]);
}
//{hook a_index_index_23}
$this->CacheObj->set("index_index_".$type.'_'.$pageid,$data);
}
|