本文整理汇总了PHP中blockclass_cache函数的典型用法代码示例。如果您正苦于以下问题:PHP blockclass_cache函数的具体用法?PHP blockclass_cache怎么用?PHP blockclass_cache使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了blockclass_cache函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
include_once TDISCUZ_ROOT . './source/class/class_core.php';
include_once TDISCUZ_ROOT . './source/function/function_core.php';
$cachelist = array();
$discuz =& discuz_core::instance();
$discuz->cachelist = $cachelist;
$discuz->init_cron = false;
$discuz->init_setting = false;
$discuz->init_user = false;
$discuz->init_session = false;
$discuz->init_misc = false;
$discuz->init();
$_G['siteurl'] = str_replace('source/plugin/tools/', '', $_G['siteurl']);
require_once libfile('function/cache');
updatecache();
include_once libfile('function/block');
blockclass_cache();
//note 清除群组缓存
require_once libfile('function/group');
$groupindex['randgroupdata'] = $randgroupdata = grouplist('lastupdate', array('ff.membernum', 'ff.icon'), 80);
$groupindex['topgrouplist'] = $topgrouplist = grouplist('activity', array('f.commoncredits', 'ff.membernum', 'ff.icon'), 10);
$groupindex['updateline'] = TIMESTAMP;
$groupdata = DB::fetch_first("SELECT SUM(todayposts) AS todayposts, COUNT(fid) AS groupnum FROM " . DB::table('forum_forum') . " WHERE status='3' AND type='sub'");
$groupindex['todayposts'] = $groupdata['todayposts'];
$groupindex['groupnum'] = $groupdata['groupnum'];
save_syscache('groupindex', $groupindex);
DB::query("TRUNCATE " . DB::table('forum_groupfield'));
$tpl = dir(DISCUZ_ROOT . './data/template');
while ($entry = $tpl->read()) {
if (preg_match("/\\.tpl\\.php\$/", $entry)) {
@unlink(DISCUZ_ROOT . './data/template/' . $entry);
}
示例2: add_diy_template
function add_diy_template($template, $arr)
{
global $_G;
$template = stripslashes($template);
include_once libfile('function/block');
block_parse_template($template, $arr);
$appVer = $_G['setting']['version'];
if ($appVer != 'X2') {
$arr = daddslashes($arr);
}
$hash = $arr['hash'];
$result = C::t('#sanree_brand#sanree_brand_businesses')->fix_get_block($hash);
if ($result) {
C::t('#sanree_brand#sanree_brand_businesses')->fix_update_block($hash, $arr);
} else {
C::t('#sanree_brand#sanree_brand_businesses')->fix_insert_block($arr);
}
require_once libfile('function/cache');
updatecache('blockclass');
blockclass_cache();
}