Jump to content

Site Documents Editor barely works.... Fixed.


Guest kovacic

Recommended Posts

Guest kovacic

I found that CubeCart uses the FCKeditor. The version CubeCart is using is 2.0. The most current version is 2.4

The update can be found HERE: http://www.fckeditor.net/download

Download this and upload everything under:

FCKeditor_2.4\fckeditor

to the following directory:

admin\includes\rte

This will update the editor and add MUCH functionality to your site.!!

:(

Link to comment
Share on other sites

  • 1 month later...

This is exactly what I was just looking for! Thanks!

For reference, I run Firefox under Fedora Linux, which crashes often with the older version of FCKeditor, but has no problems with the newer version. When I upgraded from FC5 to FC6, the problem went away for a short time, but soon reappeared.

I've been using Drupal (which uses the newer version of FCKeditor) for a while with no problems.

Now I need to remember where to reset the height of the editing box.

Link to comment
Share on other sites

Found it.

In this newer version, the fckeditor.php file simply detects whether PHP4 or PHP5 is being run and then including the appropriate file there.

The height variable is in the fckeditor_php4.php and fckeditor_php5.php files.

Link to comment
Share on other sites

Guest ej-rebirth

In Firefox I seem to be getting problems only when there are multiple instances of it. For instance in my Add Product area I have 3 instances, and each time i reload FCK seems to play pass the parcel, by loading one and not the others.

In IE I don't have this problem. It's just a tad odd, because the version that comes with cubecart 3.0.15 works fine.

Link to comment
Share on other sites

  • 2 months later...

One thing I recently found with the FCKeditor is that the image upload and browse functions require a bit of editing of configuration files to get working properly.

As the editor comes, it tries to connect to the filesystem using ASP, which is useless in my situation. In order to get it to use the PHP connectors, you have to edit the fckconfig.js file in the /admin/includes/rte/ folder. Look around lines 182/183 for the following:

var _FileBrowserLanguage	= 'asp';	// asp | aspx | cfm | lasso | perl | php | py

var _QuickUploadLanguage	= 'asp';	// asp | aspx | cfm | lasso | php




Change the 'asp' to 'php' and that will help.



The next step is to enable the php connector, which is in /admin/includes/rte/editor/filemanager/browser/default/connectors/php/config.php



Around line 27, find


// SECURITY: You must explicitelly enable this "connector". (Set it to "true").

$Config['Enabled'] = false;



// Path to user files relative to the document root.

$Config['UserFilesPath'] = '/userfiles/';




and change the setting to true, and the userpath setting to where you want to look for files.



Finally, open the upload config file, which is in /admin/includes/rte/editor/filemanager/upload/php/config.php.



Around line 27, you'll find


// SECURITY: You must explicitelly enable this "uploader".

$Config['Enabled'] = false;



// Set if the file type must be considere in the target path.

// Ex: /userfiles/image/ or /userfiles/file/

$Config['UseFileType'] = false;



// Path to uploaded files relative to the document root.

$Config['UserFilesPath'] = '/userfiles/';

Again, change false to true and set the userfile path to where files should be uploaded. I haven't yet found where the UseFileType setting does much of anything useful. For now, it seems to work better when left as false, although it means that files uploaded using the 'Upload' tab of the image function go one place, and the image browser looks in a subfolder (and files uploaded there also go to the subfolder). I'm still looking for a way to get everything referencing the same folder.

There might be other settings that need to be edited to get other features to work. The image uploading was the issue I dealt with recently for my wife's new site.

Link to comment
Share on other sites

  • 2 weeks later...
Guest redearth

I am still getting the image upload problem when I try to upload an image. I can't figure it out ?

I have done the changes and still can't put an image on my homepage??

Link to comment
Share on other sites

Guest SirenKimmie

Okay so I upgraded the FKCeditor. I went and implemented the changes suggested by Alan T which now at least allow me to upload files and I can actually see a directory of files!!! (Thanks Alan!) However it seems that the script is creating a new folder (/image/) at the specified userpath (as directed by Alan's instructions above). This causes a difference in folders when you browse to images using the "image properties browse" versus the "Upload" tab. Does that make sense?

Essentially this is the deal.

My image folder, which is what I'd like the editor to link to is:

/images/uploads/

When my first file was added using the Insert/Edit Image button in the editor then choosing "Browse Server" then uploading an image in the "Resources Browser" window, a new folder was created called "image" in the /images/uploads directory and the file I uploaded was saved to that folder (/images/uploads/images).

So, somewhere in the code, when using that upload feature the script is creating a new "image" folder, which is not what I wanted of course. The problem furthers when uploading a file using the upload tab, as it uploads to the properly specified directory /images/uploads/ - which means that depending on which way you upload the files, you wind up with two different directories of images. And when you want browse to your images you're only seeing one of those directories.

Any ideas, suggestions, comments?

Thanks, Kimmie

Link to comment
Share on other sites

You're seeing exactly what I saw. The problem is that the "browse" function of the FCKeditor ALWAYS looks for the /image/ subfolder. I haven't found any way to set it to look for the base folder (i.e.- /images/upload/).

You can set the configuration of the upload connector to NOT create the /image/ subfolder, but then the browse function won't see the files uploaded. It's a catch-22.

To upload files to the base folder, look at the section

// Set if the file type must be considere in the target path.

// Ex: /userfiles/image/ or /userfiles/file/

$Config['UseFileType'] = false;

and set it back to 'false', as it was originally. Just remember that the browse function won't see the files uploaded.

Link to comment
Share on other sites

Guest SirenKimmie

Yeah, I did leave that part to "false" as you said beause the browse didn't want to do a whole lot of anything and I had no means of actually SEEING my files. Which would mean, after uploading a file I actually have to put the url of the file to include it in the site. Essentially what I think I have to do at this point is copy all of the old files that are in the main image folder into this newly created subfolder that way when browsing I'll have all image files in one area. What this also means is the "upload imgage" tab is useless because it will send files to the main image folder and I'll never be able to see them using the browse. Kind of cumbersome.

Anyway we can find out of someone is working on this? I mean wouldn't it make sense that you'd want the upload tab and the browse feature all to point to the same directory? That directory being the main image folder? I'm going to assume that because this is a new upgrade that someone will eventually fix this no?

You're seeing exactly what I saw. The problem is that the "browse" function of the FCKeditor ALWAYS looks for the /image/ subfolder. I haven't found any way to set it to look for the base folder (i.e.- /images/upload/).

You can set the configuration of the upload connector to NOT create the /image/ subfolder, but then the browse function won't see the files uploaded. It's a catch-22.

To upload files to the base folder, look at the section

// Set if the file type must be considere in the target path.

// Ex: /userfiles/image/ or /userfiles/file/

$Config['UseFileType'] = false;

and set it back to 'false', as it was originally. Just remember that the browse function won't see the files uploaded.

Link to comment
Share on other sites

Guest SirenKimmie

Scratch that. I just realized that the actual browse and upload buttons (not the inert/edit button browse) point to the regular main image directory. So the only thing that doesn't point to the right directory is the browse in the insert/edit button. Which means that adding the functionality of the insert/edit button browse will not help a whole lot. But as you're saying, I can't browse to existing images to add them which is a total pain. I'm trying to poke around to see with my very limited knowledge in coding, if I can find out how to get that sucker to point to the right folder. *sigh*

Yeah, I did leave that part to "false" as you said beause the browse didn't want to do a whole lot of anything and I had no means of actually SEEING my files. Which would mean, after uploading a file I actually have to put the url of the file to include it in the site. Essentially what I think I have to do at this point is copy all of the old files that are in the main image folder into this newly created subfolder that way when browsing I'll have all image files in one area. What this also means is the "upload imgage" tab is useless because it will send files to the main image folder and I'll never be able to see them using the browse. Kind of cumbersome.

Anyway we can find out of someone is working on this? I mean wouldn't it make sense that you'd want the upload tab and the browse feature all to point to the same directory? That directory being the main image folder? I'm going to assume that because this is a new upgrade that someone will eventually fix this no?

You're seeing exactly what I saw. The problem is that the "browse" function of the FCKeditor ALWAYS looks for the /image/ subfolder. I haven't found any way to set it to look for the base folder (i.e.- /images/upload/).

You can set the configuration of the upload connector to NOT create the /image/ subfolder, but then the browse function won't see the files uploaded. It's a catch-22.

To upload files to the base folder, look at the section

// Set if the file type must be considere in the target path.

// Ex: /userfiles/image/ or /userfiles/file/

$Config['UseFileType'] = false;

and set it back to 'false', as it was originally. Just remember that the browse function won't see the files uploaded.

Link to comment
Share on other sites

Guest timopp

I am having problems as well. I am not understanding the /userfiles/ . Should this be my images folder? In my root folder? Do I have to set the whole path? Assuming a stock install of CC what should this look like.

I have followed all the instructions above, but am still have all problems.

Thanks

Tim

Link to comment
Share on other sites

Guest SirenKimmie

Okay I found the solution! (This was painful to find let me tell you but I got the information from the fkcEditor forum). After implimenting Alan T's suggestions impliment this solution:

The default behavior of the filebrowser is that it will search for files in a directory named like their filetype:

file: "File"

image: "Image"

flash: "Flash"

media: "Media"

If you don't like this behavior, you can change the code so that you can specify whether to use a different folder for each filetype and what folder that should be. Just put the folder name in the quotes or leave it blank if you want it to stay at the folder previously specified by AlanT's solution.

You'll want to copy and past the following code and edit the folder names to your specification - putting the code at the bottom of the config.php file ('rte/filemanager/browser/default/connectors/php/config.php'). :

// Set directory per file type

// Leave any setting empty to work in your 'UserFilesPath' for that filetype.

$Config['FileTypeDirectories']['File'] = "myFiles";

$Config['FileTypeDirectories']['Image'] = "";

$Config['FileTypeDirectories']['Flash'] = "exampleDir";

$Config['FileTypeDirectories']['Media'] = "";

----------------------------------------------

Then change the 'io.php' ('rte/filemanager/browser/default/connectors/php/io.php') as follows:

Find:

function GetUrlFromPath( $resourceType, $folderPath )

{

if ( $resourceType == '' )

return RemoveFromEnd( $GLOBALS["UserFilesPath"], '/' ) . $folderPath ;

else

return $GLOBALS["UserFilesPath"] . strtolower( $resourceType ) . $folderPath ;

}

Replace With:

function GetUrlFromPath( $resourceType, $folderPath )

{

global $Config ;

if ( $Config['FileTypeDirectories'][$resourceType] == '' )

return RemoveFromEnd( $GLOBALS["UserFilesPath"], '/' ) . $folderPath ;

else

return $GLOBALS["UserFilesPath"] . $Config['FileTypeDirectories'][$resourceType] . $folderPath ;

}

------------------------

Find:

function ServerMapFolder( $resourceType, $folderPath )

{

// Get the resource type directory.

$sResourceTypePath = $GLOBALS["UserFilesDirectory"] . strtolower( $resourceType ) . '/' ;

// Ensure that the directory exists.

CreateServerFolder( $sResourceTypePath ) ;

// Return the resource type directory combined with the required path.

return $sResourceTypePath . RemoveFromStart( $folderPath, '/' ) ;

}

Replace With:

function ServerMapFolder( $resourceType, $folderPath )

{

global $Config ;

// Get the resource type directory.

$sResourceTypePath = $GLOBALS["UserFilesDirectory"] . $Config['FileTypeDirectories'][$resourceType] . '/' ;

// Ensure that the directory exists.

CreateServerFolder( $sResourceTypePath ) ;

// Return the resource type directory combined with the required path.

return $sResourceTypePath . RemoveFromStart( $folderPath, '/' ) ;

}

-------------------------

That fixed it for me! I am now able to see my images directory by browsing and I can upload images to the proper folder! ;)

Link to comment
Share on other sites

  • 7 months later...

I found that CubeCart uses the FCKeditor. The version CubeCart is using is 2.0. The most current version is 2.4

The update can be found HERE: http://www.fckeditor.net/download

Download this and upload everything under:

FCKeditor_2.4\fckeditor

to the following directory:

admin\includes\rte

This will update the editor and add MUCH functionality to your site.!!

:wacko:

I did the upload and when I tried to Browse Server to upload an image, I got a message that say,

===

The server didn't sent back a proper XML response. Please contact your system adminstrator.

XML request error. Forbidden (403)

===

What should I do from here?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...