Jump to content
Sign in to follow this  
Rochdalemark

WYSIWYG HTMLArea Problems, please help

Recommended Posts

Ive installed the WYSIWYG HTML editor for product descriptions V1.7 hack and although I can now create product descriptions the way I want them to apear, my admin page for the products is screwed up, please see the following screen shot

 

cat-admin.gif

 

I think the problem is around line 1076 where its not seeing it as php, but as I'm not to clever on php I'm just a beginer then I'm going to leave it up to you experts to tell me, My Categories.php file can be found HERE please please take a look and ell me where I've messed up.

Share this post


Link to post
Share on other sites

I'm having the same exact error, man! :angry:

 

If you figure out what the problem is, please post the solution.

Share this post


Link to post
Share on other sites

Well I fixed the Info box problem that occured to the right of the products, see my categories.php file HERE

 

And I managed to get rid of the garbled mess in this Categories.php file HERE but although this one works and theres no mess I'm not sure if its working as it should. But hey at least I've got my clean layout back ;) and the editing works as it should.

 

Just have a look at the differences between your categories and mine and alter it.

but I would still like someone to have a look at it and tell me I've not mada a big booboo :P

 

I've now got to take it to the next stage and add the categories descripiton wysiwyg part to it :blink:

 

I was hoping Lee Nielson who did this contribution might tell us where were going wrong as he must have a working version with no errors.

Edited by Rochdalemark

Share this post


Link to post
Share on other sites

Ok Ive added the categories descriptions and although everything looks great, when iI click on preview after I've finished editing a categorie i get the following error.

 

Fatal error: Call to undefined function: tep_get_uploaded_file() in /home/jwaqdoio/public_html/portal/modules/shop/admin/categories.php on line 536

 

Heres that section of the code from categories.php line 536 is the third } else { down Can anyone spot a problem here?

 

 break;
     case 'new_product_preview':
       if (HTML_AREA_WYSIWYG_DISABLE == 'Disable') {
         // copy image only if modified
         $products_image = new upload('products_image');
         $products_image->set_destination(DIR_FS_CATALOG_IMAGES);
         if ($products_image->parse() && $products_image->save()) {
           $products_image_name = $products_image->filename;
         } else {
           $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
         }
       } else {
         if (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS['products_image'] != 'none')) {
           $products_image_name = $HTTP_POST_VARS['products_image'];
         } else {
           $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
         }
       }
       break;

Share this post


Link to post
Share on other sites

I did the same and there was an unnecessary little bracket a couple of line later.

However I didnt have the errors you have after I clicked on the preview button in the categories desc section but other:

 

If I want to add category image and clicking on the edit button then a window uppear with this error message:

 

categories_image_edit_error.jpg

 

In this case I dont have a clue what's wrong.

Share this post


Link to post
Share on other sites
Ok Ive added the categories descriptions and although everything looks great, when iI click on preview after I've finished editing a categorie i get the following error.
Fatal error: Call to undefined function: tep_get_uploaded_file() in /home/jwaqdoio/public_html/portal/modules/shop/admin/categories.php on line 536

 

 

In case anyone is still looking for the answer to this one..... try inserting the following in admin/includes/functions/general.php

 

 function tep_get_uploaded_file($filename) {
   if (isset($_FILES[$filename])) {
     $uploaded_file = array('name' => $_FILES[$filename]['name'],
                           'type' => $_FILES[$filename]['type'],
                           'size' => $_FILES[$filename]['size'],
                           'tmp_name' => $_FILES[$filename]['tmp_name']);
   } elseif (isset($GLOBALS['HTTP_POST_FILES'][$filename])) {
     global $HTTP_POST_FILES;

     $uploaded_file = array('name' => $HTTP_POST_FILES[$filename]['name'],
                           'type' => $HTTP_POST_FILES[$filename]['type'],
                           'size' => $HTTP_POST_FILES[$filename]['size'],
                           'tmp_name' => $HTTP_POST_FILES[$filename]['tmp_name']);
   } else {
     $uploaded_file = array('name' => $GLOBALS[$filename . '_name'],
                           'type' => $GLOBALS[$filename . '_type'],
                           'size' => $GLOBALS[$filename . '_size'],
                           'tmp_name' => $GLOBALS[$filename]);
   }

   return $uploaded_file;
 }

// the $filename parameter is an array with the following elements:
// name, type, size, tmp_name
 function tep_copy_uploaded_file($filename, $target) {
   if (substr($target, -1) != '/') $target .= '/';

   $target .= $filename['name'];

   move_uploaded_file($filename['tmp_name'], $target);
 }

// return a local directory path (without trailing slash)
 function tep_get_local_path($path) {
   if (substr($path, -1) == '/') $path = substr($path, 0, -1);

   return $path;
 }

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×