Forums / Addon Admin Tools / Image Manager addon

Image Manager addon

Results 1 to 20 of 284
15 Oct 2009, 08:13
#1
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Image Manager addon

Hi all,

I just contributed a new Image Manager for Zen-Cart 1.3.8.

The reason I developed this add-on, is that I was looking for an alternative way to handle my images, small, medium and large. Somehow Google had problems with IH2 links, so I had to revert back to the original way.

Any comments are welcome.

Although not much CAN go wrong with using the addon (see the provided help info), I advice you to play around in a test environment first.

Boudewijn.

Image Manager is now available from the download section at: http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_41&products_id=1441
08 Mar 2010, 16:44
#3
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

Hi Dinix,

Can you try the following:

In admin/includes/functions/extra_functions, edit function_image_manager.php

On line 187, replace:

$file = HTTP_CATALOG_SERVER . "/" . DIR_WS_IMAGES . $p["dirname"] . $p["filename"] . "." . $p["extension"];

with:

$file = DIR_WS_CATALOG_IMAGES . $p["dirname"] . $p["filename"] . "." . $p["extension"];

On line 233, replace:

$file = HTTP_CATALOG_SERVER . "/" . DIR_WS_IMAGES . 'medium/'. $p["dirname"] . $p["filename"] . "_MED." . $p["extension"];

with:

$file = DIR_WS_CATALOG_IMAGES . 'medium/'. $p["dirname"] . $p["filename"] . "_MED." . $p["extension"];

On line 287, replace:

$file = HTTP_CATALOG_SERVER . "/" . DIR_WS_IMAGES . 'large/'. $p["dirname"] . $p["filename"] . "_LRG." . $p["extension"];

with:

$file = DIR_WS_CATALOG_IMAGES . 'large/'. $p["dirname"] . $p["filename"] . "_LRG." . $p["extension"];

I THINK this will fix your problem, but as I cannot test this myself I'm not entirely sure. If it doesn't help, please report back and we will go a step further.

Boudewijn
09 Mar 2010, 22:07
#4
dinix avatar

dinix

Zen Follower

Join Date:
May 2006
Posts:
102
Plugin Contributions:
0

Re: Image Manager addon

Tanks Boudewijn
now works fine
04 May 2010, 13:33
#5
jvanree avatar

jvanree

Zen Follower

Join Date:
Mar 2008
Posts:
211
Plugin Contributions:
0

Re: Image Manager addon

Sounds like a good add on, I will give it a try once I'm done updating the stores!
04 May 2010, 14:38
#6
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

Hmmm nice shop :-)

Installation is done in 5 mins.....
If you intend to update your images too, this tool will be very helpful!
06 May 2010, 14:50
#7
salixia avatar

salixia

New Zenner

Join Date:
Oct 2009
Posts:
30
Plugin Contributions:
0

Re: Image Manager addon

Looks like this doesnt work with 1.3.9.

When installed on a 1.3.9 you dont see thumbnails of images.
Also you can not perform any actions on images. You cant create sized images ( the main feature I liked).

It does let you search your images and see if the correct images size files are present. It does make non existent folders automatically.
And you can delete images that are not linked.

I did try boudewijn's fix above with no effect.
06 May 2010, 15:06
#8
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

Hi,

Actually I just started rebuilding our webshop to ZenCart 1.3.9. I also copied the IM package but had no opportunity yet to test it, as there are no products and images in my DB.
I will give this some priority and come up with an answer soon.

Boudewijn
06 May 2010, 15:35
#9
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

I did find a small bug in the English language file:

in

<admin dir>/includes/languages/english/extra_definitions/image_manager.php line 30 should be:

define('IM_SELECT_IMG_IMG_ALL', 'All images');

Furthermore I did a small test with one product and one image, and all works fine. So I suspect the problem is in your config.
Can you check <admin dir>/includes/configure.php and check the values for:

HTTP_CATALOG_SERVER: should be something like http://www.mysite.com (no trailing slash)
DIR_WS_IMAGES: should be images/

and check if the image is actually in http://www.mysite.com/images/mypic.jpg

The uploaded image should appear, even before the medium and large image is made, if you select "Small images' or 'All images' in the option bar and click 'Send'.

Boudewijn
06 May 2010, 18:38
#10
salixia avatar

salixia

New Zenner

Join Date:
Oct 2009
Posts:
30
Plugin Contributions:
0

Re: Image Manager addon

Just checked configure.php admin/includes file and it is all correct.
All product images are in the correct image folder.

I tried selecting all different options and could not get any thumbnail images to appear. Nor were there any options anywhere to create med. or large images.

