Textpattern Forum

You are not logged in. Register | Login | Help

#131 2011-08-16 15:29:17

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,176
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Thanks Stef, since my issue was with a javascript gallery going wonky in IE when the img tag included width and height, (no idea why, it was weird), I ended up just editing smd_thumnails to not output that part.


My Plugins

Piwik Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#132 2011-09-26 23:15:33

frickinmuck
Member
From: Vancouver, BC
Registered: 2008-05-01
Posts: 105
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

I love this plugin! I was wondering if it’s possible to use this with smd_gallery – I love the idea of being able to do something like this:

<txp:smd_gallery type="Large" thumblimit="1" />
<txp:smd_gallery type="Small" offset="1" />

to display the first image using the large thumbnail, the rest using the smaller thumbnail. Or is there a simpler way to do this that my limited faculties aren’t grasping at the moment?

Never mind. DUH. txp:images works for this. :^)

Last edited by frickinmuck (2011-09-26 23:35:23)


The AI does not hate you, nor does it love you, but you are made out of atoms which it can use for something else.

Offline

#133 2011-09-26 23:30:47

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

Re: smd_thumbnail: manage multiple thumbnails of your images

frickinmuck wrote:

I love this plugin!

Why, thank you.

I was wondering if it’s possible to use this with smd_gallery

Yes, you can do it with multiple galleries, or try this (untested) construct:

<txp:smd_gallery countform="1:thumb_large, :!1:thumb_small" [...other options...] />

Then in Form thumb_large:

<txp:smd_thumbnail type="Large" id="{id}" />

and of course a similar tag in thumb_small. The gallery tag’s countform should then execute thumb_large for only the first image and pass control to thumb_small for every image that isn’t the first. At least, in theory :-)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#134 2011-09-26 23:36:38

frickinmuck
Member
From: Vancouver, BC
Registered: 2008-05-01
Posts: 105
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

I just did it using txp:images, although I think your suggestion gives powerful options for other uses. Here’s what I used:

<txp:images limit="1"><a href="<txp:image_url />" rel="lightbox-inventory"><txp:article_image thumbnail="1" /></a></txp:images>
<txp:images limit="8" offset="1" wraptag="div" break="" >
     <a href="<txp:image_url />" rel="lightbox-inventory"><txp:smd_thumbnail type="Small" offset="1" /></a>
</txp:images>

(with Large set as the default size).

Last edited by frickinmuck (2011-09-26 23:38:01)


The AI does not hate you, nor does it love you, but you are made out of atoms which it can use for something else.

Offline

#135 2011-10-12 04:44:05

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 2,967
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Hi Stef,

Although I can’t find it now, I think you somewhere mentioned the issue related to Remora dropdowns being shown below the “Thumbnail Profiles” fieldset.
As it seems it’s not solvable via z-index dance (at least, not without also touching Remora’s CSS), I suggest this possible fix:

#smd_thumb_profiles { width:700px; margin:0 auto 18px; position:relative; }
(…)
.smd_thumb_btn { position:absolute; right:10px; top:-12px; text-align:center; padding:3px; }

Basically, it removes the position:relative on the fieldset, which solves any z-index issues between dropdowns and the fieldset. Then, it also removes the position:absolute from the “Tools / Prefs” button, so it shows just inside the fieldset.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#136 2011-10-12 10:50:55

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

Re: smd_thumbnail: manage multiple thumbnails of your images

Thanks maniqui. I’ve put that into v0.22. This release also brings:

  • New preference for creating thumbs from Txp’s main image or its thumbnail (thanks Gil / maniqui)
  • display attribute for choosing whether to output the thumbnail or a raw URL to the thumbnail so you can create your own <img> tag
  • Fix for using the plugin on an admin-side dashboard
  • Fix for jQuery 1.6+ (.attr() / .prop() resolution)

Let me know how this one fares.


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

Txp Builders – finely-crafted code, design and Txp

Offline

#137 2011-10-12 14:29:35

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 2,967
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Thank you, Stef.

New preference for creating thumbs from Txp’s main image or its thumbnail (thanks Gil / maniqui)

Please, could you refresh me a little about what this new feature does? I can’t recall what I may have requested in the past! :)

BTW, on a site where I’ve used smd_thumbnail, I’ve decided to change the way I’m (ab)using it.
I was using different smd_thumbnail profiles to store different versions (not just different sizes) of the “same” image. For example, different POVs or close-ups of the same product.
Although it seems a “clever” trick and it may work in some simple scenarios, it also adds some complexity: tacit rules, or risks of overwriting customized thumbnails on batch regeneration, etc.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#138 2011-10-12 14:43:55

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

Re: smd_thumbnail: manage multiple thumbnails of your images

maniqui wrote:

Please, could you refresh me a little about what this new feature does? I can’t recall what I may have requested in the past! :)

It was started by Gil with talk of making it work better with ebl_image_edit. Essentially if you have messed around with the cropping of your original Txp thumbnails by using ebl_image_edit, you can use those as the basis for new smd_thumbs instead of the main image.

different versions (not just different sizes) of the “same” image

Nice! If there’s anything you think the plugin could do to help in this regard let me know. I guess I could offer an option to turn off batch regeneration so you have less chance to clobber your thumbs. Then, as long as you have turned off the option to recreate thumbs on image replacement that’s a big step.


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

Txp Builders – finely-crafted code, design and Txp

Offline

#139 2011-10-12 15:02:57

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 2,967
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

maniquí wrote:

different versions (not just different sizes) of the “same” image

Bloke wrote:

Nice! If there’s anything you think the plugin could do to help in this regard let me know.

I will have to think a bit, but then, I think that the way I approached (different versions of the “same” image stored on each profile) is somehow flawed. It breaks (or brings too far) the “thumbnails” concept. If it’s a different image, then it should be uploaded as a new image.

That being said… it just occurred to me this: there is an “special case” that I’d like you to consider: rotated thumbnails. It seems to fall in the middle between “a different image” and “the same image”.

I foresee the ability of rotating thumbnails both on:

  • a per-image basis. You go to the Edit screen for a particular image, click on a particular thumbnail and then select to rotate it.
  • a per-profile option

In both cases, you have to consider that there are two possible orderings of the steps (rotate & create, create & rotate), so two possible different outcomes:

  • create the thumb for this profile and then rotate it, or
  • rotate the image and then create the thumb

La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#140 2011-10-12 20:35:46

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 542
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Bloke wrote:

Thanks maniqui. I’ve put that into v0.22. This release also brings:

  • New preference for creating thumbs from Txp’s main image or its thumbnail (thanks Gil / maniqui)

Sweet! :)
Thanks a lot!
I will give it a try sometime this weekend.

Offline

Board footer

Powered by FluxBB