public function monitor_change($theme) { $config_file_path = vmc::get_themes_root_dir() . '/' . $theme . '/config.xml'; $last_modify_time = filemtime($config_file_path); if (!$last_modify_time) { return false; } $exist_last_time = app::get('site')->getConf($theme . '_theme_last_config'); $exist_last_time = $exist_last_time ? $exist_last_time : 0; if ($exist_last_time - $last_modify_time == 0) { return true; } else { app::get('site')->setConf($theme . '_theme_last_config', $last_modify_time); } $config_xml_content = file_get_contents($config_file_path); if ($config_xml_content) { $theme_info = vmc::singleton('site_utility_xml')->xml2arrayValues($config_xml_content); } if (empty($theme_info)) { return false; } $config = $theme_info; $theme_sdf = array('theme_id' => $config['theme']['id']['value'], 'theme_dir' => $theme, 'name' => $config['theme']['name']['value'], 'version' => $config['theme']['version']['value'], 'info' => $config['theme']['info']['value'], 'author' => $config['theme']['author']['value'], 'config' => array()); $theme_sdf = vmc_('site', 'theme_install_config', $theme_sdf, $config); if (!vmc::singleton('site_theme_base')->update_theme($theme_sdf)) { return false; } return $theme_sdf; }
public function get_theme_dir($theme, $open_path) { return vmc_('mobile', 'theme_get_theme_dir', $theme, $open_path); }
public function print_banner() { vmc_('base', 'printf_shell_banner'); }
function get_source_code($theme, $tmpl_type) { return vmc_('mobile', 'theme_get_source_code', $theme, $tmpl_type); }
public function get_view($theme) { return vmc_('mobile', 'theme_get_view', $theme); }
protected function _get_args() { return vmc_('desktop', 'finder_get_args', $_GET); }
public function get_source_code($theme, $tmpl_type) { return vmc_('site', 'theme_get_source_code', $theme, $tmpl_type); }