Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

CKEditor 3.6.2


Recommended Posts

Hi

 

I have installed the latest CKeditor but cannot find it anywhere in the Admin area. Should CKEditor appear anywhere?

 

Also, if I choose to add a new product and go the the description text block, nothing of CKEditor shows.

 

Any suggestions?

Link to comment
Share on other sites

I would suggest starting by checking that you have followed all the install directions.

 

I have CKeditor working fine on OSC 2.3.1

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Thanks for your response - I've read some of your comments on other CKE topics and thus assume your are "the lady" when it comes to CKE.

 

Ok, here is the first step of the installation instruction:

 

Open /catalog/admin/includes/functions/html_output.php and change the tep_draw_textarea_field (around line 252) to read:

 

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

 

And this is what mine looks like (I copied a bit above and below so you can read the whole entry):

 

// Output a form textarea field

// The $wrap parameter is no longer used in the core xhtml template

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

global $HTTP_GET_VARS, $HTTP_POST_VARS;

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

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

$field .= '>';

if ( ($reinsert_value == true) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {

if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {

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

} elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {

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

}

} elseif (tep_not_null($text)) {

$field .= tep_output_string_protected($text);

}

$field .= '</textarea>';

return $field;

}

 

The next step was:

Open /catalog/admin/includes/template_top.php and add the following before the </head> tag:

 

<?php

if (!defined('USE_CKEDITOR_ADMIN_TEXTAREA')) {

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, set_function) values ('', 'Use CKEditor', 'USE_CKEDITOR_ADMIN_TEXTAREA','true','Use CKEditor for WYSIWYG editing of textarea fields in admin',1,99,now(),'tep_cfg_select_option(array('true', 'false'),' )");

define ('USE_CKEDITOR_ADMIN_TEXTAREA','true');

}

if (USE_CKEDITOR_ADMIN_TEXTAREA == "true") {

?>

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/ckeditor.js'); ?>"></script>

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/adapters/jquery.js'); ?>"></script>

<script type="text/javascript">

$(function() {

var $editors = $('textarea');

if ($editors.length) {

$editors.each(function() {

var editorID = $(this).attr("id");

var instance = CKEDITOR.instances[editorID];

if (instance) { CKEDITOR.remove(instance); }

CKEDITOR.replace(editorID);

});

}

});

</script>

<?php

}

?>

 

After doing that, mine reads this:

 

 

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html <?php echo HTML_PARAMS; ?>>

<?php

if (!defined('USE_CKEDITOR_ADMIN_TEXTAREA')) {

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, set_function) values ('', 'Use CKEditor', 'USE_CKEDITOR_ADMIN_TEXTAREA','true','Use CKEditor for WYSIWYG editing of textarea fields in admin',1,99,now(),'tep_cfg_select_option(array(\'true\', \'false\'),' )");

define ('USE_CKEDITOR_ADMIN_TEXTAREA','true');

}

if (USE_CKEDITOR_ADMIN_TEXTAREA == "true") {

?>

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/ckeditor.js'); ?>"></script>

<script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/adapters/jquery.js'); ?>"></script>

<script type="text/javascript">

$(function() {

var $editors = $('textarea');

if ($editors.length) {

$editors.each(function() {

var editorID = $(this).attr("id");

var instance = CKEDITOR.instances[editorID];

if (instance) { CKEDITOR.remove(instance); }

CKEDITOR.replace(editorID);

});

}

});

</script>

<?php

}

?>

<head>

 

Please point out the errors I could've made.

 

Thanks a mil

Link to comment
Share on other sites

OK they both look correct, (mine is slightly different as I made changes to only call up ckeditor on the product input page)

 

Have you unzipped the ckeditor core files to a directory as specified catalog/admin/ext/ckeditor/ ?? I think this may be your problem

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Morning Heather - so nice to see you are in the UK, which means there is only a 2 hour time difference between us making conversation much easier. What I did was extract the zip file into a folder on my HD and then with Filezilla, uploaded the directory (including the extracted files) to the location you mentioned above.

 

If I have a look at my extracted folder on my HD, it contains 15 files, 8 directories with total size of 680 306 bytes and on the website it is 15 files, 8 directories but with a 675 076bytes file size. Initially I thought not all files uploaded so I deleted the website folder and re-upload but the final result of the file size was the same.

 

Many thanks.

George

Link to comment
Share on other sites

Hi there, I just downloaded the ckeditor as well but can't find any instructions on the site other than install into the root folder.

 

Any help would be great.

 

Installation instructions can be found here and in the text file.

 

George

Link to comment
Share on other sites

@@outdoorgeek

 

Then there is no reason for it not to work, if all the files and sub folders are located in a folder called catalog/admin/ext/ckeditor/ with ckeditor.js being in the root of this folder

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Silly question here.....

 

Have you been to admin and under configuration HTML-Editor set "FCKeditor verwenden" to True?

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Not silly question as nothing ever referred to that. But, under admin>configuration there is no "html editor" as all that shows is:

  • Administrators
  • Store Logo
  • My Store
  • Minimum Values
  • Maximum Values
  • Images
  • Customer Details
  • Module Options
  • Shipping/Packaging
  • Product Listing
  • Stock
  • Logging
  • Cache
  • E-Mail Options
  • Download
  • GZip Compression
  • Sessions
  • Terms & Conditions

And this is worrisome as I thought all along that there is an HTMl Editor that comes with ver 2.3.

Edited by outdoorgeek
Link to comment
Share on other sites

Check that you have the following 2 entries in the Configuration table of your database by using phpmyadmin

1183 Höhe FCKeditor FCK_EDITOR_HEIGHT 600 Höhe der Eingabefelder in Pixel bei Verwendun... 20 2 2007-12-17 01:08:56 2007-05-13 06:37:14 NULL NULL

 

1182 FCKeditor verwenden DESCRIPTION_EDITOR

Edited by Mort-lemur

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

The only entry I found in "configuration" is

 

USE_CKEDITOR_ADMIN_TEXTAREA under the "configuration key" colum which is set to "true" with the configuration description as "Use CKEditor for WYSIWYG editing of textarea field....

Link to comment
Share on other sites

ok - you are missing some fields from the table - I will try to put together a sql for you to add them

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

OK Try this - BUT BACKUP THE DATABASE FIRST !

 

INSERT INTO `configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
(1183, 'Höhe FCKeditor', 'FCK_EDITOR_HEIGHT', '600', 'Höhe der Eingabefelder in Pixel bei Verwendung des FCK-Editors.', 20, 2, '2007-12-17 01:08:56', '2007-05-13 06:37:14', NULL, NULL),
(1182, 'FCKeditor verwenden', 'DESCRIPTION_EDITOR', 'true', 'Soll der HTML-Editor für Beschreibungen benutzt werden?', 20, 1, '2008-03-20 22:40:05', '2007-05-13 06:37:14', NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

I had a look and cannot figure out how to add the new lines you want me to so I can capture the info into the different headings/colums. It seems as if your line number is 1182 and 1183 - mine ends at 440 so I have to create line 441 and 442. Correct?

 

Should the last modified date to be today?

Link to comment
Share on other sites

Hi,

 

go to phpmyadmin, select sql tab.

 

copy the above code into the box and press go.

 

That will insert the new lines in the table

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

Before you try the above, check in admin configuration my store and see if there is an option such as "use CK Editor"

 

Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Link to comment
Share on other sites

  • 2 weeks later...

ooo err .... works for me! thanks all ...

Just two small points

1. The instructions HAVE changed to say install in catalog/admin/ext/ckeditor/ ..

2. The step below

 

Open /catalog/admin/includes/functions/html_output.php and change the tep_draw_textarea_field (around line 252) to read:

 

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

 

Should perhaps read

 

Open /catalog/admin/includes/functions/html_output.php and replace the function tep_draw_textarea_field to read:

 

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

global $HTTP_GET_VARS, $HTTP_POST_VARS;

 

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

 

I got confused as to where to paste the $field ... being thick n all ...

 

Cheers!

Edited by ja1nsa
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...