Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problems when I Include FCKeditor in Oscommerce


bhaveshmandalia

Recommended Posts

Posted

Hi Friends,

 

I have some problems when i include FCKeditor in oscommerce

 

i got this type of error

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent

(output started at /home/mascot/public_html/store/admin/fckeditor/fckeditor.php:1) in /home/mascot/public_html/store/admin/includes/functions/sessions.php on line 100

 

i include fckeditor in oscommerce by this way (mentioned below).

 

it works fine at localhost but when i upload all this to server it shows the error.

 

i used store instead of catalog folder..

 

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

 

Canany one help me to get out of this problems?????

 

Regards,

Bhavesh ( [email protected] )

Archived

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

×
×
  • Create New...