<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://docs-old.ckeditor.com/index.php?action=history&amp;feed=atom&amp;title=FCKeditor_2.x%2FDevelopers_Guide%2FConfiguration%2FBuilt_in_File_Browser%2FNewFB_Description</id>
		<title>FCKeditor 2.x/Developers Guide/Configuration/Built in File Browser/NewFB Description - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://docs-old.ckeditor.com/index.php?action=history&amp;feed=atom&amp;title=FCKeditor_2.x%2FDevelopers_Guide%2FConfiguration%2FBuilt_in_File_Browser%2FNewFB_Description"/>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=FCKeditor_2.x/Developers_Guide/Configuration/Built_in_File_Browser/NewFB_Description&amp;action=history"/>
		<updated>2026-05-12T17:49:21Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.1</generator>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=FCKeditor_2.x/Developers_Guide/Configuration/Built_in_File_Browser/NewFB_Description&amp;diff=2156&amp;oldid=prev</id>
		<title>W.olchawa: New page: = Built in File Browser  =  The editor gives the end user the flexibility to create a custom file browser that can be integrated into it or to use the default file browser provided with th...</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=FCKeditor_2.x/Developers_Guide/Configuration/Built_in_File_Browser/NewFB_Description&amp;diff=2156&amp;oldid=prev"/>
				<updated>2008-04-11T09:40:13Z</updated>
		
		<summary type="html">&lt;p&gt;New page: = Built in File Browser  =  The editor gives the end user the flexibility to create a custom file browser that can be integrated into it or to use the default file browser provided with th...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Built in File Browser  =&lt;br /&gt;
