Textpattern Forum

You are not logged in. Register | Login | Help

#1 2010-08-06 08:32:56

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,713
Website

smd_thumbnail: manage multiple thumbnails of your images

If you’re bored of one thumbnail per image and don’t fancy using an auto-resizing script or relying on the browser to stretch your thumbs, smd_thumbnail could be the answer. It allows you to create profiles for as many thumbnail sizes as you like and will automatically create physical thumbnails at those dimensions for any/all of your images.

You can set one profile as a default to be the size you see on the Images tab. A couple of new public-side tags take care of displaying your thumbs.

Download it (Requires PHP 5+ and TXP 4.4.1+)

If anyone has any reports of weirdness or workflow improvements for this plugin, please let me know the details and I’ll see if I can figure it out.

Happy multi-thumbnailing.

Revision history
————————

All available versions and changes are listed here. Each entry indexes the relevant post(s) in the thread to learn about the features.

  • 06 Aug 2010 | 0.10beta | Initial beta release
  • 04 Oct 2010 | 0.10 | Official public release
  • 09 Nov 2010 | 0.11 | Added force_size and add_stamp (both thanks zero) ; removed unnecessary DB call
  • 10 Nov 2010 | 0.12 | Added ability to sync default profile thumbs with the corresponding TXP thumbnails (thanks zero)
  • 10 Nov 2010 | 0.13 | Added confirmation on Create all ; relabelled upload box (thank uli) ; tamed styles ; silenced chmod warnings (thanks zero)
  • 21 Nov 2010 | 0.14 | Permitted thumbs to be larger than the original images (thanks maniqui) ; fixed callbacks for image uploading and deleting
  • 26 Jan 2011 | 0.20 | Tools / prefs separated from profile list ; permitted batch creation via 1) selected images 2) category 3) author (thanks jpdupont) ; added smd_thumb_auto_replace option and altered default behaviour (thanks maniqui) ; fixed TXP thumbnail creation on thumbnail replace and made prefs global — and only available to site admins (all thanks jstubbs) ; fixed New Profile button wrapping (thanks jpdupont)
  • 12 May 2011 | 0.21 | Added smd_thumb_get_profiles() for other plugins to find which profiles are available
  • 12 Oct 2011 | 0.22 | Added display attribute ; added ‘create from’ preference (thanks the blue dragon / maniqui) ; fixed plugin for dashboard use ; fixed jQuery attr/prop in prefs ; fixed Txp menu interference (thanks maniqui)

Last edited by Bloke (2011-10-12 10:55:53)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#2 2010-08-06 09:20:30

Gocom
Developer
Registered: 2006-07-14
Posts: 4,403
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Sounds good, tho haven’t tested it yet. But sound good.

I will test when I get some time (or willness) to install the latest dev. Too bad I don’t use SVNs (I only weekly read the changes).


Rah-plugins | What? I’m a little confused… again :-) <txp:is_god />

Offline

#3 2010-08-06 15:49:26

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

This is very cool… something I’ve wished for a couple of times. I don’t have the time to play with it yet, but I will as soon as I get a chance. Thanks, Stef.


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#4 2010-08-06 17:00:18

mapu
Member
From: Munich, Germany
Registered: 2004-03-16
Posts: 141

Re: smd_thumbnail: manage multiple thumbnails of your images

Is this plugin capable to achieve something like this?

Offline

#5 2010-08-06 20:36:36

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

The short answer Marcus is – yes it can. But I think you need to go and play with it then come back and ask any specific questions you have about such things as coding, using it with the new <txp:image_list /> tag and using it with article_images. It might be best though if you had a test site you could try it out on.

I am currently using it on Textgarden.

Last edited by thebombsite (2010-08-06 20:37:23)


Stuart – The BombsiteProText ThemesTextgarden

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#6 2010-08-06 21:04:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,713
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

mapu wrote:

Is this plugin capable to achieve something like this?

The long answer is also yes :-)

You don’t need to resize the existing thumbnails for your new layout: you can create a second profile that fits your new model (e.g. 200×180, no cropping, quality 80%, no sharpening). Then simply hit the Create all button and it’ll go away and make you a whole bunch of new, physical thumbnails at your desired size. You can create as many profiles as you like, add and delete images, quickly activate / deactivate profiles so only certain thumbs are created when you upload or replace images, and so on. You can even upload different thumbs (i.e. not derived from the image) if you wish, for each thumbnail profile.

On the public side you use the <txp:smd_thumbnail /> tag to display them. Works exactly the same as the built in thumbnail tag but you can specify type="profile_name" to display the thumbnail of the given size.

As Stuart says the best way to figure out the capabilities is to try it out. As long as your TXP and server meet the requirements there’s no special instructions. After you’ve played with it, feel free to let me know if you need it to do something else or the workflow could be tightened.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#7 2010-08-07 06:20:16

mapu
Member
From: Munich, Germany
Registered: 2004-03-16
Posts: 141

Re: smd_thumbnail: manage multiple thumbnails of your images

Bloke wrote:

The long answer is also yes :-)

Sounds great! I’ll try it!

Offline

#8 2010-08-12 11:00:06

hidalgo
Member
From: Australia
Registered: 2008-02-05
Posts: 49
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Another brilliant plugin, thanks Stef! All the features I can think of you’ve already covered.

One small problem I’ve had is when trying to change the capitalisation of a profile name i.e. ‘Medium’ to ‘medium’. It’s possible however to change to an interim name and then back to the correct name/case.

I’m looking forward to 4.3.0 now so that I can use this on one of my live sites.

Offline

#9 2010-08-12 11:57:13

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,713
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

hidalgo wrote:

Another brilliant plugin, thanks Stef!

Thank you.

trying to change the capitalisation of a profile name

Ooops thanks for the catch. I’ll see what I can do to fix it.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#10 2010-11-07 15:42:54

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,713
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Officially released

One bug fix for those using the beta version: capitalisation changes for profile names are now permitted (thanks hidalgo).


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB