本文整理汇总了PHP中CacheControl::flushSkin方法的典型用法代码示例。如果您正苦于以下问题:PHP CacheControl::flushSkin方法的具体用法?PHP CacheControl::flushSkin怎么用?PHP CacheControl::flushSkin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CacheControl
的用法示例。
在下文中一共展示了CacheControl::flushSkin方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteSidebarModuleOrderData
function deleteSidebarModuleOrderData($dataArray, $sidebarNumber, $modulePos)
{
$gCacheStorage = globalCacheStorage::getInstance();
if (!isset($dataArray[$sidebarNumber])) {
$dataArray[$sidebarNumber] = array();
}
array_splice($dataArray[$sidebarNumber], $modulePos, 1);
CacheControl::flushSkin();
$gCacheStorage->purge();
return $dataArray;
}
示例2: setBlogDescription
function setBlogDescription($blogid, $description)
{
$context = Model_Context::getInstance();
if ($description == $context->getProperty('blog.description')) {
return true;
}
if (Setting::setBlogSettingGlobal('description', Utils_Unicode::lessenAsEncoding($description, 255)) === false) {
return false;
}
$context->setProperty('blog.description', $description);
requireModel('blog.feed');
requireLibrary('blog.skin');
clearFeed();
CacheControl::flushSkin();
return true;
}
示例3: setSkinSetting
function setSkinSetting($blogid, $setting)
{
global $skinSetting;
// Legacy global support. TODO: DELETE THIS LINE AFTER CHECK EVERY REFERENCES IN WHOLE SOURCE
importlib('blogskin');
$blogid = getBlogId();
if (strncmp($context->getProperty('skin.skin'), 'customize/', 10) == 0) {
if (strcmp($context->getProperty('skin.skin'), "customize/{$blogid}") != 0) {
return false;
}
} else {
$skinSetting['skin'] = Path::getBaseName($context->getProperty('skin.skin'));
// Legacy global support. TODO: DELETE THIS LINE AFTER CHECK EVERY REFERENCES IN WHOLE SOURCE
$context->setProperty('skin.skin', $skinSetting['skin']);
if ($context->getProperty('skin.skin') === '.' || $context->getProperty('skin.skin') === '..') {
return _t('실패 했습니다');
}
}
$skinpath = getSkinPath($context->getProperty('skin.skin'));
if (!is_dir($skinpath)) {
return _t('실패 했습니다');
}
foreach ($setting as $key => $value) {
Setting::setSkinSetting($key, $value, $blogid);
}
Setting::setSkinSetting('skin', $context->getProperty('skin.skin'), $blogid);
Setting::setBlogSetting('useMicroformat', $setting['useMicroformat'], true);
Setting::setBlogSetting('useAjaxComment', $setting['useAjaxComment'], true);
Setting::setBlogSetting('useFOAF', $setting['useFOAF'] == 1 ? 1 : 0, true);
Setting::setBlogSetting('entriesOnPage', $setting['entriesOnPage'], true);
Setting::setBlogSetting('entriesOnList', $setting['entriesOnList'], true);
CacheControl::flushCategory();
CacheControl::flushTag();
CacheControl::flushSkin();
Setting::getSkinSettings($blogid, true);
// refresh skin cache
return true;
}
示例4: handleSidebars
function handleSidebars(&$sval, &$obj, $previewMode)
{
global $service, $pluginURL, $pluginPath, $pluginName, $configVal, $configMappings;
importlib('model.blog.sidebar');
$newSidebarAllOrders = array();
// [sidebar id][element id](type, id, parameters)
// type : 1=skin text, 2=default handler, 3=plug-in
// id : type1=sidebar i, type2=handler id, type3=plug-in handler name
// parameters : type1=sidebar j, blah blah~
$sidebarCount = count($obj->sidebarBasicModules);
$sidebarAllOrders = getSidebarModuleOrderData($sidebarCount);
if ($previewMode == true) {
$sidebarAllOrders = null;
} else {
if (is_null($sidebarAllOrders)) {
$sidebarAllOrders = array();
}
}
for ($i = 0; $i < $sidebarCount; $i++) {
$str = "";
if (!is_null($sidebarAllOrders) && array_key_exists($i, $sidebarAllOrders)) {
$currentSidebarOrder = $sidebarAllOrders[$i];
for ($j = 0; $j < count($currentSidebarOrder); $j++) {
if ($currentSidebarOrder[$j]['type'] == 1) {
// skin text
$skini = $currentSidebarOrder[$j]['id'];
$skinj = $currentSidebarOrder[$j]['parameters'];
if (isset($obj->sidebarBasicModules[$skini]) && isset($obj->sidebarBasicModules[$skini][$skinj])) {
$str .= $obj->sidebarBasicModules[$skini][$skinj]['body'];
}
} else {
if ($currentSidebarOrder[$j]['type'] == 2) {
// default handler
// TODO : implement
} else {
if ($currentSidebarOrder[$j]['type'] == 3) {
// plugin
$plugin = $currentSidebarOrder[$j]['id']['plugin'];
$handler = $currentSidebarOrder[$j]['id']['handler'];
include_once ROOT . "/plugins/{$plugin}/index.php";
if (function_exists($handler)) {
$str .= "[##_temp_sidebar_element_{$i}_{$j}_##]";
$parameter = $currentSidebarOrder[$j]['parameters'];
$obj->sidebarStorage["temp_sidebar_element_{$i}_{$j}"]['plugin'] = $plugin;
$obj->sidebarStorage["temp_sidebar_element_{$i}_{$j}"]['handler'] = $handler;
$obj->sidebarStorage["temp_sidebar_element_{$i}_{$j}"]['parameters'] = $parameter;
} else {
$obj->sidebarStorage["temp_sidebar_element_{$i}_{$j}"] = "";
}
} else {
// WHAT?
}
}
}
}
} else {
$newSidebarAllOrders[$i] = array();
for ($j = 0; $j < count($obj->sidebarBasicModules[$i]); $j++) {
$str .= $obj->sidebarBasicModules[$i][$j]['body'];
array_push($newSidebarAllOrders[$i], array('type' => '1', 'id' => "{$i}", 'parameters' => "{$j}"));
}
if (!is_null($sidebarAllOrders)) {
$sidebarAllOrders[$i] = $newSidebarAllOrders[$i];
}
}
dress("sidebar_{$i}", $str, $sval);
}
if (count($newSidebarAllOrders) > 0) {
if ($previewMode == false && !is_null($sidebarAllOrders)) {
Setting::setBlogSettingGlobal("sidebarOrder", serialize($sidebarAllOrders));
CacheControl::flushSkin();
}
}
}
示例5: array
<?php
/// Copyright (c) 2004-2015, Needlworks / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
$IV = array('POST' => array('publishWholeOnRSS' => array('int', 0, 1, 'default' => 0), 'publishEolinSyncOnRSS' => array('int', 0, 1, 'default' => 0), 'entriesOnRSS' => array('int', 'default' => 5), 'commentsOnRSS' => array('int', 'default' => 5), 'useFeedViewOnCategory' => array('int', 0, 1, 'default' => 1), 'rssURL' => array('url', 'mandatory' => false), 'atomURL' => array('url', 'mandatory' => false)));
require ROOT . '/library/preprocessor.php';
requireStrictRoute();
setCommentsOnRSS($blogid, $_POST['commentsOnRSS']);
setEntriesOnRSS($blogid, $_POST['entriesOnRSS']);
// Feed range
Setting::setBlogSettingGlobal('publishWholeOnRSS', $_POST['publishWholeOnRSS']);
Setting::setBlogSettingGlobal('publishEolinSyncOnRSS', $_POST['publishEolinSyncOnRSS']);
// Category Feed
Setting::setBlogSettingGlobal('useFeedViewOnCategory', $_POST['useFeedViewOnCategory']);
Setting::setBlogSettingGlobal('atomURL', $_POST['atomURL']);
Setting::setBlogSettingGlobal('rssURL', $_POST['rssURL']);
clearFeed();
CacheControl::flushSkin();
Respond::ResultPage(0);
示例6: setSkinSetting
function setSkinSetting($blogid, $setting)
{
global $database;
global $skinSetting;
requireLibrary('blog.skin');
$blogid = getBlogId();
if (strncmp($skinSetting['skin'], 'customize/', 10) == 0) {
if (strcmp($skinSetting['skin'], "customize/{$blogid}") != 0) {
return false;
}
} else {
$skinSetting['skin'] = Path::getBaseName($skinSetting['skin']);
if ($skinSetting['skin'] === '.' || $skinSetting['skin'] === '..') {
return _t('실패 했습니다');
}
}
$skinpath = ROOT . '/skin/blog/' . $skinSetting['skin'];
if (!is_dir($skinpath)) {
return _t('실패 했습니다');
}
foreach ($setting as $key => $value) {
Setting::setSkinSetting($key, $value, $blogid);
}
Setting::setSkinSetting('skin', $skinSetting['skin'], $blogid);
Setting::setBlogSetting('useMicroformat', $setting['useMicroformat'], true);
Setting::setBlogSetting('useAjaxComment', $setting['useAjaxComment'], true);
Setting::setBlogSetting('useFOAF', $setting['useFOAF'] == 1 ? 1 : 0, true);
Setting::setBlogSetting('entriesOnPage', $setting['entriesOnPage'], true);
Setting::setBlogSetting('entriesOnList', $setting['entriesOnList'], true);
CacheControl::flushCategory();
CacheControl::flushTag();
CacheControl::flushSkin();
Setting::getSkinSettings($blogid, true);
// refresh skin cache
return true;
}