If you take a look in the connectors/php/Commands folder at FileUpload.php that is where the file is actually saved to disk, so i think that would be the best place to put your char replacement code.
I will look at including this in the new file browser,
<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* <a href="http://www.opensource.org/licenses/lgpl-license.php" target="_blank">http://www.opensource.org/licenses/lgpl-license.php</a>
*
* For further information visit:
* <a href="http://www.fckeditor.net/" target="_blank">http://www.fckeditor.net/</a>
*
* File Name: config.php
* Configuration file
*
* File Authors:
* Grant French (<a href="mailto:grant@mcpuk.net" target="_new">grant@mcpuk.net</a>)
*/
session_start();
/*------------------------------------------------------------------------------*/
/* HTTP over SSL Detection (shouldnt require changing) */
/*------------------------------------------------------------------------------*/
$fckphp_config['prot']="http";
$fckphp_config['prot'].=((isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=='on')?"s":"");
$fckphp_config['prot'].="://";
/*==============================================================================*/
/*------------------------------------------------------------------------------*/
/* The physical path to the document root, Set manually if not using apache */
/*------------------------------------------------------------------------------*/
//$fckphp_config['basedir']=$_SERVER['DOCUMENT_ROOT'];
$fckphp_config['basedir'] = '/var/www/localhost/htdocs' ;
/*==============================================================================*/
/*------------------------------------------------------------------------------*/
/* Prefix added to image path before sending back to editor */
/*------------------------------------------------------------------------------*/
$fckphp_config['urlprefix']=$fckphp_config['prot'].$_SERVER['SERVER_NAME'];
/*==============================================================================*/
/*------------------------------------------------------------------------------*/
/* Path to user files relative to the document root (no trailing slash) */
/*------------------------------------------------------------------------------*/
$fckphp_config['UserFilesPath'] = "/kartrevolution/deposito" ;
/*==============================================================================*/
/*------------------------------------------------------------------------------*/
/* Progressbar handler (script that monitors upload progress) (''=none)
/*------------------------------------------------------------------------------*/
// $fckphp_config['uploadProgressHandler']=''; //No upload progress handler
$fckphp_config['uploadProgressHandler']=$fckphp_config['prot'].$_SERVER['SERVER_NAME']."/cgi-bin/progress.cgi"; //Perl upload progress handler
/*==============================================================================*/
/*------------------------------------------------------------------------------*/
/* Authentication (auth) :- */
/* - Req :: Boolean, whether authentication is required */
/* - HandlerClass :: Name of class to handle authentication in connector */
/*------------------------------------------------------------------------------*/
$fckphp_config['auth']['Req']=false;
$fckphp_config['auth']['HandlerClass']='Default';
/*==============================================================================*/
/*------------------------------------------------------------------------------*/
/* Settings for authentication handler :- */
/* - SharedKey :: Shared encryption key (as set in test.php in example) */
/*------------------------------------------------------------------------------*/
$fckphp_config['auth']['Handler']['SharedKey']="->Shared_K3y-F0R*5enD1NG^auth3nt1caT10n'Info/To\FILE,Brow5er--!";
/*==============================================================================*/
/*------------------------------------------------------------------------------*/
/* Per resource area settings:- */
/* - AllowedExtensions :: Array, allowed file extensions (in lowercase) */
/* - AllowedMIME :: Array, allowed mime types (in lowercase) */
/* - MaxSize :: Number, Maximum size of file uploads in KBytes */
/* - DiskQuota :: Number, Maximum size allowed for the resource area */
/* - HideFolders :: Array, RegExp, matching folder names will be hidden */
/* - HideFiles :: Array, RegExp, matching file names will be hidden */
/* - AllowImageEditing :: Boolean, whether images in this area may be edited */
/*------------------------------------------------------------------------------*/
//First area options are commented
//File Area
$fckphp_config['ResourceAreas']['File'] =array(
//Files(identified by extension) that may be uploaded to this area
'AllowedExtensions' => array("zip","doc","xls","pdf","rtf","csv","jpg","gif","jpeg","png","avi","mpg","mpeg","swf","fla"),
//Not implemented yet
'AllowedMIME' => array(),
//Set the maximum single upload to this area to 2MB (2048Kb)
'MaxSize' => 2048,
//Set disk quota for this resource area to 20MB
'DiskQuota' => 20,
//By Default hide all folders starting with a . (Unix standard)
'HideFolders' => array("^\."),
//By Default hide all files starting with a . (Unix standard)
'HideFiles' => array("^\."),
//Do not allow images to be edited in this resource area
'AllowImageEditing' => false
);
//Image area
$fckphp_config['ResourceAreas']['Image'] =array(
'AllowedExtensions' => array("jpg","gif","jpeg","png","tiff","tif",),
'AllowedMIME' => array(),
'MaxSize' => 1024,
'DiskQuota' => 5,
'HideFolders' => array("^\."),
'HideFiles' => array("^\."),
'AllowImageEditing' => false //Not yet complete, but you can take a look and see
);
//Flash area
$fckphp_config['ResourceAreas']['Flash'] =array(
'AllowedExtensions' => array("swf","fla"),
'AllowedMIME' => array(),
'MaxSize' => 1024,
'DiskQuota' => 5,
'HideFolders' => array("^\."),
'HideFiles' => array("^\."),
'AllowImageEditing' => false
);
//Media area
$fckphp_config['ResourceAreas']['Media'] =array(
'AllowedExtensions' => array("swf","fla","jpg","gif","jpeg","png","avi","mpg","mpeg"),
'AllowedMIME' => array(),
'MaxSize' => 5120,
'DiskQuota' => 20,
'HideFolders' => array("^\."),
'HideFiles' => array("^\."),
'AllowImageEditing' => false
);
/*==============================================================================*/
/*------------------------------------------------------------------------------*/
/* Global Disk Quota - Max size of all resource areas */
/*------------------------------------------------------------------------------*/
$fckphp_config['DiskQuota']['Global']=50; //In MBytes (default: 50mb)
/*==============================================================================*/
/*------------------------------------------------------------------------------*/
/* Directory and File Naming :- */
/* -MaxDirNameLength :: Maximum allowed length of a directory name */
/* -DirNameAllowedChars :: Array of characters allowed in a directory name */
/* -FileNameAllowedChars :: Array of characters allowed in a file name */
/*------------------------------------------------------------------------------*/
$fckphp_config['MaxDirNameLength']=25;
$fckphp_config['DirNameAllowedChars']=array();
//Allow numbers
for($i=48;$i<58;$i++) array_push($fckphp_config['DirNameAllowedChars'],chr($i));
//Allow lowercase letters
for($i=97;$i<123;$i++) array_push($fckphp_config['DirNameAllowedChars'],chr($i));
//Allow uppercase letters
for($i=65;$i<91;$i++) array_push($fckphp_config['DirNameAllowedChars'],chr($i));
//Allow space,dash,underscore,dot
array_push($fckphp_config['DirNameAllowedChars']," ","-","_",".");
$fckphp_config['FileNameAllowedChars']=$fckphp_config['DirNameAllowedChars'];
array_push($fckphp_config['FileNameAllowedChars'],')','(','[',']','~');
/*==============================================================================*/
/*------------------------------------------------------------------------------*/
/* Debugging :- */
/* - Debug :: Boolean, if set to true a copy of the connector output is */
/* sent to a file as well as to the client. */
/* - DebugOutput :: File to send debug output to (absolute path) */
/*------------------------------------------------------------------------------*/
$fckphp_config['Debug']=false;
$fckphp_config['DebugOutput']="/var/www/fckeditor/htdocs/FCKeditor/data/fck_conn_dbg";
#Log PHP errors
$fckphp_config['Debug_Errors']=false;
$fckphp_config['Debug_Trace']=false;
#Log Connector output
$fckphp_config['Debug_Output']=false;
#With each logged event display contents of
/* $_GET */ $fckphp_config['Debug_GET']=false;
/* $_POST */ $fckphp_config['Debug_POST']=false;
/* $_SERVER */ $fckphp_config['Debug_SERVER']=false;
/* $_SESSIONS */ $fckphp_config['Debug_SESSIONS']=false;
/*==============================================================================*/
/*------------------------------------------------------------------------------*/
/* Internals :- */
/* ResourceTypes :: Array of valid resource areas */
/* Commands :: Array of valid commands accepted by the connector */
/*------------------------------------------------------------------------------*/
$fckphp_config['ResourceTypes'] = array('File','Image','Flash','Media');
$fckphp_config['Commands'] = array(
"CreateFolder",
"GetFolders",
"GetFoldersAndFiles",
"FileUpload",
"Thumbnail",
"DeleteFile",
"DeleteFolder",
"GetUploadProgress",
"RenameFile",
"RenameFolder"
);
/*==============================================================================*/
?>
is there a way to pass a variable to the connector. we have a few sites using the same code. each site has a unique site_id that's used as the "UserFiles" directory. so i need a way to pass that var along to config.php to be used like so:
Yes there is, it is under the guise of Authentication. This allows you to pass a 'userid' in your case this would be a site id. The connector will then create a folder for the passed id under the UserFilesPath and generate the resource type folders too (obviously unless they already exist), the user is then locked into that folder. To enable this you need to set the $fckphp_config['auth']['Req'] configuration variable to true (in the config.php file for the connector) you then need to look at the following example of how to construct the editor and pass this authentication token to it. http://www.mcpuk.net/fbxp/downloads/sample05.phps
If you change the shared key, please make sure they are both the same, when constructing the connector and in the connectors config.php.
Which bit do you need to strip out? The url is constructed using the urlprefix from the config.php file followed by the specified user files directory, then as you are using authentication the user's id, then the resource area, then the filename. This path is generated in the filemanager/browser/mcpuk/connectors/php/commands/GetFoldersAndFiles.php file on line 30 and 64.
MCPUK File browser work fine on my PC (XPSP2 easyphp1.8) with IE, FF and Netscape but when i upload script on my server (hosting infomaniak.ch) i have a javascript error :
after having to try to find the problem I think that it is an error in the address of the connector, but I does not understand because the structure of the site is the same one as locally on my computer....
Hello, first I want to congratulate on a good work on this file browser and have one feature request.
I know the easiest thing is to keep folders and files chmoded to 0777 and everything would work that way, but I would prefer to have it in config. For example - I prefer 0775, and after mcput is updated I have to remember to go thru files and change chmod function. Default should stay on 0777 (and add some note "don't change this at home, we are trained professionals"
And another one - in /Commands/CreateFolder.php, line 68:
if (mkdir($newdir, 0777)) { $err_no=0; //Success } else { ...
This is a wonderful addon to the FCKEditor and many thanks.
However, even though everything seems fine, ie, i can see all my files and create folders but i can't seem to upload anything. It keeps prompting my with an error msg when i try to upload a file. The error msg is 'invalid XML in the connector' This happens in IE6 but in FireFox the error msg is different- it always says that i am 'over my quota', which is not true since i increased it to 500MB and i have only used up less than 20MB.
I have read a post about auth that may be the casue of it but i have tried setting it to true in my conf file (below) and it still gives me the same error msg.
I am running Apache2 with PHP4.3.11 on WinXP and here is part of my php connector conf file:
the width of the editor $editor->Width="90%"; //Set the height of the editor $editor->Height="500px"; //Assign the value(data in the editor) the editor will start off with $editor->Value=(isset($_POST['testpage']))?stripslashes($_POST['testpage']):"Enter page data here"; //Set the default toolbar $editor->ToolbarSet="Default"; //Checksum and encode user authentication info to send to the file browser $myData=time()."|^SEP^|".$s_LoggedInUser
I am lost as to where else to set the auth in other files? Please help anyone
Also, the icons which appears for my mp3 files is that of the document.jpg is there any way of change this so it will use the sound.jpg as an icon for the mp3 files which should of been the case.
There was a similar question asked to this but it's solution didn't help me at all so I'll post all my stuff as "new".
I'm able to upload files and add directories and all that fun stuff. My problem comes when I add a picture to my text box. I get the wrong URL information inserted.
Currently my directory structure is as follows (all under a devel folder on my server) devel/FCKeditor devel/UserFiles/Images etc
also the main file I'm working on is found in this base: devel/test_file.html
The code from my config.php for this key spot is as follows: /*------------------------------------------------------------------------------*/ /* The physical path to the document root, Set manually if not using apache */ /*------------------------------------------------------------------------------*/ $fckphp_config['basedir']=$_SERVER['DOCUMENT_ROOT'].'/FCKeditor/editor/filemanager/browser/mcpuk/connectors/php'; //$fckphp_config['basedir'] = '/var/public_html/devel/FCKeditor/editor/filemanager/browser/mcpuk/connectors/php' ; /*==============================================================================*/
/*------------------------------------------------------------------------------*/ /* Prefix added to image path before sending back to editor */ /*------------------------------------------------------------------------------*/ $fckphp_config['urlprefix']=$fckphp_config['prot'].$_SERVER['SERVER_NAME']; /*==============================================================================*/
/*------------------------------------------------------------------------------*/ /* Path to user files relative to the document root (no trailing slash) */ /*------------------------------------------------------------------------------*/ $fckphp_config['UserFilesPath'] = '../../../../../../../UserFiles' ; /*==============================================================================*/
I ended up solving this about 3 hrs after I posted but couldn't access the site till now.
I reverted everything back to the base install (config.php) and everything just "worked". I swore before this wasn't the case so it threw me off. All is well that ends well I guess.
I can get the default file browser to work but not the mcpuk version. My platform is Win XP SP2 + IIS + IE 6 + PHP5. The browser appears and I can create a folder example 'bltest' but I don't see the sub folders like the one just created folder nor any images yet there are images in the Images folder.
I've created the 4 folders under the $fckphp_config['UserfilesPath'] directory. It does picks up my custom directory path as will create new directories via the browser ok.
- Uncommented the two lines in fckconfig.js to enable the mcpuk version. //FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/php/connector.php' ; FCKConfig.LinkBrowserURL = FCKConfig.BasePath + '/filemanager/browser/mcpuk/browser.html?Connector=connectors/php/connector.php' ; //FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php' ; FCKConfig.ImageBrowserURL = FCKConfig.BasePath + '/filemanager/browser/mcpuk/browser.html?Type=Image&Connector=connectors/php/connector.php' ;
In the connectors/php directory, I've tried several changes in the config.php without success.
Have you got authentication required set to true or false in the config.php, if true are you passing the required information to it?
I think the default was left at one, which would have been fine but the sample of how to use it when constructing the editor seems to have been left out, you can find the example here though:
Grant, I was able to get your sample05 script to work after converting it to a .php file and echo'ing out the html. For some reason the php code was not being interpreted and was displayed inline. It's a good example of using the PHP class to initiate the editor.
Still, it does not help me solve the issues with the file browser.
Problem has been solved for me. In all my reading of posts in this forum. I did not find posts that clearly stated or cautioned about the use of directory delimiters.
I hope this helps someone else - I was going in circles there for a while. As I would correct the basedir setting ( I was trying both path seperator formats and adding/removing path info) and playing with the urlprefix and UserFilesPath settings. Any one of these not right and you will have problems.
Note: Authentication was not being used - set to false all along. Upload ProgressHandler had been disabled as well.
The MCPUK is working fine until I try to upload a image/file. After upload the image/file does not show until I manually refresh. Server unix/apache Browser FF The Readme says: if you specify the relative path of the connector in the fckconfig.js file you may experience some unusual behaviour mainly in firefox, like the resource list failing to refresh. To avoid this specify the absolute path of the connector.
The including the BasePath should be fine, this is what was ment by absolute, it used to be that people were just putting connectors/php instead of /FCKeditor/editor/filemanager.....etc.
I have to say i have never experienced this and all development has been done with FF on a linux/apache host. but your not the only one, i will look into it and keep you posted.
This fix works great for the Image refresh problem however it creates a new one.
When you upload a file for the Media or Flash folders (or one you made such as MP3) the frame where the file is uploaded gets refreshed to the main "File" folder and not to the Media or MP3 or Flash folder. The dropdown in the resource type frame stays at Media or MP3 or wherever you uploaded the file.
Example scenario.
Already located in the "File" folder is a file called document.doc
I now want to upload a movie called clip.avi into the Media folder. I switch my resources to Media and upload the clip.
The frame (frmfolders frame) is refreshed but goes back to the contents of the 'File' folder thus showing me document.doc but the dropdown is still on Media.
To see if my clip.avi uploaded I change resources to File then back to Media and I see my clip.avi
The resource frame (listbox) won't reload.. so I store the sActiveFolder value into some temporary variable there. Then after reload I will call function OpenFolder using value of this temporary variable as parameter
First you need to somehow name the frame which contains frmresourcetype.html
Thanks for working on this with me. I haven't been able to get your workaround working though -- been punching at it for close to an hour and half now.
In browser.html I changed: <frame src="frmresourcetype.html" frmscrolling="no" frameborder="no"> to <frame name="frmResourceList" id="frmResourceList" src="frmresourcetype.html" frmscrolling="no" frameborder="no">
then inserted your code above directly into where it should go in frmupload.html.
It's still refreshing back to the contents of the File resource. I've tried a couple different things that I could figure out but no change really. I had it staying on the Media folder but then not refreshing etc. I honestly don't know Javascript for the life of me so all of this is a learning process.
RE: MCPUK File browser in 2.0FC
I will look at including this in the new file browser,
Regards,
Grant
RE: MCPUK File browser in 2.0FC
I can't get thumbnailing working, here's my config:
fckconfig.js:
FCKConfig.ImageBrowser = true ;
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/mcpuk/browser.html?Type=Image&Connector=connectors/php/connector.php' ;
FCKConfig.ImageBrowserWindowWidth = screen.width * 0.7 ; // 70% ;
FCKConfig.ImageBrowserWindowHeight = screen.height * 0.7 ; // 70% ;
config.php:
RE: MCPUK File browser in 2.0FC
we have a few sites using the same code. each site has a unique site_id that's used as the "UserFiles" directory. so i need a way to pass that var along to config.php to be used like so:
$fckphp_config['UserFilesPath'] = "/".$site_id."/UserFiles" ;
is this possible
RE: MCPUK File browser in 2.0FC
Yes there is, it is under the guise of Authentication. This allows you to pass a 'userid' in your case this would be a site id. The connector will then create a folder for the passed id under the UserFilesPath and generate the resource type folders too (obviously unless they already exist), the user is then locked into that folder. To enable this you need to set the $fckphp_config['auth']['Req'] configuration variable to true (in the config.php file for the connector) you then need to look at the following example of how to construct the editor and pass this authentication token to it.
http://www.mcpuk.net/fbxp/downloads/sample05.phps
If you change the shared key, please make sure they are both the same, when constructing the connector and in the connectors config.php.
Hope this is of use.
Grant
RE: MCPUK File browser in 2.0FC
RE: MCPUK File browser in 2.0FC
when selecting a thumbnail in the image browser, the url that gets out in the txtUrl field is something like this:
http://domain.com/files/users/3/Image/5.jpg
i need to strip some of this out.
does anyone know in which file this is being built.
thanks
RE: MCPUK File browser in 2.0FC
like to look at line 46 of the Auth/Default.php file.
RE: MCPUK File browser in 2.0FC
RE: MCPUK File browser in 2.0FC
MCPUK File browser in 2.0FC
I have a problem...
MCPUK File browser work fine on my PC (XPSP2 easyphp1.8) with IE, FF and Netscape but when i upload script on my server (hosting infomaniak.ch) i have a javascript error :
Erreur : this.DOMDocument has no properties
Fichier Source : http://www.domain.com/admin/includes/ed ... /fckxml.js
Ligne : 108
RE: MCPUK File browser in 2.0FC
chmod 777
Hello, first I want to congratulate on a good work on this file browser and have one feature request.

I know the easiest thing is to keep folders and files chmoded to 0777 and everything would work that way, but I would prefer to have it in config. For example - I prefer 0775, and after mcput is updated I have to remember to go thru files and change chmod function. Default should stay on 0777 (and add some note "don't change this at home, we are trained professionals"
And another one - in /Commands/CreateFolder.php, line 68:
if (mkdir($newdir, 0777)) {
$err_no=0; //Success
} else {
...
it would be good to be changed in
if (mkdir($newdir, $this->fckphp_config['file_chmod'])) {
chmod($newdir, $this->fckphp_config['file_chmod']);
$err_no=0; //Success
} else {
...
(yes I created a new option in config.php)
Thanks in advance,
Stevan
RE: MCPUK File browser in 2.0FC
However, even though everything seems fine, ie, i can see all my files and create folders but i can't seem to upload anything. It keeps prompting my with an error msg when i try to upload a file. The error msg is 'invalid XML in the connector' This happens in IE6 but in FireFox the error msg is different- it always says that i am 'over my quota', which is not true since i increased it to 500MB and i have only used up less than 20MB.
I have read a post about auth that may be the casue of it but i have tried setting it to true in my conf file (below) and it still gives me the same error msg.
I am running Apache2 with PHP4.3.11 on WinXP and here is part of my php connector conf file:
the width of the editor $editor->Width="90%"; //Set the height of the editor $editor->Height="500px"; //Assign the value(data in the editor) the editor will start off with $editor->Value=(isset($_POST['testpage']))?stripslashes($_POST['testpage']):"Enter page data here"; //Set the default toolbar $editor->ToolbarSet="Default"; //Checksum and encode user authentication info to send to the file browser $myData=time()."|^SEP^|".$s_LoggedInUser
I am lost as to where else to set the auth in other files? Please help anyone
Also, the icons which appears for my mp3 files is that of the document.jpg is there any way of change this so it will use the sound.jpg as an icon for the mp3 files which should of been the case.
Many thanks,
S
RE: MCPUK File browser in 2.0FC
There was a similar question asked to this but it's solution didn't help me at all so I'll post all my stuff as "new".
I'm able to upload files and add directories and all that fun stuff. My problem comes when I add a picture to my text box. I get the wrong URL information inserted.
Currently my directory structure is as follows (all under a devel folder on my server)
devel/FCKeditor
devel/UserFiles/Images etc
also the main file I'm working on is found in this base:
devel/test_file.html
The code from my config.php for this key spot is as follows:
/*------------------------------------------------------------------------------*/
/* The physical path to the document root, Set manually if not using apache */
/*------------------------------------------------------------------------------*/
$fckphp_config['basedir']=$_SERVER['DOCUMENT_ROOT'].'/FCKeditor/editor/filemanager/browser/mcpuk/connectors/php';
//$fckphp_config['basedir'] = '/var/public_html/devel/FCKeditor/editor/filemanager/browser/mcpuk/connectors/php' ;
/*==============================================================================*/
/*------------------------------------------------------------------------------*/
/* Prefix added to image path before sending back to editor */
/*------------------------------------------------------------------------------*/
$fckphp_config['urlprefix']=$fckphp_config['prot'].$_SERVER['SERVER_NAME'];
/*==============================================================================*/
/*------------------------------------------------------------------------------*/
/* Path to user files relative to the document root (no trailing slash) */
/*------------------------------------------------------------------------------*/
$fckphp_config['UserFilesPath'] = '../../../../../../../UserFiles' ;
/*==============================================================================*/
I think my problem was how I sent my UserFilesPath. Basically when I insert an image into my editable area I get the URL looking like this:
http://devel.mydomain.com../../../../.. ... ge/pic.jpg
where I'd need it to look like:
http://devel.mydomain.com/UserFiles/Images/pic.jpg
I know I probably messed one of my configs up but after playing around with it for a couple of days I thought I'd post for a different opinion on it.
Thanks!
RE: MCPUK File browser in 2.0FC
I reverted everything back to the base install (config.php) and everything just "worked". I swore before this wasn't the case so it threw me off. All is well that ends well I guess.
RE: MCPUK File browser in 2.0FC
I can get the default file browser to work but not the mcpuk version. My platform is Win XP SP2 + IIS + IE 6 + PHP5. The browser appears and I can create a folder example 'bltest' but I don't see the sub folders like the one just created folder nor any images yet there are images in the Images folder.
I've created the 4 folders under the $fckphp_config['UserfilesPath'] directory. It does picks up my custom directory path as will create new directories via the browser ok.
- Uncommented the two lines in fckconfig.js to enable the mcpuk version.
//FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/php/connector.php' ;
FCKConfig.LinkBrowserURL = FCKConfig.BasePath + '/filemanager/browser/mcpuk/browser.html?Connector=connectors/php/connector.php' ;
//FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php' ;
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + '/filemanager/browser/mcpuk/browser.html?Type=Image&Connector=connectors/php/connector.php' ;
In the connectors/php directory, I've tried several changes in the config.php without success.
Setting or not setting - no diff
1) $_SERVER['DOCUMENT_ROOT']
$_SERVER['DOCUMENT_ROOT'] = 'L:/geek1311_2/public_html/mydata';
2) $fckphp_config['basedir']
$fckphp_config['basedir'] = 'L:/geek1311_2/public_html/mydata' ;
3) $fckphp_config['urlprefix']
$fckphp_config['urlprefix'] = 'http://localhost/geek1311_2/fckeditor';
4) This setting works - as the browser will create new directories ok
$fckphp_config['UserfilesPath'] = 'L:\geek1311_2\public_html\fckeditor\data' ;
5) Progress Bar disabled.
$fckphp_config['uploadProgressHandler']='';
Note: Toggling on the Defaulf Browser in fckconfig.js and I can see the directories, images and upload files ok.
Also I have set this at the top of the fckconfig.js
FCKConfig.BaseHref = 'http://localhost/geek1311_2' ;
Any Suggestions?
RE: MCPUK File browser in 2.0FC
Have you got authentication required set to true or false in the config.php, if true are you passing the required information to it?
I think the default was left at one, which would have been fine but the sample of how to use it when constructing the editor seems to have been left out, you can find the example here though:
http://www.mcpuk.net/fbxp/downloads/sample05.phps
of course you dont have to use it, in which case just turn the authentication required option to false, and it should just work.
RE: MCPUK File browser in 2.0FC
$fckphp_config['auth']['Req']=false;
The only other settings I was working with were debug - setting these to true and changing the location of the logfile.
RE: MCPUK File browser in 2.0FC
Still, it does not help me solve the issues with the file browser.
RE: MCPUK File browser in 2.0FC
Problem has been solved for me. In all my reading of posts in this forum. I did not find posts that clearly stated or cautioned about the use of directory delimiters.
I had 2 problems.
1) $fckphp_config['basedir'] = 'L:/geek1311_2/public_html/mydata' ;
Needs to be just to the document root of your site and escape the directory path separator if you use a '\' instead of a '/'. So these are both valid.
$fckphp_config['basedir'] = 'L:/geek1311_2/public_html/' ;
$fckphp_config['basedir'] = 'L:\\geek1311_2\\public_html\\' ;
2) $fckphp_config['urlprefix'] = 'http://localhost/geek1311_2/fckeditor';
Set it to the Document Root only - use the settings $fckphp_config['UserFilesPath'] to set any sub folder URL component.
$fckphp_config['UserFilesPath'] = "fckeditor/data" ;
I hope this helps someone else - I was going in circles there for a while. As I would correct the basedir setting ( I was trying both path seperator formats and adding/removing path info) and playing with the urlprefix and UserFilesPath settings. Any one of these not right and you will have problems.
Note: Authentication was not being used - set to false all along. Upload ProgressHandler had been disabled as well.
RE: MCPUK File browser in 2.0FC
The MCPUK is working fine until I try to upload a image/file.
After upload the image/file does not show until I manually refresh.
Server unix/apache
Browser FF
The Readme says:
if you specify the relative path of the connector in
the fckconfig.js file you may experience some unusual behaviour mainly in firefox, like the resource list
failing to refresh. To avoid this specify the absolute
path of the connector.
Do you mean change the connector path: FCKConfig.BasePath + to http://mysite.com/FCKeditor/editor/filemanager/etc./etc
RE: MCPUK File browser in 2.0FC
I have to say i have never experienced this and all development has been done with FF on a linux/apache host. but your not the only one, i will look into it and keep you posted.
RE: MCPUK File browser in 2.0FC
switch ( errorNumber )
{
case 0 :
window.parent.frames['frmResourcesList'].Refresh();
to following:
switch ( errorNumber )
{
case 0 :
top.frames['frmFolders'].location.reload();
now the refresh after file upload works ok in Firefox.
RE: MCPUK File browser in 2.0FC
When you upload a file for the Media or Flash folders (or one you made such as MP3) the frame where the file is uploaded gets refreshed to the main "File" folder and not to the Media or MP3 or Flash folder. The dropdown in the resource type frame stays at Media or MP3 or wherever you uploaded the file.
Example scenario.
Already located in the "File" folder is a file called document.doc
I now want to upload a movie called clip.avi into the Media folder. I switch my resources to Media and upload the clip.
The frame (frmfolders frame) is refreshed but goes back to the contents of the 'File' folder thus showing me document.doc but the dropdown is still on Media.
To see if my clip.avi uploaded I change resources to File then back to Media and I see my clip.avi
I'm trying to solve this at the moment.
RE: MCPUK File browser in 2.0FC
RE: MCPUK File browser in 2.0FC
RE: MCPUK File browser in 2.0FC
The resource frame (listbox) won't reload.. so I store the sActiveFolder value into some temporary variable there. Then after reload I will call function OpenFolder using value of this temporary variable as parameter
First you need to somehow name the frame which contains frmresourcetype.html
I named it frmResourceList
now:
switch ( errorNumber )
{
case 0 :
top.frames['frmResourceList'].last_active_folder= top.frames['frmFolders'].sActiveFolder;
top.frames['frmFolders'].location.reload();
setTimeout("top.frames['frmFolders'].OpenFolder( top.frames['frmResourceList].last_active_folder );",500);
- the timeout is needed because OpenFolder must be called only when reload is completed and folder refreshed.
RE: MCPUK File browser in 2.0FC
In browser.html I changed:
<frame src="frmresourcetype.html" frmscrolling="no" frameborder="no">
to
<frame name="frmResourceList" id="frmResourceList" src="frmresourcetype.html" frmscrolling="no" frameborder="no">
then inserted your code above directly into where it should go in frmupload.html.
It's still refreshing back to the contents of the File resource. I've tried a couple different things that I could figure out but no change really. I had it staying on the Media folder but then not refreshing etc. I honestly don't know Javascript for the life of me so all of this is a learning process.
RE: MCPUK File browser in 2.0FC
Okay, I have it working. For some strange reason I had to remove the Refresh and now it works:
case 0 :
top.frames['frmResourceList'].last_active_folder= top.frames['frmFolders'].sActiveFolder;
setTimeout("top.frames['frmFolders'].OpenFolder(top.frames['frmResourceList'].last_active_folder);",500);
I also realized midway through today I forgot a closing ' on one of my entries as well which was causing some troubles.
Thanks for the help creamd!
RE: MCPUK File browser in 2.0FC
just put this line in the "case 0 :" code...
setTimeout("top.frames['frmFolders'].LoadFolders( top.frames['frmFolders'].sActiveFolder);",500) ;