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

beanflying

Just answered my own question but it seems the install package is adding AFTER the ?> and not before when modifying the Admin.english.php file  ???

Manual edit to fix it and all sorted.
Owner of many many shiny toys.

Kays

Yes, what's happened there is that the php closing tag wasn't on the last line of that page.

Glad you got that sorted out. :)

Quote from: polepole on August 28, 2012, 11:58:54 AM
What are the *.jpg_thumb files that are created with zero size?

-Allen

Sorry I missed your post earlier. Are the dates on these files recent?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Mave

I have an 2.0 RC3 and want to install the mod and get error

QuoteERROR!! This version of the mod can only be installed on SMF 2.0 RC4+.

i use the version 2-final

what happend?

Kays

That version of the mod uses several functions which were introduced with the release of RC4. So it will not work for an RC3 forum.

The RC3 version of the mod is still available on the mod page. Use that instead.

Or better yet, update to 2.0.2. ;)

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Mave

Quote from: Kays on September 20, 2012, 06:02:53 PM
That version of the mod uses several functions which were introduced with the release of RC4. So it will not work for an RC3 forum.

The RC3 version of the mod is still available on the mod page. Use that instead.

Or better yet, update to 2.0.2. ;)
Yes i know its better to upgrade, but ts need so much time.

Where i can find a version for 2rc3? version 1.5 dont work too.

Kays

Sorry, I thought you could see that mod in the list.

See attached.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

fiver

Quote from: Kays on January 22, 2011, 09:47:17 AM
Are the original images still on the server? Look at the dlattach number for that image. Then check the database for it and the attachment folder. All attachments are now named with the id number as the first digits before the underscore. Followed by the file_hash.


Hi Kays,


Still on the after-uninstall problem more than a year ago... is there any way (script?) to restore all the 2800+ attachments which were renamed by the mod?


Thanks.

Mave

Sorry for late Thanx

With your mod i save 3GB Storage

THANK YOUUUUUUUUU  :-*

Kays

I think need some more info on this. ???

Are these older files from before SMF 1.1.9? If you search the attachments table for the id, is there a value for "file_hash"?

Can you identify any of these these files on the server? What is the file name format on the server for these files?

What format were these images in originally?

@ Mave, you're welcome. :)

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

littlenicki

Hello Kays,

I'm using V1.5 of your mod with SMF 1.1.16. However I'm encountering one problem:

- If a users uploads an image larger than 3500 Pixels (width or height) the script seems to cause a problem. That is it won't resize the files anymore and wnating to access the topic / page containing these images will give a blank page.

Any help would be greatly appreciated.

Thank you,

Nicole
Fomer SMF user. Switched to Invision Power Board and VBulletin

novill

hungarian translation

<file name="$themedir/languages/Admin.hungarian.php">
<operation>
<search position="end" />
<add><![CDATA[
// Added for resize attached images mod 2.0.
$txt['attachment_image_width'] = 'Csatolt kép maximális szélessége.<div class="smalltext">(0 ha nincsen maximum szélesség)</div>';
$txt['attachment_image_height'] = 'Csatolt kép maximális magassága.<div class="smalltext">(0 ha nincsen maximum magassága)</div>';
$txt['attachment_image_compression'] = 'JPEG mínőségi faktor<div class="smalltext">(Maximum 100, default 75)</div>';
$txt['attachment_resize_existing'] = 'Meglévő képek átméretezése';
$txt['attachment_image_reformat'] = 'Nem JPEG képek átkonvertálása JPEG formátumra.';
$txt['attachment_thumb_png'] = 'Bélyegképek mentése PNG fájl formátumba.';
$txt['attachment_gd_warning'] = 'A GD modul nincsen jelenleg instalálva. A következő kép átméretezési funkció nem elvégezhető.';
]]></add>
</operation>
</file>

<file name="$themedir/languages/Help.hungarian.php">
<operation>
<search position="end" />
<add><![CDATA[
// Added for resize attached images mod 2.0.
$helptxt['attachment_image_compression'] = 'Ez állítja be a JPEG képmínőségét. A nagyobb szám csökkenti a kép mínőségét, de a kép fájl méretét is. ';
$helptxt['attachment_resize_existing'] = 'Ennek az opciónak az engedélyezése átméretez minden létező csatolt képet, mely nagyobb mint a beállított méretek.';
$helptxt['attachment_image_reformat'] = 'Ennek az opciónak az engedélyezése minden nem JPEG formátumú képet JPEG formátumra konvertál';
]]></add>
</operation>
</file>

