SE 3.18
Prosze o przeniesienie do CMS i Fora
Witam
Mam problem z SE 3.18
Przy dodawaniu Foty do profilu wyskakuje blad:
Fatal error: Call to undefined function imagecreatefromjpeg() in ./rastafarianie/include/class_upload.php on line 285
Na poprzednim hostingu wszystko było Ok.
sprawdziłem linie 285 i jest ok wiec wydaje mi sie ze to cos z serwerem, a moze nie, wiec pytam tutaj.
Chmod jest na 777
Dodam że strone zawisiłem tylko do 10 lutego
--------------------
Problem rozwiązany
Jednak po dokładnym zbadaniu kodu PHP
Skapłem sie o co kaman a to było takie proste
trzeba zamienić kod php z
Kod PHP:
od lini 173 do 307
// RESIZE IMAGE AND PUT IN USER DIRECTORY switch($this->file_ext) { case "gif": $file = imagecreatetruecolor($width, $height); $new = $this->imagecreatefrombmp($this->file_tempname); for($i=0; $i<256; $i++) { imagecolorallocate($file, $i, $i, $i); } imagecopyresampled($file, $new, 0, 0, 0, 0, $width, $height, $this->file_width, $this->file_height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; case "bmp": $file = imagecreatetruecolor($width, $height); $new = $this->imagecreatefrombmp($this->file_tempname); for($i=0; $i<256; $i++) { imagecolorallocate($file, $i, $i, $i); } imagecopyresampled($file, $new, 0, 0, 0, 0, $width, $height, $this->file_width, $this->file_height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; case "jpeg": case "jpg": $file = imagecreatetruecolor($width, $height); $new = imagecreatefromjpeg($this->file_tempname); for($i=0; $i<256; $i++) { imagecolorallocate($file, $i, $i, $i); } imagecopyresampled($file, $new, 0, 0, 0, 0, $width, $height, $this->file_width, $this->file_height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; case "png": $file = imagecreatetruecolor($width, $height); $new = imagecreatefrompng($this->file_tempname); for($i=0; $i<256; $i++) { imagecolorallocate($file, $i, $i, $i); } imagecopyresampled($file, $new, 0, 0, 0, 0, $width, $height, $this->file_width, $this->file_height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; } chmod($photo_dest, 0777); return true; } // END upload_photo() METHOD
// THIS METHOD CREATES A SQUARE THUMBNAIL // INPUT: $photo_dest REPRESENTS THE DESTINATION OF THE UPLOADED PHOTO // $file_maxdim (OPTIONAL) REPRESENTING THE MAXIMUM WIDTH AND HEIGHT OF THE UPLOADED PHOTO // OUTPUT: BOOLEAN INDICATING WHETHER UPLOAD SUCCEEDED OR FAILED function upload_thumb($photo_dest, $file_maxdim = "60") { // SET DESIRED WIDTH AND HEIGHT $x = 0; $y = 0; $width = $this->file_width; $height = $this->file_height; if($width > $height) { $x = ceil(($width - $height) / 2); $width = $height; } elseif($width < $height) { $y = ceil(($height - $width) / 2); $height = $width; } // RESIZE IMAGE AND PUT IN USER DIRECTORY switch($this->file_ext) { case "gif": $file = imagecreatetruecolor($file_maxdim, $file_maxdim); $new = imagecreatefromgif($this->file_tempname); $kek=imagecolorallocate($file, 255, 255, 255); imagefill($file,0,0,$kek); imagecopyresampled($file, $new, 0, 0, $x, $y, $file_maxdim, $file_maxdim, $width, $height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; case "bmp": $file = imagecreatetruecolor($file_maxdim, $file_maxdim); $new = $this->imagecreatefrombmp($this->file_tempname); for($i=0; $i<256; $i++) { imagecolorallocate($file, $i, $i, $i); } imagecopyresampled($file, $new, 0, 0, $x, $y, $file_maxdim, $file_maxdim, $width, $height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; case "jpeg": case "jpg": $file = imagecreatetruecolor($file_maxdim, $file_maxdim); $new = imagecreatefromjpeg($this->file_tempname); for($i=0; $i<256; $i++) { imagecolorallocate($file, $i, $i, $i); } imagecopyresampled($file, $new, 0, 0, $x, $y, $file_maxdim, $file_maxdim, $width, $height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; case "png": $file = imagecreatetruecolor($file_maxdim, $file_maxdim); $new = imagecreatefrompng($this->file_tempname); for($i=0; $i<256; $i++) { imagecolorallocate($file, $i, $i, $i); } imagecopyresampled($file, $new, 0, 0, $x, $y, $file_maxdim, $file_maxdim, $width, $height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; } chmod($photo_dest, 0777); return true; }
Na
Kod PHP:
// RESIZE IMAGE AND PUT IN USER DIRECTORY switch($this->file_ext) { case "gif": $file = imagecreatetruecolor($width, $height); $new = imagecreatefromgif($this->file_tempname); $kek=imagecolorallocate($file, 255, 255, 255); imagefill($file,0,0,$kek); imagecopyresampled($file, $new, 0, 0, 0, 0, $width, $height, $this->file_width, $this->file_height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; case "bmp": $file = imagecreatetruecolor($width, $height); $new = imagecreatefromgif($this->file_tempname); $kek=imagecolorallocate($file, 255, 255, 255); imagefill($file,0,0,$kek); imagecopyresampled($file, $new, 0, 0, 0, 0, $width, $height, $this->file_width, $this->file_height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; case "jpeg": case "jpg": $file = imagecreatetruecolor($width, $height); $new = imagecreatefromgif($this->file_tempname); $kek=imagecolorallocate($file, 255, 255, 255); imagefill($file,0,0,$kek); imagecopyresampled($file, $new, 0, 0, 0, 0, $width, $height, $this->file_width, $this->file_height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; case "png": $file = imagecreatetruecolor($width, $height); $new = imagecreatefromgif($this->file_tempname); $kek=imagecolorallocate($file, 255, 255, 255); imagefill($file,0,0,$kek); imagecopyresampled($file, $new, 0, 0, 0, 0, $width, $height, $this->file_width, $this->file_height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; } chmod($photo_dest, 0777); return true; } // END upload_photo() METHOD
// THIS METHOD CREATES A SQUARE THUMBNAIL // INPUT: $photo_dest REPRESENTS THE DESTINATION OF THE UPLOADED PHOTO // $file_maxdim (OPTIONAL) REPRESENTING THE MAXIMUM WIDTH AND HEIGHT OF THE UPLOADED PHOTO // OUTPUT: BOOLEAN INDICATING WHETHER UPLOAD SUCCEEDED OR FAILED function upload_thumb($photo_dest, $file_maxdim = "60") { // SET DESIRED WIDTH AND HEIGHT $x = 0; $y = 0; $width = $this->file_width; $height = $this->file_height; if($width > $height) { $x = ceil(($width - $height) / 2); $width = $height; } elseif($width < $height) { $y = ceil(($height - $width) / 2); $height = $width; } // RESIZE IMAGE AND PUT IN USER DIRECTORY switch($this->file_ext) { case "GIF": $file = imagecreatetruecolor($file_maxdim, $file_maxdim); $new = imagecreatefromgif($this->file_tempname); $kek=imagecolorallocate($file, 255, 255, 255); imagefill($file,0,0,$kek); imagecopyresampled($file, $new, 0, 0, $x, $y, $file_maxdim, $file_maxdim, $width, $height); imagejpeg($file, $photo_dest, 67); ImageDestroy($new); ImageDestroy($file); break; case "bmp": $file = imagecreatetruecolor($file_maxdim, $file_maxdim); $new = imagecreatefromgif($this->file_tempname); $kek=imagecolorallocate($file, 255, 255, 255); imagefill($file,0,0,$kek); imagecopyresampled($file, $new, 0, 0, $x, $y, $file_maxdim, $file_maxdim, $width, $height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; case "JPEG": case "JPG": $file = imagecreatetruecolor($file_maxdim, $file_maxdim); $new = imagecreatefromgif($this->file_tempname); $kek=imagecolorallocate($file, 255, 255, 255); imagefill($file,0,0,$kek); imagecopyresampled($file, $new, 0, 0, $x, $y, $file_maxdim, $file_maxdim, $width, $height); imagejpeg($file, $photo_dest, 67); ImageDestroy($new); ImageDestroy($file); break; case "PNG": $file = imagecreatetruecolor($file_maxdim, $file_maxdim); $new = imagecreatefromgif($this->file_tempname); $kek=imagecolorallocate($file, 255, 255, 255); imagefill($file,0,0,$kek); imagecopyresampled($file, $new, 0, 0, $x, $y, $file_maxdim, $file_maxdim, $width, $height); imagejpeg($file, $photo_dest, 100); ImageDestroy($new); ImageDestroy($file); break; }
I takim sposobem Wszystko bedzie OK
Pozdrawiam i zapraszam
Po 10 Lutym na rastafarianie.pl
Tutaj tłumaczenie do se 3.18
http://www.przeklej.pl/plik/language-en-rar-0009an8g8
Pass= rastafarianie.pl
Przetłumaczone:
Faq
Home
Profil
Pluginy:
Video
Muzyka
Blog
i cos tam jeszcze ale nie pamiętam 
W podziekowaniu mozesz umieścić link do rastafarianie.pl
Tłumaczenie nie jest i nie może być wykorzystane na sprzedaz
Dodawnie pod Dobre Seo
po każdym dodaniu pluginu trzeba zmienić .htaccess
Dane do zamiany sa w URL Settings
Po daniu zapisz zmiany wyświetli sie kod który trzeba wkleić do pliku .htaccess w katalogu SE
Kolejny bląd przy Pluginie Radcodes Article plugin v3.3.0
Parse error: syntax error, unexpected '}' in ./include/class_radcodes.php on line 507
Tutaj poprawiony plik class_radcodes.php
http://www.przeklej.pl/plik/class-radcod...-0009aq242
pass= rastafarianie.pl
Pozdrawiam
|