Seite 1 von 2
[Suche] Attach Bilder Skalierung
Verfasst: 16.09.2004 16:30
von Einste1n
moin,
ich suche einen mod, der mir bei Anhängen mit Bildern die automatisch auf 640x480 skalliert, denn das mit den Link mag ich nicht

danke
mfg
Einste1n
Verfasst: 16.09.2004 21:25
von tomtom
Verfasst: 16.09.2004 22:53
von Einste1n
nein, der funktioniert nicht mit dem attachmod

schon probiert
Verfasst: 16.09.2004 22:58
von Leuchte
Das macht doch der Attach Mod selbst oder hab ich dich falsch verstanden?
Verfasst: 17.09.2004 00:45
von Einste1n
nö eben nicht ...
ich sitze da schon den ganzen tag dran, kriege es aber einfach nicht hin
Thumbnail erstellen hab ich auch schon versucht, ich weiss genau das GD1 auf meinen webserver installiert ist und funktioniert
Code: Alles auswählen
Warning: imagecreatetruecolor(): requires GD 2.0 or later in /home/www/web7/html/phpbb2.test/attach_mod/includes/functions_thumbs.php on line 205
Warning: imagecopyresampled(): requires GD 2.0 or later in /home/www/web7/html/phpbb2.test/attach_mod/includes/functions_thumbs.php on line 206
Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/www/web7/html/phpbb2.test/attach_mod/includes/functions_thumbs.php on line 215
Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/www/web7/html/phpbb2.test/attach_mod/includes/functions_thumbs.php on line 225
Warning: Cannot add header information - headers already sent by (output started at /home/www/web7/html/phpbb2.test/attach_mod/includes/functions_thumbs.php:205) in /home/www/web7/html/phpbb2.test/posting.php on line 595
Warning: Cannot add header information - headers already sent by (output started at /home/www/web7/html/phpbb2.test/attach_mod/includes/functions_thumbs.php:205) in /home/www/web7/html/phpbb2.test/includes/page_header.php on line 480
Warning: Cannot add header information - headers already sent by (output started at /home/www/web7/html/phpbb2.test/attach_mod/includes/functions_thumbs.php:205) in /home/www/web7/html/phpbb2.test/includes/page_header.php on line 482
Warning: Cannot add header information - headers already sent by (output started at /home/www/web7/html/phpbb2.test/attach_mod/includes/functions_thumbs.php:205) in /home/www/web7/html/phpbb2.test/includes/page_header.php on line 483
Die GD2 Erweiterung ist aber im Admin Attach Panel aus und "header already sent" steht eigentlich für ein Leerzeichen am Ende, doch Zeile 483 steht
soweit ich verstehe müste ja GD1 reichen, wenn man GD2 nicht einschaltet.
also da steh ich dann am ende meiner bescheidenen php künste

Verfasst: 17.09.2004 09:29
von Acid
imagecreatetruecolor(): requires GD 2.0 or later
Is doch eindeutig oder?

Verfasst: 17.09.2004 14:42
von Einste1n
jo, nur frag ich mich da, wieso es einen schalter gibt wo man GD2 in dem mod einschalten kann, wenn es auch so schon GD2 braucht ... das macht keinen Sinn!
Verfasst: 18.09.2004 18:59
von mgutt
das gleiche Problem habe ich auch.
Im ACP kann man extra zwischen GD1 und GD2 wählen.
Ich habe GD2 deaktiviert und trotzdem kommt die Meldung:
Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in /mnt/kw1/07/480/00000001/htdocs/forum/attach_mod/includes/functions_thumbs.php on line 205
Den Album Mod habe ich ebenfalls installiert. Dort ist GD1 gewählt und der macht keine Probleme, weswegen ich glaube, dass das GD1 ja da sein muss.
Verfasst: 18.09.2004 19:14
von Einste1n
Hab zwar ne *kleine* Lösung gefunden, diese scheint aber nur mit dem IE zu funktionieren ist also nicht kompatibell mit Netscape und co ... also nicht wirklich ne gute Lösung aber besser als nix
Öffne phpBB2/templates/dein template/overall_footer.tpl
Finde </body>
davor add
Code: Alles auswählen
<img name="tstimg" width="450" height="1">
<script>
var oimg_width=new Array();
var oimg_height=new Array();
var imgMaxWidth=document.images['tstimg'].width;
var imgLength;
setTimeout("resize_image()",3000);
function resize_image() {
if (document.images('postimg') && imgMaxWidth>449) {
if (document.images('postimg').length) {
imgLength=document.images('postimg').length;
if (imgLength>0 && imgMaxWidth>0) {
for (var i=0; i<imgLength && i<10; i++) {
var imager = document.images('postimg')(i);
imager.id=i;
if (imager.width>imgMaxWidth) {
update_img(imager);
} else {
imager.onload=update_img;
}
}
}
} else {
var imager = document.images('postimg');
imager.id=0;
if (imager.width>imgMaxWidth) {
update_img(imager);
} else {
imager.onload=update_img;
}
}
}
}
function revert(evt) {
var elem = (evt) ? evt.target : ((window.event) ? window.event.srcElement : "")
var temp;
temp=elem.width;
elem.width=oimg_width[elem.id];
oimg_width[elem.id]=temp;
temp=elem.height;
elem.height=oimg_height[elem.id];
oimg_height[elem.id]=temp;
elem.onclick=revert;
}
function update_img(evt) {
var elem = (evt) ? (evt.target ? evt.target : evt) : ((window.event) ? window.event.srcElement :
"")
if (elem.width>imgMaxWidth) {
oimg_width[elem.id]=elem.width;
oimg_height[elem.id]=elem.height;
elem.style.cursor= document.all ? 'hand' : 'pointer';
elem.title="Für Originalgröße anklicken!";
elem.onclick=revert;
elem.width=imgMaxWidth;
elem.height=elem.height * imgMaxWidth/elem.width;
}
}
</script>
öffne dein template/viewtopic_attach_body.tpl
finde
Code: Alles auswählen
<tr>
<td colspan="2" align="center"><br /><img src="{postrow.attach.cat_images.IMG_SRC}" alt="{postrow.attach.cat_images.DOWNLOAD_NAME}" border="0" /><br /><br /></td>
</tr>
ersetze mit
Code: Alles auswählen
<tr>
<td colspan="2" align="center"><br /><img src="{postrow.attach.cat_images.IMG_SRC}" name='postimg' alt="Image" title="Image" border="0" /><br /><br /></td>
</tr>
Verfasst: 18.09.2004 21:27
von mgutt
das ist dann ne manuelle kleinere vorschau, right? also lädt er trotzdem das bild in gesamter größe.
beim burning board ist das ja auch so.
aber das problem muss doch auch eine lösung haben