Zen Cart Logo
Forums / All Other Contributions/Addons / Image Handler 3 Support Thread (for ZC v1.3.9)

Image Handler 3 Support Thread (for ZC v1.3.9)

Views: 180,291

Results 661 to 680 of 1,099
29 Nov 2011, 10:20 PM
#661
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Image Handler 3 Support Thread (for ZC v1.3.9)

DivaVocals:

Thanks for saying this Angel.. :hug:Hopefully YOU won't get chastised for saying this.. :smile: as recent posts from certain individuals would indicate, I get critiqued when I suggest that folks read the readme.. SMH

They can chastise away, I sometimes chastise others too but...I love the read me myself. I was able to sit, read and totally understand things.

I learned a long time ago NOT to upload the entire folder to the server (I took it literally then and my store went away) but to open folders/compare the ones on desk and server then upload the ones from the zip to server.

still at times I goof thought. The other shame is that not everyone makes the readme like IH3's. Segmented into each category and thorough.

You did a marvelous job on it.:hug:

29 Nov 2011, 10:26 PM
#662
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

Soul39:

Hi, all, i've looked through most of the pages in this support thread and the readme file, and i don't think my question has been asked, so sorry for repeating if i have missed it.
It mentions that "you upload your highest quality image and it will do the rest" What if you already cropped and optimized your images, how does IH treat them?
I have done the 3 sizes image thing and now want to do the single image IH thing, with subfolders. Will i be undertaking too much work?
I have 1.3.9h running on my local server and was intending to install IH3, but if i import the DB from my site will i need to reasign the images to all the products as from scratch or will IH automatically find them even though they will be in subfolders?
Is there a better way to do this?
There are a few questions in there but i hope it all made sense.

Thanks in advance for your assistance.
Soul39
http://www.k-craftteddies.co.uk

not sure if I understood right but.....

I recently moved my entire store and test store to a new hosting provider and used the database from the other providers myPHPadmin....and the store is still running beautifully, except when I mess it up.

The images are still found cause they are in the database...all information from the database should be there too.

about the images....if you upload the ones you have already optimized it will not hurt at all. you just need to remember to upload the largest size you want the customer to see----NO OTHER SIZES are needed. When you use IH3 to handle the images it automatically creates the other sizes (small and medium) and puts them into that bmz_cache folder for faster loading.

the ones you upload can go directly into the stores main image folder or in a subfolder, you can set the path in the IH3 control area when uploading it through there.

hope that did not confuse you more

29 Nov 2011, 11:28 PM
#663
scriptjunkie avatar

scriptjunkie

Totally Zenned

Join Date:
Jul 2008
Posts:
772
Plugin Contributions:
0

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

Adding here to what Angel said....the Troubleshooting tab of the readme file has a section called "Prepare Your Site For Growth". It goes into detail about image filing and file naming, as well as gives examples of how to do it.

It should help you tremendously.

DarkAngel:

not sure if I understood right but.....

I recently moved my entire store and test store to a new hosting provider and used the database from the other providers myPHPadmin....and the store is still running beautifully, except when I mess it up.

The images are still found cause they are in the database...all information from the database should be there too.

about the images....if you upload the ones you have already optimized it will not hurt at all. you just need to remember to upload the largest size you want the customer to see----NO OTHER SIZES are needed. When you use IH3 to handle the images it automatically creates the other sizes (small and medium) and puts them into that bmz_cache folder for faster loading.

the ones you upload can go directly into the stores main image folder or in a subfolder, you can set the path in the IH3 control area when uploading it through there.

hope that did not confuse you more

30 Nov 2011, 9:00 AM
#664
soul39 avatar

soul39

Zen Follower

Join Date:
Jul 2008
Location:
london
Posts:
167
Plugin Contributions:
0

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

ScriptJunkie:

Adding here to what Angel said....the Troubleshooting tab of the readme file has a section called "Prepare Your Site For Growth". It goes into detail about image filing and file naming, as well as gives examples of how to do it.

It should help you tremendously.

Yes, that is way i wish to go. It takes me a long time to locate images in the image folder, as i have not put them into sub folders.
Also i think i would like to rename the images as per the naming convention ( under score_ instead of spaces ).
That is going to be a bit more difficult, isn't it? Is there an easy way to do achieve that? A work around or some program i can use?

Many thanks for your assistance
Soul39

30 Nov 2011, 4:17 PM
#665
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

Soul39:

