Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

integrating oscommerce with FCKeditior


nashnz

Recommended Posts

  • 2 months later...
i just want to know if anybody had tried to integrate FCKeditor into oscommerce. or any other editor that is working fine. cheers [email protected]

 

Took me a while to find this, but here are the instructions:

 

INSTALLATION

-----------

1. Download FCKeditor

http://www.fckeditor.net/

 

version at 11/18/2.005: FCKeditor 2.1.1

 

this include a directory called FCKeditor

 

 

2. Installation of FCKeditor

 

2.1 put it in the admin directory

install it at http://www.yoursite.com/admin/FCKeditor/

 

in

 

catalog/admin/FCKeditor/

 

 

in

http://www.yoursite.com/admin/FCKeditor/_s...es/default.html

you can see a demo

 

 

 

2.2 changeds to files:

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

 

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

/admin/categories.php

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

 

######## FIND (LINE 538) ########

 

 

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

######## You may edit the 600 and the 300 in ########

######## this line to change the height and ########

######## width of the editor ########

 

 

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

 

 

 

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

 

 

 

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

/admin/includes/functions/html_output.php

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

 

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

 

 

////

// The HTML href link wrapper function

 

 

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

 

######## BEFORE ADD ########

 

 

require("FCKeditor/fckeditor.php");

 

 

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

 

######## 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 ADD ########

 

 

////

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

}

 

 

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

 

3. Go to Administration >> Catalog >> Categories/Products

edit any of the products to see the FCKeditor in the description of a product

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Unfortunately, this procedure don't work with FCKeditor release v2.4.2. And I don't know the reason.

 

Any suggestions are welcome.

 

Pascal Thiou

Link to comment
Share on other sites

  • 3 weeks later...
  • 5 months later...

I've installed the FCKEditor but am having problems with it.

 

When I put a description in it adds it into a Paragraph Tag <P>. My site has a Stylesheet for <P> that formats my text. How can I find the coding to change the tag it places into my description <p> and change it to <p class="main">?

 

This would save me a whole load of time as I have over 1500 descriptions to sort out!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...