Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

image_manager


azer

Recommended Posts

A altered version of file_manager wich makes it possible to manage images for categories and products.

Now possible to create sub-folders and upload images into them.

 

Also with fixed error where image info is lost updating category and no filename is entered.

 

See readme.txt for instructions.

 

 

Link to Contribution: http://www.oscommerce.com/community/contributions,4844

MS2

Link to comment
Share on other sites

here are some request for improvement of this contribution :

 

- for the moment , you say image manager , but in fact we can uplaod any kind of ile , and this can be good to use it like that :-) or then we should exclude all file excpet image files ...

 

that would be :

- so usefull to be able to rename a file or a folder

- be able to select several file at the same time from the windows selector

- TEXT_DELETE_INTRO should have one text for folder , and another one for folder

MS2

Link to comment
Share on other sites

hi,

 

i just installed it and its great. But there is some little problem:

 

I am using on fly watermark contribution, and part of that contrib is to put .htaccess file in the folder where you have images that you want to protect.

 

i create that folder from the image manager, but now I cannot upload this .htaccess because permissions are 755 of that folder, and when i want to change them it is not allowding me. In my cpanel i noticed that all other folders that i created my self i can change permissions but not in two folders created with image manager.

 

can you tell me fix for this????

 

I need this, it is very important to protect this images.

 

Thanks

Link to comment
Share on other sites

As this is made by a member of the Dutch osCommerce community we also have a support-thread running.

We made some changes to the actual use of this contri to make sure that customers cannot messup their shop by using this contri.

Here are some changes:

 

1. I wanted to use a special dir for the product-images and not use the root-dir catalog\images.

First you create a dir called products in catalog\images (catalog\images\products).

 

Then in admin/includes/configure.php:

After:

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

 

Add:

define('DIR_FS_PRODUCTS_IMAGES', DIR_FS_CATALOG . 'images/products');

 

 

In catalog\admin\image_manager.php:

 

Find all:

DIR_FS_CATALOG_IMAGES

 

Replace all with:

DIR_FS_PRODUCTS_IMAGES

 

Also to have the Reset button diplayed as Back (The word Reset could confuse users).

 

Find:

<tr valign="top">
				<td class="smallText"><?php echo '<a href="' . tep_href_link(FILENAME_IMAGE_MANAGER, 'action=reset') . '">' . tep_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td>

 

Replace with:

<tr valign="top">
				<td class="smallText"><?php echo '<a href="' . tep_href_link(FILENAME_IMAGE_MANAGER, 'action=reset') . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td>

 

Hope this helps!

Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Link to comment
Share on other sites

i create that folder from the image manager, but now I cannot upload this .htaccess because permissions are 755 of that folder, and when i want to change them it is not allowding me.

 

Folders created with image_manager should have permission 777!

 

mkdir($current_path . '/' . $HTTP_POST_VARS['folder_name'], 0777)

 

For now I don't know a solution. I am sorry!

 

PprMkr

 

Note: uploaded new complete package with all changes in it.

Edited by pprmkr
Link to comment
Share on other sites

As this is made by a member of the Dutch osCommerce community we also have a support-thread running.

We made some changes to the actual use of this contri to make sure that customers cannot messup their shop by using this contri.

Here are some changes:

 

1. I wanted to use a special dir for the product-images and not use the root-dir catalog\images.

First you create a dir called products in catalog\images (catalog\images\products).

 

Then in admin/includes/configure.php:

After:

define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

 

Add:

define('DIR_FS_PRODUCTS_IMAGES', DIR_FS_CATALOG . 'images/products');

In catalog\admin\image_manager.php:

 

Find all:

DIR_FS_CATALOG_IMAGES

 

Replace all with:

DIR_FS_PRODUCTS_IMAGES

 

Also to have the Reset button diplayed as Back (The word Reset could confuse users).

 

Find:

<tr valign="top">
				<td class="smallText"><?php echo '<a href="' . tep_href_link(FILENAME_IMAGE_MANAGER, 'action=reset') . '">' . tep_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td>

 

Replace with:

<tr valign="top">
				<td class="smallText"><?php echo '<a href="' . tep_href_link(FILENAME_IMAGE_MANAGER, 'action=reset') . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td>

 

Hope this helps!

 

 

Tnx,

 

this helped, but it still didnt solved the problem with permissions created by image_manager. There must be added line in the code that will automaticly give 777 permission to newly created folders.

 

But this solved problems with the watermark, cause when I created folder manualy I added 777 and added .htaccess easily.

 

Tnx again :thumbsup:

Link to comment
Share on other sites

  • 3 weeks later...

Hi all !

 

I have a little problem with this contribution. When i add or modify a product I lost the picture of the product in the Preview window but the image is correct in the store or in admin. I have located the problem: the problem is coming from the modification made at line 312 in the categories.php file:

 

FIND: line 312

***********************************************************

case 'new_product_preview':

// 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;

$products_image_name = $products_image;

} else {

$products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');

}

break;

***********************************************************

REPLACE WITH:

***********************************************************

case 'new_product_preview':

 

$products_image = $HTTP_POST_VARS['products_image'];

if ($products_image==''){

$products_image = $HTTP_POST_VARS['products_previous_image'];

}

break;

***********************************************************

 

Prior to the modifications made by the installation of Image Preview (06.02.2007 version) all was correct (i have the Open Featured Sets contribution, the ImageMagick contribution and the Category Fields contribution installed). Any way to get me preview images back ?

 

Thanks a lot in advance and keep up the good work !

Guillaume

Link to comment
Share on other sites

and one more corection, just a little one, that acctualy sorting the problem that guillaume14 had.

 

when you are adding this to the configure file:

 

define('DIR_FS_PRODUCTS_IMAGES', DIR_FS_CATALOG . 'images/products');

 

should be with the "/" at the end, like this

 

define('DIR_FS_PRODUCTS_IMAGES', DIR_FS_CATALOG . 'images/products/');

 

that is all

 

:thumbsup:

Edited by ivagarfitt
Link to comment
Share on other sites

  • 3 years later...

I've developed a danish version of osCommerce including lots of contributions among others this one. There are several hundred users of this danish package but a small handfull are having troubles uploading images does anyone have an idea about why?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...