Avatar true resize.............
Verfasst: 25.08.2013 14:03
Hallo,
nach langen versuchen komme ich nicht weiter:
PhpBB 3.011
Wenn ich über ACP Avatar True resize installieren mag, bekomme ich diese Meldung:
File edits
Click to hide files without errors • Click to show all edits
Functions_upload.php
--------------------------------------------------------------------------------
Find
/**
* Performing additional checks
*/
--------------------------------------------------------------------------------
Add Before
/**
* Resize avatar with the true diemensions
*/
function resize_avatar()
{
if ( $_GET['mode'] == "avatar" ) {
$limite_largeur = $this->upload->max_width;
$limite_hauteur = $this->upload->max_height;
$size = getimagesize($this->destination_file);
$largeur = $size[0];
$hauteur = $size[1];
if($hauteur > $limite_hauteur OR $largeur > $limite_largeur)
{
if($largeur > $limite_largeur)
{
$hauteur = $hauteur / ($largeur / $limite_largeur);
$largeur = $limite_largeur;
}
if($hauteur > $limite_hauteur)
{
$largeur = $largeur / ($hauteur / $limite_hauteur);
$hauteur = $limite_hauteur;
}
$destination = imagecreatetruecolor($largeur, $hauteur);
if ( $this->extension == "jpg" || $this->extension == "jpeg" ) $source = imagecreatefromjpeg($this->destination_file);
elseif ( $this->extension == "png" ) $source = imagecreatefrompng($this->destination_file);
elseif ( $this->extension == "gif" ) $source = imagecreatefromgif($this->destination_file);
imagecopyresampled($destination, $source, 0, 0, 0, 0, $largeur, $hauteur, $size[0], $size[1]);
if ( $this->extension == "jpg" || $this->extension == "jpeg" ) imagejpeg($destination, $this->destination_file);
elseif ( $this->extension == "png" ) imagepng($destination, $this->destination_file);
elseif ( $this->extension == "gif" ) imagegif($destination, $this->destination_file);
}
}
}
The Find specified by the MOD could not be found
Am Anfang bekam ich die Meldung das die Datei Functions_upload.php nicht gefunden wird, erst als ich diese in die Root gelegt habe fand die Mod diese.
Wenn ich jetzt diesen Fehler editieren mag, geht es nicht es bleibt bei diesem Fehler.
Jemand eine Idee?
Danke
nach langen versuchen komme ich nicht weiter:
PhpBB 3.011
Wenn ich über ACP Avatar True resize installieren mag, bekomme ich diese Meldung:
File edits
Click to hide files without errors • Click to show all edits
Functions_upload.php
--------------------------------------------------------------------------------
Find
/**
* Performing additional checks
*/
--------------------------------------------------------------------------------
Add Before
/**
* Resize avatar with the true diemensions
*/
function resize_avatar()
{
if ( $_GET['mode'] == "avatar" ) {
$limite_largeur = $this->upload->max_width;
$limite_hauteur = $this->upload->max_height;
$size = getimagesize($this->destination_file);
$largeur = $size[0];
$hauteur = $size[1];
if($hauteur > $limite_hauteur OR $largeur > $limite_largeur)
{
if($largeur > $limite_largeur)
{
$hauteur = $hauteur / ($largeur / $limite_largeur);
$largeur = $limite_largeur;
}
if($hauteur > $limite_hauteur)
{
$largeur = $largeur / ($hauteur / $limite_hauteur);
$hauteur = $limite_hauteur;
}
$destination = imagecreatetruecolor($largeur, $hauteur);
if ( $this->extension == "jpg" || $this->extension == "jpeg" ) $source = imagecreatefromjpeg($this->destination_file);
elseif ( $this->extension == "png" ) $source = imagecreatefrompng($this->destination_file);
elseif ( $this->extension == "gif" ) $source = imagecreatefromgif($this->destination_file);
imagecopyresampled($destination, $source, 0, 0, 0, 0, $largeur, $hauteur, $size[0], $size[1]);
if ( $this->extension == "jpg" || $this->extension == "jpeg" ) imagejpeg($destination, $this->destination_file);
elseif ( $this->extension == "png" ) imagepng($destination, $this->destination_file);
elseif ( $this->extension == "gif" ) imagegif($destination, $this->destination_file);
}
}
}
The Find specified by the MOD could not be found
Am Anfang bekam ich die Meldung das die Datei Functions_upload.php nicht gefunden wird, erst als ich diese in die Root gelegt habe fand die Mod diese.
Wenn ich jetzt diesen Fehler editieren mag, geht es nicht es bleibt bei diesem Fehler.
Jemand eine Idee?
Danke