function skinTypes_PageDidLoad($page, $parameters)
 {
     $skinTypes = WFSkin::installedSkinTypes();
     $page->assign('skinTypes', $skinTypes);
     $skin = WFRequestController::sharedSkin();
     if (!empty($parameters['skinTypeName'])) {
         $skin->setDelegateName($parameters['skinTypeName']);
     }
     $page->assign('currentSkinType', $skin->delegateName());
     // show the info for the current skin delegate
     $contentInfo = array();
     foreach ($skin->namedContentList() as $contentName) {
         $contentInfo[$contentName] = print_r($skin->namedContent($contentName), true);
     }
     // get skin list for current skin type
     $skins = $skin->installedSkins();
     $page->assign('skins', $skins);
     $page->assign('namedContentInfo', $contentInfo);
     $page->assign('skinDelegateClassName', get_class($skin->valueForKey('delegate')));
 }
示例#2
0
 function dspSkinCSS_PageDidLoad()
 {
     // determine skin type/skin/theme
     $cssTemplate = $skinName = $skinThemeName = NULL;
     @(list(, , , $cssTemplate, $skinTypeName, $skinName, $skinThemeName) = split('/', $_SERVER['PATH_INFO']));
     $cssFilePath = WFWebApplication::appDirPath(WFWebApplication::DIR_SKINS) . '/' . $skinTypeName . '/' . $skinName . '/' . $cssTemplate;
     if (!file_exists($cssFilePath)) {
         header("HTTP/1.0 404 Not Found");
         exit;
     }
     // set the skin's wrapper information
     $skin =& WFRequestController::sharedSkin();
     $skin->setDelegateName($skinTypeName);
     $skin->setSkin($skinName);
     $skin->setTemplateType(SKIN_WRAPPER_TYPE_RAW);
     $skin->setValueForKey($skinThemeName, 'skinThemeName');
     // load the theme vars into our smarty for this module
     $this->requestPage->assign('skinThemeVars', $skin->valueForKey('skinManifestDelegate')->loadTheme($skinThemeName));
     $this->requestPage->assign('cssFilePath', $cssFilePath);
     $this->requestPage->assign('skinDir', $skin->getSkinDir());
     $this->requestPage->assign('skinDirShared', $skin->getSkinDirShared());
     header("Content-Type: text/css");
 }