Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#145 2012-01-04 20:59:34

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 741

Re: smd_thumbnail: manage multiple thumbnails of your images

A site with media queries, different column widths for desktop/tablet/mobile … Long shot – but any creative ideas on how to use this plugin to serve differently-sized images based on viewport?

Could output all thumbs, with a class, and hide unrequired sizes based on the media query … but I understand even if you hide an image via css, the browser will still load it

Offline

#146 2012-01-04 21:35:14

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

Re: smd_thumbnail: manage multiple thumbnails of your images

I did it like this combined with adi_mobile


Gud One Blog
Wondrous Healing Wondrous ways to a healthy old age

Offline

#147 2012-01-05 17:20:17

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,365
Website GitHub

Re: smd_thumbnail: manage multiple thumbnails of your images

In my current Google-esque fashion of making everything beta with six years of feature creep between releases, I’ve uploaded an interim version of smd_thumbnail with support for mem_moderation_image (i.e. when you Approve an image / image-wrapped-in-an-article you get thumbnails created).

I’ve also beefed up the <txp:smd_thumbnail> tag so you can use it with form/container and a new <txp:smd_thumbnail_info> tag to build up your own <img> tags instead of using the default template. I’ve not forgotten about your request, maniqui, so maybe if I get some time I’ll roll your ideas into this release too. Or maybe the next one. Will see how I get on.

Last edited by Bloke (2012-01-05 17:21:21)


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

#148 2012-01-12 15:43:19

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 233
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Rather than spend a long time trying to fiddle it, I thought I’d ask the expert :¬)

Stef – I already use the article image attribute for a article listings. I call this the ‘preview’. Each preview has a thumbnail. All other pictures are embedded into the post normally.

Using your rather wonderful smd_featured plugin, I’d like to populate a JQuery slider with ‘banner’ images, which are actually larger than the original ‘preview’.

I have the featured slider working with the ‘preview’ article images, but, they are not big enough (and a different ratio), would this plugin let me add an image, the ‘banner’, to a post, and call that for use with your smd_featured plugin?

Please say yes!

If not, perhaps I can implement it using a custom field to reference banner images, but that’s too ‘manual’ for my liking. Prefer admin/backend links :¬)

Last edited by rossharvey (2012-01-12 15:45:12)

Offline

#149 2012-01-12 15:55:40

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

I’m not Stef, but I say “yes”. It’s possible.
Do your experiments, and if still not working, come back with your findings :)
In any case, if you prefer to wait (not so) long enough, Stef may be able to give you a better (more complete) answer.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#150 2012-01-12 17:05:26

milosevic
Member
From: Madrid, Spain
Registered: 2005-09-19
Posts: 389

Re: smd_thumbnail: manage multiple thumbnails of your images

If you want to manage several size versions of your images, another way is to use a php script like timthumb.

Since I use it in one of my sites, I can show images with any width/height I desire in any place.


<txp:rocks/>

Offline

#151 2012-02-01 06:56:30

lithium002
Member
Registered: 2011-04-29
Posts: 25

Re: smd_thumbnail: manage multiple thumbnails of your images

I get the following errors when trying to create a thumbnail:

Warning: getimagesize(/images/33t.png) [function.getimagesize]: failed to open stream: No such file or directory in /textpattern/lib/class.thumb.php on line 87

Notice: Undefined index: image in /textpattern/lib/class.thumb.php on line 232

Warning: imagecopyresampled() expects parameter 2 to be resource, null given in /textpattern/lib/class.thumb.php on line 232

Notice: Undefined index: image in /html/textpattern/lib/class.thumb.php on line 277

Warning: imagedestroy() expects parameter 1 to be resource, null given in /textpattern/lib/class.thumb.php on line 277

I’m running PHP 5.3 and Textpattern 4.4.1. I feel like there might be some sort of permission issue but I haven’t been able to figure out what’s happening. Any help?

Offline

#152 2012-02-01 08:10:30

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

I’ve got the same problem.
I the tools/pref panel, do you create thumbnail from thumbnail?
Try changing that: create thumbnail from full size image.

Offline

#153 2012-02-02 03:49:32

lithium002
Member
Registered: 2011-04-29
Posts: 25

Re: smd_thumbnail: manage multiple thumbnails of your images

Yes!

That was it! Woohoo!

Awesome plugin.

Offline

#154 2012-02-12 19:38:12

lonelytraveller
Member
From: Firenze, Italy
Registered: 2008-04-04
Posts: 45

Re: smd_thumbnail: manage multiple thumbnails of your images

@rossharvey I’m using smd_thumbnail together with Stef’s wonderful smd_featured plug-in and this is the code I use to generate my slider:

<txp:smd_featured>
           <img src="<txp:smd_thumbnail type='cover' display='url' limit='1' id='<txp:custom_field name="article_image" />' />" title="#htmlcaption" /> 
      </txp:smd_featured>

Tht’s just what I need in my case, but you can easily adapt it to your needs. The only issue I noticed is that I need to specify the id parameter or else the image won’t show up, I don’t know if it’s the standard behaviour.

Offline

#155 2012-03-05 22:05:32

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Hi,

I’m getting this error:

Tag error: <txp:smd_thumbnail /> -> Textpattern Notice: Unknown image. on line 1262
textpattern/lib/txplib_misc.php(653) : eval()'d code:1262 trigger_error()
textpattern/publish.php:1188 smd_thumbnail()
textpattern/publish.php:1100 processTags()
textpattern/publish/taghandlers.php:2261 parse()
textpattern/publish.php:1188 body()
textpattern/publish.php:1100 processTags()
textpattern/lib/txplib_misc.php:1706 parse()
textpattern/publish.php:937 parse_form()
textpattern/publish.php:964 doArticle()
textpattern/publish.php:592 parseArticles()

I’m running 4.4.1 and PHP version: 5.2.17.

The plugin works in the Image tab perfectly but get the error above when using <txp:smd_thumbnail />.

Any ideas?

I’ve got the plugin running on other websites perfectly.

Offline

#156 2012-03-05 22:11:13

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

Re: smd_thumbnail: manage multiple thumbnails of your images

Can you post the code that generates this error?

Offline

Board footer

Powered by FluxBB