Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Integrating HTML Area 3.0


richard978

Recommended Posts

I'm having a few troubles getting this version of html 3 in my build of oscommerce.

 

http://sf.net/projects/itools-htmlarea/

 

The problem I have is that it used the id of the textarea rather than its name. The tep_draw_textarea_field doesn't appear to support ids, so amended the function as follows:

 

 function tep_draw_textarea_field($name, $wrap, $classid, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
? ?$field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" id="' . tep_output_string($classid) . '" 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;
?}

 

I apply this to categories.php using;

<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', 'ta', '70', '15', (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

The problem with this is that all my other textareas stop working, does anyone know of a better way of doing this.

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