chrometweaks.org

Forum with file iPage hosting service for free?

Click Here To View All Answers...


First question I got is Forum with file iPage hosting service for free? Looking forward for any answer or 2. My 2nd question... OK after too many hours of trying to get the HTML editor image upload tool to work with Additional Images - I am giving up..

But I can get by if someone can tell me how to change the following code:.

If (($HTTP_POST_VARS['unlink_image_sm_1'] == 'yes') or ($HTTP_POST_VARS['delete_image_sm_1'] == 'yes')) {.

      $products_image_sm_1 = '';.

      $products_image_sm_1_name = '';.

      } else {.

      $products_image_sm_1 = new upload('products_image_sm_1');.

      $products_image_sm_1->set_destination(DIR_FS_CATALOG_IMAGES);.

      if ($products_image_sm_1->parse() && $products_image_sm_1->save()) {.

        $products_image_sm_1_name = $products_image_sm_1->filename;.

      } else {.

        $products_image_sm_1_name = (isset($HTTP_POST_VARS['products_previous_image_sm_1']) ? $HTTP_POST_VARS['products_previous_image_sm_1'] : '');.

      }.

I want to disable the upload portion if a check box is active. So I know some of the code, but I need to add the option if $skip_upload =='true' simply save the name and do not try to upload (and overwrite the image)..

Comments (108)

I'm stumped. I'm not so sure what is the right answer to your question. I'll do some research and get back to you if I discover an good answer. You should email the people at iPage as they probably could answer your iPage question..

Comment #1

Thanks - where do I plug that in to the curent code so not to break that?..

Comment #2

I don't use the contribution you mention so I can't help you with that. If you want to post the whole file I will look at it and see if I can see where it should go. From the way I read your first post though, you will need to enclose the code you want to stop, with the code I posted. Remember to add the required {}..

Jack..

Comment #3

Well I can post it but it is loarge as has heavy alterations. The code I posted above is the section of code that runs the operation. I was just trying to figure out how to work in what you posted..

I can write the if statement finr I need to change the above code to not upload when condition is ment, but still save the filenme and work normal otherwise..

If you want I can email you thoe code or put it up if you feel you need more thatn I posted...

Comment #4

Give this a try:.

If (($HTTP_POST_VARS['unlink_image_sm_1'] == 'yes') or ($HTTP_POST_VARS['delete_image_sm_1'] == 'yes')) {.

     $products_image_sm_1 = '';.

     $products_image_sm_1_name = '';.

     } else {.

       $skip = $HTTP_POST_VARS['skip_upload'];.

       if (! empty($skip_upload)) {.

         $products_image_sm_1 = new upload('products_image_sm_1');.

       }.

     $products_image_sm_1->set_destination(DIR_FS_CATALOG_IMAGES);.

     if ($products_image_sm_1->parse() && $products_image_sm_1->save()) {.

       $products_image_sm_1_name = $products_image_sm_1->filename;.

     } else {.

       $products_image_sm_1_name = (isset($HTTP_POST_VARS['products_previous_image_sm_1']) ? $HTTP_POST_VARS['products_previous_image_sm_1'] : '');.

     }.

Jack..

Comment #5

Nope - didnt work....

I got an error:.

Fatal error: Call to a member function on a non-object in..

Comment #6

I bascially need to figure out how to run it exactly the same except to not try to do the upload...

Comment #7

Oops, that's what I get for typing and chewing gum at the same time..

Try this instead:.

$skip_upload = $HTTP_POST_VARS['skip_upload'];.

      if (! empty($skip_upload)) {.

And, in case you hadn't realized it, you have to had the checkbox named skip_upload..

Jack..

Comment #8

Same error uhghhgh - seems l;ike this should not be this hard.....

Error on.

$products_image_sm_1->set_destination(DIR_FS_CATALOG_IMAGES);..

Comment #9

Jacl,.

Thanks for trying - I have found another way to do what I needed to do -..

Comment #10

OK after too many hours of trying to get the HTML editor image upload tool to work with Additional Images - I am giving up..

But I can get by if someone can tell me how to change the following code:.

If (($HTTP_POST_VARS['unlink_image_sm_1'] == 'yes') or ($HTTP_POST_VARS['delete_image_sm_1'] == 'yes')) {.

      $products_image_sm_1 = '';.

      $products_image_sm_1_name = '';.

      } else {.

      $products_image_sm_1 = new upload('products_image_sm_1');.

      $products_image_sm_1->set_destination(DIR_FS_CATALOG_IMAGES);.

      if ($products_image_sm_1->parse() && $products_image_sm_1->save()) {.

        $products_image_sm_1_name = $products_image_sm_1->filename;.

      } else {.

        $products_image_sm_1_name = (isset($HTTP_POST_VARS['products_previous_image_sm_1']) ? $HTTP_POST_VARS['products_previous_image_sm_1'] : '');.

      }.

I want to disable the upload portion if a check box is active. So I know some of the code, but I need to add the option if $skip_upload =='true' simply save the name and do not try to upload (and overwrite the image)..

Comment #11

Something like this should work:.

$skip = $HTTP_POST_VARS['skip_upload'];.

If (empty($skip_upload)) ....

I haven't tested this and you obviously need to add the checkbox but I think it will work..

Jack..

Comment #12


This question was taken from a support group/message board and re-posted here so others can learn from it.