Udalo sie rozwiazac nastepujacy problem. Posta w jezyku angielkim bo takze pisalem na forum FCK.
Kod
<?php
include("FCKeditor/fckeditor.php");
?>
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript" src="pick.js" type="text/javascript"></script>
</head>
<body>
<form action="check.php" method="post">
<?php
$oFCKeditor = new FCKeditor('copy');
$oFCKeditor->BasePath = '/Anglia/adminarea/FCKeditor/';
$oFCKeditor->Width = '600';
$oFCKeditor->Height = '400';
$oFCKeditor->Value = 'Default text in editor';
$oFCKeditor->Create();
$sValue = stripslashes( $_POST['copy'] );
?>
<tr><td class="RowEven"><input type="text" name="Thumbnail" value="" size="32" id="Thumbnail">
<a onclick="BrowseServer('Thumbnail');"><img src="FCKeditor/editor/filemanager/browser/default/images/FolderOpened.gif" alt="open fle browser" width="16" height="16" border="0"/></a></td>
</form>
</body>
</html>
You must only change name="Thumbnail" and add pick.js
Code pick.js
Kod
// File Picker modification for FCK Editor v2.0 - www.fckeditor.net
// by: Pete Forde <pete@unspace.ca> @ Unspace Interactive
var urlobj;
function BrowseServer(obj)
{
urlobj = obj;
OpenServerBrowser(
'FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/php/connector.php',
screen.width * 0.7,
screen.height * 0.7 );
}
function OpenServerBrowser( url, width, height )
{
var iLeft = (screen.width - width) / 2;
var iTop = (screen.height - height) / 2;
var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes";
sOptions += ",width=" + width;
sOptions += ",height=" + height;
sOptions += ",left=" + iLeft;
sOptions += ",top=" + iTop;
var oWindow = window.open( url, "BrowseWindow", sOptions );
}
function SetUrl( url, width, height, alt )
{
document.getElementById(urlobj).value = url;
oWindow = null;
}
Its all:) pick.js should be thja same directory where your file:)
Greeting from Poland. Please visit my site.
http://radziowi.webd.pl/anglia/Thanks!