|
|||
|
Hallo,
ich hab ein kleines Problem beim Upload der Artikelbilder. Wenn in den Bildoptionen alles normal angegeben ist ( Breite und H?he ) funktioniert alles einwandfrei. Steht allerdings z.b. die Breite auf 0 damit diese automatisch errechnet wird gibts beim Upload ne Fehlermeldung Zitat:
mfg Matthias |
|
||||
|
einen wert !=0 && !='' eingeben.
__________________
xt:Commerce Helpdesk xt:Commerce Blog xt:Commerce Warenwirtschaft ### ![]() Offene Stellen bei xt:Commerce! xt:Commerce stellt ein ### |
|
||||
|
jo das solls hei?en, mit ein wenig rumprorgammieren kommt man sicherlich drauf wie nun h?he/breit zum einstellen sind. es wird immer auf den wert resized, auf den das bild zuerst trifft.
__________________
xt:Commerce Helpdesk xt:Commerce Blog xt:Commerce Warenwirtschaft ### ![]() Offene Stellen bei xt:Commerce! xt:Commerce stellt ein ### |
|
|||
|
So der erste Ansatz einer L?sung f?r das Problem
Man nehme die Datei: admin\includes\classes\image_manipulator.php und suche sich darin die Funktion Code:
function compile() Diese ersetzen durch die ge?nderte Funktion: Code:
function compile()
{
$this->h = getimagesize($this->a);
if(is_array($this->h))
{
$this->i = $this->h[0];
$this->j = $this->h[1];
$this->k = $this->h[2];
// Berechnung der Breite aus Orginalimage
if($this->m == '0'){
$this->z = ($this->j / $this->n);
$this->m = ($this->i / $this->z);
}
// Berechnung der Breite aus Orginalimage Ende
$this->o = ($this->i / $this->m);
$this->p = ($this->j / $this->n);
$this->q = ($this->o > $this->p) ? $this->m : round($this->i / $this->p); // width
$this->r = ($this->o > $this->p) ? round($this->j / $this->o) : $this->n; // height
}
$this->s = ($this->k < 4) ? ($this->k < 3) ? ($this->k < 2) ? ($this->k < 1) ? Null : imagecreatefromgif($this->a) : imagecreatefromjpeg($this->a) : imagecreatefrompng($this->a) : Null;
if($this->s !== Null)
{
$this->t = imagecreatetruecolor($this->q, $this->r); // created thumbnail reference
$this->u = imagecopyresampled($this->t, $this->s, 0, 0, 0, 0, $this->q, $this->r, $this->i, $this->j);
}
}
mfg Matthias |
|
||||
|
hab das mal so ?bernommen. danke.
__________________
xt:Commerce Helpdesk xt:Commerce Blog xt:Commerce Warenwirtschaft ### ![]() Offene Stellen bei xt:Commerce! xt:Commerce stellt ein ### |
![]() |
| Lesezeichen |
| Stichworte |
| admin, bilderupload, fehler |
| Themen-Optionen | |
| Ansicht | |
|
|