帖子菜单

HYBBS 官方博客模板

admin 2016-7-21

QQ截图20160721180300.jpg

QQ截图20160721180422.jpg

模板使用了额外的 hook 可以从中学习 如何调用额外的数据 输出到 模板的!

//<?

$lib_new_post_data = (array)$this->CacheObj->get('lib_new_post_data');
if(empty($lib_new_post_data) || DEBUG){
	$inc = get_plugin_inc('lib_new_post_data');
	$lib_new_post_data	 = M("Thread")->select('*',array("ORDER" => "btime DESC","LIMIT" => array(0, $inc['size'])));
	$this->CacheObj->set('lib_new_post_data',$lib_new_post_data);
}
$this->v('lib_new_post_data',$lib_new_post_data);

$lib_new_image_data = (array)$this->CacheObj->get('lib_new_image_data');

if(empty($lib_new_image_data) || DEBUG){
	$inc = get_plugin_inc('lib_new_image_data');
	$lib_new_image_data	 = M("Thread")->select('*',array('img[!]'=>'',"ORDER" => "id DESC","LIMIT" => array(0, $inc['size'])));
	$this->CacheObj->set('lib_new_image_data',$lib_new_image_data);
}
$this->v('lib_new_image_data',$lib_new_image_data);


$lib_top_post_data = (array)$this->CacheObj->get('lib_top_post_data');

if(empty($lib_top_post_data) || DEBUG){
	$inc = get_plugin_inc('lib_top_post_data');
	$lib_top_post_data	 = M("Thread")->select('*',array("ORDER" => "posts DESC","LIMIT" => array(0, $inc['size'])));
	$this->CacheObj->set('lib_top_post_data',$lib_top_post_data);
}
$this->v('lib_top_post_data',$lib_top_post_data);

QQ截图20160721180540.jpg


john52

# 1楼 2016-7-21 点评

QQ截图20160721221713.png


这个怎么解决

達也

# 2楼 2016-7-21 点评

同樣,DEBUG模式開著正常,一關掉就顯示分類已被刪除。

fghb1029

# 3楼 2017-4-15 点评

官方博客用的是wordpress程序?


这个博客的模板在那里下载的?

踩 (0)
赞 (0)
查看 (6694)
登陆后才可发表内容