Index: trunk/core/units/admin/admin_tag_processor.php =================================================================== diff -u -N -r5177 -r5219 --- trunk/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 5177) +++ trunk/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 5219) @@ -7,7 +7,7 @@ $name = $this->SelectParam($params, 'name,const'); safeDefine($name, $params['value']); } - + /** * Allows to execute js script after the page is fully loaded * @@ -100,10 +100,10 @@ $module = strtolower($is_params['is_Module']); $template = $module.'/import'; $module_info = $this->Application->findModule('Name', $module); - + $item_prefix = $module_info['Var']; $pass_params = Array('m_opener' => 'd', $item_prefix.'.import_id' => 0, $item_prefix.'.import_event' => 'OnNew', 'pass' => 'm,'.$item_prefix.'.import', 'm_cat_id' => $module_info['RootCat']); - + $this->Application->Redirect($template, $pass_params); } } @@ -133,14 +133,14 @@ function DrawTree($params) { static $deep_level = 0; - + // when processings, then sort children by priority (key of children array) $ret = ''; $section_name = $params['section_name']; $params['name'] = $this->SelectParam($params, 'name,render_as,block'); $sections_helper =& $this->Application->recallObject('SectionsHelper'); $section_data =& $sections_helper->getSectionData($section_name); - + $params['children_count'] = isset($section_data['children']) ? count($section_data['children']) : 0; $params['deep_level'] = $deep_level++; $template = $section_data['url']['t']; @@ -158,33 +158,33 @@ $deep_level--; } - + return $ret; } - + function PrintSection($params) { $section_name = $params['section_name']; if ($section_name == '#session#') { $section_name = $this->Application->RecallVar('section'); } - + $sections_helper =& $this->Application->recallObject('SectionsHelper'); $section_data =& $sections_helper->getSectionData($section_name); - + $params['name'] = $this->SelectParam($params, 'name,render_as,block'); $params['section_name'] = $section_name; - + $template = $section_data['url']['t']; unset($section_data['url']['t']); - + $section_data['section_url'] = $this->Application->HREF($template, '', $section_data['url']); $ret = $this->Application->ParseBlock( array_merge_recursive2($params, $section_data) ); - + return $ret; } - + /** * Used in XML drawing for tree * @@ -199,10 +199,10 @@ if ($section_name == '#session#') { $section_name = $this->Application->RecallVar('section'); } - + $sections_helper =& $this->Application->recallObject('SectionsHelper'); $section_data =& $sections_helper->getSectionData($section_name); - + $params['name'] = $this->SelectParam($params, 'name,render_as,block'); if (!isset($section_data['children'])) { return ''; @@ -212,7 +212,7 @@ foreach ($section_data['children'] as $section_name) { $params['section_name'] = $section_name; $section_data =& $sections_helper->getSectionData($section_name); - + if (isset($section_data['tabs_only']) && $section_data['tabs_only']) { $perm_status = false; $folder_label = $section_data['label']; @@ -227,7 +227,7 @@ // no permission for all tabs -> don't display tree node either continue; } - + $params['section_name'] = $section_name; $section_data =& $sections_helper->getSectionData($section_name); $section_data['label'] = $folder_label; // use folder label in tree @@ -236,9 +236,9 @@ elseif (!$this->Application->CheckPermission($section_name.'.view', 1)) { continue; } - + $params['children_count'] = isset($section_data['children']) ? count($section_data['children']) : 0; - + $template = $section_data['url']['t']; unset($section_data['url']['t']); @@ -261,15 +261,15 @@ return preg_replace("/\r\n|\n/", '', $ret); } - + function ListSectionPermissions($params) { $section_name = isset($params['section_name']) ? $params['section_name'] : $this->Application->GetVar('section_name'); $sections_helper =& $this->Application->recallObject('SectionsHelper'); $section_data =& $sections_helper->getSectionData($section_name); - + $block_params = array_merge_recursive2($section_data, Array('name' => $params['render_as'], 'section_name' => $section_name)); - + $ret = ''; foreach ($section_data['permissions'] as $perm_name) { if (preg_match('/^advanced:(.*)/', $perm_name) != $params['type']) continue; @@ -278,21 +278,21 @@ } return $ret; } - + function ModuleInclude($params) { foreach ($params as $param_name => $param_value) { $params[$param_name] = replaceModuleSection($param_value); } - + return $this->Application->ProcessParsedTag('m', 'ModuleInclude', $params); } - + function TodayDate($params) { return date($params['format']); } - + function TreeEditWarrning($params) { $ret = $this->Application->Phrase($params['label']); @@ -303,7 +303,7 @@ $ret = str_replace('
', '\n', $ret); return $ret; } - + /** * Draws section tabs using block name passed * @@ -313,24 +313,24 @@ { $sections_helper =& $this->Application->recallObject('SectionsHelper'); $section_data =& $sections_helper->getSectionData($params['section_name']); - + $ret = ''; $block_params = Array('name' => $params['render_as']); ksort($section_data['children'], SORT_NUMERIC); foreach ($section_data['children'] as $priority => $section_name) { // if (!$this->Application->CheckPermission($section_name.'.view', 1)) continue; - + $tab_data =& $sections_helper->getSectionData($section_name); $block_params['t'] = $tab_data['url']['t']; $block_params['title'] = $tab_data['label']; $block_params['main_prefix'] = $section_data['SectionPrefix']; $ret .= $this->Application->ParseBlock($block_params); } - - + + return $ret; } - + /** * Returns list of module item tabs that have view permission in current category * @@ -351,6 +351,28 @@ } return $ret; } + + function FCKEditor($params) + { + include_once(FULL_PATH.'/admin/editor/cmseditor/fckeditor.php'); + $oFCKeditor = new FCKeditor($params['name']); + $oFCKeditor->BasePath = BASE_PATH.'/admin/editor/cmseditor/'; + $oFCKeditor->Width = $params['width'] ; + $oFCKeditor->Height = $params['height'] ; + $oFCKeditor->ToolbarSet = 'Advanced' ; + $oFCKeditor->Value = '' ; + $oFCKeditor->Config = Array( + //'UserFilesPath' => $pathtoroot.'kernel/user_files', + 'ProjectPath' => BASE_PATH.'/', + 'CustomConfigurationsPath' => $this->Application->BaseURL().'admin/editor/inp_fckconfig.js', + 'EditorAreaCSS' => $this->Application->BaseURL().'/themes/inportal_site/inc/inportal.css', //GetThemeCSS(), + //'StylesXmlPath' => '../../inp_styles.xml', +// 'Debug' => 1, + 'Admin' => 1, + ); + return $oFCKeditor->CreateHtml(); + + } } ?> \ No newline at end of file