Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FCK WYSIWYG HTML editor


spooks

Recommended Posts

At the very start of html_output after the first <?php have you got:

 

require("fckeditor/fckeditor.php");

 

and made sure its not within the commented out section.

 

Thanks for getting back Spooks,

 

No, I've got this:

 

require('FCKeditor/catalog/admin/fckeditor/fckeditor.php');

 

And it returns this:

 

The requested URL /catalog/admin/FCKeditor/editor/fckeditor.html was not found on this server.

 

Give me a minute and I'll remove the bit after fckeditor/ (it came back with the earlier error with just what you suggest).

Link to comment
Share on other sites

Thanks for getting back Spooks,

 

No, I've got this:

 

require('FCKeditor/catalog/admin/fckeditor/fckeditor.php');

 

And it returns this:

 

The requested URL /catalog/admin/FCKeditor/editor/fckeditor.html was not found on this server.

 

Give me a minute and I'll remove the bit after fckeditor/ (it came back with the earlier error with just what you suggest).

 

 

Well, I tried that again and returned the first error. Could there be a typo in the php version selector file?

Link to comment
Share on other sites

Well, I tried that again and returned the first error. Could there be a typo in the php version selector file?

 

require('FCKeditor/catalog/admin/fckeditor/fckeditor.php');

 

is wrong, it wont work, as I said it should be

 

require("fckeditor/fckeditor.php");

 

have you tried setting it to that?

 

where did your line come from anyway, the install instructions say:

 

In:

 

/admin/includes/functions/html_output.php

 

Find near top:

 

////

// The HTML href link wrapper function

 

 

Add before:

 

require("fckeditor/fckeditor.php");

 

 

Find near 235-253

 

 

////

// Output a form textarea field

function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {

$field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

 

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

 

$field .= '>';

 

if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {

$field .= tep_output_string_protected(stripslashes($GLOBALS[$name]));

} elseif (tep_not_null($text)) {

$field .= tep_output_string_protected($text);

}

 

$field .= '</textarea>';

 

return $field;

}

 

 

Add After:

 

 

////

////

// Output a form textarea field w/ fckeditor

function tep_draw_fckeditor($name, $width, $height, $text) {

 

$oFCKeditor = new FCKeditor($name);

$oFCKeditor -> Width = $width;

$oFCKeditor -> Height = $height;

$oFCKeditor -> BasePath = 'fckeditor/';

$oFCKeditor -> Value = $text;

$field = $oFCKeditor->Create($name);

 

return $field;

}

 

That It!!

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Sorry, away having to cook!

 

Yes, I've tried it again - require('fckeditor/fckeditor.php') and it returns the following:

 

Warning: main(fckeditor/fckeditor.php): failed to open stream: No such file or directory in /usr/local/home/httpd/vhtdocs/mysite.com/catalog/admin/includes/functions/html_output.php on line 14

 

Fatal error: main(): Failed opening required 'fckeditor/fckeditor.php' (include_path='.:/opt/php-4.3/lib/php') in /usr/local/home/httpd/vhtdocs/mysite.com/catalog/admin/includes/functions/html_output.php on line 14

 

