Jump to content
Sign in to follow this  
tomjmul

Support thread for the Image Magic contribution

Recommended Posts

I have correctly installed the Image Magic Cont., but the product images will not change size from 100...i have changed them to 150, but they still show 100px, any thing i didnt do?

Share this post


Link to post
Share on other sites

I'm running CRE 6.15..

 

I tried to do the install, but am having problems with:

Step #6 - In :

/catalog/includes/functions/html_output.php

replace the entire tep_image() function with

 

I'm not sure which one to replace.. Can anyone help?

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Hi there,

 

I have installed the very first version of IM (date: 2005-11-21) on my system some time ago and it worked perfectly.

 

But now I just figured out, that the renewal of the thumbs is not working just by replacing the big image.

I had to delete the thumb, press refresh and IM brought up the new image.

 

So far, no problem.

 

Now, I just had to do exactly the same thing as described above, but now, my ftp-program is telling me, that he is running into a "permission denied" if I want to delete the new thumb again (to renew it again).

I took my console and saw that IM was writing the thumb as user NOBODY.

 

Can anyone tell me, why that happens and if I can change this (without upgrading - you now, never touch...)

 

Thanks in advance,

great contrib,

 

Andreas

Share this post


Link to post
Share on other sites
Hi Everyone,

 

I'm new to posting here so forgive me if I don't do it right. I have been viewing for a while and learning so much. However, I just can't figure this one out. :blink:

 

I installed the image magic contrib and my images do not show up. When I check the property I see image magic.php there and when I turn it off they come back. I see a post referring to code missing a ; but when I check my html_output.php I can't find that exact wording where this missing ; is supposed to go.

 

I also added a thumbnail folder as I saw a post talking about that and there wasn't one in my files.

 

Can someone give me any clue what I am doing wrong? Thanks :rolleyes:

 

Hi :)

 

My problem was identical to yours! I just gave up and turned it off but decided to glance at the thread to see if there were any new ideas..... Did you sort?

 

ty x

Share this post


Link to post
Share on other sites

For the ones that imagemagic doesnt work.

 

I had installed one on my shop under /catalog and it worked (except the watermarks).

Then i did a new shop without /catalog but imagemagic didnt work (the thubnail directory was empty).

So i found out where the problem was and publishing it so other can make it work.

1) on both installations

find in imagemagic.php at about line 20

require('includes/imagemagic/imagemagic.functions.php');

coment the next line:

chdir (DIR_FS_CATALOG);

 

2) when installation on root (not in catalog)

 

in imagemagic.php at about line 132

 

find

$image = @getimagesize($_GET['img']);

 

replace with:

$image = @getimagesize(DIR_FS_CATALOG .$_GET['img']);

 

find

// $filename = DIR_FS_CATALOG.$filename;

uncomment it

 

find

$src = imagecreatefromjpeg($_GET['img']);

replace with

$src = imagecreatefromjpeg(DIR_FS_CATALOG .$_GET['img']);

find

$src = imagecreatefromgif($_GET['img']);

replace with

$src = imagecreatefromgif(DIR_FS_CATALOG .$_GET['img']);

find

$src = imagecreatefrompng($_GET['img']);

replace with

$src = imagecreatefrompng(DIR_FS_CATALOG .$_GET['img']);

 

find

$src = imagecreatefrompng($_GET['img']);

replace with

$src = imagecreatefrompng(DIR_FS_CATALOG .$_GET['img']);

 

 

in html_output

find

$image_size = @getimagesize($src);

replace with

$image_size = @getimagesize(DIR_FS_CATALOG .$src);

 

 

in product_thumb

find

$image = @getimagesize($_GET['img']);

replace with

$image = @getimagesize(DIR_FS_CATALOG .$_GET['img']);

 

thats it!

Now also watermarks might work..

Share this post


Link to post
Share on other sites

i amwondering if it is a way to apply this contribution to all the images that allready have been uploaded to the website pr doy ou have to upload all the images one more time for it to take effect.

 

Meaning that if i allready have 500 products with images, must I go into eah product and upload the image for the product again or does this contribution go through all products and resize the thumbnail etc autmatically?

Share this post


Link to post
Share on other sites

This contribution was working fine for me until yesterday. I installed it about a month ago and it worked flawlessly. Unlike many of the contributions I installed during my OsC setup, this one required no debugging/hacking to get it to work right. I completely forgot about it and took Image Magic for granted. Until yesterday, that is, when all of my thumbnails/images became little white boxes that said "Error Database Connection."

 

I contacted my server, asked if they had changed something on their end. No, they said, it's something in your script.

 

I uploaded a backup copy of imagemagic.php. Problem persisted.

 

I switched off the master switch to the Image Magic contribution in admin configuration - my images came back! I switched Image Magic back on, and truly, the contribution lived up to its name and did some more Criss Angel action on my images. Not cool. I thought that maybe all of my image magic files were corrupted.

 

I downloaded a new copy of Image Magic 1.15 and uploaded those files - problem persisted.

 

I read through this thread. Went to phpmyadmin and deleted all references in the configuration tables to Image Magic. I re-ran the SQL file. I turned on Image Magic. I went to my website - "Error Database Connection" on all of my images.

 

What else can I try? I've got the contribution switched off right now to allow the reappearance of my images. I want this contribution to work, but if this persists, I may have to junk it for a more reliable package.

 

Sit and Spin - the Image Magic conundrum

Share this post


Link to post
Share on other sites

First of all, this is a great great great contribution.

It works perfectly in my calog and my shop looks nicer.

I have only a smaal problem in the admin section. The picture are not displayed correctly. I only can see line of some pixels height. The picture looks like a thin bar. :blink:

Does anyone has an idea ?

Thanks

Share this post


Link to post
Share on other sites
First of all, this is a great great great contribution.

It works perfectly in my calog and my shop looks nicer.

I have only a smaal problem in the admin section. The picture are not displayed correctly. I only can see line of some pixels height. The picture looks like a thin bar. :blink:

Does anyone has an idea ?

Thanks

 

This is a couple of dirty solutions. The first option displays the picture at full size instead of displaying a thumbnail. If you are using a large image as your source, it can take up a lot of screen space or push it self off the screen, forcing you to scroll right to see it.

 

Step 1 - Back up, if you dont, you deserve the pain the comes with not backing up.

Step 2 - Backup up again - trust me

 

Step 3:

 

Edit catalog/admin/categories.php

 

search for:

 

$contents[] = array('text' => '<br>' . tep_info_image($cInfo->categories_image, $cInfo->categories_name, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '<br>' . $cInfo->categories_image);

 

and replace it with:

 

$contents[] = array('text' => '<br>' . tep_info_image($cInfo->categories_image, $cInfo->categories_name) . '<br>' . $cInfo->categories_image);

 

Alternately, you can replace the variables HEADING_IMAGE_WIDTH and HEADING_IMAGE_HEIGHT with a fixed number. This will force your picture to a fixed size, either stretching or shrinking it as necessary. It will probably cause your thumbails to look odd, but should keep them on your screen.

Share this post


Link to post
Share on other sites

Hey - I just installed this tonight on my store and OMG its sweet. Thanks SOOOOO much!

 

I did notice that the font picked for the Text Watermark was Arial.ttf but this was not shipped with the zip file. It doesnt create an error it just will not display a watermark. I just copied the Arial.TTF file from my windows directory up to catalog/includes/imagemagic/fonts and it worked like a champ!

 

Good job on this!!! YAYYYYY!!!!!

Share this post


Link to post
Share on other sites

Hello.

 

Just installed Image Magic and get this message in the thumbnail:

Cache error. Cannot create dir. Check readme.

 

The directory is installed as thumbnails. Chmod set to 777. In the admin. panel the cash directory is set to /thumbnails.

Still get the message.

 

Allso checked the server info for Gd and it´s there.

 

My site is not installed in the catalog direktory but in the root folder.

Can this be an issue?

 

Ronny


May life be good to you...

Sincerely, Ronny

Share this post


Link to post
Share on other sites

 

link doesnt seems to work !

 

 

Is there anybody with enough kindness and courage to package a full and up to date new version

with all the fix and idea given here and there in this thread ?

i know it takes times to do that i know since i repackaged and released many contrib also , but i m sure taht then we could improve and give feedbacks to the author more than only post support help question B)

 

this contribution is so interessting , i know my paypal will be usefull again to award the author


MS2

Share this post


Link to post
Share on other sites
Hello.

 

Just installed Image Magic and get this message in the thumbnail:

Cache error. Cannot create dir. Check readme.

 

The directory is installed as thumbnails. Chmod set to 777. In the admin. panel the cash directory is set to /thumbnails.

Still get the message.

 

Allso checked the server info for Gd and it´s there.

 

