[2.0.19] Thumbnail-on-Dimensions mod (for Attachment mod)

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
2
33%
Very Good
1
17%
Good
2
33%
Fair
1
17%
Poor
0
No votes
 
Total votes: 6

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17002
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: [2.0.19] Thumbnail-on-Dimensions mod (for Attachment mod)

Post by DavidIQ » Fri Jun 06, 2008 2:30 pm

Change the file size that triggers the thumbnail creation.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

baerenwurm
Registered User
Posts: 131
Joined: Wed Nov 06, 2002 2:38 pm
Location: Germany

Re: [2.0.19] Thumbnail-on-Dimensions mod (for Attachment mod)

Post by baerenwurm » Fri Jun 06, 2008 2:48 pm

Where? Changing the values in "Image Thumbnail Dimensions"* did not help.

(* "If this defined Dimension of an Image is reached, the Image will be displayed as a Thumbnail, rather than full size (Width x Height in pixels).
If it is set to 0x0, this feature is disabled. With some Images this Feature will not work due to limitations in PHP.")

[e]
Image

baerenwurm
Registered User
Posts: 131
Joined: Wed Nov 06, 2002 2:38 pm
Location: Germany

Re: [2.0.19] Thumbnail-on-Dimensions mod (for Attachment mod)

Post by baerenwurm » Sat Jun 07, 2008 2:58 pm

I've just noticed that thumbnail creation is still partially based on the image size.

If you try to upload a more or less uncompressed image (399x299px, 15 KB) it will be displayed as a thumb, although I changed "img_link_width" to 401px. If it is highly compressed, let's say to 1.4KB, it will be displayed directly within the message.

(Sorry for the double post :roll:)

[e] K, I'm able to avoid that by increasing the "img_min_thumb_size". Now, when posting large images there will be a download link instead of a thumbnail though.

[e] Actually this mod is not working at all. It just creates thumbnails for every image that has a larger size than the one specified in "img_min_thumb_size" regardless of the dimensions.

baerenwurm
Registered User
Posts: 131
Joined: Wed Nov 06, 2002 2:38 pm
Location: Germany

Re: [2.0.19] Thumbnail-on-Dimensions mod (for Attachment mod)

Post by baerenwurm » Sat Jun 07, 2008 5:45 pm

K, I changed this:

Code: Select all

				// Do we have to create a thumbnail ?
				if ($cat_id == IMAGE_CAT && intval($attach_config['img_create_thumbnail']))
				{
					$this->thumbnail = 1;
				}
				// ######################################################################
				// start Thumbnail-on-Dimensions mod...
				elseif ($cat_id == IMAGE_CAT)
				{
					list($width, $height) = image_getdimension($file);
					if ( ($width > intval($attach_config['img_link_width'])) || ($height > intval($attach_config['img_link_height'])) )
					{
						$this->thumbnail = 1;
					}
				}
				// end Thumbnail-on-Dimensions mod
				// ######################################################################
to this:

Code: Select all

				// ######################################################################
				// start Thumbnail-on-Dimensions mod...
				if ($cat_id == IMAGE_CAT && intval($attach_config['img_create_thumbnail']))
				{
					list($width, $height) = image_getdimension($file);
					if ( ($width > intval($attach_config['img_link_width'])) || ($height > intval($attach_config['img_link_height'])) )
					{
						$this->thumbnail = 1;
					}
				}
				// end Thumbnail-on-Dimensions mod
				// ######################################################################
Now it works.

Post Reply

Return to “[2.0.x] MOD Database Releases”