Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

CKEditor osC 2.3.1


blr044

Recommended Posts

Haven't seen a support thread for CKEditor osc 2.3.1 as of yet. Although it is a very straight forward install. So am asking if the author of said mod, has a link for such a thread. Because I have a question, or should I just post it here?

 

Thank you.

Link to comment
Share on other sites

  • 1 month later...

I installed ckeditor and working properly.

 

The problem comes when I put more than one textarea categories.php

 

Returns the empty field in the administration

 

but it is filled in the db and displayed in product_info

 

I thought output cloned in textarea html_output but still the same

 

I try it in admin/includes/html_output/:

 

Original code:

 


////
// 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;
 }

 

 

And add new code below:

 


////
// Output a form textarea1 field
// The $wrap parameter is no longer used in the core xhtml template
 function tep_draw_textarea1_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;
 }


 

 

 

And in admin/categories.php

 

<td class="main"><?php echo TEXT_PRODUCTS_LINK1; ?></td>
           <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_textarea1_field('products_link1', $pInfo->products_link1); ?></td>

 

I add textarea1 but returns empty in adminitration, but work in db and catalog

 

Any solution?¿?¿?

Edited by arcadia128
Link to comment
Share on other sites

no response?? :(

 

Other questions:

 

I add a filemanager to ckeditor 3.5 but not found my folder image.

 

This is the test

 

Link

 

The code is this:

 

require('../../../../../admin/includes/configure.php');

$config['doc_root'] = (DIR_FS_CATALOG . DIR_WS_IMAGES); // No end slash

 

Is correct the first line "require" if my url configure is this ??

 

http://laertes.es/secret/admin/includes/configure.php

 

 

2 question:

 

In the urlroot i placed the same code of configure.php, is correct,no??

 

var fileRoot = '/';

var urlRoot = '/var/www/vhosts/laertes.es/httpdocs/secret/images/'; // full url

 

 

this is the instruccions installation:

 

find:

var fileRoot

 

replace:

 

var fileRoot = '/';

 

and bellow this add and change to your settings

 

var urlRoot = 'http://localhost/dev/images'; // full url

 

And last quieston 3:

 

where I place the following code in osc 2.3.1???

 

admin\newsletter.php

find:

</head>

above add:

echo '<script type="text/javascript" src="./ckeditor/ckeditor.js"></script>';

 

 

find:

<td class="main"><?php echo tep_draw_textarea_field('content', '70', '20', $nInfo->content); ?></td>

replace:

<td class="main"><?php echo tep_draw_textarea_ckeditor ('content', '70', '20', $nInfo->content); ?></td>

 

admin\categories.php

find:

</head>

above add:

<?php

if ($action == 'new_product' || $information_action == 'Added' || $information_action == 'Edit' ) {

// No need to put JS on all pages. If need more action to the string above.

echo '<script type="text/javascript" src="./ckeditor/ckeditor.js"></script>';

}

?>

Link to comment
Share on other sites

  • 7 months later...

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...