Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SPAW2 EDITOR


Guest

Recommended Posts

I keep getting this error below and I can't figure it out

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/hera/public_html/shop/admin/categories.php:4) in /home/hera/public_html/shop/admin/includes/functions/sessions.php on line 67

 

Warning: Cannot modify header information - headers already sent by (output started at /home/hera/public_html/shop/admin/categories.php:4) in /home/hera/public_html/shop/admin/includes/functions/general.php on line 90

 

 

below are the only directions to add spaw2 as html editor.

anyone out their please help..

thank you

noppie

 

 

open this file with your favourite text editor and add the following include lines into

the header in line 13 (just after the copyright information)

 

 

 

include(DIR_FS_CATALOG.'spaw2/spaw.inc.php');

 

This includes the relevant information we need from Spaw.

 

We then need to modify the tep_draw_textarea_field function which by default starts at

line 236 as follows

 

AROUND LINE 236 FIND:

 

////

// 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 .= stripslashes($GLOBALS[$name]);

} elseif (tep_not_null($text)) {

$field .= $text;

}

 

$field .= '</textarea>';

 

return $field;

}

 

 

REPLACE WITH:

 

////

// Output a form textarea field

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

if (class_exists(SpawEditor)) {

$content = '';

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

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

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

} elseif (tep_not_null($text)) {

$content .= tep_output_string_protected($text);

}

$spaw = new SpawEditor(tep_output_string($name), $content);

$spaw->show();

} else {

$field = '<textarea test="1" 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;

}

 

4. Test and Done

Link to comment
Share on other sites

Please disregard. :'(

I figured it out.

I had to much white space above the <php on top of the categories.php :blink:

 

so if anyone else is having the same problems..check your white space at the beginning or end of the file.

thank you all.

noppie :thumbsup:

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