Kays

HI  littlenicki, that sounds like it could be a memory issue.

In Subs_Graphics.php look for the following:


@ini_set('memory_limit', '90M');


And change the 90 to a higher value like 128.

Thanks novill. I'll include that with my next update. :)

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

littlenicki

Quote from: Kays on September 30, 2012, 03:37:10 PM
HI  littlenicki, that sounds like it could be a memory issue.

In Subs_Graphics.php look for the following:


@ini_set('memory_limit', '90M');


And change the 90 to a higher value like 128.

Thanks novill. I'll include that with my next update. :)

Hello, thanks for your quick response. Yes, I thought it could be a memory issue, too. I tried raising the value and went up to 300M ... I'm on a decdicated server with 4GB Ram ...

However no changes. Uploading a file larger than 3500 pixels width will give me a blank screen but after the upload and also when wanting to access the posting / topic.

Any suggestions? Thanks!

Regards,

Nicole
Fomer SMF user. Switched to Invision Power Board and VBulletin

Kays

It still sounds like a timeout problem because it's trying to continually resize that image.

Something to try, in the same place add the following. (default is normally at 30)


@set_time_limit(90);
if (function_exists('apache_reset_timeout'))
@apache_reset_timeout();

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

littlenicki

Fomer SMF user. Switched to Invision Power Board and VBulletin

Kays


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

novill

Great mod. :)

Hungarian translation

<file name="$themedir/languages/Admin.hungarian.php">
<operation>
<search position="end" />
<add><![CDATA[
// Added for resize attached images mod 2.0.
$txt['attachment_image_width'] = 'Csatolt kép maximális szélessége.<div class="smalltext">(0 ha nincsen maximum szélesség)</div>';
$txt['attachment_image_height'] = 'Csatolt kép maximális magassága.<div class="smalltext">(0 ha nincsen maximum magassága)</div>';
$txt['attachment_image_compression'] = 'JPEG mínőségi faktor<div class="smalltext">(Maximum 100, default 75)</div>';
$txt['attachment_resize_existing'] = 'Meglévő képek átméretezése';
$txt['attachment_image_reformat'] = 'Nem JPEG képek átkonvertálása JPEG formátumra.';
$txt['attachment_thumb_png'] = 'Bélyegképek mentése PNG fájl formátumba.';
$txt['attachment_gd_warning'] = 'A GD modul nincsen jelenleg instalálva. A következő kép átméretezési funkció nem elvégezhető.';
]]></add>
</operation>
</file>

<file name="$themedir/languages/Help.hungarian.php">
<operation>
<search position="end" />
<add><![CDATA[
// Added for resize attached images mod 2.0.
$helptxt['attachment_image_compression'] = 'Ez állítja be a JPEG képmínőségét. A nagyobb szám csökkenti a kép mínőségét, de a kép fájl méretét is. ';
$helptxt['attachment_resize_existing'] = 'Ennek az opciónak az engedélyezése átméretez minden létező csatolt képet, mely nagyobb mint a beállított méretek.';
$helptxt['attachment_image_reformat'] = 'Ennek az opciónak az engedélyezése minden nem JPEG formátumú képet JPEG formátumra konvertál';
]]></add>
</operation>

Glasso

Hi Kays,

When trying to attach a large image, the screen just turns blank after 86 seconds. This does not happen when trying a large non-image file - it just goes back to empty post screen instead.

Have tried increasing memory_limit, @set_time_limit(90), and @apache_reset_timeout() that your suggested, with no effect.

Additionally, I see these errors as in this topic: http://www.simplemachines.org/community/index.php?topic=477508.msg3340564#msg3340564

I am running SMF 2.0.2

Appreciate any help you can offer.
Thanks.

kennethm

downloaded and installed this mod, NOW cant post any attachment. When you try it acts like it is uploading then screen turns blank then a ZERO appears at top left of screen. Running smf 2.02

Download and install went as normal as can be expected. SO ANY IDEAS what has happened and what can be done to fix it? I even uninstalled the mod and its still doing the same thing, cant post any attachment of any size. Can post normall with no attachments.

kennethm

any one that knows anything ever reply to thses postings anymore or has it been abandoned

Advertisement: