Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#181 2012-09-11 19:11:27
Re: smd_thumbnail: manage multiple thumbnails of your images
lithium002 wrote:
Is there something I’m doing wrong or is this just not compatible anymore? sigh
Doesn’t quite work under 4.5.0 I don’t think because the callbacks and plugin types changed. Shouldn’t be hard to fix, I’ll see what I can do tonight.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#182 2012-09-11 20:44:37
Re: smd_thumbnail: manage multiple thumbnails of your images
OK, try the version for 4.5.0. It’s only ‘beta’ because I haven’t actually installed it on my site yet, and the prefs/tools area is rather ugly at the moment until I can make the markup / CSS prettier. But it works. Please report anything good or bad here.
Features (some of which were introduced in the unreleased v0.23):
- Txp 4.5.0 only
- added mem_moderation_image support
<txp:smd_thumbnail>tag has form/container support- added
<txp:smd_thumbnail_info>tag - fixed image <-> select list interaction
- added better tooltip on thumb hover
- fixed beaucoup de invalid markup
Last edited by Bloke (2012-09-11 20:46:58)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#183 2012-12-04 03:02:07
- hidalgo
- Member
- From: Australia
- Registered: 2008-02-05
- Posts: 86
Re: smd_thumbnail: manage multiple thumbnails of your images
Hi Stef,
I’ve been using the smd_thumbnail v0.30 beta on a few Textpattern 4.5.2 sites and noticed that the <txp:smd_thumbnail /> tag is outputting some internal information on the public site.
For example, <txp:smd_thumbnail type="gallery-medium" /> outputs the following:
<img src="..." width="640" height="426" url="..." alt="" type="gallery-medium" name="image.jpg" category="gallery" category_title="Gallery" author="..." date="1320218742" class="gallery-medium" title="Image=977 × 650 Profile=640 × 426" style="">
Downgrading to v0.22 works as expected:
<img src="..." width="640" height="426" alt="" class="gallery-medium" style="">
Offline
#184 2012-12-08 10:49:01
Re: smd_thumbnail: manage multiple thumbnails of your images
Hey Stef, is the plugin working with yet 4.5.2+? Have a site with over 2000 images and 0.2.2 doesn’t seem to work well. Is the beta version of 0.2.3 the way to go, or?
Offline
#185 2012-12-08 19:03:27
Re: smd_thumbnail: manage multiple thumbnails of your images
jstubbs wrote:
Hey Stef, is the plugin working with yet 4.5.2+?
The beta 0.30 is 4.5.0 compatible. Give that a whirl.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#186 2013-01-14 12:09:18
Re: smd_thumbnail: manage multiple thumbnails of your images
Mmm. Getting odd output using the following:
<txp:smd_thumbnail type="medium" id="15" class="left" width="0" height="0" />
Outputs:
<img src="/images/medium/15.jpg" width="150" height="150" url="/images/medium/15.jpg" alt="" type="medium" name="name.jpg" author="author" date="2013-01-14 10:11:19" class="left" title="Image=800 × 600 Profile=150 × 150">
I thought as per the docs that if setting width="0" and height="0" that these attributes would be omitted?
Using 0.30.
Offline
#187 2013-01-14 12:40:57
Re: smd_thumbnail: manage multiple thumbnails of your images
jstubbs wrote:
I thought as per the docs that if setting
width="0"andheight="0"that these attributes would be omitted?
Ah, attributes for the plugin haven’t kept pace with the core’s attributes so width and height are not properly implemented. You’ll probably find if you put the site into Testing mode that the plugin throws a couple of ‘unknown attribute’ errors. Unfortunately it’s not as simple as just permitting those attributes, because of the way the core deals with the special case ‘0’ . Perhaps I need to rethink this bit of the plugin.
Last edited by Bloke (2013-01-14 12:41:25)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#188 2013-01-14 13:00:02
Re: smd_thumbnail: manage multiple thumbnails of your images
Bloke wrote:
You’ll probably find if you put the site into Testing mode that the plugin throws a couple of ‘unknown attribute’ errors. Unfortunately it’s not as simple as just permitting those attributes, because of the way the core deals with the special case ‘0’ . Perhaps I need to rethink this bit of the plugin.
Yep that’s just what I found! Due to the setting of height and width attributes the tag does not work on responsive sites : <txp:smd_thumbnail type="medium" id="15" class="left" width="0" height="0" />. Thanks for the update and will reconsider how to handle on this particular site….
Offline
#189 2013-01-14 13:36:08
Re: smd_thumbnail: manage multiple thumbnails of your images
jstubbs wrote:
Yep that’s just what I found! Due to the setting of height and width attributes the tag does not work on responsive sites :
<txp:smd_thumbnail type="medium" id="15" class="left" width="0" height="0" />. Thanks for the update and will reconsider how to handle on this particular site….
Hi Jonathan, maybe I’m wrong but doesn’t it work with:
img.medium {width=100%; height=auto;}
in your stylesheet … !?
Last edited by RedFox (2013-01-14 13:36:41)
Offline
#190 2013-01-14 15:01:42
Re: smd_thumbnail: manage multiple thumbnails of your images
Hi Joop, maybe it does, but that kind of adds an extra layer to a future workflow when the attribute is supposed to be based on the default thumbnail method. I may have to use your suggestion in the meantime though. Thanks for posting it!
Offline
#191 2013-01-14 16:08:39
Re: smd_thumbnail: manage multiple thumbnails of your images
All our hope centers* on Stef … ;-)
*Is this English?
Offline
#192 2013-01-14 16:49:29
Re: smd_thumbnail: manage multiple thumbnails of your images
RedFox wrote:
All our hope centers on Stef … ;-)
Then I fear our world is doomed ;-)
But, actually, I’m working on it now and trying to figure out why I made some of the coding decisions I made…
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#193 2013-01-14 17:33:44
Re: smd_thumbnail: manage multiple thumbnails of your images
Try the updated smd_thumbnail 0.30 with today’s date against it and see if that resolves the width/height issue.
I’m now wondering if the force_size attribute can be deprecated because you can get the same functionality by using the width/height attributes and setting them to empty '' if you want to use the dimensions stored in the database, or use '0' to omit one or the other value from the img tag.
Hmmmmm. I’ll leave it for now: if anyone can see a good reason for keeping it they can holler. If not, I’ll axe it.
Last edited by Bloke (2013-01-14 17:34:05)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#194 2013-01-14 17:52:31
Re: smd_thumbnail: manage multiple thumbnails of your images
What’s the deal with the titles?
title="Image=439 × 421 Profile=100 × 0"
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#195 2013-01-14 19:24:38
Re: smd_thumbnail: manage multiple thumbnails of your images
MattD wrote:
What’s the deal with the titles?
Ah, that was because someone mentioned that the tooltips on the admin side weren’t much use as it was difficult to tell what was the image’s actual size and the image’s profile size. So if there’s no caption associated with the pic, the default caption is the image data. Due to me using the same function for admin and public sides I guess the title is also showing there too huh? Pants.
Not the best thought through feature ever. Got any ideas on how it might be made more useful on both admin and public sides? Suppose I could make it a configurable string so at least you have a choice when using the default <img> tag. Of course you can always construct your own by using the <txp:smd_thumbnail> tag as a container and using the <txp:smd_thumbnail_info /> tag to display image profile data..
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline