bkng Posted September 27, 2002 Share Posted September 27, 2002 Anyone knows how i canchange the upload directory for the images wich are uploaded with an item? Thanx in advance for your help. Link to comment Share on other sites More sharing options...
sinful Posted September 27, 2002 Share Posted September 27, 2002 include>configure.php change the following line define('DIR_WS_IMAGES', 'images/'); to whatever directory you want "Stick to the devil you know than the one you don't " Link to comment Share on other sites More sharing options...
bkng Posted September 27, 2002 Author Share Posted September 27, 2002 Wel ok that changes the directory for all the images. What i need is a seperate upload directory for the images that are uploaded throug the admin program. I want those images in a seperate directory away from the standard items wich are used by OSC. You see????????????????? Link to comment Share on other sites More sharing options...
Mark Evans Posted September 27, 2002 Share Posted September 27, 2002 Wel ok that changes the directory for all the images. What i need is a seperate upload directory for the images that are uploaded throug the admin program. I want those images in a seperate directory away from the standard items wich are used by OSC. This isn't currently available in CVS at the moment. They only way you could do it was by running an SQL query using PhpMyAdmin to add the extra directory name it. Mark Evans osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops) --------------------------------------- Software is like sex: It's better when it's free. (Linus Torvalds) Link to comment Share on other sites More sharing options...
bkng Posted September 27, 2002 Author Share Posted September 27, 2002 Thanx, I already did this for most of my images but also wanted the same for my items wich i occasionally upload from admin. But ok now i know, Thanx again Link to comment Share on other sites More sharing options...
Ian-San Posted September 27, 2002 Share Posted September 27, 2002 Or (AT YOUR OWN RISK!): 1) Install the Quick Updates pack from Downloads 2) Add or modify one column to deal with images. I can't explain this in detail but if you study the main file in this pack (it is quite logicallyset-out) and then replace or add the code for one column with: if ($action == "update") { foreach($HTTP_POST_VARS['products_new_image'] as $id => $new_image) { mysql_query("UPDATE products SET products_image='$new_image' WHERE products_id=$id"); } and: <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_IMAGE; ?></td> and: echo "<td class="smallText" valign="top" align="center"><input type="text" size="25" name="products_new_image[".$row['products_id']."]" value={$row['products_image']}></td>n"; and: add a definition for TABLE_HEADING_IMAGE to the quick updates language file. To use, just: 1) Manually create the image sub-directories and upload images files as required using your ftp program. 2) You can then just type in the image path as text e.g. 'mysubdirectory/myimage.jpg' using the Quick Updates add-on. Sounds complex but once you have done it, it is reasonably simple as you can just paste in image names. One limitation is that this method does not allow image names with spaces in them - so replace all spaces with underscore and no problems. I am not sure if the images get deleted again with the product but this is not much of a problem as you can just manually clean up later. Ian-san Flawlessnet Link to comment Share on other sites More sharing options...
premmala Posted March 11, 2004 Share Posted March 11, 2004 I cannot find for the life of me the Quick Updates in the download area. Can you please help? Thanks, Jerome Jerome Freedman, Ph. D. [email protected] Jewels by Mala Jewelry by Mala Jerome Freedman, Ph. D. Link to comment Share on other sites More sharing options...
roedel Posted February 15, 2005 Share Posted February 15, 2005 ok, heres my problem, i have to shops running on one server. both shops will sell the same products, so i want only one image category. like mentioned above i tried to change the directory in include-configure.php. but it is not working, for shure i made a little mistake :blush: here is what i have moded. define('DIR_WS_IMAGES', '/home/xyz/public_html/catalog/images/'); the shop is running in the folder catalog2. also i changed the directorys in admin-includes-configure.php define('DIR_WS_IMAGES', '/home/xyz/public_html/catalog/images/'); and define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . '/home/xyz/public_html/catalog/images/'); any idea whats wrong here ? Link to comment Share on other sites More sharing options...
♥Vger Posted February 15, 2005 Share Posted February 15, 2005 If the site is running in the folder catalog2, then this is what it should read: define('DIR_WS_IMAGES', 'images/'); The path to catalog is defined in another part of the configure.php file, as: /catalog2/ Vger Link to comment Share on other sites More sharing options...
roedel Posted February 15, 2005 Share Posted February 15, 2005 ok, ok found it. // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) so it should look like this define('DIR_WS_IMAGES', 'http://xyz.com/catalog/images/'); no its running just fine, thanks chris Link to comment Share on other sites More sharing options...
roedel Posted February 15, 2005 Share Posted February 15, 2005 but, heres antoher problem. no iam unable to set the permissions of include-configure.php. to read only. somehow i save the new setting with the ftp client, but after checking it afterwards the permission is read and write again. strange Link to comment Share on other sites More sharing options...
♥Vger Posted February 15, 2005 Share Posted February 15, 2005 No, doing it that way you have just hard-coded the path to the images directory via your domain name. That will cause problems for you later on. dir_ws_images just needs to be images/ (nothing else). If that does not work then it's because you have errors elsewhere in your configure.php file. Vger Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.