Yes, that is way i wish to go. It takes me a long time to locate images in the image folder, as i have not put them into sub folders.
Also i think i would like to rename the images as per the naming convention ( under score_ instead of spaces ).
That is going to be a bit more difficult, isn't it? Is there an easy way to do achieve that? A work around or some program i can use?

Many thanks for your assistance
Soul39Not for nothing, but this support thread isn't really the place to discuss this.. That said I'll say this very briefly.. there are a TON of free file renaming software packages out there.. Google "free file renaming software" and you will see what I mean.. and even with a renaming software, it will still likely take some manual work on your part depending how your files were named in the first place..

if you have additional question on renaming software, or naming conventions for image files or how to set up image folders, you should really start a separate thread on the topic..

30 Nov 2011, 4:28 PM
#666
scriptjunkie avatar

scriptjunkie

Totally Zenned

Join Date:
Jul 2008
Posts:
772
Plugin Contributions:
0

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

I don't know that it's going to be more difficult...but could definitely be time consuming if you have a lot of images.

I don't know of a program that will automatically rename your images for you...but if you've been using extensions on your file names like image1_LRG.jpg (with the _LRG part being the extension)...you're going to want to get rid of the extension anyway. So as long as you're dumping extensions, you can rename the files as you go.

I know that doesn't really help you cut down on the amount of work there is to do, I'm sorry. I'm afraid there's no fast easy way to organize/re-organize a lot of images that have been allowed to pile up in a single folder. That's not a criticism...I've been where you are so I really empathize.

