ShopMadeSimple new development is comming
Posted: Thu Dec 24, 2009 8:10 pm
Dear Users I will try to fix the bugs in ShopMadeSimple. I need the module for a client of mine. Expect updates soon.
I am not a senior programmer. so don't expect the best possible solution, but it will work.
I will post the new code here. Please feel free to improve it as best as you can and post it back.
Let's make it work!
Here is the first fix. Most PHP configuration does not have exif_imagetype() complied.
function not found exif_imagetype()
Here is the work around for this function
Replace the switch on line 207 in ShopMadeSimple.php
switch(exif_imagetype($sourcedir.'/'.$image)) .......
With :
I am not a senior programmer. so don't expect the best possible solution, but it will work.
I will post the new code here. Please feel free to improve it as best as you can and post it back.
Let's make it work!
Here is the first fix. Most PHP configuration does not have exif_imagetype() complied.
function not found exif_imagetype()
Here is the work around for this function
Replace the switch on line 207 in ShopMadeSimple.php
switch(exif_imagetype($sourcedir.'/'.$image)) .......
With :
Code: Select all
list($width, $height, $type, $attr) = getimagesize($sourcedir.'/'.$image);
// Type of image will be determine
//1 = GIF 5 = PSD 9 = JPC 13 = SWC
//2 = JPG 6 = BMP 10 = JP2 14 = IFF
//3 = PNG 7 = TIFF(intel byte order) 11 = JPX 15 = WBMP
//4 = SWF 8 = TIFF(motorola byte order) 12 = JB2 16 = XBM
if ($type == 1)
{$srcimg = imagecreatefromgif($sourcedir.'/'.$image);}
elseif
($type == 2) {$srcimg = imagecreatefromjpeg($sourcedir.'/'.$image);}
elseif
($type == 3 ) {$srcimg = imagecreatefrompng($sourcedir.'/'.$image);}