Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Support thread for the Image Magic contribution


tomjmul

Recommended Posts

elazar: which thumbnail text? on which page?

 

Hi pixclinic !

 

Thanks for your reply :)

 

I want to change the text color that in the pop up images..

 

Could someone tell me if there is a good free image editor that I could use to add my Text or Logo simply to my products images, this would be a better solution for me instead of using Image Magic that:

 

1. Don't really protect my images. Surfers still go directly and copy the pictures from the image folder..

2. Make my site goes slower.

 

Thanks in advance for any help..

 

Regards,

Elazar

Link to comment
Share on other sites

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Goodday!

 

I have a problem with installing Image Magic; I hope someone can help me with this as i'm a complete dummy :'( with this.

 

In the instructions it says

 

Step #6 -

In :

/catalog/includes/functions/html_output.php

 

replace the entire tep_image() function with

 

and then a complete script follows.

 

At the required place I have this:

 

 

////

// The HTML image wrapper function

function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {

if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {

return false;

}

 

My question is.......what EXACTLY must I remove from this part in order to paste the new code?

I get a parse error in html_output.php with unexpected }

 

Thanks for looking at this for me! Any help is greatly appreciated!

Link to comment
Share on other sites

Goodday!

 

I have a problem with installing Image Magic; I hope someone can help me with this as i'm a complete dummy :'( with this.

 

In the instructions it says

 

Step #6 -

In :

/catalog/includes/functions/html_output.php

 

replace the entire tep_image() function with

 

and then a complete script follows.

 

At the required place I have this:

////

// The HTML image wrapper function

function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {

if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {

return false;

}

 

My question is.......what EXACTLY must I remove from this part in order to paste the new code?

I get a parse error in html_output.php with unexpected }

 

Thanks for looking at this for me! Any help is greatly appreciated!

 

The tep_image function is quite bigger than that.

 

what you have selected is just the first "if" statement. you need to select the entire function which is:

 

// The HTML image wrapper function
 function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
  return false;
}

// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
$image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

if (tep_not_null($alt)) {
  $image .= ' title=" ' . tep_output_string($alt) . ' "';
}

if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
  if ($image_size = @getimagesize($src)) {
	if (empty($width) && tep_not_null($height)) {
	  $ratio = $height / $image_size[1];
	  $width = $image_size[0] * $ratio;
	} elseif (tep_not_null($width) && empty($height)) {
	  $ratio = $width / $image_size[0];
	  $height = $image_size[1] * $ratio;
	} elseif (empty($width) && empty($height)) {
	  $width = $image_size[0];
	  $height = $image_size[1];
	}
  } elseif (IMAGE_REQUIRED == 'false') {
	return false;
  }
}

if (tep_not_null($width) && tep_not_null($height)) {
  $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
}

if (tep_not_null($parameters)) $image .= ' ' . $parameters;

$image .= '>';

return $image;
 }

 

and replace by what is indicated in teh MODs installation instructions

Edited by pixclinic
Link to comment
Share on other sites

I've just noticed that some of my product images don't show up when in secure (https) areas such as the account information page. Instead of having the image in the 'what's new' box there's a blank area with a message saying 'Error. File path incorrect. Check configure.php.' I've noticed that some images show up but others don't, the one's that don't are the one's that have spaces in the file name that get replaced with %20 by the server. I'm pretty sure it's an image magic issue as turning it off stops it from happening.

 

 

 

Of course the way to stop this is to not have spaces in my filenames (as that's naughty) but is there a way to alter imagemagic to get round this (try explaining to the people who run the sites on a day to day basis that unix systems dont understand spaces in filepaths and you'll see a sea of blank faces.).

Link to comment
Share on other sites

The tep_image function is quite bigger than that.

 

what you have selected is just the first "if" statement. you need to select the entire function which is:

 

 

 

and replace by what is indicated in teh MODs installation instructions

 

Hi there,

 

thanks so very much for your help! I changed it now. I still can't get the contribution to work properly. Everything seems to be installed fine, I can see the Image Magic tool in my configuration screen etc. but when I switch it to 'on' my images appear broken. Also when I go over my images with the mouse it doesn't point to imagemagic.php, but chooses the regular path :(

 

Any help is so much appreciated! I've searched for solutions in this topic but can't find it. Is there something that should be set in one of the configure.php files too maybe?

 

Thanks!

Link to comment
Share on other sites

Hi there.

After install the contribution, all the products images won't display ..

Anybody meet the problem before ?

 

Hi Guy with broken images.

A good way to diagnose this is to do a right click an see the image properties. the umage url can sometimes help you to understand the reason of the problem. there are so many reasons an image cannot be displayed with imagemagic, this would be a good start

Link to comment
Share on other sites

Hi Guy with broken images.

A good way to diagnose this is to do a right click an see the image properties. the umage url can sometimes help you to understand the reason of the problem. there are so many reasons an image cannot be displayed with imagemagic, this would be a good start

 

Pixclinic, thanks for your reply :P

and this is the url:-

http://shopping.forum-talk.com/imagemagic....&page=popup

 

but this is what i get :-

Warning: mkdir(home) [function.mkdir]: Permission denied in /home/tn728202/public_html/shopping/imagemagic.php on line 379

Warning: Cannot modify header information - headers already sent by (output started at /home/tn728202/public_html/shopping/imagemagic.php:379) in /home/tn728202/public_html/shopping/imagemagic.php on line 492

Warning: Cannot modify header information - headers already sent by (output started at /home/tn728202/public_html/shopping/imagemagic.php:379) in /home/tn728202/public_html/shopping/imagemagic.php on line 493

Warning: Cannot modify header information - headers already sent by (output started at /home/tn728202/public_html/shopping/imagemagic.php:379) in /home/tn728202/public_html/shopping/imagemagic.php on line 494

Warning: Cannot modify header information - headers already sent by (output started at /home/tn728202/public_html/shopping/imagemagic.php:379) in /home/tn728202/public_html/shopping/imagemagic.php on line 495

Warning: Cannot modify header information - headers already sent by (output started at /home/tn728202/public_html/shopping/imagemagic.php:379) in /home/tn728202/public_html/shopping/imagemagic.php on line 496

Warning: Cannot modify header information - headers already sent by (output started at /home/tn728202/public_html/shopping/imagemagic.php:379) in /home/tn728202/public_html/shopping/imagemagic.php on line 497

Link to comment
Share on other sites

Pixclinic, thanks for your reply :P

and this is the url:-

http://shopping.forum-talk.com/imagemagic....&page=popup

 

but this is what i get :-

Warning: mkdir(home) [function.mkdir]: Permission denied in /home/tn728202/public_html/shopping/imagemagic.php on line 379

Warning: Cannot modify header information - headers already sent by (output started at /home/tn728202/public_html/shopping/imagemagic.php:379) in /home/tn728202/public_html/shopping/imagemagic.php on line 492

Warning: Cannot modify header information - headers already sent by (output started at /home/tn728202/public_html/shopping/imagemagic.php:379) in /home/tn728202/public_html/shopping/imagemagic.php on line 493

Warning: Cannot modify header information - headers already sent by (output started at /home/tn728202/public_html/shopping/imagemagic.php:379) in /home/tn728202/public_html/shopping/imagemagic.php on line 494

Warning: Cannot modify header information - headers already sent by (output started at /home/tn728202/public_html/shopping/imagemagic.php:379) in /home/tn728202/public_html/shopping/imagemagic.php on line 495

Warning: Cannot modify header information - headers already sent by (output started at /home/tn728202/public_html/shopping/imagemagic.php:379) in /home/tn728202/public_html/shopping/imagemagic.php on line 496

Warning: Cannot modify header information - headers already sent by (output started at /home/tn728202/public_html/shopping/imagemagic.php:379) in /home/tn728202/public_html/shopping/imagemagic.php on line 497

 

from the url that you provided, I can tell that your product image is a gif.

check in your admin section for image magic if changing the setting "Output GIFs as JPEGs" is set on true

 

regarding the "headers already sent" errors, be sure that the VERY END of your imagemagic.php file ends with

 ?>

, AND THAT THERE IS NOT AND EXTRA BLANK CHARACTER OR LINE AFTER IT

 

Let me know

Edited by pixclinic
Link to comment
Share on other sites

from the url that you provided, I can tell that your product image is a gif.

check in your admin section for image magic if changing the setting "Output GIFs as JPEGs" is set on true

 

I enable it before, now already set to "no"

 

regarding the "headers already sent" errors, be sure that the VERY END of your imagemagic.php file ends with
 ?>

, AND THAT THERE IS NOT AND EXTRA BLANK CHARACTER OR LINE AFTER IT

 

Let me know

 

I never edit the file before.

I just copy and upload it to server.

This is the file :-

http://shopping.forum-talk.com/imagemagic.zip

 

Btw, thanks you very much to pixclinic.

Thanks for the fast response.

thanks you very much :P

Link to comment
Share on other sites

You file is clean.

double check that your image directory permissions are 777

 

2001697984749162312_rs.jpg

 

Really thanks to pixclinic to spend the time for me

Thanks you very much !!!!

 

If i disable the imagemagic ..

the images will show out ...

Link to comment
Share on other sites

Goodday!

 

I'm still having problems with Imagemagic. I had to turn it off because I also have all images broken.

Everything is installed fine. I have the feeling I miss something in the instructions for installing and something more needs to be set in a config file or something like that. My images don't point to imagemagic, but right to the normal place which is catalog/images :'(

 

Does anyone have any idea what can cause this? I have the thumbnails file and all. It's set to 777 too. I would so much appreciate it if anyone could help me with this, please? :blush:

 

Thanks!

Link to comment
Share on other sites

Hi there,

 

A short update. I now have my images pointing to imagemagic, yeaaaaaah. I did have my thumbnails file on 777 and thought the whole tree under that would be on 777 too, but that wasn't the case. The thumbnails/IMAGES file wasn't set to 777. After I changed that the images where pointing to imagemagic!!! So one problem is fixed, but...................I still get broken images. The broken images look different now. They have a little red block in the left corner and are broken. This is the link of one of the images:

 

www.blablabla.com/catalog/imagemagic.php?img=images/table_background_default.gif&w=181&h=81&page=

My images are all in catalog/images. Does anyone know what can be wrong? Please please help me. I'm totally lost! thanks so much.

Link to comment
Share on other sites

Hi there,

 

A short update. I now have my images pointing to imagemagic, yeaaaaaah. I did have my thumbnails file on 777 and thought the whole tree under that would be on 777 too, but that wasn't the case. The thumbnails/IMAGES file wasn't set to 777. After I changed that the images where pointing to imagemagic!!! So one problem is fixed, but...................I still get broken images. The broken images look different now. They have a little red block in the left corner and are broken. This is the link of one of the images:

 

www.blablabla.com/catalog/imagemagic.php?img=images/table_background_default.gif&w=181&h=81&page=

My images are all in catalog/images. Does anyone know what can be wrong? Please please help me. I'm totally lost! thanks so much.

 

Lathyrus,

You set the folder "IMAGES" to capital letter or just "images" ?

Link to comment
Share on other sites

Lathyrus,

You set the folder "IMAGES" to capital letter or just "images" ?

 

Hi there,

 

With no capitals :)

I also noticed that not all my images are pointing to imagemagic. Very weird! And when I turn ImageMagic off in the Admin control panel my image thumbnails look weird. See here: http://www.gorgeouscrafts.com/catalog/inde...?cPath=34_83_94

 

I'm totally lost. What a mess!

 

But thanks!

Edited by Lathyrus
Link to comment
Share on other sites

Hi there,

 

With no capitals :)

