News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Resize Attached Images (Updated for 2.0 RC4)

Started by Kays, October 17, 2009, 04:19:10 PM

Previous topic - Next topic

72 454

#260
I just started using this mod on a new forum and it works great. However, when in the admin panel there's some code embedded at the top of the page. The first line is:  // Added for resize attached images mod 2.0. $txt['attachment_image_width'] = 'Maximum width of attached images.


This is followed by some code below it.

(0 for no maximum width)
'; $txt['attachment_image_height'] = 'Maximum height of attached images.
(0 for no maximum height)
'; $txt['attachment_image_compression'] = 'JPEG quality factor
(Maximum 100, default 75)
'; $txt['attachment_resize_existing'] = 'Resize existing images'; $txt['attachment_image_reformat'] = 'Reformat non-JPEG images to JPEG.'; $txt['attachment_thumb_png'] = 'Save thumbnails as PNG.'; $txt['attachment_gd_warning'] = 'The GD module is currently not installed. The following image resize functions can not be performed.';




It doesn't seem to affect anything other than within the admin panel and users don't see it, but please let me know how to fix it. Using 2.0.7. It's also appearing in the default Curve theme. Here's a pic in the admin options panel


Tnx.
SMF 2.0.11

melanieh75

I don't think this one is being monitored anymore. I posted for help in April and nothing back yet.

luuuciano

Question... this mod resizes images every time it is seen? or just once at upload time? (that last is what I am looking for...)
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Westwegoman

It resizes on upload and will resize current images the first time they are viewed.

luuuciano

#264
Quote from: Westwegoman on June 17, 2014, 06:42:05 PM
It resizes on upload and will resize current images the first time they are viewed.

Thanks Westwegoman! will try it then :)

Done, installed and a few little testing...

Amazing mod! I LOVE IT!

This and the spud's ILA
https://github.com/Spuds/SMF-ILA

ROCKSSSSSS
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

luuuciano

Quote from: 72 454 on May 28, 2014, 01:38:37 PM
This is followed by some code below it.

(0 for no maximum width)
'; $txt['attachment_image_height'] = 'Maximum height of attached images.
(0 for no maximum height)
'; $txt['attachment_image_compression'] = 'JPEG quality factor
(Maximum 100, default 75)
'; $txt['attachment_resize_existing'] = 'Resize existing images'; $txt['attachment_image_reformat'] = 'Reformat non-JPEG images to JPEG.'; $txt['attachment_thumb_png'] = 'Save thumbnails as PNG.'; $txt['attachment_gd_warning'] = 'The GD module is currently not installed. The following image resize functions can not be performed.';

Something is wrong on your language file/s, you still have that problem??
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Westwegoman

Quote from: luuuciano on June 17, 2014, 10:38:10 PM
Quote from: 72 454 on May 28, 2014, 01:38:37 PM
This is followed by some code below it.

(0 for no maximum width)
'; $txt['attachment_image_height'] = 'Maximum height of attached images.
(0 for no maximum height)
'; $txt['attachment_image_compression'] = 'JPEG quality factor
(Maximum 100, default 75)
'; $txt['attachment_resize_existing'] = 'Resize existing images'; $txt['attachment_image_reformat'] = 'Reformat non-JPEG images to JPEG.'; $txt['attachment_thumb_png'] = 'Save thumbnails as PNG.'; $txt['attachment_gd_warning'] = 'The GD module is currently not installed. The following image resize functions can not be performed.';

Something is wrong on your language file/s, you still have that problem??

Just a hunch here but, open up Themes\default\languages\Admin.english.php and make sure the following is at the end of the file.
?>

If it is not, then you will have to move it to the very last line.

If using utf8, you also have to do it in Admin.english-utf8.php

_sebas_


hi

little by little, and from time to time, I've been having the occasional mistake, she increasingly corrupt images in forum

thumbnails always look good, but to expand a magnified image appears entirely black,


when this happens, I notice that in the log. error

-----

error mess.:

8: getimagesize() [<a href='function.getimagesize'>function.getimagesize</a>]: Read error!
Archivo: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Sources/Display.php
Línea: 1325
-------------------------
2: imagecreatefromjpeg() [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: gd-jpeg, libjpeg: recoverable error: Premature end of JPEG file
Archivo: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Sources/Subs-Graphics.php
Línea: 1706
-------------------------
2: imagecreatefromjpeg() [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: '/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/attachments/2464_ba6dd1aa16f5f9bde9b84605ebd4a58ebeb04d0f' is not a valid JPEG file
Archivo: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Sources/Subs-Graphics.php
Línea: 1706
-------------------------
2: imagecopyresampled(): supplied argument is not a valid Image resource
Archivo: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Sources/Subs-Graphics.php
Línea: 1724
-------------------------
2: imagedestroy(): supplied argument is not a valid Image resource
Archivo:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Sources/Subs-Graphics.php
Línea: 1733







please, what is wrong ?
Who is causing this?
any ideas or help?
how I can recuperarl original image?
(apparently the file is full of information, but it comes in black)

kokett

Hello,

is there a simple way to modify your "clean_thumbs.php" script to delete all attachments on server if they are NOT in databse?

Trond Dahl

I am running smf 1.1.20.
Should I attempt to install version 1.5 or 2? Is 2 aimed for smf 2.x forums?

Steve

Check the first post. That shows which version was updated for 2.0 ... ;)
DO NOT pm me for support!

Rogerd

Hi All, After installing this mod, I tried uploading a 4MB attachment and got this error "Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 16000 bytes) in /home/*******/public_html/Sources/Subs-Graphics.php on line 1706" using SMF 1.1.20 thanks for any replies.

Dragon41673

To Anyone currently using this mod...

#1 - Does anyone use it on 2.0.9 or 2.0.10 If so...any issues?

#2 - Just for clarification...this mod will automatically resize the attached image in the background of SMF during the upload...right?

I ask because my new host has size limitations for disk space, whereas my previous host did not. People are now upset that they now have to resize their posting attachments so I was looking for a program that will do it automatically for them during the upload for their post.

Thanks
Owner - Aries Games & Miniatures

luuuciano

No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Dragon41673

LOL awesome...thank you! I'll try it later today on 2.0.10 & let you know if it seems to work.
Owner - Aries Games & Miniatures

luuuciano

BTW we are using the attached image/files inline (do not remember the name right name) mod too, it is a nice add on to this one...
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Dragon41673

Quote from: luuuciano on May 23, 2015, 10:31:05 AM
BTW we are using the attached image/files inline (do not remember the name right name) mod too, it is a nice add on to this one...

Just did a quick search and did not come up with anything similar to what you stated. If you figure out which one it is, I'll take a peek at it.
Owner - Aries Games & Miniatures

luuuciano

No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Dragon41673

I can confirm it works perfectly on 2.0.10

As far as the other package, I'd rather only download ones directly from this site...but thank you!
Owner - Aries Games & Miniatures

luuuciano

Well, that mod was here in the past, but Spuds choose to continue using git only as repository resource (as several other modders here and there)...
It was his call, and yes... it is your call to use it or not lol
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Advertisement: