Guest Posted October 11, 2008 Posted October 11, 2008 I've posted in the ultrapics thread, but it looks pretty dead, and I think this could be easily fixed, I just can't figure out how to do it. I want to add the product image manually rather than having to browse and upload a pic from my local system. This code is in the categories.php page, and I'd need to change it on all the multiple pics code. // copy image only if modified if (($HTTP_POST_VARS['unlink_image'] == 'yes') or ($HTTP_POST_VARS['delete_image'] == 'yes')) { $products_image = ''; $products_image_name = ''; } else { $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'] : ''); } } As you can see, it's calling for an upload. I want to type it in manually because all my product pics are already on the server and don't need to be uploaded. As an aside, even when I try to upload from my server it doesn't work. Anybody have a clue how I can change this code? Thanks in advance!
germ Posted October 11, 2008 Posted October 11, 2008 Hey Deb, there's a contribution called osc File Browser you install that changes the admin so you can pick files from the images folder rather that upload them. There are a few things required, so read the install closely and be sure you meet all the requirements before attempting an install. ;) oscFileBrowser I don't know about the latest versions. I installed the "latest" as of this last April. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted October 12, 2008 Posted October 12, 2008 I actually have that installed, but it's an old version. I'll see if the newer version will help. Thanks hon!
Guest Posted October 12, 2008 Posted October 12, 2008 Germ, Do you have a clue though how I could just have the field as a type in rather than a browse? I'd so much rather type the damn thing in. It's faster than having to browse.
Guest Posted October 12, 2008 Posted October 12, 2008 Yeah, I can't use the updated one. PHP5 required. Besides, Ive got the old one installed, but the upload still points to my local machine rather than the server. I know this is got to be pretty easy to change the path that the upload is pointing to, but since I'm a ditz with php, I can't figure it out.... Maybe a path in admin/configure.php to point to the server for uploads????
germ Posted October 12, 2008 Posted October 12, 2008 Filebrowser has a config file of it's own: /admin/includes/filebrowser/config.php Have you got it set up correct? :unsure: I didn't have much problem with the version I installed other than the popup window with the image file names has a rather lengthy blank space at the top which made it look like it wasn't working. After I saw the scroll bar on the right side and scrolled down everything was peachy. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Guest Posted October 12, 2008 Posted October 12, 2008 Yeah, but UltraPics uses its own calls within admin/includes/categories.php It doesn't call any filebrowser pages. When I click on browse, it goes to my local machine, not the server. I just want to be able to type in the file path myself. This should be so simple...I don't want to use anything but my keyboard :o I'm so frustrated I could scream. I think I'll just dump the whole thing if I can't get it figured out by tomorrow. I can't be adding new products via the sql table. What a p.i.a!
lindsayanng Posted October 12, 2008 Posted October 12, 2008 You should look at the DOWNLOADS input form. That is a field that allows you to type in the file name or file path for a file that already exists in your filemanager.. I will look in my download store to see if i can find it for you A great place for newbies to start Road Map to oscommerce File Structure DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways! HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you Proud Memeber of the CODE BREAKERS CLUB!!
lindsayanng Posted October 13, 2008 Posted October 13, 2008 here is what i found.. MAYBE it can help you if (DOWNLOAD_ENABLED == 'true') { $products_attributes_id = tep_db_insert_id(); $products_attributes_filename = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_filename']); <td class="smallText"><?php echo TABLE_TEXT_FILENAME; ?></td> <td class="smallText"><?php echo tep_draw_input_field('products_attributes_filename', $products_attributes_filename, 'size="15"'); ?> </td> i think this is what you REALLY were looking for: $file_name = ''; if (isset($HTTP_POST_VARS['input_filename']) && !empty($HTTP_POST_VARS['input_filename'])) { $file_name = tep_db_prepare_input($HTTP_POST_VARS['input_filename']); } if (tep_not_null($file_name) && file_exists(DIR_FS_CATALOG_DOWNLOAD . $file_name)) { A great place for newbies to start Road Map to oscommerce File Structure DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways! HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you Proud Memeber of the CODE BREAKERS CLUB!!
lindsayanng Posted October 13, 2008 Posted October 13, 2008 did that help?? I hope so, because i only read code as good as i speak spanish... asi asi. A great place for newbies to start Road Map to oscommerce File Structure DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways! HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you Proud Memeber of the CODE BREAKERS CLUB!!
Guest Posted October 13, 2008 Posted October 13, 2008 LOL! I'm going to try it after dinner & Dexter B)
lindsayanng Posted October 13, 2008 Posted October 13, 2008 Something in there had to be the right code.. i mean, i guess i might have missed some sections, you do want the same function as what the downloads does.. if (($HTTP_POST_VARS['unlink_image'] == 'yes') or ($HTTP_POST_VARS['delete_image'] == 'yes')) { $products_image = ''; $products_image_name = ''; } else { $products_image = $file_name = ''; if (isset($HTTP_POST_VARS['input_filename']) && !empty($HTTP_POST_VARS['input_filename'])) { $file_name = tep_db_prepare_input($HTTP_POST_VARS['input_filename']); } $products_image-> if (tep_not_null($file_name) && file_exists(DIR_FS_CATALOG_IMAGES . $file_name)) { 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'] : ''); } } A great place for newbies to start Road Map to oscommerce File Structure DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways! HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you Proud Memeber of the CODE BREAKERS CLUB!!
Guest Posted October 13, 2008 Posted October 13, 2008 I just uninstalled the silly thing. Thanks for trying!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.