&lt;br /&gt;
The editor gives the end user the flexibility to create a custom file browser that can be integrated into it or to use the default file browser provided with the editor. This is a powerful feature because each scenario has unique requirements and the default file browser may not always meet them.Still, the editor package offers a default implementation of the File Browser so the user has a ready-to-use file browsing component, without having to develop anything. &lt;br /&gt;
&lt;br /&gt;
In prior versions, a sample File Browser was available for each supported server side technology. The problem with this approach is that each sample had a different implementation and worked completely differently from one another. And worse, some of them were really poor. &lt;br /&gt;
&lt;br /&gt;
To solve that problem the current version offers a '''unique user interface''' that can be used by all server side languages. The user interface was developed completely using Javascript DHTML and its integration is facilitated by XML. Doing it this way allows the developer to focus on their unique file browser requirements while not worrying about the presentation (client-side) layer. &lt;br /&gt;
&lt;br /&gt;
The following graphic shows how the File Browser Integration works: &lt;br /&gt;
&lt;br /&gt;
[[Image:FCKeditor FileBrowserConnector.gif|Image:FCKeditor_FileBrowserConnector.gif]] &lt;br /&gt;
&lt;br /&gt;
The XML Response looks similar to this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;&amp;amp;nbsp;?&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;Connector command=&amp;quot;&amp;quot; resourceType=&amp;quot;&amp;quot;&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;CurrentFolder path=&amp;quot;/&amp;quot; url=&amp;quot;/path/to/file/&amp;quot; /&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;Folders&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;Folder name=&amp;quot;somefolder&amp;quot; /&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/Folders&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;Files&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;File name=&amp;quot;filename.jpg&amp;quot; size=&amp;quot;numberOfKB&amp;quot; url=&amp;quot;/path/to/file/filename.jpg&amp;quot; /&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/Files&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/Connector&amp;amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Integrating the File Browser  ==&lt;br /&gt;
&lt;br /&gt;
In order to integrate the default File Browser into your editor you need to set the connector to use your preferred server side language. By default, configuration is set-up to use the PHP connector (in version older than 2.5 the default is ASP), but you also can choose from ASP.NET, ColdFusion, Java, Lasso, Perl, PHP and Python. &lt;br /&gt;
&lt;br /&gt;
=== Version 2.2 and Higher  ===&lt;br /&gt;
&lt;br /&gt;
To change the default configuration open your fckconfig.js file and look for the '''FileBrowserLanguage''' and '''QuickUploadLanguage''' settings. Change the connector language to the appropriate setting. &lt;br /&gt;
&lt;br /&gt;
For example, to use the PHP connector, the configuration would look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;var _FileBrowserLanguage = 'php'&amp;amp;nbsp;;&lt;br /&gt;
var _QuickUploadLanguage = 'php'&amp;amp;nbsp;;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== Enabling the connector  ===&lt;br /&gt;
&lt;br /&gt;
After setting the server side language for FileBrowser and QuickUpload you must remember to enable the connector. ' &lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you won't enable the connector the upload won't work at all. &lt;br /&gt;
&lt;br /&gt;
Every server side language has its own specific connectors. They are placed in /fckeditor/editor/filemanager/connectors/(your server side language extension). Every connector has its own configuration file called config.(you server side lang extension) which allows to change several options including '''enabling'''. Below you will find information about how to enable the connector in every server side language:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==== ASP  ====&lt;br /&gt;
&lt;br /&gt;
In file '''config.asp''' find the line with '''ConfigIsEnabled''' and set it to '''True'''. The code should look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;ConfigIsEnabled = True&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== ASP.NET  ====&lt;br /&gt;
&lt;br /&gt;
In file '''config.ascx''' find function called '''CheckAuthentication()'''. This function should return '''true''' if the connector is to be enabled. &lt;br /&gt;
&lt;br /&gt;
*For testing the connector you can just use&lt;br /&gt;
&amp;lt;pre&amp;gt;private bool CheckAuthentication() &lt;br /&gt;
{&lt;br /&gt;
  return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
however we don't advise to use this method permanently because in this case you are &amp;quot;anyone&amp;quot; to upload and list the files in your server &lt;br /&gt;
&lt;br /&gt;
*The more proper way to enable the connector is implementing some kind of session validation. Even something very simple as...&lt;br /&gt;
&amp;lt;pre&amp;gt; return ( Session[ &amp;quot;IsAuthorized&amp;quot; ]&amp;amp;nbsp;!= null &amp;amp;amp;&amp;amp;amp; (bool)Session[ &amp;quot;IsAuthorized&amp;quot; ] == true );&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
where '''Session[ &amp;quot;IsAuthorized&amp;quot; ]''' is set to '''true''' as soon as user logs in your system. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== ColdFusion  ====&lt;br /&gt;
&lt;br /&gt;
In file '''config.cfm''' find the line with '''Config.Enabled''' and set it to '''true'''. The code should look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;Config.Enabled = true&amp;amp;nbsp;;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Lasso  ====&lt;br /&gt;
&lt;br /&gt;
In file '''config.lasso''' find the line with &lt;br /&gt;
&amp;lt;pre&amp;gt;var('config') = map(&lt;br /&gt;
    'Enabled' = false,&lt;br /&gt;
    .................&lt;br /&gt;
    .................&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
and change the '''Enable''' option from false to '''true'''. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Perl  ====&lt;br /&gt;
&lt;br /&gt;
Perl connector is different from other connector because it doesn't have a config file. To enable the connector look for the &amp;quot;SECURITY&amp;quot; comment in the '''connector.cgi '''file and remove or comment the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;amp;SendError( 1, 'This connector is disabled. Please check the &amp;quot;editor/filemanager/connectors/perl/connector.cgi&amp;quot; file' )&amp;amp;nbsp;;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== PHP  ====&lt;br /&gt;
&lt;br /&gt;
In the file '''config.php''' find the line with '''$Config['Enabled']''' and et it to '''true'''. The code should than look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;$Config['Enabled'] = true&amp;amp;nbsp;;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Python  ====&lt;br /&gt;
&lt;br /&gt;
In the file '''config.py''' find the line with '''Enabled''' and set it to '''True'''. The code should look like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;Enabled = False&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== Uploading Files  ==&lt;br /&gt;
&lt;br /&gt;
To upload files to the server you will also need to: &lt;br /&gt;
&lt;br /&gt;
#chmod 0777 the directory you want to upload to (insecure).&amp;lt;br&amp;gt; '''NOTE''': It is advisable to change the group ownership of the directory to the same user as apache and add group write permisions instead.&amp;lt;br&amp;gt; &lt;br /&gt;
#Set in '''$Config['UserFilesPath']''' the url relative to the web site root where the files will be stored and retrieved from the web. For example &amp;quot;/userfiles/&amp;quot; if the files are supposed to be saved and retrieved from &amp;quot;http://www.example.com/userfiles/&amp;quot;.&amp;lt;br&amp;gt; &lt;br /&gt;
#You can use the '''UserFilesAbsolutePath''' setting to specify the local path for the folder where the files will be stored, and then in UserFilesPath you can use an absolute url like &amp;lt;nowiki&amp;gt;&amp;quot;http://www.example.com/myfiles/&amp;lt;/nowiki&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Allow and deny extensions settings for filetypes  ==&lt;br /&gt;
&lt;br /&gt;
In editor/filemanager/connectors/(your server side language extension)/config.(extension) you can configure what extensions are allowed or denied for specific filetypes. &lt;br /&gt;
&lt;br /&gt;
The filetypes you can configure are: &lt;br /&gt;
&lt;br /&gt;
*Files, e.g.&amp;amp;nbsp;: 'htm', 'html', 'php', 'php3', 'php5', 'phtml', 'asp', 'aspx', 'ascx', 'jsp', 'cfm', 'cfc', 'pl', 'bat', 'exe', 'dll', 'reg', 'cgi', 'asmx' &lt;br /&gt;
*Images, e.g.&amp;amp;nbsp;: 'jpg', 'gif', 'jpeg', 'png' &lt;br /&gt;
*Flash, e.g.&amp;amp;nbsp;: 'swf' &lt;br /&gt;
*Media, e.g.&amp;amp;nbsp;: 'swf', 'fla', 'jpg', 'gif', 'jpeg', 'png', 'avi', 'mpg', 'mpeg'&lt;br /&gt;
&lt;br /&gt;
Denying extensions will show all files except for the ones with the specified extensions, while allowing extensions will show no files except for the ones with the specified extensions. To allow all extensions for a filetype, leave both of the arrays empty for that filetype. &lt;br /&gt;
&lt;br /&gt;
== Set a specific directory for each file type  ==&lt;br /&gt;
&lt;br /&gt;
In the current SVN and in 2.5 it will be possible to specify if each file type should use a custom folder using the '''FileTypesPath''' and '''FileTypesAbsolutePath'''. The QuickUpload folders can be controlled with '''QuickUploadPath''' and '''QuickUploadAbsolutePath'''. &lt;br /&gt;
&lt;br /&gt;
For versions up to 2.4.3, if you have to integrate FCKeditor in an existing project, there may be no possibility to use the standard filebrowser folders based on the filetype: ''Image'', ''Flash'', ''Media'' and ''File''. In this case, the following comment may help you: http://sourceforge.net/tracker/index.php?func=detail&amp;amp;amp;aid=1312834&amp;amp;amp;group_id=75348&amp;amp;amp;atid=543655 &lt;br /&gt;
&lt;br /&gt;
== Using the File Browser outside of FCKeditor  ==&lt;br /&gt;
&lt;br /&gt;
You can use the File Browser in your pages using this code as was described here: https://sourceforge.net/tracker/index.php?func=detail&amp;amp;amp;aid=1369609&amp;amp;amp;group_id=75348&amp;amp;amp;atid=543655 &lt;br /&gt;
&lt;br /&gt;
Download the code (''pick.js'') and put it in your website directory. You have to include this file in the page where you want to use the File Browser in. &lt;br /&gt;
&lt;br /&gt;
Example: if you put ''pick.js'' in the same directory as the file in which you refer the file browser you can put this code in your heading: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;script language=&amp;quot;JavaScript&amp;quot; src=&amp;quot;pick.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Put a button to launch the File Browser and pass the reference to the input that will receive the selected image: &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;button type=&amp;quot;button&amp;quot; onclick=&amp;quot;BrowseServer('txtId');&amp;quot;&amp;amp;gt;Pick Image&amp;amp;lt;/button&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;txtId&amp;quot;/&amp;amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
The only thing you will have to do is modify the path to the upload connector - it is currently set for the ASP.NET version. &lt;br /&gt;
&amp;lt;pre&amp;gt;// File Picker modification for FCK Editor v2.0 - www.fckeditor.net&lt;br /&gt;
// by: Pete Forde &amp;amp;lt;pete@unspace.ca&amp;amp;gt; @ Unspace Interactive&lt;br /&gt;
var urlobj;&lt;br /&gt;
function BrowseServer(obj)&lt;br /&gt;
{&lt;br /&gt;
urlobj = obj;&lt;br /&gt;
OpenServerBrowser(&lt;br /&gt;
'/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&amp;amp;amp;Connector=connectors/aspx/connector.aspx',&lt;br /&gt;
screen.width * 0.7,&lt;br /&gt;
screen.height * 0.7 )&amp;amp;nbsp;;&lt;br /&gt;
}&lt;br /&gt;
function OpenServerBrowser( url, width, height )&lt;br /&gt;
{&lt;br /&gt;
var iLeft = (screen.width - width) / 2&amp;amp;nbsp;;&lt;br /&gt;
var iTop = (screen.height - height) / 2&amp;amp;nbsp;;&lt;br /&gt;
var sOptions = &amp;quot;toolbar=no,status=no,resizable=yes,dependent=yes&amp;quot;&amp;amp;nbsp;;&lt;br /&gt;
sOptions += &amp;quot;,width=&amp;quot; + width&amp;amp;nbsp;;&lt;br /&gt;
sOptions += &amp;quot;,height=&amp;quot; + height&amp;amp;nbsp;;&lt;br /&gt;
sOptions += &amp;quot;,left=&amp;quot; + iLeft&amp;amp;nbsp;;&lt;br /&gt;
sOptions += &amp;quot;,top=&amp;quot; + iTop&amp;amp;nbsp;;&lt;br /&gt;
var oWindow = window.open( url, &amp;quot;BrowseWindow&amp;quot;, sOptions )&amp;amp;nbsp;;&lt;br /&gt;
}&lt;br /&gt;
function SetUrl( url, width, height, alt )&lt;br /&gt;
{&lt;br /&gt;
document.getElementById(urlobj).value = url&amp;amp;nbsp;;&lt;br /&gt;
oWindow = null;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
E.g. if you want to use PHP as a connector instead of ASP.NET use: &lt;br /&gt;
&amp;lt;pre&amp;gt;'/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&amp;amp;amp;Connector=connectors/php/connector.php'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>W.olchawa</name></author>	</entry>

	</feed>