I will try your small change, but don't think that is big enough a change to make it work on my site. I did notice that another image manager addon named Imaged Handler required another program GD libraries or ImageMagick to work. However I see no mention of this anywhere about your addon. Is it required for yours as well and just doesnt mention it? ty for the help.
06 May 2010, 19:38
#11
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

Ah yes of course.... good point to think of the prerequisites!
IM does require the GD library, for shrinking/watermarking, as well as for recognising a file as image.
Since it cannot determine image/no image, it won't display sizes, links etc.

As the GD library is quite commonly used (I never suspected it to be absent in installations), you may ask your ISP to activate it.

In the next version I will build a check to see if the library is loaded.

Thanks for your feedback!

Boudewijn
06 May 2010, 20:11
#12
salixia avatar

salixia

New Zenner

Join Date:
Oct 2009
Posts:
30
Plugin Contributions:
0

Re: Image Manager addon

Ok well this is getting interesting. Thank you in your patience helping me with this.

After finding out that I do need GD Library, I wanted to find out if I did indeed not have it installed as part of my ISP hosting.

I found this guide to check if GD is turned on.
http://assets.webassist.com/how-tos/gd_library_ht.pdf
It said to make a file named phpinfo.php with

<?php
phpinfo();
?>

upload it to my server and go to that file.
if it is on it said it would show me the info and it did.


GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled


Not sure where this leaves me. The only conclusion I can make is that something about my server is not compatible with the addon?
06 May 2010, 21:04
#13
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

You can also do the check from within your Zen-cart admin interface: Tools->Server version/info.

Some more info that may be useful:
- What PHP version is on your server?
- The value of DIR_FS_CATALOG in the configure.php file in your <admin>/includes folder. This should be the file path on your server, to your zen-cart files, ending with a slash.

I really cannot think of anything not being compatible, as only standard PHP functions are used, which I believe were already supported in earlier versions of PHP. But one can never know.....
06 May 2010, 21:41
#14
salixia avatar

salixia

New Zenner

Join Date:
Oct 2009
Posts:
30
Plugin Contributions:
0

Re: Image Manager addon

PHP Version: 4.4.4
Apache http server

DIR_FS_CATALOG is a correct path. It is in this format;
define('DIR_FS_CATALOG', '/usr2/home/domainname.com/htdocs/storename/');

I should also note the other addons I am using are:
Easy Populate v1.2.5.4
Super Orders 20 Rev48
Quick Order 1.2.3
Improved Attributes Controller
Attribute Grid 1.1.1
07 May 2010, 05:31
#15
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

Ok thanks. That looks ok at first sight.
Let's go back to IM. I want to try and follow the program to see where it doesn't pick up the info.
Can you point out what exactely IM shows you for the images, per column?
07 May 2010, 07:34
#16
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Posts:
4,572
Plugin Contributions:
0

Re: Image Manager addon

@boudewijn - did you notice the reference to PHP 4 being used, does that make a difference to your mod?

@Salixia - you should ask you Hoster to upgrade to PHP 5.2.12, it shouldn't break any scripts and is much better.
07 May 2010, 07:42
#17
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

Yes I did notice the reference. Although I would have preferred to write IM with use of objects, I specifically did not use those functions to remain downwards compatible. And although I did not check all PHP functions I used, I am pretty sure that I did not use any functions that are not supported in PHP4.

Meanwhile I did some rewriting in the IM functions, related to paths and rights, and it would be worth trying that out.

Of course migration to PHP5 would rule out possible causes too.
31 May 2010, 21:52
#18
edadk avatar

edadk

Zen Follower

Join Date:
Nov 2008
Posts:
191
Plugin Contributions:
0

Re: Image Manager addon

Hi,

Thanks for this very nice contribution.

There's a small issue for me that I can't figure out how to get past.

I don't use Medium images, so every product is flagged with an error.

Is it possible for me to make a change so the the Manager does not check for medium size images?

Many thanks,

Ed
01 Jun 2010, 05:09
#19
boudewijn avatar

boudewijn

Zen Follower

Join Date:
Jun 2009
Posts:
207
Plugin Contributions:
0

Re: Image Manager addon

Hi Ed,

Yes, IM 1.0 beta 4 has the ability to disable medium size images, as a configuration option. The package is ready to upload to the add on section, but I would like you to test it first. Can you send me your email address so I can send you the zip file? My email address is in the image_manager.txt file of the package.

Thanks,
Boudewijn
29 Jun 2010, 16:05
#20
mezloh avatar

mezloh

New Zenner

Join Date:
Jun 2008
Posts:
28
Plugin Contributions:
0

Re: Image Manager addon

Can the hover image be added to this mod?

similar to the IH2 mod where you hover over the image producing a larger image.

Thanks in advance.