本文整理汇总了PHP中cms_utils::get_config方法的典型用法代码示例。如果您正苦于以下问题:PHP cms_utils::get_config方法的具体用法?PHP cms_utils::get_config怎么用?PHP cms_utils::get_config使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cms_utils
的用法示例。
在下文中一共展示了cms_utils::get_config方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetCMSLinker
/**
* Get CMSLinker for TinyMCE
*
* @since 1.0
* @return string
*/
public static function GetCMSLinker()
{
$mod = cms_utils::get_module('MicroTiny');
$result = "";
$config = cms_utils::get_config();
$result .= "\n\t\t//Creates a new plugin class and a custom listbox\n\t\ttinymce.create('tinymce.plugins.CMSLinkerPlugin', {\n\t\tcreateControl: function(n, cm) {\n\t\t\tswitch (n) {\n\t\t\t\tcase 'cmslinker':\n\t\t\t\t\tvar c = cm.createMenuButton('cmslinker', {\n\t\t\t\t\t\ttitle : '" . $mod->Lang("cmsmslinker") . "',\n\t\t\t\t\t\timage : '" . $config->smart_root_url() . "/modules/MicroTiny/images/cmsmslink.gif',\n\t\t\t\t\t\ticons : false\n\t\t\t\t\t});\n\n\t\t\t\t\tc.onRenderMenu.add(function(c, m) {\n\t\t";
$content_ops = cmsms()->GetContentOperations();
$content_array = $content_ops->GetAllContent();
$level = 0;
$menu = "m";
foreach ($content_array as $one) {
if ($one->Active() != 1) {
continue;
}
if ($one->FriendlyName() == 'Separator') {
continue;
}
//print_r($one);
$thislevel = substr_count($one->Hierarchy(), ".");
//echo $thislevel.":".$level;
if ($thislevel < $level) {
$menu = substr($menu, $level - $thislevel);
$level -= $level - $thislevel;
}
//if ($thislevel==$level) {
if ($one->ChildCount() > 0) {
$menu = self::AddSub($menu, $one, $result);
$level++;
} else {
$result .= self::AddEntry($menu, $one);
}
}
$result .= "\n\t\t\t\t\t});\n\n\t\t\t\t\t// Return the new menu button instance\n\t\t\t\t\treturn c;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\t\t});\n\n\t\t// Register plugin with a short name\n\t\ttinymce.PluginManager.add('cmslinker', tinymce.plugins.CMSLinkerPlugin);\n\n\t\t";
return $result;
}