Index: trunk/admin/editor/editor_new.php =================================================================== diff -u -r1735 -r1759 --- trunk/admin/editor/editor_new.php (.../editor_new.php) (revision 1735) +++ trunk/admin/editor/editor_new.php (.../editor_new.php) (revision 1759) @@ -137,14 +137,42 @@ $oFCKeditor->ToolbarSet = 'Advanced' ; $oFCKeditor->Value = '' ; $oFCKeditor->Config = Array( - 'UserFilesPath' => $pathtoroot.'kernel/user_files', + //'UserFilesPath' => $pathtoroot.'kernel/user_files', 'ProjectPath' => $objConfig->Get("Site_Path"), 'CustomConfigurationsPath' => $rootURL.'admin/editor/inp_fckconfig.js', - 'EditorAreaCSS' => $rootURL.'themes/site/inc/style.css', - 'StylesXmlPath' => '../../inp_styles.xml', + 'EditorAreaCSS' => GetThemeCSS(), + //'StylesXmlPath' => '../../inp_styles.xml', //'Debug' => 1, ); + function GetThemeCSS() + { + $query = 'SELECT LastCompiled, '.GetTablePrefix().'Stylesheets.Name as StyleName FROM '.GetTablePrefix().'Theme + LEFT JOIN '.GetTablePrefix().'Stylesheets + ON '.GetTablePrefix().'Theme.StylesheetId = '.GetTablePrefix().'Stylesheets.StylesheetId + WHERE ThemeId = 4'; + + $conn =& GetADODBConnection(); + + $res = $conn->GetRow($query); + + $last_compiled = $res['LastCompiled']; + + $style_name = strtolower( $res['StyleName'] ); + + global $pathtoroot,$rootURL; + + $css_path = $pathtoroot.'kernel/stylesheets'; + + $css_url = $rootURL.'kernel/stylesheets'; + + if( file_exists($css_path.'/'.$style_name.'-'.$last_compiled.'.css') ) + { + $ret = $css_url.'/'.$style_name.'-'.$last_compiled.'.css'; + } + return $ret; + } + echo $oFCKeditor->CreateHtml() ; ?> Index: trunk/admin/editor/inp_fckconfig.js =================================================================== diff -u -r1735 -r1759 --- trunk/admin/editor/inp_fckconfig.js (.../inp_fckconfig.js) (revision 1735) +++ trunk/admin/editor/inp_fckconfig.js (.../inp_fckconfig.js) (revision 1759) @@ -1,4 +1,4 @@ -s/* +/* * Edited by Kostja * FCKeditor - The text editor for internet * Copyright (C) 2003-2004 Frederico Caldeira Knabben @@ -20,11 +20,9 @@ * Frederico Caldeira Knabben (fredck@fckeditor.net) */ -alert('my config'); - FCKConfig.CustomConfigurationsPath = '' ; -FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ; +//FCKConfig.EditorAreaCSS = FCKConfig.ProjectPath + 'themes/site/inc/style.css' ; FCKConfig.BaseHref = '' ; @@ -97,7 +95,7 @@ FCKConfig.FontSizes = '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ; FCKConfig.FontFormats = 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ; -FCKConfig.StylesXmlPath = '../inp_styles.xml' ; +FCKConfig.StylesXmlPath = '../../inp_styles.xml' ; FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages' FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/rel/ieSpellSetup211325.exe' ;