My site is not installed in the catalog direktory but in the root folder.

Can this be an issue?

 

Found out the Chmod did not stay at 777. Couldn´t make it doe that so I deleted it and made a new thumbnail directory and changed the chmod to 777. I then got a blanc image with the right properties.

Why does the image not appear? Images does not appear in the thumbnails directory either.

In the install instructions it sais he made the assumption that osCommerce was installed in the catalog directory. My site is not. I installed it outside the catalog directory so my domain points directly to the shop.

If this is the problem how can I make this right.

Everything in the admin panel looks right allthough I didn´t alltogeather understand this:

 

-the width or height of the new image type - product information images (This sentence don´t make sence to me. But then again, I´m norwegian :-" )

-Now go to the Configuration -> Image Magic and set the options in there as required: (can´t find a required option)

 

This seems like a GREAT contrib. I would really like it to work.

 

Sincerely

Ronny

 

 

Ronny


May life be good to you...

Sincerely, Ronny

Share this post


Link to post
Share on other sites

For some strange reason that I can't work out my store logo is being processed through image magic. This results in a file which is larger than the original and although the increase isn't significant I would rather not have it processed. I have Process Store Graphics switched to False in admin.

 

Anyone know how to fix this?

 

Rich

Share this post


Link to post
Share on other sites
For some strange reason that I can't work out my store logo is being processed through image magic. This results in a file which is larger than the original and although the increase isn't significant I would rather not have it processed. I have Process Store Graphics switched to False in admin.

 

Anyone know how to fix this?

 

Rich

 

I have fixed this by adding:

 

if (strstr($src, 'logo.png')) $calculate = false;

 

to catalog/includes/functions/html_output.php just below:

 

//little gremlin fix start

if (strstr($src, 'pixel')) $calculate = false;

//little gremlin fix end

 

This can be used for other images that are slipping through the net.

 

I am back to my ongoing problem of SMALL_IMAGE size and PRODUCT_INFO_IMAGE size. I have set my Product Information Image Size to 200 and my Small Image Size to 116 (116 seems the largest value that doesn't adjust the column width when it is set to 125 in application top.

 

The problem is that when an infobox in the right column displays an image which is a thumbnail of the same product being displayed on product_info.php it uses the large image size and thus breaks the layout. I image that the variable is adjusted when the code calls the 200 size thumbnail and therefore it displays that in the right column.

 

I'll be working on this for a bit so if anyone has any suggestions I'd be more than grateful.

 

Cheers,

 

Rich

Share this post


Link to post
Share on other sites
I have fixed this by adding:

 

if (strstr($src, 'logo.png')) $calculate = false;

 

to catalog/includes/functions/html_output.php just below:

 

//little gremlin fix start

if (strstr($src, 'pixel')) $calculate = false;

//little gremlin fix end

 

This can be used for other images that are slipping through the net.

 

I am back to my ongoing problem of SMALL_IMAGE size and PRODUCT_INFO_IMAGE size. I have set my Product Information Image Size to 200 and my Small Image Size to 116 (116 seems the largest value that doesn't adjust the column width when it is set to 125 in application top.

 

The problem is that when an infobox in the right column displays an image which is a thumbnail of the same product being displayed on product_info.php it uses the large image size and thus breaks the layout. I image that the variable is adjusted when the code calls the 200 size thumbnail and therefore it displays that in the right column.

 

I'll be working on this for a bit so if anyone has any suggestions I'd be more than grateful.

 

Cheers,

 

Rich

 

Hi, I had that problem and read through most of the pages in this topic but found nothing to fix it and I don't want to spend hours just reading and not find anything so I decided to do some coding. I found a way do arrange that with some minors modifications.

 

I don't want to make an update to Tom's wonderful contrib so I post my code here to be discussed.

 

#1: In product_info.php,

- Find the following code:

if (tep_not_null($product_info['products_model'])) {

$products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';

} else {

$products_name = $product_info['products_name'];

}

- Add after:

$in_product_info_block = true;

 

#2: In the same file

- Find the following code:

if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {

- Add before:

$in_product_info_block = false;

 

#3: In html_output.php,

- Find the following code:

if (strstr($_SERVER['PHP_SELF'],"product_info.php")) {

- Change it for

if (strstr($_SERVER['PHP_SELF'],"product_info.php") && isset($in_product_info_block) & $in_product_info_block) {

 

And that's about it. It was tested for 5 mins but seems to works fine. Should fit for most versions: mine is OSC2MS2.2.

 

I had some problems previously with that contrib related to the php.ini file so I needed to also install the Register Globals contrib.

 

Alex

Share this post


Link to post
Share on other sites
Hi, I had that problem and read through most of the pages in this topic but found nothing to fix it and I don't want to spend hours just reading and not find anything so I decided to do some coding. I found a way do arrange that with some minors modifications.

 

I don't want to make an update to Tom's wonderful contrib so I post my code here to be discussed.

 

#1: In product_info.php,

- Find the following code:

if (tep_not_null($product_info['products_model'])) {

$products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';

} else {

$products_name = $product_info['products_name'];

}

- Add after:

$in_product_info_block = true;

 

#2: In the same file

- Find the following code:

if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {

- Add before:

$in_product_info_block = false;

 

#3: In html_output.php,

- Find the following code:

if (strstr($_SERVER['PHP_SELF'],"product_info.php")) {

- Change it for

if (strstr($_SERVER['PHP_SELF'],"product_info.php") && isset($in_product_info_block) & $in_product_info_block) {

 

And that's about it. It was tested for 5 mins but seems to works fine. Should fit for most versions: mine is OSC2MS2.2.

 

I had some problems previously with that contrib related to the php.ini file so I needed to also install the Register Globals contrib.

 

Alex

Alex,

 

Thank you very much for figuring this out. This was my main gripe with the Image Magic contibution and you have found a way to code what I imagined needed changing. This should be added to the contribution in my opinion. Hopefully Tom is watching and feels the same.

 

By changing the code you suggested and making sure SMALL_IMAGE_WIDTH and SMALL_IMAGE_HEIGHT were changed to PRODUCT_INFO_IMAGE_WIDTH and PRODUCT_INFO_IMAGE_HEIGHT in product_info.php this has completely resolved this issue!!!

 

Thanks so much!

 

Rich

Share this post


Link to post
Share on other sites

KITWEAR.COM KITWEAR.COM KITWEAR.COM KITWEAR.COM

 

DO NOT BUY FROM THIS WEBSITE. DO NOT BUY FROM THIS WESITE

 

COMPANY SENDING OUT FAKE GOODS. NO RETURN ADDRESS YOU WILL NEVER GET YOUR MONEY BACK

 

CROOKED COMPANY BEING INVESTIGATED BY TRADING STANDARDS

Share this post


Link to post
Share on other sites

Hi everybody!

 

I'm setting up a new OSC and have made some modifications to make the shop faster (decrease querie counts and parse time, as described by Chemo, here ). It worked all well and my shop was pretty fast

Then i've installed the latest version of image-magic to speed up the whole image-loading. But something went wrong, and now all is slow like never before. The images are popping in one after one after one. Same images have to load everytime i browse or refresh the site.

 

I hope you understand my english and have a solution for me...

 

Thanks a lot!!!

Edited by BackyardRacing

Share this post


Link to post
Share on other sites
Hi everybody!

 

I'm setting up a new OSC and have made some modifications to make the shop faster (decrease querie counts and parse time, as described by Chemo, here ). It worked all well and my shop was pretty fast

Then i've installed the latest version of image-magic to speed up the whole image-loading. But something went wrong, and now all is slow like never before. The images are popping in one after one after one. Same images have to load everytime i browse or refresh the site.

 

I hope you understand my english and have a solution for me...

 

Thanks a lot!!!

 

i forgot, here is my config:

Folder "thumbnails" is created and has CHMOD 777 (as like all subfolders and files in it)

 

Help support the OSC Image Magic Project Make a donation

Image Magic Master Switch On

Apply security features to registered customers Yes

Process Store's Graphics False

Auto Clean Cache True

Encrypt Image Filenames False

Filename Encryption Key changeme

Apply Internet Explorer PNG Transparency work-around? False

Use Resampling True

Create Truecolour Thumbnails True

Output GIFs as JPEGs False

'GIF as JPEG' Matte colour (HEX) FFFFFF

Cache Thumbnails on the Server True

Cache Thumbnails in user's browser True

Thumbnail Cache directory /thumbnails

Use 404 Response if image not found? True

Allow thumbnails larger than original True

Center if thumbnail larger than original False

JPEG Quality - Pop-up Images 100

JPEG Quality - Product Information Thumbnails 100

JPEG Quality - Category Thumbnails 100

JPEG Quality - Heading Thumbnails 100

JPEG Quality - Small Thumbnails 100

Graphic Watermark in Pop-up Images No

Graphic Watermark in Product Information Thumbnails No

Graphic Watermark in Category Thumbnails No

Graphic Watermark in Heading Thumbnails No

Graphic Watermark in Small Thumbnails No

Watermark Image File

Image Watermark Transparency 20

Image Watermark Position Top

Image Watermark Margin 0

Resize Watermark Image True

Text Watermark in Pop-up Images No

Text Watermark in Product Information Thumbnails No

Text Watermark in Category Thumbnails No

Text Watermark in Heading Thumbnails No

Text Watermark in Small Thumbnails No

Watermark Text Sample

Text Watermark Font Name arial.ttf

Text Watermark Size 10

Text Watermark Colour (HEX) 000000

Text Watermark Transparency 20

Text Watermark Position Top

Text Watermark Margin 0

Text Watermark Angle 0

Auto Adjust Brightness 0

Auto Adjust Contrast 0

Frame Pop-up Images No

Frame Product Information Thumbnails No

Frame Category Thumbnails No

Frame Heading Thumbnails No

Frame Small Thumbnails No

Frame Width 4

Frame Depth 4

Frame Colour (HEX) CCCCCC

Frame Inside 3D Highlight Colour (HEX) FFFFFF

Frame Inside 3D Shadow Colour (HEX) 000000

Buttonize Pop-up Images No

Buttonize Product Information Thumbnails No

Buttonize Category Thumbnails No

Buttonize Heading Thumbnails No

Buttonize Small Thumbnails No

Button Height 4

Button Highlight Colour (HEX) CCCCCC

Button Shadow Colour (HEX) 000000

Last Hash (System Use - Read Only) e184a6d0869be0cc8e0f8e3a08f07bd2

 

 

 

 

hinzugefügt am: 29.12.1899

letzte Änderung: 03.10.2005

Share this post


Link to post
Share on other sites

I'm interested in installing this contribution but after reading through these posts I'm not too sure which version to download.. seems like the newer versions might not be as good as the older?

 

which version did you use?

Share this post


Link to post
Share on other sites
I'm interested in installing this contribution but after reading through these posts I'm not too sure which version to download.. seems like the newer versions might not be as good as the older?

 

which version did you use?

The latest version which tomjmul released on 7 Nov 06 called 'Bug Fix release' is the full package. When I analysed the code vs the last full package I could only find a change to the donation part of the image magic configuration. Download that and install it. Then you should check if you have a problem with larger sized product_info.php images altering the size of the same image in the right column. you can check this by adding a review to a product and putting the reviews infobox in the right column. Then browse to the product for which you made the review and see if it displays the big image in the right infobox for reviews. If it does so you will need to look back a few posts and impliment the code alexv suggested. Check my post straight after it for additional info.

 

Cheers,

 

Rich

Edited by psynaptic

Share this post


Link to post
Share on other sites

i am wondering if it is a way to apply this contribution to all the images that allready have been uploaded to the website or do you have to upload all the images one more time for it to take effect.

 

Meaning that if i allready have 500 products with images, must I go into eah product and upload the image for the product again or does this contribution go through all products and resize the thumbnail etc autmatically?

 

Thank you to anybody who replies!

Share this post


Link to post
Share on other sites
i am wondering if it is a way to apply this contribution to all the images that allready have been uploaded to the website or do you have to upload all the images one more time for it to take effect.

When image magic is installed and activated each time an image is called it goes through a check to see if it should be resampled by image magic.

Meaning that if i allready have 500 products with images, must I go into eah product and upload the image for the product again or does this contribution go through all products and resize the thumbnail etc autmatically?

No you don't have to upload all your images again.

 

Rich

Share this post


Link to post
Share on other sites

This is the second time I've installed this contrib an I am still having issues. I read down through the posts and I still dont get it. I can usually figure this stuff out but today for some reason I cant!

 

I did not have a thumbnail file anywhere. So I created one (catalog/thumbnails) is this where it is supposed to be? I also added catalog/thumbnails/images and set them both to 777 an still have the issue where no photos are loading.

 

It looks as if the code is working but I must be doing something wrong with the thumbnails folder.

 

I am also having an issue with the more pics contrib. I can increase the size of the main image in the product info page but the other images stay the same size as set in small image size rather than changing to the size set in the product info size. I would like to have the thumbnails in the product info be larger than in the rest of the site.

 

Thanks in advance for your help!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×