image resize 110

Eklentiler ile ilgili soru, sorun ve tartışmalar.

image resize 110

İleti CosKuN_fb 10.04.2007, 12:12

[syntax="php"]
## EasyMod 0.0.7 compliant
##############################################################
## MOD Title: ImageResize (Bildanpassung) Full_Install
## MOD Author: andreasoymann < > www.retriever-hilfe.de // Leuchte < mail@leuchte.net > www.leuchte.net
## MOD Beschreibung: Mit diesem Mod werden Bilder, die als Avatar, Attachment, Album-Bild, Usercar-Bild, Nickpage-Bild
## oder Profil-Mod-Bild ins Forum gepostet werden sollen, automatisch auf die gültigen Werte verkleinert.
## Desweiteren ist auch die freie Angabe von Bildmaßen in Pixel und/oder Bildgröße in Byte möglich.
## Die installierten Mods (Attachment-Mod, Photo-Album-Mod, Usercars-Mod, Nickpage-Mod, Profile-Mod) werden automatisch
## erkannt und die konfigurierten Bildgrößen entsprechend ausgelesen.
##
## Serverseitige Voraussetzung ist die GD-Library in beliebiger Version (wird automatisch erkannt).
##
## MOD Description: Pictures that should be posted into the forum as Avatar, Attachment, Profile-Photo, Photo-Album-, User-Car- or Nickpage picture will be automatically downsized to valid numbers with this mod.
## There are free specifications possible as well regarding measurements of pictures in pixel and/or the size of
pictures in byte.
## The Mods (Attachment-Mod, Photo-Album-Mod, User-Car-Mod, Nickpage-Mod, Profile-Photo-Mod) that have been
installed will be identificated automatically and they will be read out accordingly to the configurated picture sizes.
##
## Serverside requirement is GD Library in arbitrary Version (identificated automatically)
##
## Getestet mit/Tested with phpBB Version 2.0.8 / 2.0.9 / 2.0.10
##
## MOD Version: 1.10
##
## Installation Level: easy
## Installation Time: 5 Minutes
##
##############################################################
## This MOD is released under the GPL License. Intellectual Property is retained by the MOD Author(s) listed above. http://www.gnu.org
##############################################################
## For Security Purposes, Please Check: http://www.awsw.de/ for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. You´ll find support to this MOD at http://www.phpbb.de/
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up Your Complete Database And All Files Related To This MOD !
##############################################################

#
#-----[ COPY TO FOLDER ]------------------------------------------
#

COPY root/imageresize.php TO imageresize.php
COPY root/templates/subSilver/imageresize_body.tpl TO templates/subSilver/imageresize_body.tpl
COPY root/gd/index.html TO gd/index.html

#
#-----[ SQL ]------------------------------------------
#

1.: Set the directory "gd" with FTP-CHMOD to 777 !!!

1.: Setze das Verzeichnis "gd" per FTP-CHMOD auf 777 !!!

#
#-----[ OPEN ]------------------------------------------
#

language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#

?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#

// START Imageresize
$lang['ImageResize'] = 'ImageResize';
$lang['Change_Explain'] = 'Change or input type or size:';
$lang['Select_Pic'] = 'Select JPG/GIF/PNG-file: ';
$lang['Attachment'] = 'Attachment';
$lang['UserCars'] = 'UserCars';
$lang['Nickpage'] = 'Nickpage';
$lang['Profile_photo'] = "Profile Photo";
$lang['Free'] = 'Free size';
$lang['Avatars_explain'] = '( Small image in profile )';
$lang['Attachment_explain'] = '( Image as attachment )';
$lang['Album_explain'] = '( Image for photoalbum )';
$lang['Usercars_explain'] = '( Image for UserCars )';
$lang['Nickpage_explain'] = '( Image for Nickpage )';
$lang['Profile_photo_explain'] = '( Photo in Profile )';
$lang['Free_explain'] = '( Free Width, height and size )';
$lang['Height'] = 'height: ';
$lang['Width'] = 'width: ';
$lang['Pixel'] = ' pixel';
$lang['Byte'] = ' byte';
$lang['Size'] = 'size: ';
$lang['L_NO_FILE'] = 'No file selected!';
$lang['L_TRANSFER_FAILED'] = 'Upload-Error';
$lang['L_EMPTY_FILE'] = 'Your uploaded file is empty';
$lang['L_NO_JPG'] = 'Wrong filetype selected! (JPG, GIF oder PNG are possible)';
$lang['L_SIZE_OK'] = 'This image already has the right size!';
$lang['L_SIZE_UNLIMITED'] = 'The image size is not limited!';
$lang['L_WRONG_INPUT'] = 'Wrong input! It´s not possible to create your image!';
$lang['Original'] = 'Original image: ';
$lang['Compression'] = 'Compression: ';
$lang['Pic_built'] = 'Image created: ';
$lang['Size_ok'] = 'Size ok!';
$lang['Wrong_size'] = 'Size too big!';
$lang['Rightclick_to_save'] = 'Click right to save ...';
$lang['Next_pic'] = 'Next image ...';
$lang['End_resize'] = 'End';
// END Imageresize

#
#-----[ OPEN ]------------------------------------------
#

language/lang_german/lang_main.php

#
#-----[ FIND ]------------------------------------------
#

?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#

