Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F773732
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 2, 8:51 PM
Size
14 KB
Mime Type
text/x-diff
Expires
Tue, Feb 4, 8:51 PM (4 h, 2 m)
Engine
blob
Format
Raw Data
Handle
556916
Attached To
rINP In-Portal
in-portal
View Options
Index: trunk/admin/editor/editor_new.php
===================================================================
--- trunk/admin/editor/editor_new.php (revision 1758)
+++ trunk/admin/editor/editor_new.php (revision 1759)
@@ -1,209 +1,237 @@
<?php
##############################################################
##In-portal ##
##############################################################
## In-portal ##
## Intechnic Corporation ##
## All Rights Reserved, 1998-2002 ##
## ##
## No portion of this code may be copied, reproduced or ##
## otherwise redistributed without proper written ##
## consent of Intechnic Corporation. Violation will ##
## result in revocation of the license and support ##
## privileges along maximum prosecution allowed by law. ##
##############################################################
if(!strlen($pathtoroot))
{
$path=dirname(realpath(__FILE__));
if(strlen($path))
{
/* determine the OS type for path parsing */
$pos = strpos($path,":");
if ($pos === false)
{
$gOS_TYPE="unix";
$pathchar = "/";
}
else
{
$gOS_TYPE="win";
$pathchar="\\";
}
$p = $path.$pathchar;
/*Start looking for the root flag file */
while(!strlen($pathtoroot) && strlen($p))
{
$sub = substr($p,strlen($pathchar)*-1);
if($sub==$pathchar)
{
$filename = $p."root.flg";
}
else
$filename = $p.$pathchar."root.flg";
if(file_exists($filename))
{
$pathtoroot = $p;
}
else
{
$parent = realpath($p.$pathchar."..".$pathchar);
if($parent!=$p)
{
$p = $parent;
}
else
$p = "";
}
}
if(!strlen($pathtoroot))
$pathtoroot = ".".$pathchar;
}
else
{
$pathtoroot = ".".$pathchar;
}
}
$sub = substr($pathtoroot,strlen($pathchar)*-1);
if($sub!=$pathchar)
{
$pathtoroot = $pathtoroot.$pathchar;
}
//echo $pathtoroot;
require_once($pathtoroot."kernel/startup.php");
//admin only util
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
require_once ($pathtoroot.$admin."/include/elements.php");
require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once($pathtoroot.$admin."/toolbar.php");
require_once($pathtoroot.$admin."/editor/cmseditor/fckeditor.php");
$style_sheet_global = $adminURL."/include/style.css";
?>
<html>
<head>
<title>Online Editor</title>
<?php print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style_sheet_global\">\n"; ?>
<?php require_once($pathtoroot.$admin."/include/mainscript.php"); ?>
<script>
function HasParam(param)
{
// checks of parameter is passed to function (cross-browser)
return typeof(param) == 'undefined' ? false : true;
}
</script>
</head>
<body marginwidth="0" leftmargin="0" topmargin="0" marginheight="0" style="overflow:auto" onload="update_content()">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0" align="center"><tr><td align="left" valign="top">
<?php
$section=$_GET["section"];
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("select", "la_ToolTip_Select","#","swap('select','toolbar/tool_select_f2.gif');",
"swap('select', 'toolbar/tool_select.gif');",
"document.frm.submit();","tool_select.gif");
$objListToolBar->Add("cancel", "la_ToolTip_Stop","#","swap('cancel','toolbar/tool_stop_f2.gif');",
"swap('cancel', 'toolbar/tool_stop.gif');","window.close();","tool_stop.gif");
$title = "Online HTML Editor";
$objSections->SetCurrentSection($section);
print $objSections->section_header($envar,NULL,$title);
$TargetForm = $_GET["TargetForm"];
$TargetField = $_GET["TargetField"];
echo $objListToolBar->Build();
?>
<form name="frm" action="javascript:update_opener();">
<?php
$oFCKeditor = new FCKeditor('Content');
$oFCKeditor->BasePath = 'cmseditor/' ;
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '500' ;
$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() ;
?>
</FORM>
</td></tr></table>
</form>
</body>
<script>
<?php
print <<<END
function update_content()
{
if (window.opener)
{
if (!window.opener.closed)
{
bf = window.opener.document.$TargetForm;
// if (typeof (bf.$TargetField.value) != 'undefined') {
// current = bf.$TargetField.value;
// }
// else {
current = window.opener.document.getElementById('$TargetField').value;
// }
//f = document.getElementById('editform');
d = document.getElementById('Content');
d.value = current;
}
else
window.close()
}
else
window.close()
}
function update_opener()
{
d = document.getElementById('Content');
if (d.form)
if (d.form.onsubmit)
d.form.onsubmit()
if (!window.opener) return;
if (!window.opener.closed)
// if (typeof (bf.$TargetField.value) != 'undefined') {
// current = bf.$TargetField;
// }
// else {
current = window.opener.document.getElementById('$TargetField');
// }
current.value = d.value;
//alert('Setting bf.$TargetField.value to'+d.value);
window.close();
}
END;
?>
// setTimeout('update_content();',100);
</script>
</html>
Property changes on: trunk/admin/editor/editor_new.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5
\ No newline at end of property
+1.6
\ No newline at end of property
Index: trunk/admin/editor/inp_fckconfig.js
===================================================================
--- trunk/admin/editor/inp_fckconfig.js (revision 1758)
+++ trunk/admin/editor/inp_fckconfig.js (revision 1759)
@@ -1,134 +1,132 @@
-s/*
+/*
* Edited by Kostja
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fckconfig.js
* Editor configuration settings.
* See the documentation for more info.
*
* Version: 2.0 RC3
* Modified: 2005-02-27 21:31:48
*
* File Authors:
* 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 = '' ;
FCKConfig.FullPage = false ;
FCKConfig.Debug = false ;
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;
FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
// FCKConfig.Plugins.Add( 'placeholder', 'en,it' ) ;
FCKConfig.AutoDetectLanguage = true ;
FCKConfig.DefaultLanguage = 'en' ;
FCKConfig.ContentLangDirection = 'ltr' ;
FCKConfig.EnableXHTML = true ;
FCKConfig.EnableSourceXHTML = true ;
FCKConfig.FillEmptyBlocks = true ;
FCKConfig.FormatSource = true ;
FCKConfig.FormatOutput = true ;
FCKConfig.FormatIndentator = ' ' ;
FCKConfig.GeckoUseSPAN = true ;
FCKConfig.StartupFocus = false ;
FCKConfig.ForcePasteAsPlainText = true ;
FCKConfig.ForceSimpleAmpersand = false ;
FCKConfig.TabSpaces = 0;
FCKConfig.ShowBorders = true;
FCKConfig.ShowTableBorders = true;
FCKConfig.UseBROnCarriageReturn = false ;
FCKConfig.ToolbarStartExpanded = true ;
FCKConfig.ToolbarCanCollapse = true ;
//FCKConfig.ProjectPath = FCKConfig.BasePath.replace(/\/cmseditor\/editor\/$/,'');
FCKConfig.IconImagesUrl = FCKConfig.ProjectPath+'kernel/user_files/icons';
FCKConfig.ToolbarSets["Default"] = [
['Cut','Copy','Paste','PasteText','PasteWord','NewPage','SelectAll','-','Link','Unlink','Anchor','-','Image','SpecialChar','-','Find','Replace','-','Rule'],
['Source'],
'/',
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','Outdent','Indent'],
'/',
['Style','RemoveFormat']
] ;
FCKConfig.ToolbarSets["Advanced"] = [
['Cut','Copy','Paste','PasteText','PasteWord','-','NewPage','SelectAll','-','Find','Replace','-','Print','-','Link','Unlink','Anchor','Rule','-','Image','Document','Table','SpecialChar'],
'/',
['Bold','Italic','Underline','StrikeThrough','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList','Outdent','Indent','-','Subscript','Superscript','-','TextColor','BGColor','-','Undo','Redo'],
'/',
['Style','FontName','FontSize','RemoveFormat','-','SpellCheck','100%','|','Source']
] ;
FCKConfig.ToolbarSets["Basic"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
] ;
FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Select','Document','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','TableCell','Table','Form'] ;
FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ;
FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
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' ;
FCKConfig.LinkBrowser = true ;
FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'kernel/user_files' ;
FCKConfig.LinkBrowserWindowWidth = screen.width * 0.7 ; // 70%
FCKConfig.LinkBrowserWindowHeight = screen.height * 0.7 ; // 70%
FCKConfig.ImageBrowser = true ;
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Images&Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'kernel/user_files' ;
FCKConfig.ImageBrowserWindowWidth = screen.width * 0.7 ; // 70% ;
FCKConfig.ImageBrowserWindowHeight = screen.height * 0.7 ; // 70% ;
FCKConfig.DocumentBrowser = true ;
FCKConfig.DocumentBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Documents&Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'kernel/user_files' ;
FCKConfig.ImageBrowserWindowWidth = screen.width * 0.7 ; // 70% ;
FCKConfig.ImageBrowserWindowHeight = screen.height * 0.7 ; // 70% ;
FCKConfig.DocumentsServerPath = FCKConfig.ProjectPath+'kernel/user_files/Documents'
FCKConfig.StructureBrowser = true ;
FCKConfig.StructureBrowserURL = FCKConfig.ProjectPath+'/admin/index.php?t=structure/tree' ;
FCKConfig.StructureBrowserWindowWidth = screen.width * 0.5 ; // 50%
FCKConfig.StructureBrowserWindowHeight = screen.height * 0.7 ; // 70%
FCKConfig.FilesBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Files&Connector=connectors/php/connector.php&ServerPath='+FCKConfig.ProjectPath+'kernel/user_files/' ;
FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ;
FCKConfig.SmileyImages = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ;
FCKConfig.SmileyColumns = 8 ;
FCKConfig.SmileyWindowWidth = 320 ;
FCKConfig.SmileyWindowHeight = 240 ;
FCKConfig.K4Mode = 1;
\ No newline at end of file
Property changes on: trunk/admin/editor/inp_fckconfig.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.5
\ No newline at end of property
Event Timeline
Log In to Comment