Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2010-11-10 12:16:42

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Assuming user has already created thumbs with one default profile, now changes default profile, then probably user wants to keep thumbs already created, but now create new thumbs for different images. So no need for an indication there. However, if user wants to change existing thumbs, then user must just do this one by one, or all the lot. So still normal use of your plugin?


BB6 Band My band
Gud One My blog

Offline

#26 2010-11-10 12:31:27

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: smd_thumbnail: manage multiple thumbnails of your images

zero wrote:

I’d say don’t delete the txp thumb

Yup. If the images were deleted we didn’t have a fallback when we wanted to turn off smd_thumbnail completely by any (unforeseeable) reason.

And: Yes, <txp:article_image thumbnail="1" /> should keep working, think of people who had uploaded collections of Photoshop-optimized thumbnails.

One mor thing: smd_thumbnail seems to disable the ability to replace a thumbnail with such an optimized one. Can this be re-activated? Perhaps at least temporarily by a switch by whose use I declare that I have completely understood the consequences of such acting and agree with being a Photoshop slave for a lifetime?

And thanks, Stef, for another extra cool, über-useful plugin!


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#27 2010-11-10 12:36:27

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: smd_thumbnail: manage multiple thumbnails of your images

(@zero) Yes… ish.

At present, if you create a bunch of thumbs with the plugin at the designated default size and then alter the default profile, nothing happens to the TXP thumbnails. The only thing you’ll see is the admin-side adjust to use the new size.

In the next version I planned that if you create a bunch of thumbs with the plugin at the designated default size, TXP thumbs are automatically created and overwritten if they already exist. If you subsequently alter the default profile, nothing happens to the TXP thumbnails. Again, the only thing you’ll see is the admin-side adjust to use the new size. The only time the TXP thumbs will be altered is if you create a new (default) thumb, upload a new image or replace an existing image. At that point, the new default is in place so you get the new default sizing.

But I think I’ve had a customary change of heart.

If I could offer prefs to a) create, b) delete TXP thumbs along with the default profile then it adds some sorely missing functionality to TXP: namely the ability to mass-delete thumbnails. As it stands in TXP, you can only delete full-size images using the multi-edit tool. But if you were to tick the ‘yes, delete TXP thumbs too’ option and then deleted the default profile, all TXP thumbs would go as well. This might be a nice feature if you wanted to start afresh or something.

Since the tick boxes would always be available in the control panel you could choose to alter the TXP thumbs with changes to the default profile’s thumbs at will. Thus you could:

  1. Tick them both off: mimics the current plugin behaviour; TXP thumbs are ignored and remain as you have them
  2. Tick Create: allows TXP thumbs to be created when you upload a new image or replace a (default profile) thumb, or use Create All
  3. Tick Delete: allows TXP thumbs to be deleted when you delete an individual (default profile) thumb (in the edit panel) or en masse when deleting a profile

At any point, after you have maybe created the TXP thumbs at a given size, you can tick the checkboxes off and thus leave the TXP thumbs exactly as they are: even as far as not having them created when new images are uploaded (since the checkbox governs the creation and replacement process).

How does that sound?

EDIT: you can also bypass creation/deletion of default thumbnails (regardless of the checkbox setting) by temporarily disabling the default profile. Perhaps if the default profile is disabled I’ll grey out the checkboxes too since they will have no effect.

Last edited by Bloke (2010-11-10 12:41:55)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#28 2010-11-10 12:52:12

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Sounds good! Could you also use the tickboxes alongside every image to choose which image thumbs you wish to delete/create/change?


BB6 Band My band
Gud One My blog

Offline

#29 2010-11-10 13:00:54

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: smd_thumbnail: manage multiple thumbnails of your images

zero wrote:

Sounds good! Could you also use the tickboxes alongside every image to choose which image thumbs you wish to delete/create/

If you mean the ‘with_selected’ tickboxes alongside each TXP image, sadly they’re not available for plugin use. It’s one area I plan to visit in TXP 5 — opening that up to plugins to add new functionality to the dropdown (not sure if it can be done, but I’m going to try!)

The (new) smd_thumbnail tickboxes will only govern what happens to TXP thumbs when you do something with the default profile. In the meantime, if you wish to turn off creation/deletion/alteration of any smd_thumbnail images, just deactivate that profile while you interact with the image controls.

Does that sort of provide an answer?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#30 2010-11-10 13:14:24

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Yep, great stuff, Stef!


BB6 Band My band
Gud One My blog

Offline

#31 2010-11-10 16:55:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: smd_thumbnail: manage multiple thumbnails of your images

OK, have v0.12 and let me know how you get on.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#32 2010-11-10 17:32:59

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Strange, created the txp thumbs OK, I can see them in the images folder but <txp:article_image thumbnail="1" /> shows nothing even though <txp:article_image /> (using the tag in exactly the same place) shows me the correct full images. The only difference is the thumbnail="1"


BB6 Band My band
Gud One My blog

Offline

#33 2010-11-10 18:03:03

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: smd_thumbnail: manage multiple thumbnails of your images

Peter, have a look at the folder structure. Sorry, outdated.

Last edited by uli (2010-11-10 18:08:25)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#34 2010-11-10 18:46:53

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

My mistake, I’m using a test site, using all kinds of similar images and I picked the wrong ones to make thumbnails from. All seems to be working just great now I’ve tried again. :) :) :-)

EDIT: But I am getting this error message now that I didn’t get an hour ago: Warning: chmod() [function.chmod]: No such file or directory in /home/public_html/textpattern/lib/txplib_misc.php(638) : eval()’d code on line 210

although it doesn’t seem to affect anything.

EDIT 2: I forgot to mention that Uli’s request to be able to upload a thumbnail like previously still doesn’t work, but perhaps you haven’t looked at that yet.

Last edited by zero (2010-11-10 19:02:01)


BB6 Band My band
Gud One My blog

Offline

#35 2010-11-10 20:38:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: smd_thumbnail: manage multiple thumbnails of your images

I’ll look into the chmod warning. It should only be trying to do the chmod if the file already exists, and the fact it hasn’t affected anything means you can definitely write to the directories. Bizarre. I’ve either made a schoolboy error… or perhaps I’ll just silence the warning :-)

I’m also toying with idea of adding a confirmation dialog to the Create All button since it now has the ability to trash your TXP thumbs. Watch this space.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#36 2010-11-10 20:48:21

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: smd_thumbnail: manage multiple thumbnails of your images

uli wrote:

smd_thumbnail seems to disable the ability to replace a thumbnail with such an optimized one

I don’t get it. Are you saying that when you click an Image from the list to edit it, twist down the Thumbnails panel, select a profile size from the dropdown (or click an existing thumb) and hit Browse… that the image won’t load in?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB