Jump to content
Sign in to follow this  
tomjmul

Support thread for the Image Magic contribution

Recommended Posts

well since my shop is set up with out the catalog directory can anyone tell me how should i go about chainging it so i can use the watermark image files in the imagemagic option, since all i am getting now is a blank white small box, with out the images that are there.

 

my guess is that since it explains where the directory is for the images =(/catalog/includes/imagemagic/watermarks/) it would not work for a site that is setup like mine which is =(/includes/imagemagic/watermarks/)...

 

hope i explained what im struggling with here clearly, as i do not do it well in most cases :blush:

anyone

Share this post


Link to post
Share on other sites

Hi,

 

I'm too having problems with the 'parse error' and cant see a solution in this thread. I followed the instructions once and got the error, so I installed it again after I had reinstalled my backups and I got the exact same error again.

 

help please!

 

Heres the error, I just get a blank page with this at the top

Parse error: syntax error, unexpected T_FUNCTION, expecting T_STRING in /home/discoun/public_html/includes/functions/html_output.php on line 75

Share this post


Link to post
Share on other sites
Quick Bump for any new installs:

 

If you're not seeing images in your new installation, complete the ImageMagic installation by:

creating /thumbnails/images and chmoding both directories 777.

 

This isn't mentioned in the docs and it doesn't appear to create the directories for you (at least not on my server)

 

 

Ah really interested in this. I installed this but just cannot see any images when I turn it on and my instinct was that I may have got this bit wrong as rest of instructions seemed straight forward. Have searched and searched but could not work this bit out - where exactly have you put these please?

Share this post


Link to post
Share on other sites

I had to make this same change to get product images to show as stu2000.

&& $product_info[products_id]==$_GET['products_id']

 

Thanks for figuring that out for me, stu2000.

I wish someone would explain the reason for this.

 

QUESTION! config_cache.php keeps breaking in my line 236 with an error about the paypal donation.

I do not mind donating for this great contrib once I get it up on my real server. But is this breaking intentional and only to be fixed by a donation? Slick if it is.

 

.

Share this post


Link to post
Share on other sites

I paid Tom Muldoon (the creator of this contribution) $250 for an Image Magic install and for other freelance work that he agreed to do. As soon as the PayPal payment went through to him he ceased all communication with me. Not one bit of work has been done. It has been over 2 weeks now without any communication.

 

I emailed him at the email address he used to correspond with me (tom@celtware.com) and does not respond. I also contacted him via the form on his website http://www.celtware.com/im/contact.php and emailed him through his PayPal email oscimagemagic@celtware.com and he still does not reply. He also has not replied to PayPal's dispute emails either.

 

If he makes good on this issue and refunds my money then I will let the community know. I'm sorry this had to get posted.

Share this post


Link to post
Share on other sites

everything works fine here, except for thumbs in admin session are displayed wrong. The height is right, but the width is only 1 pixel... any id? why??

 

 

 

outback: he is not here either... maybe something happened? u never know

Edited by frenchflies

Share this post


Link to post
Share on other sites

I have Image magic 1.5 and More_Pics_6 installed. there is one problem. when I am in a product_info page, and the same product is in the specials box. The size of the Product image in the specials box is wrong. It should be the SMALL_IMAGE size, but instead, it's now shown as PRODUCT_INFO_IMAGE size!

 

the problem accur only if I am in the product info page and same product is in the specials box!!

 

Please anybody, help!!

Edited by frenchflies

Share this post


Link to post
Share on other sites

Hello,

 

I've been reading through these forums about the watermark issues - text and graphic...

 

now, depending on how you have set up catalog/includes/configure.php - the offending line of code may differ!

 

For some of you, check catalog/imagemagic.php for a missing starting '/' before 'includes/imagemagic/...' in the watermark path around 261 like suggested earlier by Mark.

 

HOWEVER, I found my issue was in the changes to admin/includes/functions/general.php

 

It uses the document_root as a path for the font (text) and graphic watermarks... in my configuration I had to add my starting '/' before 'includes/imagemagic/...' in bot the text and graphic watermark path. Then POOF, the dropdown box appeared in the Admin!

 

I did not need to change imagemagic.php

 

Hope this helps some of you!

 

Scott

olsonsp4c

Share this post


Link to post
Share on other sites

Hiya,

 

I'm having similar problems. My main one is that my catalogue directory is not called "catalog" it is called "profiles". All the references to filepaths in my admin section have catalog/ at the beginning.

 

Where do I look to tell image magic that it should be dealing with profiles/... for all the filepaths?

 

Any help would be great.


If you will suck my soul, I will lick you're funky innocence.

Share this post


Link to post
Share on other sites

Hi all,

I've searchd the support thread and have not found a solution to my problem. None of my images are showing. There is a big blank. The url of the images does show imagemagic.php. However, some also show ?img=.... while others don't. Nonetheless, the images don't appear at all.

Any thoughts?

I've also had to manually create thumbnail directory, and when i did found an image folder inside it with some images. The CHMOD is set to 777. But have i put the dir in the correct place? My one is inside catalog, i.e. catalog/thumbnails.

Share this post


Link to post
Share on other sites

I am having the following error. When I clock on: Text Watermark Font Name/edit

 

Fatal error: Call to undefined function: tep_cfg_pull_down_installed_fonts() in /home/bbprop/public_html/catalog/admin/configuration.php(125) : eval()'d code on line 1

 

And when I clock on: Watermark Image File/edit

 

Fatal error: Call to undefined function: tep_cfg_pull_down_installed_watermarks() in /home/bbprop/public_html/catalog/admin/configuration.php(125) : eval()'d code on line 1

Share this post


Link to post
Share on other sites

I have it installed using the readme.html instructions, but doesn't work at all and messed with 2 images on top of admin page (cart and oscommerce logo).

 

Any sugestions ?

 

my store is at www.slaveinformatica.com.br/lojavirtual

 

 

Fabio

Share this post


Link to post
Share on other sites

I am adding this post, in case someone else ends up with the same problems I had with Image Magic.

 

I recently moved my website from Ipowerweb to a local host, due to Ipower's unwillingness to fix the Apache User Dir vulnerability.

 

On the new host, I noticed that my product photos would randomly NOT display. However, when the image was right clicked "view image," the image would show properly.

 

I completely re-installed Image Magic, to no benefit.

 

Finally, I checked the server's error logs, and noticed entries like the following:

 

client denied by server configuration: /server directory/catalog/imagemagic.php

 

Also, if I rapidly reloaded the main page; upon each relaod, I would lose more images each reload, to the point that I would end up with a plain white page with text. Finally, I would end up with a 403 error. If I waited a few seconds, and reloaded, the nearly perfect page would load into the browser.

 

I contacted my host, and he checked deep into the server logs and administration.

He was able to find a couple of articles that referenced the same type of problem and permissions error. It pointed to "mod_evasive" which is a program used on the server to help prevent DDOS attacks.

 

He then changed some of the settings, for the server, and I have yet to have this problem reoccur.

 

I read as much of this thread, as I could. I could not locate any other users who had experienced this problem. Therefore, I am leaving this as a reference.

 

Rob


-------------------------------

Rob

Huntsville, AL

Share this post


Link to post
Share on other sites

My store is at Abdinor.net

 

I have been trying for 2 days to get Imagemagic to work and now I give up and ask for help. I followed instructions I think and everything seems to fine. The only problems I had was that I had to create my directories manually and I was not sure where imagemagic.php should be so I tried it in includes and in includes/imagemaker The result was the same in both.

 