(obviously not 'mysite.com' ! but it is a subdomain i.e. 'this.that.com' although I shouldn't think that would make a difference.

 

Because of the url above missing the actual position of the fckeditor directory in the url tree others I've tried are:

 

#require('http://mysite.com/catalog/admin/FCKeditor/catalog/admin/fckeditor/fckeditor.php');

and

#require('FCKeditor/catalog/admin/fckeditor/fckeditor.php');

 

The first throws up on the categories page:

Fatal error: Cannot instantiate non-existent class: fckeditor in /usr/local/home/httpd/vhtdocs/mysite.com/catalog/admin/includes/functions/html_output.php on line 274

 

The second throwing the file not found error on the catalog page:

Not Found

The requested URL /catalog/admin/FCKeditor/editor/fckeditor.html was not found on this server.

 

I got the line from the install instructions that came from the download, which were unzipped to a local directory prior to upload to the server:

 

######## OPEN ########

/admin/includes/functions/html_output.php

######################

 

######## FIND (LINE 13-14) ########

 

 

////

// The HTML href link wrapper function

 

 

###################################

 

######## Just BEFORE ADD this line ########

 

 

require("fckeditor/fckeditor.php"); (!! This didn't work as mentioned above)

 

 

############################

 

######## FIND (LINE 235-253) ########

 

 

////

// Output a form textarea field

function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {

$field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

 

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

 

$field .= '>';

 

if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {

$field .= tep_output_string_protected(stripslashes($GLOBALS[$name]));

} elseif (tep_not_null($text)) {

$field .= tep_output_string_protected($text);

}

 

$field .= '</textarea>';

 

return $field;

}

 

 

####################################

 

 

####################################

 

######## AFTER that ADD these lines ########

 

 

////

// Output a form textarea field w/ fckeditor

function tep_draw_fckeditor($name, $width, $height, $text) {

 

$oFCKeditor = new FCKeditor($name);

$oFCKeditor -> Width = $width;

$oFCKeditor -> Height = $height;

$oFCKeditor -> BasePath = 'fckeditor/';

$oFCKeditor -> Value = $text;

 

$field = $oFCKeditor->Create($name);

 

return $field;

}

 

 

###########################

I found on a post higher up something saying to make function tep_draw_fckeditor($name, $width, $height, $text) {

 

into: function tep_draw_fckeditor($name, $width, $height, $text = '') {

 

and where the install said to put it, I entered:

 

// Output a form textarea field with fckeditor

function tep_draw_fckeditor($name,$width,$height,$text='') {

$oFCKeditor = new FCKeditor($name);

$oFCKeditor -> Width = $width;

$oFCKeditor -> Height = $height;

$oFCKeditor -> BasePath = 'FCKeditor/'; (!! I've tried this both upper and lowercase as mentioned on the FCKeditor forum pages: http://www.oscommerce.com/forums/lofiversion/index.php?f7.html - B Payne, resulting in the same problem)

 

 

$oFCKeditor -> Value = $text;

 

$field = $oFCKeditor->Create($name);

 

return $field;

}

////

 

Sorry to be a pain! :blush:

Link to comment
Share on other sites

You may have an error in you configure.php thats preventing the server finding fck, in anycase the urls your trying are wrong,

 

try instead

 

/home/sitename/public_html/catalog/admin/fckeditor/fckeditor.php or DIR_FS_ADMIN . '/fckeditor/fckeditor.php ' (should be same in the end)

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

I think the fact the title of the zip file you downloaded is .... Install for OSC2.2rc1.zip might just perhaps make you think its not been tested with rc2!!

 

That said I can't see why it shouldent work, fck mearly emulates a form input field, but with loads of javascript for all the fancy stuff, on that point you have'nt got javascript disabled have you? What browsers have you tried it with?

 

If your sure you`ve not made any errors, you could add this to the page ( immediatly after an instance of fck) this javascript should report the successful start of FCK

 

<script language="javascript"><!--

function FCKeditor_OnComplete( editorInstance )

{

alert ("editor reports startup complete");

var oEditor;

var oEditor = FCKeditorAPI.GetInstance('products_description[1]') ;

if ( oEditor != null ) alert("editor instance found"); else alert("instance not found");

}

//--></script>

 

You will need to refresh your cache to ensure new code get loaded

This is testing for a english instance so will fail if your using another language.

 

 

;)

Hi Sam

I was install the editor in my site, and the editor doesn't really loaded. so the description area are loading my front page

screenshot.jpg

I read on your post about the JavaScript to identified if the editor loading or not, and it doesn't have any response at all.

I have install the SEO-G in my site, is that the problem to make the FCKeditor not working?

thank you

ken

Link to comment
Share on other sites

FCK & the test code is all javascript, if javascript is disabled, or if you have any javascript errors during page load, then the code will not execute so yuo get nothing. Check for javascript errors by enabling script debugging in your browser.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Hi Mr Spooks,

 

Thanks for your pm, I ended up using AJAX Attribute manager (mod 4063) and with QT pro and FCK... it is a dream. All seem to intergrate well with no problems...so far :)

 

I can dress my pages up, adjust the attributes all in one go and soooo much cleaner.

 

My question is related to FCK

in that I can't get it to load the images.

 

When I click on the Add "image button" it says the following

 

"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris"

 

Which I wouldn't have a clue?!

 

Then when I try to "upload" a picture to the server it does no problem and shows in the userfiles folder.

"image info" It says

http://www.mywebsite.com/public_html/osc/u...ge/DSC_0004.gif

 

When I press "ok" it goes to the FCK screen but shows a box outline with a red cross

 

Any ideas, I am sure it just a problem with my configuration but not quite smart enough.. ;)

 

Kind Regards

 

btw I am using oscommerce v2.2 rc2a

Link to comment
Share on other sites

Hi Mr Spooks,

 

Thanks for your pm, I ended up using AJAX Attribute manager (mod 4063) and with QT pro and FCK... it is a dream. All seem to intergrate well with no problems...so far :)

 

I can dress my pages up, adjust the attributes all in one go and soooo much cleaner.

 

My question is related to FCK

in that I can't get it to load the images.

 

When I click on the Add "image button" it says the following

 

"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris"

 

Which I wouldn't have a clue?!

 

Then when I try to "upload" a picture to the server it does no problem and shows in the userfiles folder.

"image info" It says

http://www.mywebsite.com/public_html/osc/u...ge/DSC_0004.gif

 

When I press "ok" it goes to the FCK screen but shows a box outline with a red cross

 

Any ideas, I am sure it just a problem with my configuration but not quite smart enough.. ;)

 

Kind Regards

 

btw I am using oscommerce v2.2 rc2a

 

Yes, looks like configuration, you'll see in your url the images folder is called 'image' instead of 'images' hence your error, the default FCK images folder is 'image' and old installs got round that issue by renaming the osc folder, but that caused othewr issues so I wrote a new install to get around that, perhaps you missed a step.

 

In catalog/admin/fckeditor/editor/filemanager/connectors/php/config.php

 

In Line 30 change:

 

$Config['Enabled'] = false ;

 

To

 

$Config['Enabled'] = true ;

 

In Line 34 change:

 

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

 

To:

 

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

 

In line 132

 

Change

 

$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . '/image/' ;

 

to

 

$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . '/images/' ;

 

In line 134/5

 

Find:

 

$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] ;

$Config['QuickUploadAbsolutePath']['Image'] = $Config['UserFilesAbsolutePath'] ;

 

To:

 

$Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ;

$Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ;

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Hi DR. SPOOKS,

 

Ok, I did all that but still didn't work..... I have tried /osc/.... as I don't have catalogs...

 

I have pasted below my config file :(

 

Am sure it is just a little error but am trying to get my head around file paths and such.

 

Your help would be greatly appreciated!

 

 

 

 

 

 

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

// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only

// authenticated users can access this file or use some kind of session checking.

$Config['Enabled'] = true ;

 

 

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

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

 

// Fill the following value it you prefer to specify the absolute path for the

// user files directory. Useful if you are using a virtual directory, symbolic

// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.

// Attention: The above 'UserFilesPath' must point to the same directory.

$Config['UserFilesAbsolutePath'] = '/home/mysite/public_html/osc/userfiles/' ;

 

// Due to security issues with Apache modules, it is recommended to leave the

// following setting enabled.

$Config['ForceSingleExtension'] = true ;

 

// Perform additional checks for image files.

// If set to true, validate image size (using getimagesize).

$Config['SecureImageUploads'] = true;

 

// What the user can do with this connector.

$Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;

 

// Allowed Resource Types.

$Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;

 

// For security, HTML is allowed in the first Kb of data for files having the

// following extensions only.

$Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;

 

// After file is uploaded, sometimes it is required to change its permissions

// so that it was possible to access it at the later time.

// If possible, it is recommended to set more restrictive permissions, like 0755.

// Set to 0 to disable this feature.

// Note: not needed on Windows-based servers.

$Config['ChmodOnUpload'] = 0777 ;

 

// See comments above.

// Used when creating folders that does not exist.

$Config['ChmodOnFolderCreate'] = 0777 ;

 

//

//

 

$Config['AllowedExtensions']['File'] = array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip') ;

$Config['DeniedExtensions']['File'] = array() ;

$Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . 'file/' ;

$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ;

$Config['QuickUploadPath']['File'] = $Config['UserFilesPath'] ;

$Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;

 

$Config['AllowedExtensions']['Image'] = array('bmp','gif','jpeg','jpg','png') ;

$Config['DeniedExtensions']['Image'] = array() ;

$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . '/images/' ;

$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'image/' ;

$Config['QuickUploadPath']['Image'] = $Config['FileTypesPath']['Image'] ;

$Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ;

 

$Config['AllowedExtensions']['Flash'] = array('swf','flv') ;

$Config['DeniedExtensions']['Flash'] = array() ;

$Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . 'flash/' ;

$Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ;

$Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] ;

$Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'] ;

 

$Config['AllowedExtensions']['Media'] = array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv') ;

$Config['DeniedExtensions']['Media'] = array() ;

$Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . 'media/' ;

$Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ;

$Config['QuickUploadPath']['Media'] = $Config['UserFilesPath'] ;

$Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'] ;

 

?>

Link to comment
Share on other sites

From what you say you have a 'root' site therfore your config should be:

 

not:

 

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

 

but:

 

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

 

not:

 

$Config['UserFilesAbsolutePath'] = '/home/mysite/public_html/osc/userfiles/';

 

but:

 

$Config['UserFilesAbsolutePath'] = '';

 

not:

 

$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . '/images/';

 

but:

 

$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . 'images/';

 

not:

 

$Config['FileTypesAbsolutePath']['Image']  = ($Config['UserFilesAbsolutePath'] == '') ? '' :$Config['UserFilesAbsolutePath'].'image/';

 

but:

 

$Config['FileTypesAbsolutePath']['Image']  = ($Config['UserFilesAbsolutePath'] == '') ? '' :$Config['UserFilesAbsolutePath'].'images/';

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Uploaded New Version 2.7

 

This update makes some corrections & gives instruction for latest version (2.6.2)

 

Modified install to work with rc2a, correct bug in function call, added userfiles directory for flash etc files yet ensure existing osC images directory is still used.

 

This has been tested on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & RC2a and is register_globals compatible.

 

:)

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Hello Mr. Spooks,

 

I followed all instructions but, when I go to admin, then catergories to add product descriptions, there is nothing. Product descriptions have disappeared. I have installed 2.2RC2a. Need some assistance, I have uploaded the config.php file that u have included with your install instructions. I only modified the catergories.php, html_output.php as instructed.

 

Looking forward to your response.

 

BJB

Link to comment
Share on other sites

FCK is all javascript, if javascript is disabled, or if you have any javascript errors during page load, then the code will not execute so you get nothing. Check for javascript errors by enabling script debugging in your browser.

 

I installed on vanilla 2.2rc2a and only problems were with image upload, which I fixed in the latest (2.7).

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

FCK is all javascript, if javascript is disabled, or if you have any javascript errors during page load, then the code will not execute so you get nothing. Check for javascript errors by enabling script debugging in your browser.

 

I installed on vanilla 2.2rc2a and only problems were with image upload, which I fixed in the latest (2.7).

 

 

 

 

 

It is enabled. Really don't know what to do again. I have attempted this over 20 times. I am frustrated now. I am not a programmer or anthing like that, so it is a bit difficult for me.

 

BJB

Link to comment
Share on other sites

You could try this, if you`ve messed up the install so the function call is invalid it will revert to the original function

 

The install said:

 

in /admin/categories.php

 

In Line 538 ish:

 

Find:

 

<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

Replace With:

 

<td class="main"><?php echo tep_draw_fckeditor('products_description[' . $languages[$i]['id'] . ']','600','300',(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

instead replace with:

 

<td class="main"><?php echo (function_exists(tep_draw_fckeditor) ?  tep_draw_fckeditor('products_description[' . $languages[$i]['id'] . ']','600','300',(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))) : tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id'])))); ?></td>

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

  • 2 weeks later...
Hi Sam

I was install the editor in my site, and the editor doesn't really loaded. so the description area are loading my front page

****

I read on your post about the JavaScript to identified if the editor loading or not, and it doesn't have any response at all.

I have install the SEO-G in my site, is that the problem to make the FCKeditor not working?

thank you

ken

I know you already found a solution, I found it in another post of yours... It has to do with SEO-G

 

For those who are finding a solution...

add:

 RewriteEngine On

in .htacces in your admin

Link to comment
Share on other sites

Hey Sam,

 

I am hoping you can help. I am having problems when creating a table using FCKeditor for my informational pages. The table is spaced correctly when I am creating it and in the FCKeditor box area, but then in the preview to actually add it to my site it gets pushed down and then there is a large blank space above it. The only way I have found to fix this is by editing the HTML codes of my table and making sure all of the codes touch each other, if that makes sense. Then keeping it in viewing Source I go to the preview page and it works. But, my customers may not get how to do this since they know nothing about HTML and can easily mess things up. I have read your other post I found about someone having a similar problem with mail and newsletters and tried applying it to my problem area, but it didn't seem to work. I also use Page Editor, http://www.oscommerce.com/community/contri.../search,manager, and have added FCKeditor to that which is where the problem is occurring, I think. I am using the latest version of FCKeditor and have the latest version of oscommerce installed.

 

Thanks for your time!

 

Jen

Edited by barefootdivas
Link to comment
Share on other sites

A problem with all wysiwyg editors is that as you make changes you are adding code on top of code, this can end up with a real mess of code & give the sort of effect your seeing. FCK has an answer, before making new changhes, or if your having your problem use the rubber (it says 'remove format' on hover) that will remove any applied code from your selected content.

 

Another issue is the css, the stylesheet on the admin side is not the same as on your client side, to correct this I create a edit-stylesheet.css in my catalog directory that contains the main styles used, then in admin/categories.php add the link, ie

 

Find:

 

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

 

Add After:

 

<link rel="stylesheet" type="text/css" href="../edit-stylesheet.css">

 

Hope that helps.

 

;)

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Does anyone have fckeditor working for the header tag controller description fields?

 

i.e. categories_htc_description and manufacturers_htc_description

 

I have tried it but find that the text is not stored inthe database and the fckeditor input box appears at the top of the page rather than in the right hand column for editing categories and manufacturers.

 

Regards,

Simon

Link to comment
Share on other sites

Thats for creating your meta tags is it not? Why would you want to make them full html, that would invalidate them.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Thats for creating your meta tags is it not? Why would you want to make them full html, that would invalidate them.

 

No the categories_htc_description field is an equivalent to the 'category description' contribution. It allows you to add content to the top of the category pages. You are thinking of the other 3 fields which are used for meta data.

Link to comment
Share on other sites

Your probably entering the call wrong somewhere, I`ll take a look at the contrib & see whats needed.

 

You cant just have a small box with fck though, it needs space for all the function icons, you have to alter the layout so it can go across the page, I work on 500 wide as minimum.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Your probably entering the call wrong somewhere, I`ll take a look at the contrib & see whats needed.

 

You cant just have a small box with fck though, it needs space for all the function icons, you have to alter the layout so it can go across the page, I work on 500 wide as minimum.

 

Thanks Sam. At the moment I use HTMLarea and it works fine (but htmlarea doesn't work with Firefox so I need to change). With FCKeditor the instance of the editor is created straight away when the draw_fck_editor() function is called.

 

  ////
// Output a form textarea field w/ fckeditor
 function tep_draw_fckeditor($name, $not_used, $width, $height, $text) {

$oFCKeditor = new FCKeditor($name);
$oFCKeditor->Width  = $width;
$oFCKeditor->Height = $height;
$oFCKeditor->BasePath= 'fckeditor/';
$oFCKeditor->Value = $text;
$oFCKeditor->Config['ImageDlgHideLink'] = false;
$oFCKeditor->Config['ImageDlgHideAdvanced'] = false;	

$field = $oFCKeditor->Create($name);

return $field;
 }

 

With HTMLarea the loading of the editor is deferred until the page is constructed. i.e. in categories.php

 

//MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.7 - 2.2 MS2 Products Description HTML - </form>
 // if (HTML_AREA_WYSIWYG_DISABLE == 'Disable') {} else { ?>
		<script language="JavaScript1.2" defer>
		 var config = new Object();  // create new config object
		 config.width = "<?php echo HTML_AREA_WYSIWYG_WIDTH; ?>px";
		 config.height = "<?php echo HTML_AREA_WYSIWYG_HEIGHT; ?>px";
		 config.bodyStyle = 'background-color: <?php echo HTML_AREA_WYSIWYG_BG_COLOUR; ?>; font-family: "<?php echo HTML_AREA_WYSIWYG_FONT_TYPE; ?>"; color: <?php echo HTML_AREA_WYSIWYG_FONT_COLOUR; ?>; font-size: <?php echo HTML_AREA_WYSIWYG_FONT_SIZE; ?>pt;';
		 config.debug = <?php echo HTML_AREA_WYSIWYG_DEBUG; ?>;
	  <?php for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { ?>
		 editor_generate('categories_htc_description[<?php echo $languages[$i]['id']; ?>]',config);
	  <?php } ?>
		 config.height = "35px";
		 config.bodyStyle = 'background-color: white; font-family: Arial; color: black; font-size: 12px;';
		 config.toolbar = [ ['InsertImageURL'] ];
		 config.OscImageRoot = '<?php echo trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES); ?>';
		 editor_generate('categories_image',config);
		</script>
<?php // } 

}
?>
	  </tr>
	</table></td>
  </tr>
</table>
<?php
 }
?>

</td>
<!-- body_text_eof //-->
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

 

I have noticed that version 3 of the editor will have a deferred loading capability but I suspect that a workaround can be found now. Any ideas will be much appreciated.

 

Regards,

Simon

Link to comment
Share on other sites

hello at all,

 

sorry for my bad English, I'm from Swiss.

 

I've installed the editor and more Pics (latest version) yesterday.

After few problems it is running mor than less.

 

Now I don't know, it is correct or not:

Admin picture

 

Fact is, everytime I make a modify, the link is brocken.

Can everyone help me?

 

thanks for help.

 

Michael

Edited by swissMike
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...