I think you're going to have to take the long road to solve this one. Please don't let that deter you though....the results will be well worth the effort in the long run. The alternative is to leave it as is, and it will only get worse :(

Soul39:

Yes, that is way i wish to go. It takes me a long time to locate images in the image folder, as i have not put them into sub folders.
Also i think i would like to rename the images as per the naming convention ( under score_ instead of spaces ).
That is going to be a bit more difficult, isn't it? Is there an easy way to do achieve that? A work around or some program i can use?

Many thanks for your assistance
Soul39

30 Nov 2011, 5:15 PM
#667
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

@ Diva
Shhesh, you don't get much thanks for writing readme documents on this thread do you ? Or for trying to help. Big respect to you for not mentioning that this is an open source add-on to an open source product and if people do not like their free ( in all senses of the word ) readme files then they could just go and write their own. You know that I believe that IH is unduly complex but the readme files are very good and that should be noted and I am sure that what people intended to say was ' thanks for putting all that work in without any reward ' --- and that it just came out sounding like they were being foolishly critical.

1 Dec 2011, 12:17 AM
#668
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

Hey Niccol.. Thanks!!:hug: What a nice thing to say!!! I can't take full credit.. ScriptJunkie and Nigel did their fair share in helping to shape the readme document into what it is today.. We're all pretty pleased with how it turned out..

I do know how you feel about Image Handler :laugh:.. Thanks for the CONSTRUCTIVE critic.. :smile: Image Handler isn't for everyone, but I have mad respect for those who can articulate clearly why versus just throwing out the "it just sucks" type of comments.. I know you are exploring putting together an image management add-on of your own.. So hopefully soon there will be another choice for image management for those who want to do it differently if you decide to submit your solution.. (I will certainly be looking out for it to test as well..)

niccol:

@ Diva
Shhesh, you don't get much thanks for writing readme documents on this thread do you ? Or for trying to help. Big respect to you for not mentioning that this is an open source add-on to an open source product and if people do not like their free ( in all senses of the word ) readme files then they could just go and write their own. You know that I believe that IH is unduly complex but the readme files are very good and that should be noted and I am sure that what people intended to say was ' thanks for putting all that work in without any reward ' --- and that it just came out sounding like they were being foolishly critical.

1 Dec 2011, 1:11 AM
#669
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

ScriptJunkie:

I don't know of a program that will automatically rename your images for you...but if you've been using extensions on your file names like image1_LRG.jpg (with the _LRG part being the extension)...you're going to want to get rid of the extension anyway. So as long as you're dumping extensions, you can rename the files as you go.There really are a couple of programs that do exactly this.. (you can use a variety of filters to aid in the process -- they work best if there is some similarity in the current file names to build out the correct filter) The OP should try the Google search I suggested to locate one of these cool pieces of software..

1 Dec 2011, 3:27 AM
#670
scriptjunkie avatar

scriptjunkie

Totally Zenned

Join Date:
Jul 2008
Posts:
772
Plugin Contributions:
0

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

That's awesome!!

DivaVocals:

There really are a couple of programs that do exactly this.. (you can use a variety of filters to aid in the process -- they work best if there is some similarity in the current file names to build out the correct filter) The OP should try the Google search I suggested to locate one of these cool pieces of software..

1 Dec 2011, 4:39 AM
#671
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

ScriptJunkie:

That's awesome!!and for the slightly off topic post.. :laugh:

HEY YOU!!! Long time no chat at!!! waves

1 Dec 2011, 1:42 PM
#672
dee_d_lady avatar

dee_d_lady

New Zenner

Join Date:
Jan 2011
Location:
Slovakia
Posts:
24
Plugin Contributions:
0

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

Hello everyone! After upgrading from IH2 I keep getting warnings with this debugg log:

PHP Warning:  htmlentities() [<a href='function.htmlentities'>function.htmlentities</a>]: charset `windows-1250' not supported, assuming iso-8859-1 in .../includes/classes/bmz_image_handler.class.php on line 690

I've used kaboom to convert the coding but this didn't help. The log is created like every minute so it's pretty annoying. But IH3 works fine. I'm using the latest version of ZenCart.

Any suggestions how to fix this? Thank you for your responses.

1 Dec 2011, 2:34 PM
#673
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

It is a character encoding issue, which isn't really to do with IH at all.

If your character encoding is set to windows-1250 for your site, which the error suggests, then there is a lot of docmentation out there about issues with htmlentities.

The character encoding is set in the file languages/english.php ( or it's override ). You are looking for a line that looks like this:

// charset for web pages and emails
  define('CHARSET', 'iso-8859-1');

That is the default setting for Zen Cart -- iso-8859-1. It looks like you or someone else has changed this and you need to decide why. Or alternatively other changes have been made to your site that have messed up the character encoding.

As always it is actually a heck of a lot easier for people to help you if you give people a bit more information - like a URL for example.....

1 Dec 2011, 3:45 PM
#674
scriptjunkie avatar

scriptjunkie

Totally Zenned

Join Date:
Jul 2008
Posts:
772
Plugin Contributions:
0

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

DivaVocals:

and for the slightly off topic post.. :laugh:

HEY YOU!!! Long time no chat at!!! waves

With apologies to thread readers for being off topic: HEY!!! :smile: How are you feeling?!? Better I hope :smile: I've been reading your replies and thinking....it's so good to see her back! I look forward to your being 100% back whenever you feel up to it :smile:

1 Dec 2011, 7:25 PM
#675
dee_d_lady avatar

dee_d_lady

New Zenner

Join Date:
Jan 2011
Location:
Slovakia
Posts:
24
Plugin Contributions:
0

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

niccol:

It is a character encoding issue, which isn't really to do with IH at all.

If your character encoding is set to windows-1250 for your site, which the error suggests, then there is a lot of docmentation out there about issues with htmlentities.

The character encoding is set in the file languages/english.php ( or it's override ). You are looking for a line that looks like this:

// charset for web pages and emails
define('CHARSET', 'iso-8859-1');

> 
> That is the default setting for Zen Cart -- iso-8859-1.  It looks like you or someone else has changed this and you need to decide why.  Or alternatively other changes have been made to your site that have messed up the character encoding.
> 
> As always it is actually a heck of a lot easier for people to help you if you give people a bit more information - like a URL for example.....


Yes, my site <https://www.poncik.eu> is using windows-1250 charset. I understand now that htmlentities doesn't support this charset. But is there any other way to escape quotes without using htmlentities so I don't get the warning? Or is this line 690 that important for IH3?
1 Dec 2011, 10:35 PM
#676
scriptjunkie avatar

scriptjunkie

Totally Zenned

Join Date:
Jul 2008
Posts:
772
Plugin Contributions:
0

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

dee_d_lady:

Yes, my site https://www.poncik.eu is using windows-1250 charset. I understand now that htmlentities doesn't support this charset. But is there any other way to escape quotes without using htmlentities so I don't get the warning? Or is this line 690 that important for IH3?

All lines in the code are important. Typically speaking..software (well...good software) files don't carry extraneous or unnecessary code. All code that is written is code that is necessary.

Line 689 & 690 of this file: /includes/classes/bmz_image_handler.class.php contains the following code:

 //escape possible quotes if they're not already escapped
		$alt = addslashes(htmlentities($alt, ENT_COMPAT, CHARSET));

While I can't explain what this means exactly (someone more knowledgable about the inner workings of IH3 will need to answer that one) I can say it is necessary code.

I know that doesn't solve your problem, but someone more experienced with php will need to step in here to assist you.

2 Dec 2011, 2:15 PM
#677
soul39 avatar

soul39

Zen Follower

Join Date:
Jul 2008
Location:
london
Posts:
167
Plugin Contributions:
0

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

ScriptJunkie:

I don't know that it's going to be more difficult...but could definitely be time consuming if you have a lot of images.

I don't know of a program that will automatically rename your images for you...but if you've been using extensions on your file names like image1_LRG.jpg (with the _LRG part being the extension)...you're going to want to get rid of the extension anyway. So as long as you're dumping extensions, you can rename the files as you go.

I know that doesn't really help you cut down on the amount of work there is to do, I'm sorry. I'm afraid there's no fast easy way to organize/re-organize a lot of images that have been allowed to pile up in a single folder. That's not a criticism...I've been where you are so I really empathize.

I think you're going to have to take the long road to solve this one. Please don't let that deter you though....the results will be well worth the effort in the long run. The alternative is to leave it as is, and it will only get worse :(

Hi, Thanks, for the support! I am already on it. As suggested by the man, i found a program by typing in "free renaming.. in the big G, that seems to do what i want. I have about 500 images to rename and i have already whittled that down to 350 images with spaces.
I just need to rename twice; once to add the _ and once to remove the _LRG. I am on my way to doing it correctly.
BTW; great readme file!

Thanks, guys and gals
Soul39

2 Dec 2011, 2:57 PM
#678
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

While I agree entirely with what scriptjunkie says about extraneous code there are perhaps a few exceptions.

I haven't looked at this really closely but the line of code is 'sanitising' the alt tag before it is output. What that means effectively is that it is removing the double quotes from the alt tag if they are there. Why? Well if you think of an image tag:

<img src="whatever" alt="alt-text"/>

you can see that if the alt-text contains a double quote like this ( alt"-"text ) then you are going to end up with poorly formed html. Something like:

<img src="whatever" alt="alt"-"text"/>

which means that the double quotes in the image tag are messed up.

That is just an example, htmlentities turns a list of characters into their html entities. It is often used for sanitising user input before it is sent to a web page both for practical and security reasons. Have a read of http://php.net/manual/en/function.htmlentities.php to find out more about what it does.

Personally, I think it would be fine to make sure that all your image names do not contain any strange characters and then just comment out this line. But I am probably going to get seriously criticised for that comment :smile: Or you could write a bit of a replacement for htmlentities. Something like:

$alt = addslashes(str_replace('"','',$alt))

Which just removes any double quotes but doesn't do anything else so is not nearly as complete a solution. So, you could write a much more complete bit of code that, for instance removed any characters that were not a-z or 1-9. Something like:

$alt= preg_replace("/[^a-zA-Z0-9\s]/", "", $alt);

None of this is tested so.....

2 Dec 2011, 3:29 PM
#679
scriptjunkie avatar

scriptjunkie

Totally Zenned

Join Date:
Jul 2008
Posts:
772
Plugin Contributions:
0

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

Soul39:

Hi, Thanks, for the support! I am already on it. As suggested by the man, i found a program by typing in "free renaming.. in the big G, that seems to do what i want. I have about 500 images to rename and i have already whittled that down to 350 images with spaces.
I just need to rename twice; once to add the _ and once to remove the _LRG. I am on my way to doing it correctly.
BTW; great readme file!

Thanks, guys and gals
Soul39

That's awesome! Glad you found what you needed :smile:

7 Dec 2011, 9:01 AM
#680
presh avatar

presh

New Zenner

Join Date:
Oct 2011
Posts:
25
Plugin Contributions:
0

Re: Image Handler 3 Support Thread (for ZC v1.3.9)

presh:

Hello, I have a question about product images. When I list 4 or so images to come up for a product and list there LRG images too, I get the larger images under the small icon ones at the bottom but cannot navigate around the image. Is there a way that when you go to larger image you can pan through the image as at the momment it just zooms into a particular section of the small image and cannot move around, cheers presh.
v1.3.9h

sorry guys...Wasn't actually using Image Handler 3 when I asked this question I was doing it old school...sorry, I have now uploaded image handler and all is well. Thankyou.