I also noticed that not all my images are pointing to imagemagic. Very weird! And when I turn ImageMagic off in the Admin control panel my image thumbnails look weird. See here: http://www.gorgeouscrafts.com/catalog/inde...?cPath=34_83_94

 

I'm totally lost. What a mess!

 

But thanks!

 

My image magic cannot function ...

i already uninstall it :blush:

sorry, i cannot give the help to u ..

Link to comment
Share on other sites

Could someone help with my Image Magic installation? I have installed it on my clients catalog, but the image processing is either VERY slow, or non-existent. To give it a try, go to http://www.dunamisink.com/catalog/. Click on any item. Click the Enlarge Image link. (Or just click the enlarge link under one of the pictures on the main page. Or click HERE.)

 

I have created the Thumbnail folder, and it's CHMOD 777. It used to work with the product thumbnails, but even that fails. (I have disabled that feature.)

 

Any thoughts off the top of your head? If you require information, let me know what and I'll look it up.

 

Thanks.

Link to comment
Share on other sites

Could someone help with my Image Magic installation? I have installed it on my clients catalog, but the image processing is either VERY slow, or non-existent. To give it a try, go to http://www.dunamisink.com/catalog/. Click on any item. Click the Enlarge Image link. (Or just click the enlarge link under one of the pictures on the main page. Or click HERE.)

 

I have created the Thumbnail folder, and it's CHMOD 777. It used to work with the product thumbnails, but even that fails. (I have disabled that feature.)

 

Any thoughts off the top of your head? If you require information, let me know what and I'll look it up.

 

Thanks.

 

 

Hi, I tried to open an image in your site, and it worsk, even though its very slow. You have to wait a little when the popup opens. It seems like the image path is not correct, cause I do not see the picture, just the pictureframe with the white page and red cross, if you know what I mean. If the path is corrected, so that it finds the image, it should show, but VERY slow.

Best regards

Kjolebutikken

Link to comment
Share on other sites

I have tried in vain to get hold of Tom. Tom your site doesn't work properly, I can't log in and the contact form doesn't work either.

 

I have a site http://www.kiffpics.co.za/shop/ and no watermarks are showing up. Everything else is working fine. Please note I have added manual watermarks on images all except the latest kelly slater shot for testing.

 

If anyone that's able to help can please PM me or reply here I would be grateful!

 

Regards

MtraX

Link to comment
Share on other sites

I've added an install instructions text file to the contrib page to keep a set of instructions in one place rather than having to rely on a website that might be down, and also to clarify the replacement of the tep_image() function (thanks DeadDingo).

 

 

If I've missed anything important out or made a glaring error, feel free to point it out.

 

Link if anyone needs it.

Link to comment
Share on other sites

I've added an install instructions text file to the contrib page
Thanks for that!

Can someone please tell me why I still have to create the subfolders inside the thumbnail folder by myself according to the image/ subfolders and CHMOD them to 777?

As it is my understanding, imagemagic should create subfolders himself?

Please let me know.

Thanks!

G?tz

Link to comment
Share on other sites

You have got to be kidding me... It was the PHP error reporting setting.

 

Changed it from:

error_reporting = E_ALL; display all errors, warnings and notices

 

To this:

error_reporting = E_ALL & ~E_NOTICE

 

Now it works great. What a relief.

 

 

Thank You VERY MUCH, yatahaze!

 

I had the same Problem (show the Images after refresh) and with changes in php.ini now it works. :thumbsup:

I cant believe. :)

 

Greatings from Germany,

TiloT

Link to comment
Share on other sites

Vines,

glad to see you're still here - i'm planning in a week or so to start a new thread concerning the dev of the 'Images & Media' beta contrib - even though i'll not be getting to making it till late this year or early next, i think a discusion of desired features and php intergration, etc. would prove beneficial - would you like me to send you a private message informing of when/where i start such thread or do you think i should merely announce it here in this thread?

Yes, please. I will be very interested, especially in media (video) capabilities. Look forward to it. I can't offer much by way of php skill, but I can definitely add some stuff related to media.

yup - you got me goin on this topic - thanks - i announced the plan for the dream at dev of Media Monster v0.0 Beta - hopefully the beta contrib will be finished by spring and refined to the point that within a years time nobody will have to stumble their way along with Image Magic...

Link to comment
Share on other sites

Hi there, when I try to install image magic, I have a basic problem with the sql entry - the 'configuration id' '3502' is already in use so I get a "#1046 duplicate entry" error. Essentially Another contribution is already using the unique id's that the sql file is trying to write to.

 

What I would like to know is, if I change the configuration id values in the image magic install sql file (and all the other configuraiton id's that follow), will the install still work? I would test it but I don't have the luxury of crashing the site as I am supposed to be finishing this site up asap for the owner.

 

Any help would be greatly appreciated!

 

Thanx, mo

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.

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...