// START Imageresize
$lang['ImageResize'] = 'Bildanpassung';
$lang['Change_Explain'] = 'Typ oder Größe (Höhe x Breite) auswählen oder eingeben:';
$lang['Select_Pic'] = 'JPG/GIF/PNG-Datei auswählen: ';
$lang['Attachment'] = 'Attachment';
$lang['UserCars'] = 'Steckbrief / Auto(s) des Users';
$lang['Nickpage'] = 'Nickpage';
$lang['Profile_photo'] = 'Profil-Foto';
$lang['Free'] = 'Freie Angaben';
$lang['Avatars_explain'] = '( Kleines Bild im Profil )';
$lang['Attachment_explain'] = '( Bildanhang im Posting )';
$lang['Album_explain'] = '( Bild für das Photo-Album )';
$lang['Usercars_explain'] = '( Bild für den Steckbrief )';
$lang['Nickpage_explain'] = '( Bild für die Nickpage )';
$lang['Profile_photo_explain'] = '( Gro&szlig;es Bild im Profil )';
$lang['Free_explain'] = '( Maße und Größe frei definierbar )';
$lang['Height'] = 'Höhe: ';
$lang['Width'] = 'Breite: ';
$lang['Pixel'] = ' Pixel';
$lang['Byte'] = ' Byte';
$lang['Size'] = 'Größe: ';
$lang['L_NO_FILE'] = 'Keine Datei ausgewählt!';
$lang['L_TRANSFER_FAILED'] = 'Fehler beim Upload!';
$lang['L_EMPTY_FILE'] = 'Datei ist leer!';
$lang['L_NO_JPG'] = 'Keine gültige Datei gewählt! (JPG, GIF oder PNG sind möglich)';
$lang['L_SIZE_OK'] = 'Dieses Bild hat bereits die korrekte Größe!';
$lang['L_SIZE_UNLIMITED'] = 'Die Bildgr&ouml;&szlig;e ist nicht begrenzt!';
$lang['L_WRONG_INPUT'] = 'Falsche Eingabewerte! Bilderstellung nicht möglich!';
$lang['Original'] = 'Originalbild: ';
$lang['Compression'] = 'Komprimierung: ';
$lang['Pic_built'] = 'Bild erstellt: ';
$lang['Size_ok'] = 'Größe ok!';
$lang['Wrong_size'] = 'Datei zu groß!';
$lang['Rightclick_to_save'] = 'Speichern mit Rechtsklick ...';
$lang['Next_pic'] = 'nächstes Bild ...';
$lang['End_resize'] = 'Ende';
// END Imageresize

#
#-----[ OPEN ]------------------------------------------
#

includes/constants.php

#
#-----[ FIND ]------------------------------------------
#

define('PAGE_GROUPCP', -11);

#
#-----[ AFTER, ADD ]------------------------------------------
#

define('PAGE_IMAGERESIZE', -45);

#
#-----[ OPEN ]------------------------------------------
#

includes/page_header.php

#
#-----[ FIND ]------------------------------------------
#

'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),

#
#-----[ AFTER, ADD ]------------------------------------------
#

// IMAGE RESIZE
'L_IMAGERESIZE' => $lang['ImageResize'],
'U_IMAGERESIZE' => append_sid('imageresize.'.$phpEx),

#
#-----[ OPEN ]------------------------------------------
#

templates/subSilver/overall_header.tpl

#
#-----[ FIND ]------------------------------------------
#

<tr>
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a>&nbsp; &nbsp;<a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a>&nbsp; &nbsp;<a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a>&nbsp;</span></td>
</tr>


#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">
<a href="{U_IMAGERESIZE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_IMAGERESIZE}" hspace="3">{L_IMAGERESIZE}</a>
</span></td>
</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#

You'll have to chmod 777 the 'gd' directory. if you have only plain ftp-access change the 'Attribute' to rwxrwxrwx!

Du musst das Verzeichnis 'gd' mit chmod 777 beschreibbar machen. Bei einem nicht-grafischen FTP-Zugang ändere die 'Attribute' auf rwxrwxrwx!

# EoM[/syntax]

Arkadaşlar bu kodu local'de kurup denedim. Cayır cayır çalışıyor. Ama siteye koyduğumda resimleri küçültüyor, önizlemede resmi gösteremiyor. CHMOD ayarlarını defalarca kontrol ettim. Birde bu moddan sonra parolasını yanlış girenden istenilen görsel doğrulama kodu gösterilemez oldu.
Acaba bütün bunların sorumlusu lang_main.php olabilir mi?
Kullanıcı avatarı
CosKuN_fb
Üye
Üye
 
İleti: 6
Kayıt: 17.04.2006, 08:06
Konum: Kars

Re: image resize 110

İleti NEFRİT 26.04.2007, 21:17

Gerek görsel doğrulama olsun gerekse resim yeniden yaratma kodları bu tür sistemler GD extension u kullanırlar. Görsel doğrulaman (sanal güvenlik kodun) birden bire durduk yere yok olduğuna göre belliki server cın güvenlik amacıyla farklı ayarlar yapmış servera. Bu durumu bir an önce server cına bildir GD 2 extensionunun çalışıp çalışmadığını kontrol etsin.
Kullanıcı avatarı
NEFRİT
Üye
Üye
 
İleti: 287
Kayıt: 17.03.2006, 01:14
Konum: Tekirdağ


Soru(n)lar & Tartışmalar



Kimler çevrimiçi

Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir

cron