Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#181 2012-09-11 19:11:27

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

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.

Txp Builders – finely-crafted code, design and Txp

Offline

#182 2012-09-11 20:44:37

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

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.

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: 77
Website

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&nbsp;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

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

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

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

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.

Txp Builders – finely-crafted code, design and Txp

Offline

#186 2013-01-14 12:09:18

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

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&nbsp;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

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

Re: smd_thumbnail: manage multiple thumbnails of your images

jstubbs wrote:

I thought as per the docs that if setting width="0" and height="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.

Txp Builders – finely-crafted code, design and Txp

Offline

#188 2013-01-14 13:00:02

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

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

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

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

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

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

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

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

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

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.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB