chrometweaks.org

Where is the best place/company to get a domain name and web iPage hosting service?

Click Here To View All Answers...


First of all Where is the best place/company to get a domain name and web iPage hosting service? Many thanks for any answer or 2. Another question... I am working more on a contribution that has an upload field in admin configuration, however I cannot get just the filename when selecting a file instead I end up with the full path..

I need to be able to strip the path down to just the file name when the save button is implemented, so that just the filename is entered into the database instead of the full path..

The code I have added is.

       $value_field = tep_draw_file_field('configuration_value');.

And is in the admin/configuration.php.

This gives an input field with a browse button for locating the file and the value is entered into configuration_value.

Does anyone know what additional codes are required...

Comments (68)

Good question... I dunno what is the right answer to your question. I'll do some research and get back to you if I find an anything. You should email the people at iPage as they probably could answer your iPage question..

Comment #1

Have you looked at the code to upload a product image ? may help..

The quick product adder contrib may help with the code for this also:.

Http://www.oscommerce.com/community/contri...earch,quick+add..

Comment #2

I have been working the code based on the categories image upload..

The contribution you mention does not have the correct coding of an oscommerce structure..

Thanks for the suggestions..

The codes can be changed to a simple input field, whereby the name of the image needs to be known and typed in and it will work, however it needs the functionality of the file field in order to allow browsing for images..

This post has been edited by.

241.

: 30 August 2004, 11:34..

Comment #3

Still struggling on this one. It is the last bit required to finish the section...

Comment #4

Hi Steve.

Without seeing the rest of the code the filename itself is available in the $_FILES global variable..

If you do.

Var_dump($_FILES);.

You should see the structure of the array..

Its also available in the upload class as.

$configuration_value->filename.. make sure you add the 'enctype="multipart/form-data"' to the form also..

Comment #5

I had used the 'enctype="multipart/form-data"' before I added.

If ($configuration_value = new upload('configuration_value', DIR_FS_CATALOG_IMAGES'featuredsets/')) {.

      tep_db_query("update "TABLE_FEATURED_SETS" set configuration_value = '"tep_db_input($cInfo->configuration_value->filename)"' where configuration_id = '"(int)$cID"'");.

      }.

Which did not work.

So I had taken that out.

And then added the above code which still did not work.

, but now with your prompting I have put back in the 'enctype="multipart/form-data" part to the code and all is working..

Mark as ever you are a star..

Comment #6

I am working more on a contribution that has an upload field in admin configuration, however I cannot get just the filename when selecting a file instead I end up with the full path..

I need to be able to strip the path down to just the file name when the save button is implemented, so that just the filename is entered into the database instead of the full path..

The code I have added is.

       $value_field = tep_draw_file_field('configuration_value');.

And is in the admin/configuration.php.

This gives an input field with a browse button for locating the file and the value is entered into configuration_value.

Does anyone know what additional codes are required...

Comment #7

I cannot believe that this one has had no replies..

Do I need to use code to create a tmp file then use the temp file to put the information into the database..

What about code like this, is this sort of code required.

If ($configuration_value = new upload('configuration_value', DIR_FS_CATALOG_IMAGES'featuredsets/')) {.

       tep_db_query("update "TABLE_FEATURED_SETS" set configuration_value = '"tep_db_input($cInfo->configuration_value->filename)"' where configuration_id = '"(int)$cID"'");.

       }..

Comment #8


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