Guest billmc Posted May 5, 2005 Share Posted May 5, 2005 File Name :: makethumb.txt(gif support) Author :: billmc Category :: Minor Description This is the moded makethumb.txt that enables *.gif support for image upload. It assumes that gd2 is available which has *.gif support. Copyright issues for *.gif are discussed elsewhere. Upload to your cubecart2 /images folder View File Link to comment Share on other sites More sharing options...
Guest Posted May 6, 2005 Share Posted May 6, 2005 this mod didnt work for me. I uploaded it to my cubecart images folder and still couldnt upload gif images, i also checked the GD version and it was 2.0 something Link to comment Share on other sites More sharing options...
Guest Posted May 9, 2005 Share Posted May 9, 2005 Theres a reason for that. Although this little mod tells makethumb.txt to make thumbs of gifs, there are unfortunately, other error checking codes in place, that prevent gifs from being uploaded. These also need to be amended. In add_product.php, line 414, nee4ds to be changed from if (($userfile_type=="image/x-png") || ($userfile_type=="image/pjpeg") || ($userfile_type=="image/jpeg")) { to if (($userfile_type=="image/x-png") || ($userfile_type=="image/pjpeg") || ($userfile_type=="image/jpeg") || ($userfile_type=="image/gif")) { Also, you will need to make the exact same change to edit_product.php, line 169. Categories are not affected as categories allow gifs, as category images are not thumbnailed. Link to comment Share on other sites More sharing options...
Guest Posted May 10, 2005 Share Posted May 10, 2005 shot bill! Link to comment Share on other sites More sharing options...
Guest Posted May 30, 2005 Share Posted May 30, 2005 Tried all these steps but gif thumbs still not being created any ideas??? I used the new makethumb.txt from the forum altered the format checks as above but no joy. This is the error Warning: imagecreatefromgif(/home/***********/public_html/images/Watch_FlashSticker.gif): failed to open stream: No such file or directory in /home/sites/*********/public_html/images/makethumb.txt on line 44 Warning: imagecreatetruecolor(): Invalid image dimensions in /home/***********/public_html/images/makethumb.txt on line 107 Warning: imagegif(): supplied argument is not a valid Image resource in /home/***********/public_html/images/makethumb.txt on line 123 Below is the make thumb txt for reference Gary <? /*************************************************************************** *  Copyright:    Copyright 2003 http://www.brooky.com *    ***************************************************************************/ // CONFIGURATION FOR THUMBNAILS // FOR GD VERSION 1.6 (default) SET $gd_version=1; // FOR GD VERSION 2.0+ FOR IMPROVED THUMBNAILS SET $gd_version=2; // IF YOU DO NOT HAVE GD SET $gd_version=0; $gd_version=2; // HOW CAN I TELL WHAT VERSION I RUN? // Login to admin and click server environment off the main menu. // If you have GD you will see a table entitled GD and the // version number will be displayed there. ) // END THUMBNAILS CONFIG // ************************************************************************* class thumbnail { var $img; function thumbnail($imgfile) { //detect image format $this->img["format"]=ereg_replace(".*\.(.*)$","\\1",$imgfile); $this->img["format"]=strtoupper($this->img["format"]); if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") {  //JPEG  $this->img["format"]="JPEG";  $this->img["src"] = ImageCreateFromJPEG ($imgfile); } elseif ($this->img["format"]=="PNG") {  //PNG  $this->img["format"]="PNG";  $this->img["src"] = ImageCreateFromPNG ($imgfile); } elseif ($this->img["format"]=="GIF") {  //GIF  $this->img["format"]="GIF";  $this->img["src"] = ImageCreateFromGIF ($imgfile); }else {  //DEFAULT  echo "Not Supported File! Thumbnails can only be made from .jpg .png and >gif images!";  exit(); } @$this->img["lebar"] = imagesx($this->img["src"]); @$this->img["tinggi"] = imagesy($this->img["src"]); //default quality jpeg $this->img["quality"]=75; } function size_auto($size=100) { //size if ($this->img["lebar"]>=$this->img["tinggi"]) {    $this->img["lebar_thumb"]=$size;    @$this->img["tinggi_thumb"] = ($this->img["lebar_thumb"]/$this->img["lebar"])*$this->img["tinggi"]; } else {    $this->img["tinggi_thumb"]=$size;    @$this->img["lebar_thumb"] = ($this->img["tinggi_thumb"]/$this->img["tinggi"])*$this->img["lebar"];  } } function jpeg_quality($quality=75) { //jpeg quality $this->img["quality"]=$quality; } function show($gd_version) { @Header("Content-Type: image/".$this->img["format"]);  if($gd_version==2)         {         $this->img["des"] = imagecreatetruecolor($this->img["lebar_thumb"],$this->img["tinggi_thumb"]);      @imagecopyresampled ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["lebar_thumb"],$this->img["tinggi_thumb"], $this->img["lebar"], $this->img["tinggi"]);      }         if($gd_version==1)         {         $this->img["des"] = imagecreate($this->img["lebar_thumb"],$this->img["tinggi_thumb"]);      @imagecopyresized ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["lebar_thumb"],$this->img["tinggi_thumb"], $this->img["lebar"], $this->img["tinggi"]);      } if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") {  //JPEG  imageJPEG($this->img["des"],"",$this->img["quality"]); } elseif ($this->img["format"]=="PNG") {  //PNG  imagePNG($this->img["des"]); } elseif ($this->img["format"]=="GIF") {  //GIF  imageGIF($this->img["des"]);  } } function save($save="",$gd_version) { if($gd_version==2)         {         $this->img["des"] = imagecreatetruecolor($this->img["lebar_thumb"],$this->img["tinggi_thumb"]);      @imagecopyresampled ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["lebar_thumb"], $this->img["tinggi_thumb"], $this->img["lebar"], $this->img["tinggi"]);      }         if($gd_version==1)         {        $this->img["des"] = imagecreate($this->img["lebar_thumb"],$this->img["tinggi_thumb"]);     @imagecopyresized ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["lebar_thumb"],   $this->img["tinggi_thumb"], $this->img["lebar"], $this->img["tinggi"]);      }  if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") {  //JPEG  imageJPEG($this->img["des"],"$save",$this->img["quality"]); } elseif ($this->img["format"]=="PNG") {  //PNG  imagePNG($this->img["des"],"$save"); } elseif ($this->img["format"]=="GIF") {  //GIF  imageGIF($this->img["des"],"$save"); } } } // ************************************************************************* ?> Link to comment Share on other sites More sharing options...
Guest IamV Posted August 13, 2005 Share Posted August 13, 2005 I got the same results. Followed the instructions to a T, but the thumbnails aren't being created. Link to comment Share on other sites More sharing options...
Guest Posted September 2, 2005 Share Posted September 2, 2005 Not only are they not being created...I am still getting the "Not supported file type. Thumbs can only be made from.jpg and .png files." Actually, .jpg, .png, and .gif file types, but i didn;t include the .gif as, obviously, its still not an allowed file type. Even worse, I don't even HAVE and gif product images. I do have some gif graphical elements...but I'm not asking Cube to thumbnail them. Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2005 Share Posted December 15, 2005 Just implemented this... No go for me too. Thumbnail just ain't gettin made lol. Link to comment Share on other sites More sharing options...
Guest viper682 Posted December 17, 2005 Share Posted December 17, 2005 Where are those files to edit. I am running version 3.06 and I just want to have the jpg image and a thubnail that is a gif image. Link to comment Share on other sites More sharing options...
Guest Posted December 17, 2005 Share Posted December 17, 2005 This is a V2 mod that i believe wont work on V3 Link to comment Share on other sites More sharing options...
Guest Posted December 18, 2005 Share Posted December 18, 2005 doesn't really work on V2 even lol.. Link to comment Share on other sites More sharing options...
Recommended Posts