Jump to content

Images


Guest dezigner

Recommended Posts

Guest dezigner

I am adding images now but they are only showing up in the Admin section

When you go to the cart home and look there are no images. But if you click on the thumbnail where it says No Image then the image appears.

What is happening and how do I fix this?

Link to comment
Share on other sites

Guest cw3849

I am adding images now but they are only showing up in the Admin section

When you go to the cart home and look there are no images. But if you click on the thumbnail where it says No Image then the image appears.

What is happening and how do I fix this?

I am having an image problem in that I upload the image but the image never shows. The only image I get is the 'no image' file. I upload the product description and it never shows either i.e. I get a 404 error such as:

http://www.metricwebs.net/cubecart/shop/product/3

please visit and tell me what you think.

http://www.metricwebs.net/cubecart

TIA

Link to comment
Share on other sites

Whoops!

ERROR 404

The URL that you requested, could not be found. Perhaps you either mistyped the URL or we have a broken link.

We have logged this error and will correct the problem if it is a broken link, and notify you after the webmaster has been flogged.

This site does not allow directory listings. Be sure you have typed in the appropriate *.htm file name.

example: http://thissite.com/directory/index.htm

Please Click Here to Return to our Hom

Link to comment
Share on other sites

Guest cw3849

I am adding images now but they are only showing up in the Admin section

When you go to the cart home and look there are no images. But if you click on the thumbnail where it says No Image then the image appears.

What is happening and how do I fix this?

I am having an image problem in that I upload the image but the image never shows. The only image I get is the 'no image' file. I upload the product description and it never shows either i.e. I get a 404 error such as:

http://www.metricwebs.net/cubecart/shop/product/3

please visit and tell me what you think.

http://www.metricwebs.net/cubecart/index.php

TIA

ok, so you quoted my 404 page, what's up with that?

that's what I was telling you. The proggy saves my products as a digit not a file, such as http://www.metricwebs.net/cubecart/products/1

my images don't save either

and even the digit doesn't show up and the directory is still empty.

http://www.metricwebs.net/cubecart/index.php

in short, it lets me add anything I want, but it saves nothing?

:wacko:

TIA

Link to comment
Share on other sites

Guest dezigner

I am adding images now but they are only showing up in the Admin section

When you go to the cart home and look there are no images. But if you click on the thumbnail where it says No Image then the image appears.

What is happening and how do I fix this?

How do we fix this problem

Link to comment
Share on other sites

This is a new gd.inc that booker came up with and replaces the original that had a problem. Depending on when you downloaded your CC 3, it might work for you.

Replace the original classes/gd.inc with this:

<?php

/*

+--------------------------------------------------------------------------

| CubeCart v3.0.2

| ========================================

| by Alistair Brookbanks

| CubeCart is a Trade Mark of Devellion Limited

| © 2005 Devellion Limited

| Devellion Limited,

| Westfield Lodge,

| Westland Green,

| Little Hadham,

| Nr Ware, HERTS.

| SG11 2AL

| UNITED KINGDOM

| http://www.devellion.com

| UK Private Limited Company No. 5323904

| ========================================

| Web: http://www.cubecart.com

| Date: Friday, 12 August 2005

| Email: info (at) cubecart (dot) com

| License Type: CubeCart is NOT Open Source Software and Limitations Apply

| Licence Info: http://www.cubecart.com/site/faq/license.php

+--------------------------------------------------------------------------

| gd.inc.php

| ========================================

| GD Class

+--------------------------------------------------------------------------

*/

class thumbnail

{

var $img;

function thumbnail($imgfile)

{

global $config;

//detect image format

$this->img["format"]=ereg_replace(".*\.(.*)$","\\1",$imgfile);

$this->img["format"]=strtoupper($this->img["format"]);

if($config['gdversion']>0){

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 and .jpeg file types!";

exit();

}

@$this->img["width"] = imagesx($this->img["src"]);

@$this->img["height"] = imagesy($this->img["src"]);

//default quality jpeg

$this->img["quality"]=80;

} else {

return FALSE;

}

}

function size_width($size=100)

{

//width

$this->img["width_thumb"]=$size;

@$this->img["height_thumb"] = ($this->img["width_thumb"]/$this->img["width"])*$this->img["height"];

}

function size_auto($size=100)

{

//size

if ($this->img["width"]>=$this->img["height"]) {

$this->img["width_thumb"]=$size;

@$this->img["height_thumb"] = ($this->img["width_thumb"]/$this->img["width"])*$this->img["height"];

} else {

$this->img["height_thumb"]=$size;

@$this->img["width_thumb"] = ($this->img["height_thumb"]/$this->img["height"])*$this->img["width"];

}

}

function jpeg_quality($quality=80)

{

//jpeg quality

$this->img["quality"]=$quality;

}

function show()

{

global $config;

@Header("Content-Type: image/".$this->img["format"]);

if ($config['gdversion']==2) {

$this->img["des"] = imagecreatetruecolor($this->img["width_thumb"],$this->img["height_thumb"]);

@imagecopyresampled ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["width_thumb"],$this->img["height_thumb"], $this->img["width"], $this->img["height"]);

} elseif ($config['gdversion']==1) {

$this->img["des"] = imagecreate($this->img["width_thumb"],$this->img["height_thumb"]);

@imagecopyresized ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["width_thumb"],$this->img["height_thumb"], $this->img["width"], $this->img["height"]);

}

if ($config['gdversion']>0) {

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"]);

}

imagedestroy($this->img["des"]);

}

}

function save($save="")

{

global $config;

if ($config['gdversion']==2) {

$this->img["des"] = imagecreatetruecolor($this->img["width_thumb"],$this->img["height_thumb"]);

@imagecopyresampled ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["width_thumb"], $this->img["height_thumb"], $this->img["width"], $this->img["height"]);

} elseif ($config['gdversion']==1) {

$this->img["des"] = imagecreate($this->img["width_thumb"],$this->img["height_thumb"]);

@imagecopyresized ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["width_thumb"], $this->img["height_thumb"], $this->img["width"], $this->img["height"]);

}

if ($config['gdversion']>0) {

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);

}

imagedestroy($this->img["des"]);

@chmod($this->img["des"], 0644);

}

}

}

?>

Link to comment
Share on other sites

Guest DungeonCrawler

I'm getting this error:

Call to undefined function: imagegif()

when I try to upload a gif. No thumbnail is created. When I upload a jpg, everything works.

I have GD 2 installed on the server:

gd

GD Support  enabled

GD Version  bundled (2.0.15 compatible)

FreeType Support  enabled

FreeType Linkage  with freetype

T1Lib Support  enabled

GIF Read Support  enabled

JPG Support  enabled

PNG Support  enabled

WBMP Support  enabled

XBM Support  enabled

directories are correct, rights are correct.

Is something missing on the server end?

Thanks,

Rob

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