private function _get_content_types() { if (!is_array($this->_content_types)) { // get the standard ones. $content_types = $this->_get_std_content_types(); $this->_content_types = $content_types; // get the list of modules that have content types. // and load them. content types from modules are // registered in the constructor. $module_list = module_meta::get_instance()->module_list_by_method('HasContentType'); if (is_array($module_list) && count($module_list)) { foreach ($module_list as $module_name) { cms_utils::get_module($module_name); } } } return $this->_content_types; }
break; } } $smarty->assign('mod', $mod); $modules = ModuleOperations::get_instance()->get_modules_with_capability('search'); if (is_array($modules) && count($modules)) { $tmp = array(); $tmp['-1'] = lang('none'); for ($i = 0; $i < count($modules); $i++) { $tmp[$modules[$i]] = $modules[$i]; } $smarty->assign('search_modules', $tmp); } $smarty->assign('languages', get_language_list()); $smarty->assign('templates', $templates); $tmp = module_meta::get_instance()->module_list_by_method('IsWYSIWYG'); $tmp2 = array(-1 => lang('none')); for ($i = 0; $i < count($tmp); $i++) { $tmp2[$tmp[$i]] = $tmp[$i]; } $smarty->assign('wysiwyg', $tmp2); if ($dir = opendir(dirname(__FILE__) . "/themes/")) { $themes = array(); while (($file = readdir($dir)) !== false) { if (@is_dir("themes/" . $file) && $file[0] != '.' && @is_readable("themes/{$file}/{$file}Theme.php")) { $themes[$file] = $file; } } $smarty->assign('themes', $themes); $smarty->assign('logintheme', get_site_preference('logintheme', 'default')); }
} $smarty = cmsms()->GetSmarty(); $contentops = cmsms()->GetContentOperations(); $smarty->assign('SECURE_PARAM_NAME', CMS_SECURE_PARAM_NAME); // Assigned at include.php? $smarty->assign('CMS_USER_KEY', $_SESSION[CMS_USER_KEY]); // Assigned at include.php? # WYSIWYG editor $tmp = module_meta::get_instance()->module_list_by_method('IsWYSIWYG'); $tmp2 = array(-1 => lang('none')); for ($i = 0; $i < count($tmp); $i++) { $tmp2[$tmp[$i]] = $tmp[$i]; } $smarty->assign('wysiwyg_opts', $tmp2); # Syntaxhighlighter editor $tmp = module_meta::get_instance()->module_list_by_method('IsSyntaxHighlighter'); $tmp2 = array(-1 => lang('none')); for ($i = 0; $i < count($tmp); $i++) { $tmp2[$tmp[$i]] = $tmp[$i]; } $smarty->assign('syntax_opts', $tmp2); # Admin themes $smarty->assign('themes_opts', CmsAdminThemeBase::GetAvailableThemes()); # Modules $allmodules = ModuleOperations::get_instance()->GetInstalledModules(); $modules = array(); foreach ((array) $allmodules as $onemodule) { $modules[$onemodule] = $onemodule; } #Tabs $smarty->assign('tab_start', $themeObject->StartTabHeaders() . $themeObject->SetTabHeader('maintab', lang('useraccount'), 'maintab' == $tab ? true : false) . $themeObject->SetTabHeader('advancedtab', lang('userprefs'), 'advtab' == $tab ? true : false) . $themeObject->EndTabHeaders() . $themeObject->StartTabContent());
/** * Returns an array of installed modules that have a certain capabilies * This method will force the loading of all modules regardless of the module settings. * * @param string $capability The capability name * @param mixed $args Capability arguments * @return array List of all the module objects with that capability */ public static function get_modules_with_capability($capability, $args = '') { if (!is_array($args)) { if (!empty($args)) { $args = array($args); } else { $args = array(); } } return module_meta::get_instance()->module_list_by_capability($capability, $args); }