Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#181 Today 14:23:28
Re: Automatic thumbnails for Textpattern
Callbacks added:
- (by ref)
txp.image/thumbnail.paramsis passed the$paramsarray and$thumbnail(the type: 0, 1, or 2) so plugins can take action only on a certain type of thumbnail access, or can inject parameters for fullsize images too. txp.image/url/thumbnailis passed the current URL, the image object, the$params, and$thumbnail(the latter in case you want to switch on it without having to add individual handlers for each type of thumbnail).
I did some rudimentary tests and it gives some nice powers to plugins to play with the generated thumbs, and to change things.
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 Today 14:28:30
Re: Automatic thumbnails for Textpattern
etc wrote #341752:
It complains about type mismatch.
That’ll probably be because of the SLIRImageLibrary interface, which will also need its signature changing.
The out of memory is probably due to a large source image. It’s not very robust with big files, which is something we can look at later. I managed to max out my hosts’ maximum 256MB php.ini setting generating a thumb on a smallish 3000px square image.
As long as it works for now, on regular size (not HD) pics, we can refine it and optimise it in future. Unless you happen to know some memory-saving tricks when creating thumbs (because class.thumb.php manages it on largish pics so we might be able to copy code over).
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 Today 15:59:39
Re: Automatic thumbnails for Textpattern
Okay, I reverted the transparency tweaks I made since they broke the ability for /w400-b0e56ae/NN.ext style URLs to add backgrounds to transparent images.
I guess the patch they supplied wasn’t battle tested (or I misinterpreted it, but I did try it a few ways, including directly copying it over in case my tweaks broke it). Neither worked, so we’ll rethink it.
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