I can get into the admin part fine and it seems to work. Also if I change the image sizes ther, the placeholders on the site change. But on the site, the image is broken. Properties shows imagemaker.php? in the url. What is on the site now is a fresh install after a restore. This is the third time I have done that. The sql file went in without error. Please can someone tell me what I am doing wrong. I am not new to computers but php, oscommerce, webdesign and all this I started working on about 2 weeks ago. So I need gentle guidence.

 

Thanks

Janet

abdinor.net

Share this post


Link to post
Share on other sites

Ok, have been through and think it maybe something to do with my html_output.php file, as I have the admin side OK, but when you click on the image it still says:

 

http://jemcraftmemories.com/shop/images/cr...%20dividerd.jpg

 

so is still pointing or grabbing from the /shop/images file instead of using imagemagic.

 

I am posting my html_output.php file in the hopes that someone very kind and helpful would take a look for me to compare with theirs and let me know where I have gone wrong.

 

Many thanks in advance

Jemma

 

<?php
/*
 $Id: html_output.php,v 1.56 2003/07/09 01:15:48 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

////
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
global $request_type, $session_started, $SID;

if (!tep_not_null($page)) {
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
}

if ($connection == 'NONSSL') {
  $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
} elseif ($connection == 'SSL') {
  if (ENABLE_SSL == true) {
	$link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
  } else {
	$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
  }
} else {
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');
}

if (tep_not_null($parameters)) {
  $link .= $page . '?' . tep_output_string($parameters);
  $separator = '&';
} else {
  $link .= $page;
  $separator = '?';
}

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
  if (tep_not_null($SID)) {
	$_sid = $SID;
  } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
	if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
	  $_sid = tep_session_name() . '=' . tep_session_id();
	}
  }
}

if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
  while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

  $link = str_replace('?', '/', $link);
  $link = str_replace('&', '/', $link);
  $link = str_replace('=', '/', $link);

  $separator = '?';
}

if (isset($_sid)) {
  $link .= $separator . $_sid;
}

return $link;
 }

////
// The HTML image wrapper function
// BOF Image Magic 
function tep_image($src, $alt = '', $width = '', $height = '', $params = '') {  
 global $product_info;

 //Allow for a new intermediate sized thumbnail size to be set 
 //without any changes having to be made to the product_info page itself. 
 //(see the lengths I go to to make your life easier :-)
 if (strstr($_SERVER['PHP_SELF'],"product_info.php")) {

	if (isset($product_info['products_image']) 
			   && $src == DIR_WS_IMAGES . $product_info['products_image']
			   && $product_info[products_id]==$_GET['products_id'])  {   //final check just to make sure that we don't interfere with other contribs
		$width = PRODUCT_INFO_IMAGE_WIDTH == 0?'':PRODUCT_INFO_IMAGE_WIDTH;
		$height = PRODUCT_INFO_IMAGE_HEIGHT == 0?'':PRODUCT_INFO_IMAGE_HEIGHT;
		$product_info_image=true;
		$page="prod_info"; 
	}
 }

 //Detect whether this is a pop-up image
 if (strstr($_SERVER['PHP_SELF'],"popup_image.php")) $page="popup";

 //do we apply the IE PNG alpha transparency fix?
 if  (strstr(strtolower($src),".png") && CFG_PNG_BUG=="True") $fix_png = true;

 //send the image for processing unless told otherwise
 $image = '<img src="' . $src . '"'; //set up the image tag just in case we don't want to process
 if (CFG_MASTER_SWITCH=="On") $calculate = true;
 else $calculate=false;

 // Don't calculate if the image is set to a "%" width
 if (strstr($width,'%') == true || strstr($height,'%') == true) $calculate = false; 

 // Dont calculate if a pixel image is being passed (hope you dont have pixels for sale)
 if (strstr($image, 'pixel')) $calculate = false;


 $image_size = @getimagesize($src);


 // Decide whether or not we want to process this image
 if (($width == '' && $height == '' && $page != 'popup' ) || ($width == $image_size[0] && $height == $image_size[0] && $page != 'popup')) {  
	if (CFG_PROCESS_GRAPHICS=="False") $calculate = false; //looks like this is a store graphic rather than product image
 }	

 // Is this image good to go?
 if (CONFIG_CALCULATE_IMAGE_SIZE && $calculate) { 

 if ($image_size) { 

  $ratio = $image_size[1] / $image_size[0];

  // Set the width and height to the proper ratio
  if (!$width && $height) { 
	$ratio = $height / $image_size[1]; 
	$width = intval($image_size[0] * $ratio); 
  } elseif ($width && !$height) { 
	$ratio = $width / $image_size[0]; 
	$height = intval($image_size[1] * $ratio); 
  } elseif (!$width && !$height && !$over_ride) { 
	$width = $image_size[0]; 
	$height = $image_size[1]; 
  } 

  //Encrypt the image filename if switched on
	if (CFG_ENCRYPT_FILENAMES == "True" && CFG_ENCRYPTION_KEY !="") {
		  $result = '';
		  $key=CFG_ENCRYPTION_KEY;
		  for($i=0; $i<strlen($src); $i++) {
			  $char = substr($src, $i, 1);
			  $keychar = substr($key, ($i % strlen($key))-1, 1);
			  $char = chr(ord($char)+ord($keychar));
			  $result.=$char;
		  }
		  $src=urlencode(base64_encode($result));
	}

   //Return the html
	$image = '<img src="imagemagic.php?img='.$src.'&w='.
	tep_output_string($width).'&h='.tep_output_string($height).'&page='.$page.'"';

} elseif (IMAGE_REQUIRED == 'false') { 
  return false; 
} 
 }  

//If the size asked for is greater than the image itself, we check the configs to see if this is allowed and if not over-ride
 if ($width > $image_size[0] || $height > $image_size[1]) {
	if (CFG_ALLOW_LARGER  != 'True'){
		  $width=$image_size[0];
		  $height=$image_size[1];
		  $over_ride = true;
	}
 }
 // Add remaining image parameters if they exist
 if ($width) { 
$image .= ' width="' . tep_output_string($width) . '"'; 
 } 

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

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

 $image .= ' border="0" alt="' . tep_output_string($alt) . '"';

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

 if ($fix_png && CFG_MASTER_SWITCH=="On") {
	$image .= ' onload="fixPNG(this)"'; 
 }

 $image .= '>';   
 return $image; 
}
//EOF Image Magic

////
// The HTML form submit button wrapper function
// Outputs a button in the selected language
 function tep_image_submit($image, $alt = '', $parameters = '') {
global $language;

$image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

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

$image_submit .= '>';

return $image_submit;
 }

////
// Output a function button in the selected language
 function tep_image_button($image, $alt = '', $parameters = '') {
global $language;

return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters);
 }

////
// Output a separator either through whitespace, or with an image
 function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {
return tep_image(DIR_WS_IMAGES . $image, '', $width, $height);
 }

////
// Output a form
 function tep_draw_form($name, $action, $method = 'post', $parameters = '') {
$form = '<form name="' . tep_output_string($name) . '" action="' . tep_output_string($action) . '" method="' . tep_output_string($method) . '"';

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

$form .= '>';

return $form;
 }

////
// Output a form input field
 function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) {
$field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {
  $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
} elseif (tep_not_null($value)) {
  $field .= ' value="' . tep_output_string($value) . '"';
}

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

$field .= '>';

return $field;
 }

////
// Output a form password field
 function tep_draw_password_field($name, $value = '', $parameters = 'maxlength="40"') {
return tep_draw_input_field($name, $value, $parameters, 'password', false);
 }

////
// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
 function tep_draw_selection_field($name, $type, $value = '', $checked = false, $parameters = '') {
$selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';

if ( ($checked == true) || ( isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ( ($GLOBALS[$name] == 'on') || (isset($value) && (stripslashes($GLOBALS[$name]) == $value)) ) ) ) {
  $selection .= ' CHECKED';
}

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

$selection .= '>';

return $selection;
 }

////
// Output a form checkbox field
 function tep_draw_checkbox_field($name, $value = '', $checked = false, $parameters = '') {
return tep_draw_selection_field($name, 'checkbox', $value, $checked, $parameters);
 }

////
// Output a form radio field
 function tep_draw_radio_field($name, $value = '', $checked = false, $parameters = '') {
return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters);
 }

////
// Output a form textarea field
 function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
$field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

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

$field .= '>';

if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {
  $field .= stripslashes($GLOBALS[$name]);
} elseif (tep_not_null($text)) {
  $field .= $text;
}

$field .= '</textarea>';

return $field;
 }

////
// Output a form hidden field
 function tep_draw_hidden_field($name, $value = '', $parameters = '') {
$field = '<input type="hidden" name="' . tep_output_string($name) . '"';

if (tep_not_null($value)) {
  $field .= ' value="' . tep_output_string($value) . '"';
} elseif (isset($GLOBALS[$name])) {
  $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
}

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

$field .= '>';

return $field;
 }

////
// Hide form elements
 function tep_hide_session_id() {
global $session_started, $SID;

if (($session_started == true) && tep_not_null($SID)) {
  return tep_draw_hidden_field(tep_session_name(), tep_session_id());
}
 }

////
// Output a form pull down menu
 function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
$field = '<select name="' . tep_output_string($name) . '"';

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

$field .= '>';

if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

for ($i=0, $n=sizeof($values); $i<$n; $i++) {
  $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
  if ($default == $values[$i]['id']) {
	$field .= ' SELECTED';
  }

  $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
}
$field .= '</select>';

if ($required == true) $field .= TEXT_FIELD_REQUIRED;

return $field;
 }

////
// Creates a pull-down list of countries
 function tep_get_country_list($name, $selected = '', $parameters = '') {
$countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
$countries = tep_get_countries();

for ($i=0, $n=sizeof($countries); $i<$n; $i++) {
  $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
}

return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
 }
?>

Share this post


Link to post
Share on other sites
My store is at Abdinor.net

 

Thanks to those of you who had a look. Since I received no responses and since no one seems to be receiving responses on this thread lately I decided to pay the $60 for an install but that link is no longer available so I bit the bullet and uninstalled. It seems like such a good contrib but I am afraid to start something I can't get support on. Good luck to all and thanks again to those who had a look.

 

Janet

Share this post


Link to post
Share on other sites

man,

 

looks like we both have the same problem..

 

I dunno what's wrong..

 

Did u try to put all store setting on imagemagic ? mine crashes all the store..

 

also, my home dir isn't ./catalog, it's ./lojavirtual, but it seems to be correct on configure and imagemagic.

 

I'm sorry to tell ya, but this contribution theread looks like abandoned. :/

 

nobody helps, just ask for help and get no answers :/ ... i'm waiting for some tips for a few days :(

 

Fabio

 

 

 

Ok, have been through and think it maybe something to do with my html_output.php file, as I have the admin side OK, but when you click on the image it still says:

 

http://jemcraftmemories.com/shop/images/cr...%20dividerd.jpg

 

so is still pointing or grabbing from the /shop/images file instead of using imagemagic.

 

I am posting my html_output.php file in the hopes that someone very kind and helpful would take a look for me to compare with theirs and let me know where I have gone wrong.

 

Many thanks in advance

Jemma

Share this post


Link to post
Share on other sites
Just found a small bug which can result in stock osc button images or arrows etc showing up as broken images if they have been deleted.

 

The change is to tep_image() in html_output.php

 

Find:

 

} elseif (IMAGE_REQUIRED == 'false') {

return '';

}

 

Change to:

 

} elseif (IMAGE_REQUIRED == 'false') {

return false;

}

 

Tom

 

This still doesn't work for my site.

 

www.dciron.co.uk/shop

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  

×