Index: branches/RC/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r10761 -r10832 --- branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 10761) +++ branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 10832) @@ -1984,7 +1984,15 @@ return $list->GetFormattedTotal($this->SelectParam($params, 'field,name'), $params['function']); } - function FCKEditor($params) { + function FCKEditor($params) + { + if (file_exists(FULL_PATH.'/core/cmseditor/fckeditor.php')) { + $editor_path = 'core/cmseditor/'; + } + else { + $editor_path = 'admin/editor/cmseditor/'; + } + $params['no_special'] = 1; $value = $this->Field($params); $name = $this->InputName($params); @@ -1994,17 +2002,25 @@ $bgcolor = isset($params['bgcolor']) ? $params['bgcolor'] : $this->Application->GetVar('bgcolor'); if (!$bgcolor) $bgcolor = '#ffffff'; - include_once(FULL_PATH.'/core/cmseditor/fckeditor.php'); + include_once(FULL_PATH.'/'.$editor_path.'/fckeditor.php'); $oFCKeditor = new FCKeditor($name); - $oFCKeditor->BasePath = BASE_PATH.'/core/cmseditor/'; + $oFCKeditor->BasePath = BASE_PATH.'/'.$editor_path; $oFCKeditor->Width = $params['width'] ; $oFCKeditor->Height = $params['height'] ; $oFCKeditor->ToolbarSet = 'Advanced' ; $oFCKeditor->Value = $value ; + + if ($this->Application->isModuleEnabled('In-Portal')) { + $config_path = $this->Application->BaseURL().'kernel/admin_templates/incs/inp_fckconfig.js'; + } + else { + $config_path = $this->Application->BaseURL().'core/admin_templates/js/inp_fckconfig.js'; + } + $oFCKeditor->Config = Array( - //'UserFilesPath' => $pathtoroot.'kernel/user_files', +// 'UserFilesPath' => (defined('WRITEABLE') ? WRITEABLE : FULL_PATH.'/kernel') . '/user_files/', 'ProjectPath' => BASE_PATH.'/', - 'CustomConfigurationsPath' => $this->Application->BaseURL().'core/admin_templates/js/inp_fckconfig.js', + 'CustomConfigurationsPath' => $config_path, 'StylesXmlPath' => $theme_path.'/inc/styles.xml', 'EditorAreaCSS' => $theme_path.'/inc/style.css', 'DefaultClass' => 'Default Text',