Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#241 2013-10-11 12:35:54

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: smd_thumbnail: manage multiple thumbnails of your images

I’m sorry Stef, but I can’t retrieve anything :(

Neither

<txp:images><txp:smd_thumbnail type="my-type"><txp:smd_thumbnail_info item="caption" /></txp:smd_thumbnail></txp:images>

or

<txp:images><txp:smd_thumbnail type="my-type" debug="1" ><txp:smd_thumbnail_info /></txp:smd_thumbnail></txp:images>

Last edited by Pat64 (2013-10-11 12:36:08)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#242 2013-10-11 12:59:09

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

Re: smd_thumbnail: manage multiple thumbnails of your images

Pat64 wrote:

I’m sorry Stef, but I can’t retrieve anything :(

Hmmmm. the container tag doesn’t have any debug associated with it, sorry for the bad info.

But I made myself an article on my site, put an article image ID in the field and used this tag in my default Form:

<txp:images>
   <txp:smd_thumbnail type="Large">
      <txp:image />
      <txp:smd_thumbnail_info item="title" />
   </txp:smd_thumbnail>
</txp:images>

And I saw the image and its caption. Note the name of the item="title" (not caption). I should probably make that a synonym in the code. And also ensure that the type is spelled exactly as your profile name, including case. If it’s not either of those, I’m not sure what it could be.

If you get rid of the smd_thumbnail and use txp:thumbnail, do you see the article image?

Last edited by Bloke (2013-10-11 13:01:44)


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

#243 2013-10-11 13:09:38

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: smd_thumbnail: manage multiple thumbnails of your images

Stef: now you understand why I’m never a candidate for the famous TXP tv game “You’re the best”.
Really, I’m a very poor TXP user. Shame on me :(

Thanks lot, man. You help me lot. A very great and useful plugin for “Responsive” websites.

All: YOU must use all smd_magic_plugins.

Last edited by Pat64 (2013-10-11 13:12:18)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#244 2013-10-12 16:33:05

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: smd_thumbnail: manage multiple thumbnails of your images

Stef, I’m very sorry to ask you for the second time.

I’m a little bit confusing with your plugin (as you notice).
I need a solution coz all native TXP image tags are unavailable with your plugin.

I try to display an image (if there is) before each article links.

Here what is my form:

<li class="col six <txp:if_first_article>alone </txp:if_first_article>tablet-full mobile-full">
<txp:images>
  <txp:smd_if_thumbnail type="vignettes">
     <txp:smd_thumbnail>
        <img src="<txp:smd_thumbnail_info item="url" />" />
     </txp:smd_thumbnail>
  </txp:smd_if_thumbnail>
</txp:images>
 <a href="<txp:permlink />"><txp:title /></a>
</li>

I’ve got the corresponding thumbnail images but only for the article which has one. Otherwise, if an article hasn’t an associated image all the thumbnails are displayed.
So I want to have a test if an image exists.

?


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#245 2013-10-12 16:35:16

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

Re: smd_thumbnail: manage multiple thumbnails of your images

Pat64 wrote:

So I want to have a test if an image exists.

if_article_image ?


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

#246 2013-10-12 18:48:58

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: smd_thumbnail: manage multiple thumbnails of your images

Ok.
Starting with <txp:if_article_image> I removed all the <txp:smd_if_thumbnail> tags (sorry for that) and all is fine, now !
Wow (laborious!).

Tks Stef ;)
Have a nice Sunday.
Cheers,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#247 2014-02-19 05:35:30

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Would like to test drive smd_thumbnail.
However…
After installation, I click on Thumbnail profiles in the images tab, but nothing happens. I tried it in Safari and Google Chrome. Any suggestions?

smd_thumbnail 0.30
txp 4.5.5


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#248 2014-02-19 22:34:03

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

Re: smd_thumbnail: manage multiple thumbnails of your images

Kjeld wrote #279080:

I click on Thumbnail profiles in the images tab, but nothing happens.

Very strange. I just installed that version on a clean 4.5.5 and it twists down the thumbnail panel correctly ready for me to create a thumbnail profile: in OSX Chrome and Firefox, at least.

I presume you’ve force-refreshed your browser page to eliminate any stale JS code. Could be a plugin bug, maybe a site language thing I’m not doing right. Any possibly related errors in your error_log files that might give me a clue where to start looking?


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

#249 2014-03-04 03:10:34

hurty
Member
Registered: 2004-07-17
Posts: 28

Re: smd_thumbnail: manage multiple thumbnails of your images

Nice plugin. I don’t want to create thumbnails that are larger than the image being uploaded so I changed this setting in the plugin:

$t->extrapolate = false; 

That half solves my problem. Now, when a new image is uploaded the UI still shows the thumbnails being created at the larger image sizes, giving one the impression that the large thumbnails will be created. When saving, though, the images are saved at the same size as the primary image.

For example, I created two thumbnail sizes:
Lg — 500px wide
Med — 200px wide

I uploaded an image that is 150px wide. The “Thumbnails” section of the edit image screen shows the two larger versions of the image, but when I click save then browse to either of the new thumbnail images in the /images/Lg/ folder or /images/Med/ folder I see an image that is 150px wide. I am happy that the images saved are not resized to larger dimensions than my original uploaded file. What I’m struggling with is that the UI shows me two larger images in the thumbnails section. Frankly, if I were the only user uploading images I wouldn’t care — I understand what’s going on and I can ignore the large thumbnails. But the other content editors of the site are confused by the large thumbnails when they upload a small image.

Is there a setting I can change in the plugin that changes this behavior?

Offline

#250 2014-03-04 08:51:26

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

Re: smd_thumbnail: manage multiple thumbnails of your images

hurty wrote #279401:

Is there a setting I can change in the plugin that changes this behavior?

Not at present, sorry. But the problem you describe is one I’ve come across before and you’re right, there ought to be a better way to handle it. I can certainly explose the ‘extrapolate’ switch to the UI. Should that be a global switch for all profiles, or per profile do you think?

With regards images that are larger than the original and would thus either be scaled up (if extrapolate was on) or would be rendered larger by the browser by virtue of having the width / height attributes added to the img tag, how would you propose the best way forward would be, not just for your particular situation but for the user base in general?

Off the top of my head, this could be done with a setting (either global or per-profile, not sure) that states “allow images larger than the original”. This could actually be tied to the extrapolate switch. If the pref is set on, extrapolate is set to false by default. Anyway, when it comes time to render the images, any images that are affected by the pref do NOT use the profile’s width and height but revert to the thumbnail’s actual width and height.

Whether this affects just the default profile for display on the Images panel, or if it also applies to images on the public side I don’t know yet. My gut feeling is that you can already do this with <txp:smd_thumbnail> by specifying width="0" height="0" to turn off output of HTML width/height attributes which should render the image as-stored, but maybe there needs to be some other attribute to help control it better. If just the default profile needs to be sensitive to this setting on the admin side, a global setting is good enough because there can be only one default profile.

I’ve not thought it through fully yet so there may be a better way to handle it. What are your (or anyone’s) thoughts on something like this? Any clever ways to handle such situations that are broadly applicable to many use cases of the plugin?


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

#251 2014-04-01 07:42:37

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Hey Stef – I am having a few problems with (the now awesome) smd_thumbnail & bot_image_upload (also awesome) – Both plugins work independently of each other – but if I use bot_image_upload to edit an image or try to upload an image, I get the spinning ball annoying thing & it just hangs. If I turn off smd_thumbnail it works again

I don’t expect u to jump on this and come up with a super fix – because it maybe they are not working together, or it is a txp security thing.

As far as I can tell bot_image_upload is opening the image page in an iframe & all the links are the same format.

?event=image&step=image_edit&id=221&sort=id&dir=desc&page=1&search_method=&crit=

It also logs my session out – which makes me think its some kind of txp iframe security thing?

Any ideas??

Offline

#252 2014-04-01 09:33:20

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

Re: smd_thumbnail: manage multiple thumbnails of your images

tye wrote #280000:

It also logs my session out – which makes me think its some kind of txp iframe security thing?

Weird. No ideas at the moment. Never used bot_image_upload with smd_thumbnail. I’ll check it out later. Which versions of the plugins (and Txp) are you running?


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